- Wed Oct 22, 2014 10:27 pm
#1852
mharizanov wrote:Nice project, I myself have built a bunch of DHT22 arduino compatible nodes. I only use RFM12b as method of wireless data transportation. These last years on a single AAA battery (with boost converter).
Yeah, that definitely seems to be the case!
I have a few sensors where I do something similar, but with an nRF24L01. The only "problem" is that I always have to use something bigger then an attiny85 (too many pins), and I kinda like the tinys for some reason, ahaha... And it was fun to try it out, even though it might not be the best long-term solution.
mharizanov wrote:you can use sleeping rather than delay while waiting to the ESP8266 to do something
* I have noticed that once configured for the network, the ESP8266 will automatically connect to WiFi without any further intervention. You may use that to set it only once and not every time you wake it. That will also save you few seconds of "awake" run time.
*I haven't tested that, but it could be possible to set up a pin change interrupt on serial RX to wake up the MCU when the esp8266 starts talking back
In theory my code does indeed let the ESP8266 reconnect by itself to the network... if it can't in 5 seconds, it assumes it didn't and forces it to. It does usually reconnect by itself. But that's where I can save some time with the new firmware from igrr.. I can see when the module actually connected, instead of always waiting for 5 seconds. But it's a good idea to use a pin change interrupt! I'll give that a try, it can be a way to save a few mAh (though the tiny at 8mhz and 3.3v consumes very little).
gicho wrote:in software, when waking up, check if the sensor measurements had changed since last one - don't send if no change
Hummmm good point! On a similar idea, I was thinking of storing a bunch of readings on the EEPROM, and then just send them every hour or something.. The only reason I didn't is that it complicates things on the logging side. Not terribly, but the timestamp for each reading would have to be calculated by the server retrospectively. Right now my logging server just timestamps the data as it receives it, making it super easy.