The emonTH supports both the DHT22 (humidity and temperature) and DS18B20 either onboard or remote temperature sensor. The default software will search for the presence of either sensor at startup. If both sensors are found it will return humidity from the DHT22 and temperature from the DS128B20. If only the DHT22 is found it will return both humidity and temperature readings from this sensor, finally if only the DS18B20 is found only temperature readings will be returned. In the future I would like to expand the code to support multiple DS18B20 sensors on the one-wire bus.
I have implemented many of the power saving tricks as Martin Harizanov has used in his Funky Sensor code, in particular the his DS18B20 power saving tweaks. Martin has done some great work optimising power and designing some very small low power nodes, his blog is well worth a read.
The emonTH code (in beta) is now up on Github: https://github.com/openenergymonitor/emonth
The power consumption results are as follows, assuming one reading is taken per min and using this battery estimation tool assuming AA capacity of 2200mAh and not taking into account AA self-discharge*
emonTH with DS18b20 temperature only (Vin = 2.6V)
On current: 9.7mA for 70ms then peaking to 26mA for 2.8ms for RFM12B transmission, giving average of 10.2mA for 9.8ms
Approximate battery life of 3.5 years*
emonTH with DHT22 (temperature & humidity) only (Vin = 2.6V)
Sleep Current: 0.12mA
On current: 9.5mA for 1700ms then peaking to 26mA for 2.8 ms for RFM12B transmission giving average of 9.525mA for 1703ms
Approximate battery life of 1.1 years*
*Stay tuned for the next post on AA battery considerations including how to deal with self-discharge issues...
I came across this page wile looking for tips to write some code for a slightly different TH sensor (88p + SHT11 + RF12B). Useful info, thanks.
ReplyDeleteI notice in your code you call power_adc_disable without having first disabed the ADC using the ADCSRA. In my tests that resulted in a 100uA power down current rather than the ~5uA expected. The datasheet also mentions the need to disable the ADC before setting bit 0 in the PRR. I am guessing that otherwise the IVR is left enabled?
The sleepy:: code also manipulates ADCSRA so paradoxically, removing the call to power_adc_disable actually reduced my sleep current!
Cheers Andrew, thanks for the spot. I've updated the code. Sorry for delay, I don't seem to get notification of blogger comments. Happy new year!
ReplyDelete