As mentioned previously, I wanted to be able to log my electricity usage. I knocked up a circuit with an LDR and my Uno which wrote some data out of it's serial port every time it detected a flash of the LED on my electricity meter. The LDR was simply attached to the meter with some Blutack. I had an extra long (5m + a couple of 1m extensions) USB cable running from my kitchen where the meter is located, into my lounge where my laptop usually sits. On here, was a small Perl program which read the serial port and called a URL which lived on my server upstairs. This updated a database with various values passed over serial - namely the gap between flashes, and the calculated watt/hours.
This was fine, and worked flawlessly for about 4 weeks, but I was getting tired of not being able to move my laptop around the house without disrupting my monitoring, so I decided to put a stop to it, on a temporary basis.
This was over a month ago!
I bought a basic Arduino setup from Ebay, simply an ATMega328P and a crystal and voltage regulator. I also purchased a couple of nrf24l01 wireless devices and a poor-mans ethernet shield - the ENC28J60 chip based ethernet controller. The plan was to run the bare bones Arduino in the electricity meter cupboard and have it talk wirelessly to another Arduino next to my server, and use the ethernet controller to connect to my network. I have played with the ethernet controller for a couple of days with the jcw library, and although the library does a very good job, it's just not as nice as the offical Wiznet5100 library, so today I splashed out on a W5100 controller, along with two Arduino Nano's. The bare-bones Arduino will be ideal for the final solution, but the lack of programming interface is a real pain for development.
Once these new parts arrive - probably 2-3 weeks as they are from HK, I will get coding with the Mirf library and the Wiznet library to get something up and running.
No comments:
Post a Comment