Post topics, source code that relate to the Arduino Platform

User avatar
By longinus
#1851
jonsmirl wrote:Is deep sleep really working in the ESP8266 yet? I don't think anyone has the 32Khz crystal hooked up yet. So there may be a lot more power savings possible.

From what I understand what I'm doing is a total shutdown of the ESP8266. It's not in deep sleep mode, because according to the datasheet that actually consumes 60uA (with the RTC still running). I'm pretty sure there is some leakage from a pullup resistor or something, but didn't really bother to fully investigate yet (I'm letting it run for some days logging data to test how stable it is).
Last edited by longinus on Wed Oct 22, 2014 10:35 pm, edited 1 time in total.
User avatar
By longinus
#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.
User avatar
By acerola
#4971 Very good sketch. I like the way it uses the softSerial for the wifi module, so I can use the debug monitor.
I had a couple problem with it, but finally it works for me.
Maybe I can help someone if I write about the problems.
1. I have a newer version (0.9.2.4). The response for the reset is contains the version number also. So I have to changed STR_BOOT[] to "ker.com"
2. I changed the order of SoftSerial.println and SoftSerial.flush(); If the flush is the second, it is quite often flushed part of the response for me. Like "OK" became "K"

Other than that this is a great code. I thinking about migrating this project from nano to attiny. Never tried it, but it seems a good idea. Thanks.
User avatar
By rahaman
#7447
longinus wrote:
jonsmirl wrote:Is deep sleep really working in the ESP8266 yet? I don't think anyone has the 32Khz crystal hooked up yet. So there may be a lot more power savings possible.

From what I understand what I'm doing is a total shutdown of the ESP8266. It's not in deep sleep mode, because according to the datasheet that actually consumes 60uA (with the RTC still running). I'm pretty sure there is some leakage from a pullup resistor or something, but didn't really bother to fully investigate yet (I'm letting it run for some days logging data to test how stable it is).



Hi,
I am trying to put the ESP8266 in total shutdown mode (or indefinite sleep mode). Can you please help me, how to put the ESP8266 in total shutdown mode, as you have already done it?
Thanks