Not Quite Normal

Open source catflap firmware June 7

While CATaLOG was a success most of the time, the most unreliable bit of the system was detecting the RFID tag as the cat went through the door. The system has been offline since June 2010 and we also changed our priorities from tracking the cats in and out to making sure they were safe at night. We purchased a PetPorte RFID catflap which not only reads the cat's embedded microchip reliably, but also imposes access control and has a light sensor so when it gets dark it will only let the cats in, not out.

PetPorte was a UK company and were planning to release a 'computer connection kit' until they were bought by Staywell, when all progress on that front ceased. Upon inspecting the PCB there are headers for additional antenna, programming and serial, so I hooked up a Bus Pirate to see if anything was happening. Nothing was but it seemed I was not alone in my quest. Through emails sent by forum members it transpired PetPorte had signed a 3 year NDA with Staywell and couldn't give us any info on how to make the catflap talk to anything. Yet. So we resigned to waiting until the NDA expired and going from there.

It appears someone couldn't wait this long however and released his own complete rewrite of the firmware. Not able to read the code out of the PIC he just reimplemented the whole firmware from scratch, including decoding the RFID signals from the OP amp into the PIC(!) He also added functionality to determine which way the door is opening via a potentiometer attached to the flap.

Open source firmware for my catflap and my PCB revision matched - Amazing!

I purchased a PICkit 2 programmer, made a lead up and set about reprogramming the catflap. Here it is in action:

This went well and after reassembling the catflap and programming in a test tag I hooked up my TTL-USB converter to the serial header, scanned the tag a few times, entered some control characters and saw this:

Hurrah! All I need to do now is hook the catflap up to a bifferboard, use the same python script controlling the chicken coop to get it on the internet and CATaLOG should be back online soon!