Recently I read Nathan Chantrell's blog about getting the longest life possible out of battery powered nodes http://nathan.chantrell.net/20120107/further-extending-the-temptx-battery-life/. He mentions that although in the the ATmega328 is said to work down to 1.8V he observed the ATmega stopping workin at 2.7V, this is exactly what we observed in our early emonTx trails.
Nathan explains this is probably down the the Arduino bootloaders BOD (Brown out detection) that puts the ATmega into a reset loop when the voltage drops to 2.7V. This is not normally a problem since normal Arduinio boards (for which the bootloader was designed for) run at 5V.
After some twittering with Nathen he worked out that the BOD drop-out voltage could be reduced to 1.8V by changing the value of the bootloader extended fuse from 0x05 to 0x06 then re-loading the bootloader.
I gave it a go tonight using the isp_repair bootloading sketch from jeelabs (Optiboot (Arduino uno) 4.4 bootloader). It makes it simple to change the extended fuse value in the since its in the sketch itself. This avoids having to modify boards.txt. JeeLabs info on bootloading: http://jeelabs.org/2011/05/29/summary-of-isp-options/.
The end goal is the increase the battery life of an emonTx powerd by 2 x AA's. Currently the emonTx drains batteries down to 2.8V in four months. Hopefully this BOD setting will allow a few more months of battery life.
I currently have a test emonTx running in the lab with depleated batteries, it's posting its internal battery voltage over RFM12B wireless to a NanodeRF where it's posted online to emoncms for logging. Its current voltage is 2.78V It wil be interesting to see at what voltage it stops working. The RFM12B is rated down to 2.2V so I'm not expecting to get much lower! I will update on how it goes.
Just for fun we have embeded an emoncms dashboard widget and graph of the live emonTx battery test voltage. You can watch the battery voltage go down in real time! How low will it go....?? If no dashboard appears try refreshing the page.
Update 28/1/12: Seemed like we got quite a few RF errors as voltage approached 2.7V, maybe RFM12 issue. emonTx under test now has fresh batteries, hence high votlage!
Embeded dashboard powered by emoncms V3
U think that can affect the
U think that can affect the AREF? the 3.3v reference for analog inputs?
Re: emonTx supply voltage
The code take this into account. The supply voltage is internally measured then used here:
double I_RATIO = (( CT_TURNS / CT_BURDEN_RESISTOR ) * (SUPPLY_VOLTAGE/1000.0)) / 1024.0;
Need to check this works at extreme low voltages. Also if sampling AC voltage there is a change it could go out of range. More testing needed.
I've made a custom emonTx
I've made a custom emonTx bootloader which incorporates the BOD changes above and also loads up the emonTx singel CT example. This is more of use for us in OEM labs but is open to all, its up on github: https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTx_Optiboot4_4_bootloader
Its based on the JeeLabs isp_reapair example and uses andother arduino conected via ISP connectors.
See http://jeelabs.org/2011/05/29/summary-of-isp-options/ for wiring diagram.
please modify the maximum
please modify the maximum value of the gauge as it starts going up, but clears at the level of 3V