author
2Comments

Tell us about yourself!

  • The 120 uses RFID from what I believe and cannot be reprogrammed. There is a chip if you google cartridge genius that works fine. I'm still running my CG60 with the arduino and a 120 with his chips. Almost 2 years, no solution, water only.

    View Instructable »
  • CatGenie: a Smart, Resettable SaniSolution Cartridge

    It was overwhelming at first, but for a $15 arduino uno kit on Amazon that came with wires and LEDs, and a cheap soldering Iron I was able to make this. I've never soldered or used the Arduino. It took me about 3-4 days of youtube and google, but I was able to do it. It probably would have gone faster had I read msisaac comments first. YES THE PINOUTS ARE WRONG. I have attached a photo with my CG60 cartridge with the proper labels and hopefully a clear wiring diagram attached.I have also modified the code as theres a few items that don't work like wire.read and wire.writeI also just make the Arduino flash the cartridge every 7 days and leave the green LED on once its finished so I know its been flashed. If its flashing any other order or the red LED is lit, I know there was an issue. For …

    see more »

    It was overwhelming at first, but for a $15 arduino uno kit on Amazon that came with wires and LEDs, and a cheap soldering Iron I was able to make this. I've never soldered or used the Arduino. It took me about 3-4 days of youtube and google, but I was able to do it. It probably would have gone faster had I read msisaac comments first. YES THE PINOUTS ARE WRONG. I have attached a photo with my CG60 cartridge with the proper labels and hopefully a clear wiring diagram attached.I have also modified the code as theres a few items that don't work like wire.read and wire.writeI also just make the Arduino flash the cartridge every 7 days and leave the green LED on once its finished so I know its been flashed. If its flashing any other order or the red LED is lit, I know there was an issue. For the cost of 1 CG cartridge, I bought the arduino and soldering iron. I'm not running it with any solution, just water. There isnt even a bag in the box.#include <Wire.h>// The cartridge's I2C address#define CG (B1010000)boolean resetSuccess = false;int line_LED1 = 11;int line_LED2 = 12;int line_SW1 = 2;int byteArray []= { 01, 01, 01, 60, 60, 60, 60, 60, 60, 8, 8, 8, 33, 33, 33, 255};// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15void setup(){ Serial.begin(115200); Serial.print("CatGenie reset application\n"); // Configure the LED output pinMode(line_LED1, OUTPUT); digitalWrite(line_LED1, LOW); pinMode(line_LED2, OUTPUT); digitalWrite(line_LED2, LOW); pinMode(line_SW1, INPUT); // Uncomment this to run standalone - either with external power // or via USB Wire.begin(); // Uncomment this (and comment out the above) when running via the // Catgenie. This will enable the Arduino as a slave on the I2C bus// Wire.begin(3); for(int n = 3; n; n-- ) { flash1(1); flash2(1); }}void flash1(int n){ while( n-- ) { digitalWrite(line_LED1, HIGH); // sets the LED for 1/8 second delay(125); digitalWrite(line_LED1, LOW); // sets the LED off for 1/4 second delay(250); }}void flash2(int n){ while( n-- ) { digitalWrite(line_LED2, HIGH); // sets the LED for 1/8 second delay(125); digitalWrite(line_LED2, LOW); // sets the LED off for 1/4 second delay(250); }}void loop(){ resetCartridge(); if( verifyCartridge() ) { flash2(3); digitalWrite(line_LED2, HIGH); delay (1000); digitalWrite(line_LED2, LOW); } else { flash1(3); digitalWrite(line_LED1, HIGH); delay (1000); digitalWrite(line_LED1, LOW); }}void resetCartridge(){ Serial.println("This is where we would wait for a button press if we used a button"); // Wait until the switch line goes high. If you have a // normally-closed button, we need to wait for it to go low // instead so change LOW here to HIGH. while( digitalRead(line_SW1) == HIGH ); // No button needed, so we set it to HIGH digitalWrite(line_LED1, HIGH); digitalWrite(line_LED2, HIGH); for (int i=0; i < 16; i++) { Serial.println("Begin Transmission"); Wire.beginTransmission(CG); Wire.write(i); Wire.write(byteArray[i]); Wire.endTransmission(); Serial.print(" - sent byte " ); Serial.print(i); Serial.print(" = " ); Serial.println(byteArray[i]); delay(4); } Serial.println("Cartridge reset"); //all is good so turn the GREEN LED on digitalWrite(line_LED1, LOW); //digitalWrite(line_LED2, LOW); Serial.println("Waiting 7 days"); delay(604800000); Serial.println("The wait is over");}void movePointerTo(int deviceAddr, int memoryAddr){ Wire.beginTransmission(deviceAddr); Wire.write(memoryAddr); Wire.endTransmission();}boolean verifyCartridge(){ Serial.println("Verifying..." ); boolean success = true; movePointerTo(CG, 0); Wire.requestFrom(CG, 16); int tries = 5; int avail; while( tries-- ) { if( avail = Wire.available() ) { Serial.print("There are " ); Serial.print(avail); Serial.print(" bytes available\n"); break; } Serial.print("No data available, sleeping... \n"); delay(4); } if( tries <= 0 || avail != 16 ) { Serial.print("Failed to get data\n" ); success = false; } else { for (int i=0; i < 16; i++) { int n = Wire.read(); if( n != byteArray[i] ) { Serial.print("Byte "); Serial.print(i); Serial.print(" is invalid, got "); Serial.print(n); Serial.print(", wanted "); Serial.println(byteArray[i]); success = false; } else { Serial.print("Byte "); Serial.print(i); Serial.print(" OK, got "); Serial.println(n); } } } if( success ) { Serial.println("Verified OK" ); } else { Serial.println("Validation FAILED"); } return success;}

    View Instructable »