I recently got a CatGenie 60 from eBay with the intention of modifying it.
I decided to mount the Arduino inside the CatGenie PU instead of inside the cartridge, so it would be an 'always full' system. I connected a continuous siphon into a bottle of Simple Green and I will need to check the bottle.
I simply opened up the PU, slid the spades off from the rear of the cartridge slot, and soldered my wires on. If I weren't so lazy, I could have bought some male spades of the correct size but I'm not overly worried about warranty (if you were, this would be a 'neat' way to do things.)
I decided to cut the EEPROM off a used cartridge, because I was having issues with the notorious pin contact problem. I soldered wires from the Arduino to the EEPROM, and from the EEPROM to the spades.
I hot glued all the solder joints, then wrapped the EEPROM in electrical tape, then wrapped electrical tape around both the Arduino and the EEPROM to make a neat little bundle, leaving only the USB connector exposed. I was able to tuck it in next to the cartridge slot, and it sits there fine.
I may end up modifying one of my cartridges so that it sits flush with the top of the slot, put a 1/4 od connector on it and mount the Arduino in there with some sort of plug (maybe I will get those spades..,) but for now I'm more than happy with the setup.
I loaded on one of the 240 refill sketches, and was having issues with it beeping every now and again and complaining that the cartridge was empty. I looked through the code, and I'm not a fantastic programmer but I made some modifications to it:
#include <EEPROM.h>
#include <Wire.h>
#define CG (B1010000)
boolean resetSuccess = false;
int isReset = 13;
//set to the number of refills you want to program into the cartridge:
int numberRefills = 240;
int byteArray []= {01, 01, 01, numberRefills, numberRefills, numberRefills, numberRefills, numberRefills, 240, 8, 8, 8, 33, 33, 33, 240};
void setup()
{
pinMode(isReset, OUTPUT);
digitalWrite(isReset, LOW);
Wire.begin(); // join i2c bus (address optional for master)
}
void loop()
{
if (verifyCartridge())
{
// do nothing, we're already full.
} else
{
if (Wire.receive() == 0)
{
resetCartridge();
resetSuccess = verifyCartridge();
digitalWrite(isReset, resetSuccess);
} else
{
// do nothing. I don't want to reset until we're empty. That way we get a warning beep when it's close to empty.
}
}
}
void resetCartridge()
{
for (int i=3; i < sizeof(byteArray)/2; i++)
{
Wire.beginTransmission(CG);
Wire.send(i);
Wire.send(byteArray[i]);
Wire.endTransmission();
delay(4);
}
}
void movePointerTo(int deviceAddr, int memoryAddr)
{
Wire.beginTransmission(deviceAddr);
Wire.send(memoryAddr);
Wire.endTransmission();
}
boolean verifyCartridge()
{
boolean success = true;
movePointerTo(CG, 3);
Wire.requestFrom(CG, 3);
while (Wire.available())
{
if (Wire.receive() == numberRefills && success == true)
{
// looking good so far
} else {
success = false;
}
}
return success;
}
The differences between this and other sketches I've seen is that you need only change the numberRefills variable to set the refill value, rather than a few parameters. Not groundbreaking, but handy.
I have also set this sketch up such that it will not reset the cartridge until it has 0 cycles remaining. The reason for this is that I want a warning beep every 240 cycles so that I know to check my bottle of Simple Green. I'm definitely the sort of person to forget about it.
If I have any problems, I'll post them here, but so far so good after 5 days running 2 to 3 times per day.
If anyone wants pictures, let me know.
