Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Dead_Donkey
#78914 Hi - thanks for replying.

The 12E and one of the 12S units have been reflashed using the NodeMCU ESP8266 flashing software using what I believe was the latest firmware.

The 12F and the other 12S are as supplied. The 12E didn't work properly when I first got it so re-flashed that one and I flashed one of the 12S units to see if it changed the deepsleep current draw - it made no difference.

The units are all running the same code and are powered by an HT7333 regulator fitted with a 2200uF cap taking supply from an 18650.



Electrically the units are hooked up with a resistor voltage divider connected to A0 and ground with a second high range resistor switched in and out using an NPN transistor connected to pin 12. The voltage divider is connected to pin 13 so I can turn it off to save power. There is a 0.1uF cermic filtering cap connected between A0 and ground. 1V is supplied to one moisture probe with the other probe connected to A0. Therefore the resistance of the wood (that is what I measuring the moisture content of) forms one half of the voltage divider with the other half being my high and low range reference resistors.

My 12F behaves exactly as I want it to. It sleeps for 1 hours (well 58 minutes - the deepsleep timing isn't spot on). When running it draws around 70mA and when sleeping draws 20uA (including the quiescent current of the HT 7333). The 12E draws 200uA and the two 12S units draw almost 1mA while sleeping.

With a 4000mAh 18650 and 20uA of current draw I can theoretically get 2 years of data upload from the 12F which is what I want. I intend to make a load of these for deployment on a work project but wanted to try and understand why there are such differences between my 4 different units. I ended up with the 3 different types as I was buying whatever was cheap on ebay on three different occasions for initial testing. If I go out and buy 100 units (or whatever) I want to make sure that I get the lowest power ones/don't get stuffed with a load of 1mA sleeping units which would totally ruin battery life.

Any ideas on the differences? Is the 12F more efficient/got different internal architecture than the E or S? Is it bad luck?

I can post a picture of the circuit and a photo of one of the units if that helps at all?

Thanks

Lewis
Last edited by Dead_Donkey on Wed Oct 31, 2018 12:22 pm, edited 1 time in total.
User avatar
By PeteKnight
#78971 You talk about re-flashing with the latest firmware, but then say that all the devices are running the same code.
When most ESP devices are shipped, they are supplied with basic AT firmware that allows them to be used as a Wi-Fi modem. Uploading custom code to the ESP module overwrites this code.

Current consumption of raw ESP chips shouldn’t be any different, but when you start looking at various Dev boards that have the chip, an LED, a voltage regulator and some USB to serial conversion hardware on them, things start to differ enormously.

You’ve not shared the code you’re using, or much info on the actual boards you’re using.

The standard approach with power saving for ESPs is to put them into Deep Sleep mode. The only thing that then runs is an internal timer, and when this times-out it can be used to reset (reboot) the device. We assume that this is what your code is doing, but as you’ve not shared the code we can’t tell.

If you search YouTube for Andreas Spiess (the guy with the Swiss accent) you’ll see that he’s done quite a few experiments to test the power consumption of various ESP8266 and ESP32 Dev boards in Deep Sleep mode and his findings are quite interesting. I think he also talks about the various voltage regulators that can be used to power the ESPs and strategies for reducing the current consumption of this voltage regulation circuitry.

In one of his recent videos he mentions a board made by an American guy called Kevin Darrah that uses an Attiny chip as the timer, instead of the ESP’s built-in deep sleep timer. The Attiny then powers up the ESP for long enough to log data and send a message, then goes back to sleep again. Kevin calls this the trigBoard, and the only drawback is that they cost $20 each.

Hope this helps.

Pete.