Gas and electricity monitor
From Open renewables
Contents |
about
This project came about because I wanted to learn how to do power and gas measurement myself. I thought gas measurement would be difficult but actually it can be easy; depending on your meter. My meter has a magnet on the least significant dial, so I just need a hall effect sensor to detect when this is passing.
I'm using code from the open energy monitor project for the current measurement. This uses a current clamp.
I don't have a power supply near my gas and electric meters, so this is a low power wireless metering system that sends the data to a nanode, which in turn uploads to pachube.
links
code
for the nanode pachube putter:
https://github.com/mattvenn/arduinosketchbook/tree/master/pachube_gas_monitor
for the remote energy monitor:
https://github.com/mattvenn/arduinosketchbook/tree/master/gassender
xbee config
Both should be on the same network ID and should send and receive from each other.
For the remote monitor, we use sleep mode 1 so we can control sleep mode with the micro:
commands="ATRE,ID3456,MY1,DL2,SM1,WR"
For the nanode side, we turn on serial uart IU1:
commands="ATRE,ID3456,MY2,DL1,IU1,WR" #for output module
hardware
pachube putter
This is just a nanode running the above software with an xbee' TX line attached to pin 5.
wireless monitor
This is a bit more complex; it measures:
- battery voltage
- gas pulse
- current with a current clamp
- temperature
It sleeps a lot and is running on 3.3v. The standby current draw is about 2.5mA, though about 2mA of that is from the hall sensor (haven't found a way of reducing this yet).
The schematic and board are here
https://github.com/mattvenn/energy-monitor-pcbs
links and thanks
- great site all about xbees, got me started and lots of info about battery life and sleep
- great info about using current clamps and very good software for doing the power measurement
- atmel's app note on doing power measurement (as used by openenergymonitor)
- nanode; an arduino compatible open source/hardware project with built in ethernet
- great info about fuses for atmega
- help on brown out detection I got stuck when my atmel mega168 stopped working at 3.3v, it was brownout detection!