No video

Tech Note 131 - ESP32/8266 Reducing Battery Load Hints & Tips

  Рет қаралды 18,050

G6EJD - David

G6EJD - David

Күн бұрын

Пікірлер: 69
@tonysicily2687
@tonysicily2687 5 жыл бұрын
Another fantastic video, great pacing, great slides, and very clear VO. You have become my ‘Go to’ channel’ First time I have seen most of these tips, REALLY useful
@modx5534
@modx5534 3 жыл бұрын
Very good video! You mentioned several things I did not know like switching GPIO only to output when needed. Thank you ☺️
@tycstahX
@tycstahX 4 жыл бұрын
I keep coming back. Explained so well!
@deangreenhough3479
@deangreenhough3479 5 жыл бұрын
Once again, valid and well received advice. 🏴󠁧󠁢󠁥󠁮󠁧󠁿👍
@mr.meticulous1241
@mr.meticulous1241 3 жыл бұрын
Excellent help! Succinct and easy to implement.
@DocMicha
@DocMicha 5 жыл бұрын
I never thought about serial, Thank YOU!
@G6EJD
@G6EJD 5 жыл бұрын
Every little helps😊
@marks_view1486
@marks_view1486 5 жыл бұрын
Dave , many thanks for the tips - conserving power always a problem.
@cad3175
@cad3175 5 жыл бұрын
..straight to the point, I love it, brilliant! :)
@marcrives279
@marcrives279 5 жыл бұрын
Really nice low power check list. Everything is there!
@ChrisHalden007
@ChrisHalden007 3 жыл бұрын
Very useful indeed!
@rodrigosantos4160
@rodrigosantos4160 3 жыл бұрын
Extremely useful tips!!! Thank you so much!
@wei48221
@wei48221 4 жыл бұрын
Thank you for the high quality tutorial video..
@GoatZilla
@GoatZilla 3 жыл бұрын
Delays in general are a bad idea but that's how Arduino is set up. However, if you use light sleep on at least the 8266, you actually need to have some delay in there for the power savings.
@JosefZvolanek
@JosefZvolanek 5 жыл бұрын
Much nice and helpful information!
@davebeckham5429
@davebeckham5429 5 жыл бұрын
Very nice tips. - many thanks for sharing.
@zyghom
@zyghom 3 жыл бұрын
my experience: a sensor on ESP32 that measures temp, hum. lux and its battery: 1- connecting to WiFi (static IP): anything between 2-5s, sometimes more than 10s 2- getting time from NTP server: anything between 20ms-5s, sometimes not need for connecting so just ms, sometimes connection failed so timeout 3- SHT31 sensor: max 50ms 4- TSL lux sensor: 0.4s (max accuracy) 5- ADC with 5000 iterations: 0.4s 6- MQTT publish: < 0.5s now with regards to your advice: 1- measuring voltage BEFORE wifi is connected shows different values as ESP without wifi connected is consuming much less current - so now the question is: more precise voltage measurement (when working) or less power consumption but "wrong" value - measure before wifi connected? I opt for measuring real voltage when wifi is ON 2- 200kOhm is way too much for ADC on ESP32 - your multimeter will show good results but ADC on ESP will show much lower value - again: precision vs consumption 3- my sensor takes from wake up to go to sleep anything between 3-10s, average is 5s, 90% of that time is wifi connect. Anyway, when wifi does not connect within 10s it is forced to go to sleep. Same for MQTT failures. 4- reducing serial.print - I would go even another approach: for debugging turn on serial.print - for working turn off completely - recent video on another channel showed how to with 1 command anyway, thank you for your video and advice
@WistrelChianti
@WistrelChianti 2 жыл бұрын
for everything else,... there's mastercard
@alaskawoodman
@alaskawoodman 5 жыл бұрын
Good ideas, nicely done
@sblantipodi
@sblantipodi 4 жыл бұрын
Love the Channel. Congrats
@EL90291
@EL90291 5 жыл бұрын
Exactly what I was looking for my project, (automated chicken coop door)
@rimbang_
@rimbang_ 3 жыл бұрын
Thanks
@mareksukup9592
@mareksukup9592 5 жыл бұрын
great - thank you for this advices
@faridnubaili7917
@faridnubaili7917 2 жыл бұрын
Thank you sir
@tonysicily2687
@tonysicily2687 3 жыл бұрын
Oe of the best tutorials on this I have seen, not surprising, al, your vids are awesome. My I ask, is there a simple way to check the effects of these changes? Can I for instance, run the project for a day/week then measure something with a multimeter, make the changes, and re measure after the same time period? If so, do I measure the remaining battery voltage? Sorry for such a beginner question, but being such a newbie, is why I love your tutorials so much.
@G6EJD
@G6EJD 3 жыл бұрын
Yes that’s the best way of measuring the effect of changes, measure the voltage with a multimeter implement the change then wait the same time and measure again. The problem is to be really sure you need to start with the same battery voltage each time as the discharge characteristics of a battery are not linear. But you’ve got the idea on how to see the effect of changes.
@tonysicily2687
@tonysicily2687 3 жыл бұрын
@@G6EJD thank you very much sir, I really appreciate you taking the tine to get back to me personally. I understand-ish, the programming, but the electronics are a dark magic.
@prateekmahajan1929
@prateekmahajan1929 4 жыл бұрын
That's some good info 👍
@vtech8716
@vtech8716 5 жыл бұрын
great Sir
@TOMTOM-nh3nl
@TOMTOM-nh3nl 3 жыл бұрын
Thank You
@hoereuh
@hoereuh 4 жыл бұрын
hi, ive googled, but didnt find, maybe u know, how fast can you go in and out of sleep to save power? lets say i do a bluetooth scan every 2 seconds, can i sleep for 1.5seconds? would that help save batterypower?
@johnpricejoseca1705
@johnpricejoseca1705 3 жыл бұрын
Thanks, David. Very useful tips. How much current is saved by changing a pin from an output to an input? Cheers!
@G6EJD
@G6EJD 3 жыл бұрын
It depends on the load attached and the pin state before the change is made. Say the pin was driving a load then it would be a function of the load impedance but could be in the mA range. Moving to an input places the pin into a high impedance state and so also prevents current flow (sink) into the device. It really does make a difference if your trying to get best possible power consumption from the device.
@johnpricejoseca1705
@johnpricejoseca1705 3 жыл бұрын
@@G6EJD thanks!
@Dialbist
@Dialbist 5 жыл бұрын
You can also specify the ip address immediately, and not receive dynamically.
@G6EJD
@G6EJD 5 жыл бұрын
Yes, I did think of including that but in practice I’ve found it makes. Dry little difference over on instructables I did some tests and found it gained just a few mS, but it does depend on your wireless network and access point, mine are very fast and I can detect no difference.
@davidbrooks8621
@davidbrooks8621 3 жыл бұрын
Nice lecture. Only one remark about time saving in println(). The calculations for 115200 are wrong 😑. Only about 10 time faster. And not about 1000 times.
@plazmax
@plazmax 5 жыл бұрын
Awesome
@markpieterse7785
@markpieterse7785 5 жыл бұрын
nice tips. thanks. what about rater use RF instead of WiFi
@G6EJD
@G6EJD 5 жыл бұрын
Mark, could use RF but the availability of robust protocols for RF modules (other than LoRa) is low thereby making their use questionable. They work just not as reliably as most people want.
@eriklaken1025
@eriklaken1025 5 жыл бұрын
Thank you, very usefull.:)
@tablatronix
@tablatronix 5 жыл бұрын
Also do not Serial.begin() at all if on battery, if you dont need it
@G6EJD
@G6EJD 5 жыл бұрын
tablatronix, yes sometimes we overlook the obvious! Thanks.
@lalex65
@lalex65 5 жыл бұрын
Clear as usual. I'm looking for a wakeup based on ADC value, it seems possible with ULP, did anybody use this ?
@G6EJD
@G6EJD 5 жыл бұрын
laurent, ULP has to be programmed in machine code and what you propose is feasible so yes and there are some basic examples around. It may be possible to write the logic in C and assign the code to one of the cores (ULP) whole the other core sleeps, I have not tried that concept and don’t know if the constructs are available to do it.
@G6EJD
@G6EJD 5 жыл бұрын
If you don’t need a programmed wake up voltage you could use a simple voltage divider that uses a gpio pin to wake up the main cpu or use a low power op-amp as a comparator and interrupt source for a gpio pin and with a variable resistor would allow a setting.
@lalex65
@lalex65 5 жыл бұрын
@@G6EJD using only esp32 ADC is not mandatory but I feel this much more elegant
@quito96
@quito96 5 жыл бұрын
Hello Dave, i´m very grateful for your tips. :-) I am a ESP newbie….is that possible that you give us a complete sketch example? In my current project I am desperate to get to the Wi - fi interface. Unfortunately I have no strategy for Wi - fi auto reconnect. Thanks for your input Guido
@G6EJD
@G6EJD 5 жыл бұрын
quito96, the WiFi will already automatically reconnect for you if it looses a connection, the WiFi on /off functions are on screen and widely available but I’ll see what I can do, so you mean just WiFi on / off and connection improvements. If you look in my github at the epaper weather station v13 code you will see a function in there for WiFi off and a robust WiFi connection function, you just need to include copies of those in your sketch then call them.
@quito96
@quito96 5 жыл бұрын
@@G6EJD I appreciate you for the tip and thank you for sharing your knowledge
@G6EJD
@G6EJD 5 жыл бұрын
Do you have it running now?
@G6EJD
@G6EJD 5 жыл бұрын
WiFi can be a little tricky but once you have some decent functions you’ll find its quite reliable.
@quito96
@quito96 5 жыл бұрын
​@@G6EJD not yet, i´am check your epaper ino file and later i must include it in my sketch…
@wandaniel4596
@wandaniel4596 3 жыл бұрын
it is very hard for me since im working with gps anti theft alarm system, pls david i really need help
@G6EJD
@G6EJD 3 жыл бұрын
Ok, what help do you need?
@wandaniel4596
@wandaniel4596 3 жыл бұрын
@@G6EJD i had develop motorcycle anti theft (vibration sensor) with neo 6m gps using esp32 embedded with sim800l (ttgo call) powered with 20000mah battery pack, the problem is i failed to use sleep mode and my system can only operate for 17hours(active mode all the way), i really dont understand how to use the sleep mode for my system, may i email you my coding? Pls sir i need guidance, im working alone and i had no one who can help me with this problem
@G6EJD
@G6EJD 3 жыл бұрын
@@wandaniel4596 Yes please do and I'll have a look for you. I'll add sleep too. contact me at g6ejd.dynu.com then contact. I should advise you that it's hard to make the GPS sleep not that you want it to so it knows where it is. A 20A/Hr battery should last at least 5-days or more, so something is drawing a lot of power, if your getting 17-hours from a fully charged pack then your circuit is drawing ~1.2A and that's the problem, not the sleeping.
@wandaniel4596
@wandaniel4596 3 жыл бұрын
@@G6EJD for the gps i add a relay, the gps is switch ON when needed only, ok sir i email you the coding, thank you sir
@wandaniel4596
@wandaniel4596 3 жыл бұрын
@@G6EJD sir i cannot find your email address through email, can you email me first? wandaniel94@gmail.com
@user-cr9fr2mk9i
@user-cr9fr2mk9i 4 жыл бұрын
Serial.begin(1500000); work on esp32
@G6EJD
@G6EJD 4 жыл бұрын
Слава Загайнов Maximum baud = 921600
@JC-tr2kw
@JC-tr2kw 4 жыл бұрын
@G6EJD Great tips. I was a bit playing around with deep sleep and your tips regarding serial output crossed my mind when I saw the bootloader output. I thought it was quite wasteful to dump all that output every time it came out of deep sleep. So disabling might make sense: the behavior is described here: github.com/espressif/arduino-esp32/issues/642. thanks again for sharing your expertise
@G6EJD
@G6EJD 4 жыл бұрын
J C, yes it’s just wasted time printing to the serial monitor so disabling it by simply not initialising the serial (omit serial.begin() ) saves power!
ESP32 Battery Life Tips
17:40
Tech Dregs
Рет қаралды 3,8 М.
Tech Note 130 - Solar Power for Projects (Arduino/ESP8266/ESP32)
20:59
SPONGEBOB POWER-UPS IN BRAWL STARS!!!
08:35
Brawl Stars
Рет қаралды 20 МЛН
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 26 МЛН
❌Разве такое возможно? #story
01:00
Кэри Найс
Рет қаралды 3,6 МЛН
Joker can't swim!#joker #shorts
00:46
Untitled Joker
Рет қаралды 40 МЛН
Getting started with ESP32 Deep Sleep
13:36
Programming Electronics Academy
Рет қаралды 10 М.
#229 ESP32 - Saving Variables Across Deep Sleep
24:26
Ralph S Bacon
Рет қаралды 10 М.
#400 The Best Power Source for ESP32/ ESP8266 Projects
14:30
Andreas Spiess
Рет қаралды 117 М.
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31
How to Configure the ESP32 for Light and Deep Sleep Modes
20:30
ForceTronics
Рет қаралды 1,3 М.
Tech Note 154 - ESP File Server using the Asynchronous Webserver
9:15
SPONGEBOB POWER-UPS IN BRAWL STARS!!!
08:35
Brawl Stars
Рет қаралды 20 МЛН