Hello,
I don't know much about programming with Arduino.
To save power when running an ESP32 board off a battery, is there a way in loop() to display stuff on the screen for 5s, shut it off for 25s before waking it up for another 5s?
Thank you.
Hello,
I don't know much about programming with Arduino.
To save power when running an ESP32 board off a battery, is there a way in loop() to display stuff on the screen for 5s, shut it off for 25s before waking it up for another 5s?
Thank you.
You mean you want the screen to continuously blink on for 5s, and off for 25s ?
If power saving is your goal, wouldn't it be better to keep off except when the user specifically turns it on?
ie, exactly how your mobile phone works?
The problem is that it takes several seconds for the CO2 sensor to take a few samples and stabilize, so I need to keep the program + sensor running permanently, and just shut off the screen regularly to save a bit of power.
Apparently, that board is supposed to draw 67mA, which means that a small 2,200mAh powerbank should be able to keep it running for 32h… but experience shows that it doesn't last anywhere that long.
You could still have the display be off except when requested to be on.
I don't think it would be pleasant to have the display constantly blinking on & off?
It's also a waste of power having it on at all when nobody's looking at it!
Do you really need to use that particular display? Have you looked into lower-power alternatives?
You need to do some measurements to determine what the actual current draw is, and how much is due to each part of the system (processor, WiFi, sensor, display etc) - there's no point fiddling with the display if that isn't the main power consumer!
but your sensor draws 300mA peak and 18mA average so you need to take that into account too.
How often does the data on the display change? An e-ink display might be a better choice if you only need to update the information on the display every few minutes.
Thanks everyone for the input. I'll look into putting the device into sleep mode, and possibly porting the code to an e-ink board instead.
And remember battery specs range from wildly optimistic to complete lies. I start by dividing by 2. Also the spec has an endpoint voltage that is below what will power even a LDO regulator.