Wednesday, September 23, 2009

Plant Monitor

It took me a little while to get a few bugs sorted out. But I now have a working plant monitor.

The receiver sits by the computer. It's an arduino with a loosely wired shield. The RF receiver's data line goes into the Arduino's RX. The rest are either unused or for power.

One change I will make to version 2 (if I ever get round to a version 2) is to make a small packet get sent rather than the ID and then the reading. I would also be interested in sending the temperature. I'm unsure if the temperature effects the conductivity of the soil, but I guess I'll work that out in the coming weeks. Maybe I'd have to adjust the threshold dependant on the temperature.
Both .pde files needs the RFDriver.pde file from Morris's site (mentioned in the last post). It needs to be in the same directory and this only works with Arduino's IDE version 16 onwards.


PlantRcvr.pde
PlantTrans.pde

Note - don't program the tx with rx or vice versa. Rookie mistake.


Now the transmitter is a little simpler.The idea is that one transmitter can do a windowsill full of plants. Luckily the ATmega328 has 6 A/D channels, so we don't have to do anything tricky to monitor 6 plants.

You could pull the AVR out of the arduino (carefully!) and attach the power rails and hook all of the lines up as per the pins on the arduino if you want to save yourself an arduino board. I'll be doing that as soon as I get my hands on a 16MHz crystal. Even after changing the clk fuse I can't seem to get a un-clocked chip to work.

I'm sure there's bugs in the code and it's hardly optimised at all. Let me know if you use it, like it, hate it, or find bugs. If you optimise or add functionality let me know, I'm interested to see what this could become.

No comments:

Post a Comment