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
@modx55343 жыл бұрын
Very good video! You mentioned several things I did not know like switching GPIO only to output when needed. Thank you ☺️
@tycstahX4 жыл бұрын
I keep coming back. Explained so well!
@deangreenhough34795 жыл бұрын
Once again, valid and well received advice. 🏴👍
@mr.meticulous12413 жыл бұрын
Excellent help! Succinct and easy to implement.
@DocMicha5 жыл бұрын
I never thought about serial, Thank YOU!
@G6EJD5 жыл бұрын
Every little helps😊
@marks_view14865 жыл бұрын
Dave , many thanks for the tips - conserving power always a problem.
@cad31755 жыл бұрын
..straight to the point, I love it, brilliant! :)
@marcrives2795 жыл бұрын
Really nice low power check list. Everything is there!
@ChrisHalden0073 жыл бұрын
Very useful indeed!
@rodrigosantos41603 жыл бұрын
Extremely useful tips!!! Thank you so much!
@wei482214 жыл бұрын
Thank you for the high quality tutorial video..
@GoatZilla3 жыл бұрын
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.
@JosefZvolanek5 жыл бұрын
Much nice and helpful information!
@davebeckham54295 жыл бұрын
Very nice tips. - many thanks for sharing.
@zyghom3 жыл бұрын
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
@WistrelChianti2 жыл бұрын
for everything else,... there's mastercard
@alaskawoodman5 жыл бұрын
Good ideas, nicely done
@sblantipodi4 жыл бұрын
Love the Channel. Congrats
@EL902915 жыл бұрын
Exactly what I was looking for my project, (automated chicken coop door)
@rimbang_3 жыл бұрын
Thanks
@mareksukup95925 жыл бұрын
great - thank you for this advices
@faridnubaili79172 жыл бұрын
Thank you sir
@tonysicily26873 жыл бұрын
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.
@G6EJD3 жыл бұрын
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.
@tonysicily26873 жыл бұрын
@@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.
@prateekmahajan19294 жыл бұрын
That's some good info 👍
@vtech87165 жыл бұрын
great Sir
@TOMTOM-nh3nl3 жыл бұрын
Thank You
@hoereuh4 жыл бұрын
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?
@johnpricejoseca17053 жыл бұрын
Thanks, David. Very useful tips. How much current is saved by changing a pin from an output to an input? Cheers!
@G6EJD3 жыл бұрын
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.
@johnpricejoseca17053 жыл бұрын
@@G6EJD thanks!
@Dialbist5 жыл бұрын
You can also specify the ip address immediately, and not receive dynamically.
@G6EJD5 жыл бұрын
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.
@davidbrooks86213 жыл бұрын
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.
@plazmax5 жыл бұрын
Awesome
@markpieterse77855 жыл бұрын
nice tips. thanks. what about rater use RF instead of WiFi
@G6EJD5 жыл бұрын
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.
@eriklaken10255 жыл бұрын
Thank you, very usefull.:)
@tablatronix5 жыл бұрын
Also do not Serial.begin() at all if on battery, if you dont need it
@G6EJD5 жыл бұрын
tablatronix, yes sometimes we overlook the obvious! Thanks.
@lalex655 жыл бұрын
Clear as usual. I'm looking for a wakeup based on ADC value, it seems possible with ULP, did anybody use this ?
@G6EJD5 жыл бұрын
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.
@G6EJD5 жыл бұрын
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.
@lalex655 жыл бұрын
@@G6EJD using only esp32 ADC is not mandatory but I feel this much more elegant
@quito965 жыл бұрын
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
@G6EJD5 жыл бұрын
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.
@quito965 жыл бұрын
@@G6EJD I appreciate you for the tip and thank you for sharing your knowledge
@G6EJD5 жыл бұрын
Do you have it running now?
@G6EJD5 жыл бұрын
WiFi can be a little tricky but once you have some decent functions you’ll find its quite reliable.
@quito965 жыл бұрын
@@G6EJD not yet, i´am check your epaper ino file and later i must include it in my sketch…
@wandaniel45963 жыл бұрын
it is very hard for me since im working with gps anti theft alarm system, pls david i really need help
@G6EJD3 жыл бұрын
Ok, what help do you need?
@wandaniel45963 жыл бұрын
@@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
@G6EJD3 жыл бұрын
@@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.
@wandaniel45963 жыл бұрын
@@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
@wandaniel45963 жыл бұрын
@@G6EJD sir i cannot find your email address through email, can you email me first? wandaniel94@gmail.com
@user-cr9fr2mk9i4 жыл бұрын
Serial.begin(1500000); work on esp32
@G6EJD4 жыл бұрын
Слава Загайнов Maximum baud = 921600
@JC-tr2kw4 жыл бұрын
@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
@G6EJD4 жыл бұрын
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!