Hacking the Current Cost
I have almost 30 Current Cost Individual Appliance Monitors (I need to monitor the power consumption of every appliance in my home for my PhD project). Unfortunately, I sometimes see drop-outs on a single channel lasting thousands of seconds, which is simply unacceptable. I see these epic drop-outs even if the IAM is within a meter of its EnviR. So data is being lost somewhere between the IAM transmitting its packet and it being sent via XML from the EnviR. I think the IAMs simply squirt a reading onto the RF carrier every 6 seconds without waiting for a "ping" from the EnviR. There are two possible places where the packets are being lost: 1) the EnviR drops packets or 2) RF collisions
First I'm going to assume that the main problem is that the EnviR drops packets because it's too busy. Hence I want to connect an RF receiver directly to my laptop in order to sniff IAM data directly from the air without having to use an EnviR. I'm somewhat out of my depth here! After a bit of googling, I came across this Nanode IRC conversation about sniffing the SPI bus of a Current Cost to reverse engineer their protocol. I assume I just need a Bus Pirate to sniff the SPI bus of the EnviR to get the initialisation commands the EnviR sends to its on-board RFM01 RF module; and then I can buy an RFM01 module and connect this to the bus pirate's SPI bus to communicate directly with the RFM01 from my laptop.
If I find that RF collisions are a major problem then I may investigate the EDF wireless transmitter plugs. These are similar to the Current Cost IAMs except, crucially, the EDF models use transceivers and not just transmitters. The EDF Eco Manager base station "pings" each transmitter plug in sequence and the transmitter plug responds within about 20ms. This should totally avoid RF collisions. The problem is that I already have 30 Current Cost IAMs! I'm planning to take one apart to see if there's any possibility of converting it to a trasceiver type (the IAMs say "transmitter only" on the back). If not then I guess I'll have to try to return or eBay my IAMs and buy EDF transmitter plugs. I'll still have to build my own transciever because each Eco Manager can only handle 14 transmitter plugs. If I use multiple Eco Managers then RF collisions will become possible again.
Below are some notes on tools and forums...
SPI to USB converters
- USB to I2C & SPI converter and analyser - £24.90 - eBay - UK seller
- Devantec USB to I2C, SPI and Serial - €24.59 - RobotShop.com
- Microchip ADM00419 Break Board MCP2210 mini USB-SPI - £9.79 - Farnell
- RFM12B USB light Stick (using an ATmega32u4) - €39 - Busware.de
- JeeNode (RFM12b with ATmega328p) - €18.50 - JeeLabs.com
- Bus Pirate - £20 - ProtoPic (purchased)
- Saleae 8 Channel 24 MHz - £132 from Proto-Pic
- "Saleae Logic Compatible" clone for £30 - blog post about Saleae kockoffs
- Beeny found that the Current Cost EnviR uses an RFM01 receiver and Current Cost transmitters use RFM02 transmitters operating at 433MHz. The EDF EcoManager and EDF IAMs (both of which appear to be made by Current Cost) probably use RFM12b transceivers.
- RFM12b specs
- RFM12B 433MHz is £6.32 from Farnell
- RFM12 tutorial
Forum threads and blog posts
- Eco Manager Teardown and help identify RF - Jan 2012 - forum.jeelabs.net
- KenB talking briefly about sniffing the Current Cost's SPI bus using a Bus Pirate - July 2011
- Nanode IRC log for Nov 2011 where Beeny talks about sniffing the CC's SPI bus
- DIY radio receiver for CurrentCost sensors on GanglionTwitch.