#229

  Переглядів 9,767

Ralph S Bacon

Ralph S Bacon

2 роки тому

If you need to save power on your ESP32, Deep Sleep is a necessity.
PCBWay $5 for 10 pieces www.pcbway.com plus much, much more
We'll take a look at how to wake up an ESP32 from a Deep Sleep and what you can do to maintain values across reboots from Deep Sleep.
I'll explain all the kerfuffle (technical term) about QIO, QOUT, DIO and DOUT that caused me so much pain since the Espressif Framework update beyond 3.3.0.
And some announcements! (Well, four in total)
My GitHub with more details and code (sketch) example:
github.com/RalphBacon/229-ESP...
► You can now support me by buying me a coffee!
buymeacoffee.com/ralphbacon
► My Flash Mode QIO vs DIO issue on PlatformIO Espressif Framework
github.com/platformio/platfor...
► Insight Into ESP32 Sleep Modes & Their Power Consumption
lastminuteengineers.com/esp32...
► ESP32 Deep Sleep & Its Wake-up Sources
lastminuteengineers.com/esp32...
► Why you should think twice about using floats and doubles
hownot2code.com/2017/06/09/fl...
► List of all my videos
(Special thanks to Michael Kurt Vogel for compiling this)
bit.ly/UKpostsVideoList-RalphB...
► If you like this video please give it a thumbs up, share it and if you're not already subscribed please consider doing so and joining me on my Arduinite (and other μControllers) journey
► My channel, GitHub and blog are here:
------------------------------------------------------------------
• / ralphbacon
• ralphbacon.blog
• github.com/RalphBacon
• buymeacoffee.com/ralphbacon
------------------------------------------------------------------

КОМЕНТАРІ: 121
@RalphBacon
@RalphBacon 2 роки тому
I've noticed that many comments are being removed by YT. So, don't post (identifiable) links and it might work. Even I can't post comments with links any more. I have no idea what's going on!
@NormanNodDunbar
@NormanNodDunbar 2 роки тому
I think your reply to me about buying you a coffee, and my vulgar mentioning of a certain book ;-), has also been deleted -- possibly because you were kind enough to include a link to it. I received a notification, but there was no reply from you on the thread. Weird. Cheers, Norm.
@juanherrero911
@juanherrero911 2 роки тому
Excellent video as usual Ralph, this will help with my weather station project. Thanks for the heads up on flash mode too.
@RalphBacon
@RalphBacon 2 роки тому
Glad to help! BTW Espressif have FIXED the regression QIO/DIO issue in the latest release 3.4.0 - whether that means we still have to use QOUT or DIO I'm not sure, I haven't tried it yet!
@TradieTrev
@TradieTrev 2 роки тому
Such a wealth of info mate!
@RalphBacon
@RalphBacon 2 роки тому
You would not believe how much ends up on the cutting room floor! But viewers can only absorb so much before getting overloaded! 😁
@viniciusnoyoutube
@viniciusnoyoutube 2 роки тому
I had the a bug with the ESP 32 restating loop and could find the problem. Looked up on the internet and as you said most comments says it's a voltage problem but I knew it was not. Probably the problem was the QIO, QOUT, DIO, DOUT. Great video as always.
@RalphBacon
@RalphBacon 2 роки тому
Glad I could help! Another viewer said he had not experienced this in the Arduino IDE (I use PlatformIO) but it might just be the version of the Espressif framework that is being used in that situation. Easy to check: the QIO/DIO mode is output on an ESP32 reboot.
@tonybell1597
@tonybell1597 2 роки тому
Ah! Yes, that might also explain why my attempt at your Internet radio device kept looping…. Time to revisit 😀👍
@RalphBacon
@RalphBacon 2 роки тому
Another reason is if you try and use the full 150Kb for a circular buffer when you don't have any PSRAM assigned (so it's using SRAM). Reduce the circular buffer to 10Kb initially.
@U8uxa8SP
@U8uxa8SP 2 роки тому
I love your channel. I always learn something, thanks.
@RalphBacon
@RalphBacon 2 роки тому
Glad to hear it! Thanks, Barry.
@CooperDuper3000
@CooperDuper3000 2 роки тому
I just stumbled upon your channel by this video and its great! Well, really nothing more to say, just a big Thanks! Subscribed!
@RalphBacon
@RalphBacon 2 роки тому
Welcome aboard! Nice to see your here. And thanks for the sub 👍
@markgreco1962
@markgreco1962 2 роки тому
Thanks Ralph
@RalphBacon
@RalphBacon 2 роки тому
You are most welcome, Mark, glad to see you here!
@gazzacroy
@gazzacroy 2 роки тому
hi there wow. a really handy video. i never played with the sleep modes. all of my projects have been usb powed. so im working on a small project which uses a battery and so this has come at just the right time for me. thank you for the extra info too that was very helpful too . :)
@RalphBacon
@RalphBacon 2 роки тому
Obviously I _knew_ you were working on a battery-powered project so I did this video!
@gazzacroy
@gazzacroy 2 роки тому
@@RalphBacon lol ops i just blown up a esp32 :( dam.. bloody forgot it only works 3.3.. arrrrrrrrr well haLF works lol ops
@RalphBacon
@RalphBacon 2 роки тому
If you delivered 5v to a pin, that might be the only pin affected. If you have it 5v to vcc... Well, ⚰️
@gazzacroy
@gazzacroy 2 роки тому
@@RalphBacon such a silly thing i did. i put a 5v fully chagred 470uf cap on an adc pin ("just forgot to discharge it") most of the chip still work but no adc :( oh well a silly mistake which i guess we've all done something similar lol...live and learn
@RalphBacon
@RalphBacon 2 роки тому
My condolences on your loss. It's too easy to do this with 3v3 chips. I've done it too; I once destroyed a Raspberry Pi 3 doing something similar 😭
@sinjhguddu4974
@sinjhguddu4974 2 роки тому
Neat tutorial, thank you!
@RalphBacon
@RalphBacon 2 роки тому
Glad it was helpful!
@deterdamel7380
@deterdamel7380 2 роки тому
Hi Ralph. As you mentioned before, some components on the dev board consuming power during the deep sleep. Andreas Spiess did some research on this and made some videos about. Also the ULP seems to be a very exciting player during deep sleep.
@RalphBacon
@RalphBacon 2 роки тому
Thanks for the info, Deter! I'm not too worried with my setup as the battery lasts (at least) all night and if it really died I'll have a failsafe in the code so the heater won't suddenly switch on (and burn my workshop down). 😭 I do want to investigate the ULP as another viewer mentioned it too and the Espressif documentation did mention (I believe) that it could take sensor readings and wake up the main processor if necessary. We shall see!
@richardbarker8636
@richardbarker8636 Рік тому
Thank you very much for this video. I am at the same time both delighted to discover that I can sleep my ESP32 for months or even years without resorting to RTC storage magic and hugely miffed that when I researched the maximum sleep duration back in November last I found a post by somebody who stated that I would get only 71 minutes. Accordingly, I wrote code to count 1 hour sleeps and use the RTC storage for that. It works fine but it was unnecessary and made my code more complicated. Lesson learned - Google does not always present accurate answers. It does make my prototype weather station able to customise its sleep though if the charge state is getting low. Thanks for the heads up!
@RalphBacon
@RalphBacon Рік тому
Glad you liked the updated information, Richard. I wonder if anyone has ever tested putting an ESP32 to sleep for, say, a year? My refuse bin reminder sleeps daily for 24 hours but that's not quite the same!
@Chriva
@Chriva 2 роки тому
Welcome back, Mr Bacon :)
@RalphBacon
@RalphBacon 2 роки тому
Glad to be back, another Friday, another video!
@fillempie1501
@fillempie1501 2 роки тому
First time I programmed an ESP32 with your webradio app I did get a continuing reboot. I thought how the hell did this work for Ralph and not mine, did he something I forgot. I switched to DIO and it worked. Now it is clear what the problem is /was:)
@RalphBacon
@RalphBacon 2 роки тому
Yes, that would be the issue, I suspect. If it is a power issue you would at least get a "Brownout detected" message (or similar).
@ManfredAckermann
@ManfredAckermann 2 роки тому
Useful and interesting. If you also want the esp doing something while sleeping, you should take a look at ulp programming. Awesome stuff... I get measurements from a sensor in ulp mode and wake esp only up for the heavy lifting.
@RalphBacon
@RalphBacon 2 роки тому
I'll check it out! Thanks for the heads up, Manfred.
@hariseldon2577
@hariseldon2577 2 роки тому
Very useful. Many thank you's
@RalphBacon
@RalphBacon 2 роки тому
Glad it was helpful!
@Tony770jr
@Tony770jr 2 роки тому
Hi Ralph, another nice video. I like the breadboard with the banana jacks. Any link to find it as I'd like to get one? Thanks!
@RalphBacon
@RalphBacon 2 роки тому
My breadboard is this one (UK supplier) but you can probably find it elsewhere: coolcomponents.co.uk/products/ad-11-advanced-solderless-breadboard
@MrJozza65
@MrJozza65 2 роки тому
Thanks for the information Ralph, I always find your videos give me something to experiment with. The power LED on your board stays on when it's sleeping and is going to be taking a (small) current; could it be de-soldered to maximise battery life, or is there a way to turn it off in software?
@RalphBacon
@RalphBacon 2 роки тому
I won't be using any board for Deep Sleep that has an LED on it (or, as you say, you can desolder it quickly). The board I'm actually using for my remote sensor is a Wemos/Lolin TTGO T8 V1.7.1 which has an SD card slot, battery connector and an LED - but the LED does not light up when powered only from the battery. Clever, huh?
@tonybell1597
@tonybell1597 2 роки тому
Thanks Ralph, this is perfect, building a post box sensor, only needs to power on when the flap opens….. could you point me in the right direction for the esp modules you are using?
@RalphBacon
@RalphBacon 2 роки тому
Tony, I've replied 3 times and each time YT removes my reply. Outrage! Send me an email and I will give you exact details.
@RalphBacon
@RalphBacon 2 роки тому
I've added the info to my GitHub now so just follow this link and look for the "hardware_info" file! github.com/RalphBacon/229-ESP32-Deep-Sleep
@russonjacana
@russonjacana 2 роки тому
Ralph, Thanks lots for this video. I am adding it to my smart-boat project (ESP32's sending various data from all over the boat to a central processor), and I have a question. I noticed that the power led on the board stays lit when in deep sleep mode. Is there any way (or reason) to turn it off also? I know it doesn't draw much current, but the longer a battery lasts the less often I have to replace it.
@RalphBacon
@RalphBacon 2 роки тому
Glad it was helpful! 😁 Regarding the LED, that really needs to be removed (desoldered). If you need a visual indication that power is present on board, wire up an LED to a GPIO pin and flash it for 50mS every 5 seconds - enough to tell you the board is powered but not enough to flatten the battery! ⚡ A final note! (Well, you did ask). You say "on the board" which indicates to me that you are using a dev board, complete with USB socket, LED and so on. What you should / could do is create your own board (or you can buy ESP32 boards _without_ a processor so you can solder your own on) and remove all the components you don't want with a battery powered project, including USB socket and associated USB-to-Serial chip (eg CH320G, FTDI). That way you really save power. A lot of work though 😕
@larsniklassonhede3798
@larsniklassonhede3798 Рік тому
Thank you for all your videos. I'm I really appreciate them. I wonder if I can wake up esp32 caused of the internal clock reach a certain time as: if (Time_str == "10:52:00")…wake_up… Or is the clock also sleeping during deep sleep?
@RalphBacon
@RalphBacon Рік тому
As YT has removed my original reply I'll try again. 😡 You can do this if you get the current time (ESP32 will do this very easily just by connecting to your Wi-Fi). Then calculate how many seconds between NOW and your desired wake up time. Multiply by 1 million (microseconds) and Robert's your Mother's Brother, as we Brits say. Just set the value and go to Deep Sleep. My Bin Reminder project (video #246 ukposts.info/have/v-deo/qIRqZoyEo3ec0HU.html ) does this, waking up every day at 2am (give or take). All running on 3 AA batteries.
@altrbill
@altrbill 2 роки тому
Thank you for the video, it was nicely programmed and explained. I am trying to do a wireless BLE temperature sensor for one of my projects using the ESP32 on deep sleep. How did you get the wireless temperature sensor to work on deep sleep on your heater controller project? It seems like the Bluetooth disconnects and does not connect again after it enters deep sleep. Any help would be greatly appreciated!
@RalphBacon
@RalphBacon 2 роки тому
I used ESP-NOW (I did a whole video on it #223 ukposts.info/have/v-deo/pJt5mKGWpIF4tqs.html ) which is built into the ESP32, does not rely on Wi-Fi and works well (all my sensors use it here). Each sensor runs on an ESP32 with battery backup. It sends out the temperature every 5 minutes until the power disappears and it runs on battery. Goes to Deep Sleep and wakes every 15 mins. Then it sends out the temperature and goes back to sleep. rinse. repeat. When power is re-applied it all starts again. Both Wi-Fi and BT are power hungry (compared to ESP-NOW). You don't want BT connected when you are on Deep Sleep, anyway.
@altrbill
@altrbill 2 роки тому
@@RalphBacon Thank you so much Ralph! I was able to make my project work. I wish you all the best! Do you have a patreon page that I can donate to?
@ariyanmasoumi8627
@ariyanmasoumi8627 2 роки тому
Very useful and interesting. Have you tried lvgl on esp32 yet? Would be fantastic if you made a video about that
@RalphBacon
@RalphBacon 2 роки тому
I haven't yet, Ariyan, mainly because my current project (Smart heater Controller) only uses a very simple 16x2 LCD and the library I've used for years still meets my needs. That said, a better graphics library that works for _all_ screens would be something! I'll add it to my list of things to look at.
@Bob_Burton
@Bob_Burton 2 роки тому
Hi Ralph - good information as usual I know that you can turn the log outputs on and off from the IDE by setting the Core Debug mode, but what is the mysterious variable that you mentioned that allows it to be turned on/off on a sketch by sketch basis ?
@RalphBacon
@RalphBacon 2 роки тому
Hi Bob, good to see you here! The mystery variable (defined within the Espressif ESP framework) is called CORE_DEBUG_LEVEL and starts at 0 [no debugging whatsoever] to 5 [verbose]. You can set that manually in a sketch but it is honoured at _compile_ time, not run time (so no dynamic changes).
@Bob_Burton
@Bob_Burton 2 роки тому
@@RalphBacon Thanks for the quick reply. I am usually here and find your videos interesting As to CORE_DEBUG_LEVEL, it appears to be a macro. If I add my own #define statement then the Arduino IDE warns me that it is a redefinition, but seems to ignore the value that I set
@RalphBacon
@RalphBacon 2 роки тому
Yes, it is a macro definition (and in the Arduino IDE I'm not how we modify that other than the IDE setting of Tools, Core Debug Level to Verbose). We could undefine it and redefine it but I think it might be too late by then for the new value to take effect. What's wrong with the Tools option, Bob, it's a per sketch / board setting.
@Bob_Burton
@Bob_Burton 2 роки тому
@@RalphBacon Unfortunately it is not a per sketch option. Open 2 sketches in the same IDE instance. Changing the debug level in one changes it in the other. It's not the end of the World, just a nuisance
@RalphBacon
@RalphBacon 2 роки тому
Yes, I would expect that opening two sketches from the same IDE instance would keep the same settings. I found that changing the parameters on one instance of the IDE would immediately update those of the other. The workaround I found was to launch the second IDE instance directly from the app (in my set up that is from C:\Program Files (x86)\Arduino) then the parameters are separated. I just had a shortcut to that folder on my desktop and launched it from there. Incidentally, have you tried the new and improved (ahem!) Arduino IDE 2.0 - does that do the same? That's based on Eclipse Thea so might do things differently.
@zyghom
@zyghom 2 роки тому
deep sleep you showed is not the "deepest" sleep - next one is hibernation - this one disconnects power from even more circuits on esp32 - the only drawback: RTC memory is also not restored - however in many occasions such "deeper" sleep is even better - btw if you use the bare esp32 we are talking uA not mA anymore what is even better for the battery operated sensors. Of course, as you mentioned there are also other sleeps, i.e. light sleep, which resumes running from exactly the same line of the code it went to sleep from - but less savings of the battery in such case. Nice video indeed - I have never had any problem with flash modes except I am not able to use upload speed 921600 - only half of that works for me And the new Arduino 2.x is amazing (comparing to 1.x) IMHO ;-)
@RalphBacon
@RalphBacon 2 роки тому
Indeed, but I think Hibernation is just another word for switching the whole processor off! What's the difference between coming out of Hibernation mode and switching the device on from clean? I think keeping the RTC running is the least we would do if we want any kind of "intelligence" at start up! Yes, the Arduino 2.0 is better than 1.x for sure, but still not a patch on my previous Eclipse IDE and not as good as PlatformIO. But for relative beginners it's a great step up. It can only get better!
@zyghom
@zyghom 2 роки тому
@@RalphBacon Hibernation=less power taken than deep sleep with RTC on (btw hibernation still keeps 1 RTC timer on - the one to wake up). Honestly speaking I built my sensors first with the "normal" deep sleep (as 99% of the guides online) but then I realised: the only usage of RTC was to... count the "bootCount" - everything else in my sensor had no usage for keeping the history: wake up, connect to wifi and MQTT, gather telemetry, send to MQTT and then ... go to sleep. Next wake up - again. No real need to keep the "bootCount" there in the cost of extra mA. Just saying. Super detailed guide with all possible sleep modes (with the implementation) in "normal language" with examples is here: m1cr0lab-esp32.github.io/sleep-modes/ - maybe someone will go into "deep dive" ;-)
@RalphBacon
@RalphBacon 2 роки тому
Thanks for the Real World update, I will check it out in more detail 🙂
@zyghom
@zyghom 2 роки тому
@@RalphBacon no offence brother ;-)
@NormanNodDunbar
@NormanNodDunbar 2 роки тому
@@RalphBacon +1 for PlatformIO. It's brilliant.
@chrisw1462
@chrisw1462 2 роки тому
Any chance the heater controller will get another video soon?
@RalphBacon
@RalphBacon 2 роки тому
I have got a "final" video planned as it's been behaving itself very well over the last few months. Let's say "coming soon"!
@davemorgan4524
@davemorgan4524 Рік тому
I'm using both the timer and ext0 wakeup for a rain monitor. The ext0 interrupt is activated every timing a bucket tips, and the counter is incremented (similar to bootcount). Every 5 minutes or so the timer wakeup is activated and communicates the data. My problem is that when there are many ext0 wakeups, the timer wakeup will not be serviced. I can't think of a simple solution other than the ULP but that is a bit beyond my capabilities at present! Any possible workarounds? Thanks!
@davemorgan4524
@davemorgan4524 Рік тому
I appear to have a solution - not perfect but enough for my needs! Keep track of the RTC run time. Then every time there is an ext interrupt, calculate the sleep time remaining to timer wakeup (need to do this as the timer interrupt will reset when ext0 is triggered). Finally, if the time to a timer wakeup is less than a threshold (in my case 5 seconds or so), power off the ext0 circuit until the timer interrupt is finished. The slight downside is that you will miss an ext0 wakeup, and thus a tip count if it occurs within the 5 seconds. If the timer wakeup perdiod is long, then this is not a major issue - I can live with an occasional missed tip to have the much improved battery life!
@RalphBacon
@RalphBacon Рік тому
I'm slightly unclear about the statement "...when there are many ext0 wakeups, the timer WILL NOT BE serviced". Really? Why do you say that? Do you mean that the interrupts are queued? Seems unlikely in a bucket tipping project! An interrupt (ext0) should not impact a timer wakeup. I do something similar with an Arduino, that wakes up every 8 seconds, does something every 8 wake-ups, but an external trigger at any time will always get serviced anyway. Always works as far as I can tell!
@-dou.gs-
@-dou.gs- 2 роки тому
Been trying the Deep Sleep with the WiFi stack on as part of my project and after arbitrary number of reboots the WiFi won't init and causes a device reboot - have you had any experience of this sort of issue?
@RalphBacon
@RalphBacon 2 роки тому
I'm using an ESP32 WROVER (TTGO T8 v1.7.1) and it reboots every 15 minutes from about 6pm to 7am, so about 50 reboots overnight. Then it wakes up for the entire day and repeats. Never had a problem. It's now run for weeks on end like this. So: I suggest you add in some simple code to check that your heap memory is OK like this: // Check for memory leaks etc whilst developing void displayMemory() { static unsigned long memoryMillis = 0; if (millis() - memoryMillis > 3600 * 1000 || memoryMillis == 0) { unsigned long remainingStack = uxTaskGetStackHighWaterMark(NULL); log_i("Free Stack:%lu", remainingStack); log_i("Free Heap: %d", ESP.getFreeHeap()); memoryMillis = millis(); } } So every 5 minutes (or whenever it wakes up) it shows free memory,. You can adjust the time period to suit. Also, Espressif offer a reverse crash report, I won't lie, I found it awkward to use but eventually got it working and it does show you what went on. github.com/me-no-dev/EspExceptionDecoder Also ensure your ESP32 (board/chip) is set to VERBOSE Core Debug Level to get all the info (from Espressif).
@chimpofm
@chimpofm Рік тому
morning handsom. quick question. im making a vibrational sensor alarm for my motorcycle using a pulled up vibration sensor. an esp32 and deepsleep can i make 2 seperate interups. and each interupt links to a different function. ie. vibrational interupt wakes up esp32 and runs allarm function. if interupt 2 (Seat sensor) is activated. rfid acsess controller function wakes up. id like to remove my master on off switch
@RalphBacon
@RalphBacon Рік тому
Yes. When the ESP32 restarts (wakes-up) you can find out why it is awake (eg from an external interrupt or just someone pressing RST or powering up) and then find out which interrupt pin was the culprit. Look at this bit of code that I use: esp_sleep_wakeup_cause_t wakeup_reason = esp_sleep_get_wakeup_cause(); switch (wakeup_reason) { case ESP_SLEEP_WAKEUP_EXT0: log_w("Wakeup caused by external signal using RTC_IO"); break; case ESP_SLEEP_WAKEUP_EXT1: log_w("Wakeup caused by external signal using RTC_CNTL"); break; case ESP_SLEEP_WAKEUP_TIMER: log_w("Wakeup caused by RTC timer"); break; case ESP_SLEEP_WAKEUP_TOUCHPAD: log_w("Wakeup caused by touchpad"); break; case ESP_SLEEP_WAKEUP_ULP: log_w("Wakeup caused by ULP program"); break; default: log_w("Wakeup was not caused by deep sleep: %d", wakeup_reason); } where the interrupt pins are set thus: esp_sleep_enable_ext0_wakeup((gpio_num_t)vPin, HIGH); Any good?
@chimpofm
@chimpofm Рік тому
@@RalphBacon perfect. Ive been trying to get my head around it all day. Before your recent sugestion. I was going to add a seat sensor to my motorbike. And depending on its state divert to the relivent function. Ill try both methods this evening.
@chimpofm
@chimpofm Рік тому
While i have your attention .do you have anywhere i can upload images/vids. Id love to show you all the cool things your videos have inspired me to make. All my valubles run on nfc systems. (House car motorcycle )That you have personally assisted in their creation via your videos. You have given me the means to create what i have dreamed up.and inspire new ideas. And for that i thankyou.
@chimpofm
@chimpofm Рік тому
​@@RalphBacon morning. ummm the logs are not making it to the serial monitor on my ide? like it did in your video . have i done something wrong?
@RalphBacon
@RalphBacon Рік тому
Sorry, been away for a week! Have you connected the output from the device via USB to your PC? Or are you using the TX pin on the device connected to the RX pin of a suitable USB-to-Serial device? Got the right COM port?
@eezees9306
@eezees9306 2 роки тому
Thanks for this, very helpful but I did run into a compile error (integer overflow ) when I increased the SECONDS_TO_SLEEP to 3 hours. After some searching I came up with a fix: Defining the uS_TO_S_FACTOR as a long long (#define uS_TO_S_FACTOR 1000000LL)
@RalphBacon
@RalphBacon 2 роки тому
Interesting. The compiler has (incorrectly) assumed that the output from the calculation is an integer (or similar) instead of a long or long long. By specifying one of the operands as a long long, as you have done, you have made it clear to the compiler just how big the result might be, so it adapts accordingly. Well done for figuring this out, Lee. You could use ULL (unsigned long long) too, to give an even bigger (positive) range!
@andrawsfarah8320
@andrawsfarah8320 2 роки тому
Hello sir . May we have a video about esp32 as a slave in i2c communication. I was trying a project to connect it to raspberry pi as slave but i couldn't
@RalphBacon
@RalphBacon 2 роки тому
I'll add it to my list, but you should be able to get _any_ microcontroller to respond as an I2C slave, if the I2C is all set up and working on _both_ devices. For example, an UNO should be able to talk to a RasPi. Or, try and get two UNOs talking first before trying the Pi.
@kurotenma502
@kurotenma502 2 роки тому
I have question about the bug. Is this bug also happened when you using platformIO instead of Arduino IDE?? Because i haven't found this bug yet.
@RalphBacon
@RalphBacon 2 роки тому
Yes, it happens if you use a more recent (3.3.1+) Espressif ESP-Arduino framework (which I do in PlatformIO). It now issues QIO as the flash access mode correctly if selected (it previously ignored it and used DIO). I don't know how the framework differs when used in the Arduino IDE - I'll check it out one day!
@tubeDude48
@tubeDude48 2 роки тому
Why does the ets line continually say 00:22:57? Shouldn't the time increment?
@RalphBacon
@RalphBacon 2 роки тому
The "ets" message at boot-up (which stands for Espressif Task Scheduler, I believe) is the time the person last logged onto the console and declared the firmware fit for purpose - so it will never be updated until there is new firmware in more recent devices.
@tubeDude48
@tubeDude48 2 роки тому
@@RalphBacon - OH, got it!
@Dobijasek
@Dobijasek 2 роки тому
why this and some other clips constantly toggle brightness or something else several times per minute?
@xanamata5386
@xanamata5386 2 роки тому
it look like it is his camera that change brightness settings when he moves closer to the (bright white ) light
@RalphBacon
@RalphBacon 2 роки тому
I will look into this. If it's just the code screen then it might be when I move the mouse over it. If it's the entire screen then it could be a brightness issue as mentioned above.
@Dobijasek
@Dobijasek 2 роки тому
for me it look like whole screen "toggle" - screen capture + face camera + table camera. Look at 12:08 at "18Mhz", then maybe codec or something.
@RalphBacon
@RalphBacon 2 роки тому
I will check it out, thanks for the time stamp, now I know where to look!
@flemmingchristiansen2462
@flemmingchristiansen2462 2 роки тому
Why battery on your heater control? It is connected to mains. Deep sleep will still be a good thing, no reason to waste energy.
@jyvben1520
@jyvben1520 2 роки тому
the relay is connected to the mains, not the board, would need a lot of extra hardware to convert the 240V AC power to 3.3/5 volt DC
@RalphBacon
@RalphBacon 2 роки тому
@Flemming The main heater controller is running on mains electricity (via a small transformer). I haven't (yet) made any attempt at reducing power apart from dimming the LCD screen. The remote temperature sensor (with power detector) runs on mains during the day (or when I am in the workshop) but on battery at other times, just waking up every 15 minutes to touch base with the main controller. I'll explain all in a future video. It's working quite nicely now but not yet completed (will it ever be?).
@Brian_Of_Melbourne
@Brian_Of_Melbourne 2 роки тому
So, since your videos are aimed at somewhat less experienced viewers would it be helpful to explain a little bit more about what the QIO, DIO, QOUT, and DOUT settings mean at the hardware level. Perhaps showing a schematic and explaing the four different data paths? Maybe (judging by other comments) this could do with a more in-depth video of its own? At 16:50 referring to pre-processor values as "variables" is a bit off, they are constants. At 21:25 that isn't a variable, it is a function returning a value. IMHO referring to things that aren't variables as variables will be confusing for some. The two 'time' constants might be better defined as TIME_TO_HANG_ABOUT_in_ms and TIME_TO_SLEEP_in_us that way they their purpose and units are clear at the point of use and the setting of their value in the #define line can be well commented.
@RalphBacon
@RalphBacon 2 роки тому
I knew I would get picked up on stuff like this so it's good you make me realise I should always use the correct terminology, Brian. In my defence - well, no I don't have one apart from sloppiness, so I will be more careful in the future! Good to have you looking over my shoulder!
@Brian_Of_Melbourne
@Brian_Of_Melbourne 2 роки тому
@@RalphBacon We all slip up a little sometimes. :-) I for one sometimes use 'battery' when I mean 'cell', although I don't loose all that much sleep over it.
@mahudson3547
@mahudson3547 2 роки тому
@@Brian_Of_Melbourne lose sleep? (Not loose) if we are being pedantic!
@TheRealStructurer
@TheRealStructurer Рік тому
Great video! Does it also work for the ESP8266?
@RalphBacon
@RalphBacon Рік тому
That's a whole video in itself but you can get a lot of information from this website: bit.ly/ESP8266_Deep_Sleep
@TheRealStructurer
@TheRealStructurer Рік тому
@@RalphBacon Thanks for the quick response and the link 👍🏻
@ficeto
@ficeto 2 роки тому
There is no QIO/DIO issue/change. When you select QIO, the bootloader still needs to boot in DIO and then switch to QIO. There is no guarantee that the flash chip in your module supports QIO though, so you might get into bootloop. Please correct your statements.
@RalphBacon
@RalphBacon 2 роки тому
Hang on! The issue is that it all worked up to framework 3.3.0 - when QIO was selected the bootloader reported DIO. Whether it stayed in DIO mode or not I cannot determine. But it all worked. Now, from 3.3.1 onwards, when I select QIO, the bootloader reports QIO as I showed in my video, but then causes all my ESP32 modules to loop - which they didn't before. This implies I was not running in QIO mode previously. So the issue is that the framework is doing something _different_ now that causes problems for our ESP32 modules. Maybe it is now working as it should but I have yet find an ESP32 module that runs successfully if QIO is selected; only QOUT works for me (or DIO and DOUT of course). With the utmost respect to you, Hristo, I can't see where I am misrepresenting the situation.
@ficeto
@ficeto 2 роки тому
@@RalphBacon If this was true, many people would have reported it. I have not seen a single report about this. I am using QIO all of the time, but have some boards here that can not run in that mode (1 or 2 from many). The options for flash mode or things underneath have not really changed. Also what do you mean by 3.0.0? ESP32 Arduino is on version 2.0.1 max
@RalphBacon
@RalphBacon 2 роки тому
I'm running on Visual Studio with PlatformIO, Hristo. The Espressif 32 framework is now at 3.3.2 on that IDE. Is this relevant: I did notice in the "boards.txt" file for the ESP32 (Wrover, but they are all the same) it seems that regardless of the Flash Mode selected, the *build_boot* might indeed be using the selected QIO but the actual *flash_mode* is always set to DIO regardless of the Flash Mode option picked. On that basis it might be just the initial boot that fails? I don't understand the intricacies of what mode is used for what IDE: esp32wrover.menu.FlashMode.qio=QIO esp32wrover.menu.FlashMode.qio.build.flash_mode=dio esp32wrover.menu.FlashMode.qio.build.boot=qio esp32wrover.menu.FlashMode.dio=DIO esp32wrover.menu.FlashMode.dio.build.flash_mode=dio esp32wrover.menu.FlashMode.dio.build.boot=dio ... etc [All in packages\esp32\hardware\esp32\1.0.6\boards.txt] This might just be for the Arduino IDE; I specify my Flash Mode specifically in the platformio.ini thus: [env:debug] platform = ${common.platform} board = esp32_dev framework = arduino board_build.f_flash = 40000000L board_build.f_cpu = 240000000L board_build.flash_mode = qout ; was QIO ... etc
@ficeto
@ficeto 2 роки тому
@@RalphBacon see that build.flash_mode is DIO but build.boot is QIO. Image is flashed in DIO but is booted in QIO
@RalphBacon
@RalphBacon 2 роки тому
I'm delighted to see this has been fixed in framework, 3.4.0: o Fixed a regression with incorrect flash modes used for uploading (#584, #623, #630)
@TheUnofficialMaker
@TheUnofficialMaker 2 роки тому
Arduino 1.8.16 cannot create sketch. ok so only opens with 2.0.
@RalphBacon
@RalphBacon 2 роки тому
Are you saying there's a bug in 1.8.16 (I'm using 1.8.15) or something else, Vic? The "latest" IDE 2.0 seems OK-ish (still gives red squigglies where they shouldn't oughta be) so I guess we can all use that now.
@xanamata5386
@xanamata5386 2 роки тому
a lend me a quid ,donation site , might have less tax and middlemen restrictions . no buy , no rent , no give, just infinite time for payback
@RalphBacon
@RalphBacon 2 роки тому
Hmm. I guess I'm not going to be getting a coffee from you any time soon! Drat! Believe it or not, some people feel that other people's contributions are worth a small acknowledgement now and again. Oh, there's no _lending_ involved, it's a pure _donation_ in the same way that I donate to several technical authors (eg most recently to CoolTerm and ElegantOTA) to keep the wheels turning. Funnily enough, I have to declare each donation and pay tax on it just like any other income. That means I get £2.50 for each coffee bought with which I can buy more Arduino-related components (or even a _real_ coffee now and again).
@xanamata5386
@xanamata5386 2 роки тому
@@RalphBacon hello , i was not criticizing your donation opening , i was criticizing the tax and the other bureaucratic stuff that comes with services like it my comment was more about a possible way to bypass them . i would like to welcome you to my house and treat you a coffee . i have not donated anything yet , so don feel insulted from my hesitations . i m generally ,not sure what is the right thing to do , and until i am , i do very few and mandatory things .
@RalphBacon
@RalphBacon 2 роки тому
In that case, I apologise unreservedly as I misunderstood what you were saying. Yes, tax is a big burden for me, as I earn very little these days. But I must not complain as there are others in a worse position than me. Please, please don't feel pressurised into donating anything at all. It is there for my supporters to do so when they feel able and willing. I only donate to others about once per year but I hope it helps them keep developing their code which I use.
@xanamata5386
@xanamata5386 2 роки тому
@@RalphBacon i was inspired for the "lend me a quid" by a story i watched about the singer of motorhead , lemmy , that his name derives for that quote "lend me a quid" , a man that probably was not in a need of lending him a quid . but a minor liquefaction of the concrete appreciation that he had i liked the story i am not a motorhead fan . i find that some community and friendship elements derive from it . i should apologize for not been clear enough at my comment and seemed a bit teazy
@RalphBacon
@RalphBacon 2 роки тому
At least we now are in full understanding of all posts here! Interesting anecdote, by the way! 😃
@695renzo
@695renzo 2 роки тому
Please: 1 where may I find your breadboard model 2 it is possible to find a written part of your explanatios. You are speaking too fast for a foreing fellow. Thanks Renzo
@RalphBacon
@RalphBacon 2 роки тому
Hello Renzo! My breadboard is this one (UK supplier) but you can probably find it elsewhere: coolcomponents.co.uk/products/ad-11-advanced-solderless-breadboard I'm sorry I'm speaking too fast for you. There should be an automatic (English) transcription on all my videos. Just switch on captions. They are generated by UKposts so may not be 100% perfect but will be better than nothing. And you can watch the video at a slower speed to see if that helps too.
Что будет с кроссовком?
00:35
Аришнев
Переглядів 2,5 млн
#224 🛑 STOP using Serial.print in your Arduino code! THIS is better.
26:39
#226 ROTARY ENCODER with no switch bounce 🤓 - you MUST use this
25:49
Ralph S Bacon
Переглядів 27 тис.
#118 ESP8266 Deep Sleep 💥 and Bare Bones ESP (easy)
34:18
Ralph S Bacon
Переглядів 28 тис.
#266 ESP32 Deep Sleep Project - Door Open/Closed Detection with ESP-NOW
25:18
#227 ✨printf for Arduino✨(and ESP32, ESP8266) easy, formatted output
23:02
ESP32 Deep Sleep: Ultra-Low Power Coprocessor
15:27
atomic14
Переглядів 28 тис.
Getting started with ESP32 Deep Sleep
13:36
Programming Electronics Academy
Переглядів 8 тис.
#151 - ESP32 Passing Values 💾 Between Tasks - Deep Dive (2 Easy Ways)
38:38
The ARM chip race is getting wild… Apple M4 unveiled
4:07
Fireship
Переглядів 453 тис.
НЕ ПОКУПАЙТЕ НОВЫЙ СМАРТФОН, ПОКА НЕ ВЫШЕЛ ЭТОТ [2024]
13:25
Thebox - о технике и гаджетах
Переглядів 77 тис.
Радиоприемник из фольги, стаканчика и светодиода с батарейкой?
1:00
САМЫЙ дешевый ПК с OZON на RTX 4070
16:16
Мой Компьютер
Переглядів 93 тис.
Как установить Windows 10/11?
0:56
Construct PC
Переглядів 1,8 млн