I am building myself a low power thermostat using a Moteino board, running with 3xAAA NiMH connected to VIN. If you are interested, please find the whole project in https://github.com/joaquimBS/ArduinoRepo/tree/develop/sketches/Thermostat
VCC connected to Mote 3V3.
GND connected to Mote GND.
DATA connected to a Mote digital IO.
I programmed 20 seconds sleep period by sleeping 20 times 1s, and after that I run a cycle of sampling data, doing some internal logic with it, sending the data to my RX Mote (which is connected to an ESP8266) and then back to sleep.
So far so good. I read ~23uA during sleep time (measured with a multimeter, so I assume it’s some kind of average).
At some point the thermostat switches ON the heater, and the temp readings rises almost a full 1ºC. When the heater is turned OFF again, the temp readings drop again 1ºC.
The only difference is that, due to a SW bug, the function doing HeaterON was doing a delay(250), while the HeaterOFF wasn’t.
Finally, I noticed that when plugging in the battery (the thermostat is awake during 10s), the temp reading were the same as when the heater is ON (the delay(250) active), so I assume that temp reading is the right one.
Additionally, adding a delay(250) to the HeaterOFF, make the temp readings consistent, during HeaterON and HeaterOFF states.
I used different DHT22 libraries, one with some delay before making the measurement, one without it, etc. But what makes the difference is the delay after the reading.
So here is the question, to the Moteino & DHT22 users. How do you integrate those two? Are you experiencing any issues?
I know the DHT22 has some restrictions regarding the sampling period, but since I am respecting this, I no longer know what to do…