Sunday, 20 October 2013

(Ab)using CurrentCost dev boards part 1

Once upon a time, I purchase a CurrentCost power monitoring device and base station. The monitoring device watches the output of my electricity meter, and the base station displays the information and sends an XML stream over a serial port. It works. However CurrentCost also produce some digital development boards and I picked up three, as it seemed a good idea at the time. Sadly, what I didn't realise (although, it was documented...) is that the boards send a signal indicating 500W consumption when you short the input channel, and a signal indicating 0W consumption when you leave the input channel open. Now, for some people, that's great, but I wasn't happy with it what seemed to be pretty basic operation. I thought to myself, "I'm sure we can get this thing to do a lot more!", so I set about trying to do just that.

If you haven't come across the Currentcost digital development boards before, they look like this:

Slightly confusingly, some of the silkscreen markings are on the underside of the board (like the power and input points). On the right hand side, there's two contacts that act as the input. One goes off to the positive rail, and the other to the processor.On the left hand side, there's two contacts for power (3V). The 10 pin header isn't used, and the button is used for pairing with the base station. Looks simple enough really. So, I thought it was time I got to grips with what was on the board.

The processor (rectangular chip on upper right) is actually a PIC16F689 - an 8 bit microcontroller which is the brains behind the board. The circuit board to the left (with the blob on it), is a Hope Electronic RFM02 Universal ISM Band FSK Transmitter, which is the bit that actually does the transmission. The 10 pin header only has 5 connections (the upper and lower pins are connected together), and the button - well, it's a button really.

Spending some time tracing out the PCB so that I can understand how the parts are connected, and I discover that the 10 pin header is used for programming the PIC. Microchip (the people behind the PIC microcontrollers) have a standard for in circuit serial programming (ICSP), but this board doesn't follow it. That's not a major problem, as it's easy enough to put together a lead that goes between the programmer and the board.

So, I now know how the transmitter, the PIC, the 10 pin header and the input are all connected together. This means I can start to reverse engineer what's going on so that I can reuse the board for more exciting things.

Next Part 2

No comments:

Post a Comment