Step 6:

Using the cartridge

Put the cartridge back together and insert it into the Catgenie.

The Arduino should get power from the Catgenie and boot the program we uploaded to it earlier.  It will flash its LEDs several times, and respond to the button press as it did when we were testing it using USB earlier.


The obvious fault with this design is that the Catgenie no longer dispenses any cleaning solution.  I will work through the options for this over the next few weeks and will update this Instructable when I've found something that works.


It would be great to see how other people get on with this.  If anything needs to be explained in more detail or if I've made any stoopid errors please let me know.

It would also be good to hear from anyone who can get the Catgenie working with plain EEPROM chips, or can get the Arduino to behave as the cartridge.  Its a mystery to me why those approaches didn't work out.

<p>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 <a href="https://www.instructables.com/member/msisaac" rel="nofollow">msisaac</a> 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.</p><p>I have also modified the code as theres a few items that don't work like wire.read and wire.write</p><p>I 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.</p><p>#include &lt;Wire.h&gt;</p><p>// The cartridge's I2C address</p><p>#define CG (B1010000)</p><p>boolean resetSuccess = false;</p><p>int line_LED1 = 11;</p><p>int line_LED2 = 12;</p><p>int line_SW1 = 2;</p><p>int byteArray []= {</p><p> 01, 01, 01, 60, 60, 60, 60, 60, 60, 8, 8, 8, 33, 33, 33, 255};</p><p>// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15</p><p>void setup()</p><p>{</p><p> Serial.begin(115200);</p><p> Serial.print(&quot;CatGenie reset application\n&quot;);</p><p> // Configure the LED output</p><p> pinMode(line_LED1, OUTPUT);</p><p> digitalWrite(line_LED1, LOW);</p><p> pinMode(line_LED2, OUTPUT);</p><p> digitalWrite(line_LED2, LOW);</p><p> pinMode(line_SW1, INPUT);</p><p> // Uncomment this to run standalone - either with external power</p><p> // or via USB</p><p> Wire.begin();</p><p> // Uncomment this (and comment out the above) when running via the</p><p> // Catgenie. This will enable the Arduino as a slave on the I2C bus</p><p>// Wire.begin(3);</p><p> for(int n = 3; n; n-- ) {</p><p> flash1(1);</p><p> flash2(1);</p><p> }</p><p>}</p><p>void flash1(int n)</p><p>{</p><p> while( n-- ) {</p><p> digitalWrite(line_LED1, HIGH); // sets the LED for 1/8 second</p><p> delay(125);</p><p> digitalWrite(line_LED1, LOW); // sets the LED off for 1/4 second</p><p> delay(250);</p><p> }</p><p>}</p><p>void flash2(int n)</p><p>{</p><p> while( n-- ) {</p><p> digitalWrite(line_LED2, HIGH); // sets the LED for 1/8 second</p><p> delay(125);</p><p> digitalWrite(line_LED2, LOW); // sets the LED off for 1/4 second</p><p> delay(250);</p><p> }</p><p>}</p><p>void loop()</p><p>{</p><p> resetCartridge();</p><p> if( verifyCartridge() ) {</p><p> flash2(3);</p><p> digitalWrite(line_LED2, HIGH);</p><p> delay (1000);</p><p> digitalWrite(line_LED2, LOW);</p><p> } else {</p><p> flash1(3);</p><p> digitalWrite(line_LED1, HIGH);</p><p> delay (1000);</p><p> digitalWrite(line_LED1, LOW);</p><p> }</p><p>}</p><p>void resetCartridge()</p><p>{</p><p> Serial.println(&quot;This is where we would wait for a button press if we used a button&quot;);</p><p> // Wait until the switch line goes high. If you have a</p><p> // normally-closed button, we need to wait for it to go low</p><p> // instead so change LOW here to HIGH.</p><p> while( digitalRead(line_SW1) == HIGH ); </p><p> // No button needed, so we set it to HIGH</p><p> digitalWrite(line_LED1, HIGH);</p><p> digitalWrite(line_LED2, HIGH);</p><p> for (int i=0; i &lt; 16; i++)</p><p> {</p><p> Serial.println(&quot;Begin Transmission&quot;);</p><p> Wire.beginTransmission(CG);</p><p> Wire.write(i);</p><p> Wire.write(byteArray[i]);</p><p> Wire.endTransmission();</p><p> Serial.print(&quot; - sent byte &quot; );</p><p> Serial.print(i);</p><p> Serial.print(&quot; = &quot; );</p><p> Serial.println(byteArray[i]);</p><p> delay(4);</p><p> }</p><p> Serial.println(&quot;Cartridge reset&quot;);</p><p> //all is good so turn the GREEN LED on</p><p> digitalWrite(line_LED1, LOW);</p><p> //digitalWrite(line_LED2, LOW);</p><p> Serial.println(&quot;Waiting 7 days&quot;);</p><p> delay(604800000);</p><p> Serial.println(&quot;The wait is over&quot;);</p><p>}</p><p>void movePointerTo(int deviceAddr, int memoryAddr)</p><p>{</p><p> Wire.beginTransmission(deviceAddr);</p><p> Wire.write(memoryAddr);</p><p> Wire.endTransmission();</p><p>}</p><p>boolean verifyCartridge()</p><p>{</p><p> Serial.println(&quot;Verifying...&quot; );</p><p> boolean success = true;</p><p> movePointerTo(CG, 0);</p><p> Wire.requestFrom(CG, 16);</p><p> int tries = 5;</p><p> int avail;</p><p> while( tries-- )</p><p> {</p><p> if( avail = Wire.available() )</p><p> {</p><p> Serial.print(&quot;There are &quot; );</p><p> Serial.print(avail);</p><p> Serial.print(&quot; bytes available\n&quot;);</p><p> break;</p><p> }</p><p> Serial.print(&quot;No data available, sleeping... \n&quot;);</p><p> delay(4);</p><p> }</p><p> if( tries &lt;= 0 || avail != 16 )</p><p> {</p><p> Serial.print(&quot;Failed to get data\n&quot; );</p><p> success = false;</p><p> } else {</p><p> for (int i=0; i &lt; 16; i++)</p><p> {</p><p> int n = Wire.read();</p><p> if( n != byteArray[i] ) {</p><p> Serial.print(&quot;Byte &quot;); Serial.print(i);</p><p> Serial.print(&quot; is invalid, got &quot;); Serial.print(n);</p><p> Serial.print(&quot;, wanted &quot;); Serial.println(byteArray[i]);</p><p> success = false;</p><p> } else {</p><p> Serial.print(&quot;Byte &quot;); Serial.print(i);</p><p> Serial.print(&quot; OK, got &quot;); Serial.println(n);</p><p> }</p><p> }</p><p> }</p><p> if( success ) {</p><p> Serial.println(&quot;Verified OK&quot; );</p><p> } else {</p><p> Serial.println(&quot;Validation FAILED&quot;);</p><p> } </p><p> return success;</p><p>}</p>
<p>If anyone cares...I found a temporary solution... for CatGenie 120..haven't tried on CG60</p><p>1. Take empty/full cartridge (shouldn't matter) and pull it out of the machine.</p><p>2. Insert cartridge and wait for lights to register and immediately press start until you hear the beep and genie starts up.</p><p>3. Pull out cartridge right after the genie starts.</p><p>You will have lights indicating no cartridge, but it will do the whole cycle anyway...The sanisolution is only added in the drying cycle so it's just for scent (it does help improve the smell a lot!!!)</p><p>I saw a post somewhere where someone was doing this...I ordered an Arduino chip and figured out after that it only works on the cg60 NOT 120 :(</p><p>I have been doing this with an &quot;empty&quot; cartridge for a while and it continues to work...possibly due to the CG not having time to recognize the cartridge level, but still enables the start function because it &quot;sees&quot; a cartridge in place for that 1 second.</p><p>I have yet to get a new cartridge to see if this process actually uses up the cycles stored in the cartridge...Try it out and let me know how it goes...You can't lose because it should work with spent cartridges as well</p>
If there is any chance of me buying one of these units from you please contact me at tammymnephin@gmail.com :)
Any possibility of buying one of these from you?
<p>Any interest in building one and selling it to me? At the moment, $ are more available than time. </p>
<p>Does anyone have a link to the code? The above link doesn't have a sketch in it.</p>
<p>Fixed... should be there now.</p>
<p>Did you set up your cartridge to use external solution? If so, any tricks or just plumb directly to the nipple and have the bottle of solution about level with the cartridge? Thanks.</p>
<p>Thank you! I had to change some syntax, but it's uploaded fine now.</p>
<p>Just a simple but fundamental question: does this project work with the CatGenie 120 or its only for the old CG60?</p><p>Thanx for the answer.</p>
<p>For the 60 only I'm afraid.</p><p>I owned a 120 after the 60, and didn't persue a cartridge hack for that as the cost point for the 120 cartridges is much less, especially using some of the extra cleaning modes that model supports.</p>
<p>I would bet by know you have gotten your answer, but in case you haven't this only works for the CG60. CG corporate got wise to this and changed to a RFID chip. Spoiled everyone's fun. </p>
<p>Contact me, I'd be willing to pay for this device as CatGenie has basically stopped selling the 60 cartridge. My email is hedst028@umn.edu. Thanks.</p>
<p>I am looking for some one who can make me one of these things. i have 2 extra cartridges. the instructions are great its just me....i dont get this sort of thing at all. can i please buy one of these devices? gene32@comcast.net</p>
<p>I am just overwhelmed reading this! Could someone just make one for my cat genie 120 and I can pay through paypal?</p>
<p>I would bet by now you have your answer, but in case you haven't this only works for the CG60. CG corporate got wise to this and changed to an RFID chip. Spoiled everyone's fun. </p>
<p>I NEED HELP, PLEASE! Lol, man oh man, Ive been trying code after code in my Arduino, and trying different setups. Can I exchange emails with someone and get some help finishing this project?</p><p>Thank you!</p><p>AdventureJohnson at gmail.com</p>
I spent a few hours troubleshooting my cartridge using this tutorial. No matter what I did, as soon as I pressed the button, both LEDs would light up and stay solid. No debugging info in the console. I verified that it was failing on the Wire.endTransmission(); line. After banging my head against the wall, I finally noticed that the contacts on the cartridge chip are labeled differently in the very first picture of the tutorial and the &quot;soldered&quot; picture. In the soldered picture, the contacts are labeled with +5 volt at the top, then GND, then SCL, and SDA at the bottom. In the first picture, the labels are reversed, with +5 volt at the bottom, then GND, then SCL, and SDA at the top. When I rewired the insides according to the labels in the first picture, the cartridge worked like a charm. The correct debugging info showed up in the console and the LEDs worked correctly. So if anyone is having the same problems I had, change the wiring according to the labels in the first picture.
Great stuff man. I was already a user of the previous resetting system. I adapted your proposal to my previous settings. Now, &Atilde; have an arduino on the side of my catgenie. It is directly linked to the cartridge holder connectors. I also modified your script in order for the arduino to reset automatically the cartridge frequently (no more button). Indeed, it is easy to notice when your cartridge is empty ... it smells lot more and no bubble during washing process :) Thus, solution is (as far as the cartridge is not really empty) dispensed and no more beeps ... love it ! <br> <br>Thx again for this great tuto
I was thinking of the same thing. I was going to change the program to emmulate a button push when it got down to 1. Can you post your sketch that you used?
Looks wonderful. Do you have a solution to the Cat Genie 120? I understand they have some new type of chip in it to prevent this type of re-setter from working. <br /> <br />By the way I have stopped refilling the cartridges because I found that just using a spray bottle with some Simple Green or other favorite cleaner during the cleaning cycle is much easier than filling the cartridge. Even running it with no cleaning solution is far better than my old dirty litter box.
i have the cg 60 can any one please help me i needa reset i lost my job please help im in need heidi
I have been resetting my cartridges externally for awhile now and want to use a built in design like this. Using the other design I had the 5+, ground, clock, and data lines reversed on the cartridge. Basically the same as this one but going from bottom to top. Can I get some clarification? (Just making sure before I start)

About This Instructable




More by The Snake:CatGenie: A smart, resettable SaniSolution cartridge 
Add instructable to: