OpenGenie Project

The CatGenie is the only self-cleaning box on the market. An evolution of the LitterFree design, it connects to your household plumbing.

Re: OpenGenie Project

Postby CatGenius » Sun Feb 19, 2012 11:45 am

CatGenius wrote:Home Automation. Log on and control your Box.
That's pretty easy to do: With just a couple of commands on the serial port, you can instruct the box to do the same things you can using the control panel, such as changing the mode, start a program, etc. A command to request cartridge level of error status is just as easy.
Tweak the cycle to what you want. Share it with others. Customize the cycle to the solutions being used. Possibilities are endless.
Actually, you can already tweak the washing cycle. It's specified in a separate file:
http://code.google.com/p/catgenius/sour ... gram.c#202
Code: Select all
        {CMD_BOWL,      BOWL_CCW},      /* Scoop 1 */
        {CMD_ARM,       ARM_DOWN},
        {CMD_WAITTIME,  13217},
        {CMD_ARM,       ARM_STOP},      /* Scoop 1 + 1 */
        {CMD_WAITTIME,  18141},
        {CMD_BOWL,      BOWL_CW},       /* Scoop 1 + 2 */
        {CMD_WAITTIME,  6201},
        {CMD_BOWL,      BOWL_CCW},      /* Scoop 1 + 3 */
        {CMD_ARM,       ARM_DOWN},
If you look at the code closely, even a non-programmer can understand what it does.
First is starts turning the bowl counter-clockwise, immediately followed by the arm moving down, and the program will wait for 13.217 seconds. After that, it will stop the arm and wait again, this time for 18.141 seconds. Next it will reverse the bowl to clockwise and again it will wait, for 6,201 second. Then it will reverse the bowl again to counter-clockwise an start moving the arm down again. I call these commands LitterLanguage, and I think it's fairly easy to read by anybody.

Editing the washing program is cumbersome, because the box doesn't have any sensors. So instead of listening to sensors, all movements must be timed precisely. And to test your newly modified program, you need to re-compile CatGenius, flash it into your box and test it, to see if you works as expected. A PC application feeding LitterLanguage instructions would easy the pain here.

I think there's a lot to be gained here. I've watched the standard drying program many times and I noticed that it's very inefficient. Especially in the beginning, it's spending a lot of time drying the bottom of the box, with a wet lump of granules trapped behind the scoop.
User avatar
CatGenius
Benefactor
Benefactor
 
Posts: 178
Joined: Wed Feb 10, 2010 5:08 am

Re: OpenGenie Project

Postby GenieUser » Sun Feb 19, 2012 6:50 pm

CatGenius wrote:A PC application feeding LitterLanguage instructions would easy the pain here.

I think there's a lot to be gained here. I've watched the standard drying program many times and I noticed that it's very inefficient. Especially in the beginning, it's spending a lot of time drying the bottom of the box, with a wet lump of granules trapped behind the scoop.


Hopefully the programmers reading this will chime in and see what they can do to write that PC application feeding Litter Lanquage, and help with CatGenius.
GenieUser
New User
 
Posts: 37
Joined: Wed Dec 28, 2011 2:59 pm

Re: OpenGenie Project

Postby CatGenius » Mon Feb 20, 2012 3:31 am

And if you're into home automation: CartridgeGenius can be connected too! It's an undocumented feature, because I figured nobody but me will be using it, but CartridgeGenius reports changing cartridge levels on it's serial port.

All you need to do is hook up a 5vTTL <-> RS-232 level shifter to the 4 pins marked DBG. Set your serial port to 19200b/s, 8 data bits, no parity and 1 stop bit and you'll see your CartridgeGenius chattering away. Anything you do on the panel is reported. Changes is level, whether increase by you or decreased by the box, are reported too. It doesn't give you control over the box or CartridgeGenius itself, but it does allow you to detect an empty cartridge, or the box running a washing cycle.
User avatar
CatGenius
Benefactor
Benefactor
 
Posts: 178
Joined: Wed Feb 10, 2010 5:08 am

Re: OpenGenie Project

Postby GenieUser » Mon Mar 05, 2012 7:26 am

CatGenius wrote:And if you're into home automation: CartridgeGenius can be connected too! It's an undocumented feature, because I figured nobody but me will be using it, but CartridgeGenius reports changing cartridge levels on it's serial port.

All you need to do is hook up a 5vTTL <-> RS-232 level shifter to the 4 pins marked DBG. Set your serial port to 19200b/s, 8 data bits, no parity and 1 stop bit and you'll see your CartridgeGenius chattering away. Anything you do on the panel is reported. Changes is level, whether increase by you or decreased by the box, are reported too. It doesn't give you control over the box or CartridgeGenius itself, but it does allow you to detect an empty cartridge, or the box running a washing cycle.


I may try this just for fun. I can use "snap in" solderless header pins. If I use a FTDI cable for my level shifter, what is the pin configuration? I removed the female header from the FTDI cable with a jewelers screwdriver lifting the locking flaps of the header plug to be able to reorder the wires for future CatGenius use, so what order to I put them in for the CartridegGenius? Which is pin one on the board?
GenieUser
New User
 
Posts: 37
Joined: Wed Dec 28, 2011 2:59 pm

Re: OpenGenie Project

Postby CatGenius » Thu Mar 08, 2012 3:56 am

GenieUser wrote:I may try this just for fun. I can use "snap in" solderless header pins. If I use a FTDI cable for my level shifter, what is the pin configuration? I removed the female header from the FTDI cable with a jewelers screwdriver lifting the locking flaps of the header plug to be able to reorder the wires for future CatGenius use, so what order to I put them in for the CartridegGenius? Which is pin one on the board?

The serial port is marked 'DBG' on the board. It's an unpopulated 4-pin header row, the bottom pin being pin 1, marked with a dot. This is the pinout:
1. +5 Volt (Do NOT source power here; you can draw a little power here to power a classic RS-232 level shifter)
2. TxD (Data transmitted by CartridgeGenius)
3. RxD (Data received by CartridgeGenius)
4. Ground
I have attached a part of the electronic diagram:
CartridgeGenius DBG port.png
CartridgeGenius serial port diagram
CartridgeGenius DBG port.png (20.42 KiB) Viewed 150 times

The part on the left is (part of) the PIC processor, the part on the right (marked X1) is the debug connector.

CartridgeGenius doesn't listen to any commands sent to it's debug port; There's no use in resetting the level remotely, as you cannot refill the physical cartridge remotely. However, almost anything you do on the buttons is reflected on the serial port. When the level is changed, either by you or the box, the updated level is printed to the serial port. This should give you some insight in how a cartridge is depreciated when using cat-activation mode.

Please let us know how it's working for you.
User avatar
CatGenius
Benefactor
Benefactor
 
Posts: 178
Joined: Wed Feb 10, 2010 5:08 am

Re: OpenGenie Project

Postby HateYou » Fri Mar 09, 2012 1:53 am

How can I buy one? Please contact me with details!
Barney
HateYou
New User
 
Posts: 2
Joined: Fri Mar 09, 2012 1:45 am

Re: OpenGenie Project

Postby GenieUser » Sat Mar 10, 2012 7:38 pm

CatGenius wrote:
GenieUser wrote:I may try this just for fun. I can use "snap in" solderless header pins. If I use a FTDI cable for my level shifter, what is the pin configuration? I removed the female header from the FTDI cable with a jewelers screwdriver lifting the locking flaps of the header plug to be able to reorder the wires for future CatGenius use, so what order to I put them in for the CartridegGenius? Which is pin one on the board?

The serial port is marked 'DBG' on the board. It's an unpopulated 4-pin header row, the bottom pin being pin 1, marked with a dot. This is the pinout:
1. +5 Volt (Do NOT source power here; you can draw a little power here to power a classic RS-232 level shifter)
2. TxD (Data transmitted by CartridgeGenius)
3. RxD (Data received by CartridgeGenius)
4. Ground
I have attached a part of the electronic diagram:
CartridgeGenius DBG port.png

The part on the left is (part of) the PIC processor, the part on the right (marked X1) is the debug connector.

CartridgeGenius doesn't listen to any commands sent to it's debug port; There's no use in resetting the level remotely, as you cannot refill the physical cartridge remotely. However, almost anything you do on the buttons is reflected on the serial port. When the level is changed, either by you or the box, the updated level is printed to the serial port. This should give you some insight in how a cartridge is depreciated when using cat-activation mode.

Please let us know how it's working for you.


Thanks. This will help me try this. You say that "you can draw a little power here to power a classic RS-232 level shifter". Does this mean the 5V FTDI cable with its integrated level shifter will not work?
GenieUser
New User
 
Posts: 37
Joined: Wed Dec 28, 2011 2:59 pm

Re: OpenGenie Project

Postby abbeytoo » Mon Mar 12, 2012 9:15 pm

HateYou wrote:How can I buy one? Please contact me with details!
Barney


Nice userid.
Sisters Lucy & Ruby who has Hyperthyroidism, Brothers Static & Sassy, Stormy - found in a storm drain, Speed Racer a CH Kitty, RIP my Little Lily Bug
User avatar
abbeytoo
Litterbox Angel
Litterbox Angel
 
Posts: 747
Joined: Mon Sep 16, 2002 11:52 am
Location: Sacramento, CA

Re: OpenGenie Project

Postby CatGenius » Wed Mar 14, 2012 4:22 pm

GenieUser wrote:Thanks. This will help me try this. You say that "you can draw a little power here to power a classic RS-232 level shifter". Does this mean the 5V FTDI cable with its integrated level shifter will not work?
The FTDI cable will draw it's power from the USB bus, so even if it has a 5v connection, it should not be connected, as connecting two 5v supplies together doesn't work very well.

You can use the 5v supplied to power a level-shifter converting the TTL serial port into a proper RS-232 serial port.
User avatar
CatGenius
Benefactor
Benefactor
 
Posts: 178
Joined: Wed Feb 10, 2010 5:08 am

Re: OpenGenie Project

Postby mald0r0r » Mon Mar 26, 2012 12:24 am

CatGenius wrote:I will post a new message announcing availability on this board soon. I think I'll have a couple available for shipping around half of February. But again; It's not a product, just a project, they won't be available permanently.


Any chance these are still available? I'd definitely be interested in one or two.

Thanks!
mald0r0r
New User
 
Posts: 2
Joined: Sun Mar 25, 2012 6:08 pm

Re: OpenGenie Project

Postby MrsVice » Thu Mar 29, 2012 12:27 pm

Hi, I have lurked on the forum and I love it, but finally just had to register to post this reply...I am not sure if I am understanding this thread 100% correctly because of all of the tech speak, but I for sure am also interested in any 120 hack for the cartridges if and when it becomes available. The smell of the catgenie solution is nauseating and the unscented is like using cat poop to clean cat poop. If I could refill with a 3:1 solution of water: peroxide and a tablespoon of lemon lysol, I'd be in heaven!

Also, who's interested in an entirely programmable CatGenie that could be controlled from a PC interface?! *points to self* -->THIS GIRL<--

I'd gladly pay $50+ for a program that made customizing things possible...like forcing 240 washes but still being able to control the # of times per day it washed, or even the frequency...mine runs all day long because it doesn't wait long enough between kitty potties. Being able to run JUST A SCOOP CYCLE without the whole wash would be super, the drying time could be reduced by seriously 15 minutes, ooh being able to get a READABLE ERROR MESSAGE (like "CLOG IN DRAIN HOSE") instead of trying to decipher the CatGenie beep-flash using the manual (ugh)...and so much more that I'm sure you guys have already thought of!!
MrsVice
New User
 
Posts: 1
Joined: Thu Mar 29, 2012 11:54 am

Re: OpenGenie Project

Postby CatGenius » Fri Mar 30, 2012 2:00 am

MrsVice wrote:Hi, I have lurked on the forum and I love it, but finally just had to register to post this reply...I am not sure if I am understanding this thread 100% correctly because of all of the tech speak, but I for sure am also interested in any 120 hack for the cartridges if and when it becomes available. The smell of the catgenie solution is nauseating and the unscented is like using cat poop to clean cat poop. If I could refill with a 3:1 solution of water: peroxide and a tablespoon of lemon lysol, I'd be in heaven!
The easiest to realize that right now, is to get yourself a CartridgeGenius. Nearly anybody can install it, and it will liberate your box so you will truly own it. It's not what this thread is about however.
Also, who's interested in an entirely programmable CatGenie that could be controlled from a PC interface?! *points to self* -->THIS GIRL<--
That's always nice to hear! CatGenius is alternative firmware for your box. It replaces the stock firmware your box came with. Unfortunately the upgrade process is a one way street, because the original firmware is copied protected. So once overwritten with CatGenius, there's no way back.

CatGenius is not finished yet. It will clean your box, it won't flood your room, it will detect errors, but it will not act upon them yet. Instead of pausing the program, it will just wait for it to go away, keeping whatever motor running that happens to be running. I have tried to solve this problem, but there is a nasty bug in the pause code.
I'd gladly pay $50+ for a program that made customizing things possible...like forcing 240 washes but still being able to control the # of times per day it washed, or even the frequency...mine runs all day long because it doesn't wait long enough between kitty potties.


That is easily changed. The waiting timeout of the cat sensor is defined in the program here:
http://code.google.com/p/catgenius/sour ... rface.c#26
Code: Select all
#define CAT_TIMEOUT             (4 * 60 * SECOND)

But you will have to recompile the code and flash the result into your box. I will change that into a user-changable parameter somewhere down the line, but for now it is what it is.

Being able to run JUST A SCOOP CYCLE without the whole wash would be super, the drying time could be reduced by seriously 15 minutes, ooh being able to get a READABLE ERROR MESSAGE (like "CLOG IN DRAIN HOSE") instead of trying to decipher the CatGenie beep-flash using the manual (ugh)...and so much more that I'm sure you guys have already thought of!!


That will be further down the line: The goals is to prevent the necessity of a PC. A PC can always be connected for logging though. And it will give you clearer message, but never a complete diagnose: It has no way of knowing there's a clog in the hose. It can only tell you it has difficulties draining the box. You'd still have to figure out if it's caused by a clog in the drain hose, of too many granules in the hopper.

For now CatGenie is for nerds, like me. With the documentation available, I'm sure you can install it, but I only recommend you to actually do so if you're capable of solving your own problems. I developed it with the intention to sell upgrades to people. But it's a rather complex piece of software which will be difficult to support. And even if it works perfectly, with the upgrade being a one-way street I can never defend against claims like "this problem didn't occur with the original firmware". That's why I made it freely available. People can now add their own functionality, change it as desired and solve their problems without needing me.
User avatar
CatGenius
Benefactor
Benefactor
 
Posts: 178
Joined: Wed Feb 10, 2010 5:08 am

Re: OpenGenie Project

Postby CatGenius » Sat Mar 31, 2012 5:42 pm

I have just published a new version of GenieDiag, the diagnosis tool for CatGenius users. This new version features a command line interface on the serial port, accepting typed commands to control the motors and read the sensors of your box. This way, you could write a program on a PC to send these commands to the box, creating your own washing program.

This new version also features a command to show you all contents of a cartridge chip.

A full description of these new features can be found here:
http://code.google.com/p/catgenius/wiki/GenieDiagManual

The new version can be downloaded here:
http://code.google.com/p/catgenius/downloads/list

Please understand that programming either GenieDiag or CatGenius into your box is an irreversible process and that the newer model 120+ boxes are not supported yet. Though I am currently working on 120+ support.
User avatar
CatGenius
Benefactor
Benefactor
 
Posts: 178
Joined: Wed Feb 10, 2010 5:08 am

Previous

Return to CatGenie

Who is online

Users browsing this forum: Google [Bot] and 2 guests