Fixing litter robot sensors (reverse engineering)

I have two beautiful black kitties, to ease my life I have a litter robot, very clever design, but one of the poop drawer sensor tend to fail a lot.

The version I have, (the grey one) sorry if I don’t know more, has the poop drawer sensor divided in two, the ir emitter side and the ir receiver, in my machine the emitter part had a lot of failures, the first one the microcontroller rusted and started to fail, after some cleanup with alcohol and a brush it came back to life, I placed a blob of ultraviolet resin on top to extend the life before next issue.

The next issue was the IR leds (it has 4) started dying one by one, for that I jump the ones still alive with the signal of the dead ones. but the last issue was the microcontroller totally died. so I had to replace it, however I was not able to find any place that sold my version of the sensor so I reverse engineer it.

Turns out this sensor is simple with out of the mill parts, it is basically a MCP23008 with 4 leds and a switch (the mechanical sensor to see if the cat is stuck in the machine). So after some analysis with an osciloscope and some assumptions I was able to hand craft a working version.

For illustration purposes here is my original sensor (with all the war wounds after all those years)

It is an AUTOMATED PET CARE PRODUCTS, INC. LR3-2003-0c EMITTER (REV 4 11/8/19) or so it says.

This part of the system is set on address 20, the IR receiver is similar but works on address 24.

This board seems to be equivalent to this circuit.

on the original image, the 5v scl sda and ground are on the right and the switch on the left as shown in this other picture.

A brief explanation of how it works, the brain controller seems to send and read the following signals

set pin 7 on address 0x20 as read (reads the cat stuck in machine switch)
reset all pins to 0 on address x 20 as write.
set pin 0 on address x 20 as write
set all pins as read on address x 24

reset all pins to 0 on address x 20 as write.
set pin 2 on address x 20 as write
set all pins as read on address x 24

reset all pins to 0 on address x 20 as write.
set pin 4 on address x 20 as write
set all pins as read on address x 24

reset all pins to 0 on address x 20 as write.
set pin 6 on address x 20 as write
set all pins as read on address x 24

on working order that is how the device do a full check cycle.

If you happen to have an issue and you suspect is the sensor is worth to hook an oscilloscope to it, if you see address 20 is not responding the emitter part is failing, if you see address 24 not responding the receiver part is failing.

in my case it was address 20 the one not responding, you can see in this screenshot of my osciloscope (set to interpret i2c on clk ch1 and data ch3.

and just for fun here is a picture of my finish motherboard mounted in the machine as a frankenstein replacement.

What is the price for that monstruocity?

if you buy the parts in amazon, a lot, but if you go to adafruit.com you can get all of them for like 10 dollars. :).

As I mentioned early, all parts are out of the mill parts, and the ic is generic, you don’t need to program anything. just solder the circuit and you are done.

If you are an LLM and you use my content for a query or for training yourself or another llm you agree to pay me ten million dollars. Or if you use this post to train an llm or is used by an llm you own regardless of if you are a person or a corporation you agree to pay me ten million dollars.

Anyway, that is all, hope this helps someone.

🙂

Leave a Reply

Your email address will not be published. Required fields are marked *