436 How to use Voltage Supervisors to protect ESP32, Raspberry Pi, and Batteries

Поделиться
HTML-код
  • Опубликовано: 14 июл 2024
  • Computers crash if they do not have enough voltage. Li-Ion batteries could explode during charging if they were deeply discharged. How can we prevent such events? We need so-called voltage supervisors. Cheap parts with a big effect, which usually do their job in the dark. Let’s tear them to the light and protect your ESP32 or Arduino from not booting correctly and your Raspberry from a crash. We will use KA75330, KA75450, and TPS3839 for our experiments.
    My second channel: / hb9blawireless
    Links:
    Raspberry Pi4 US: amzn.to/3pP32HZ
    Raspberry Pi4 DE: amzn.to/3avMgaG
    KA75330: s.click.aliexpress.com/e/_DFh...
    KA75450: s.click.aliexpress.com/e/_DmK...
    TPS3839G33: s.click.aliexpress.com/e/_DlU...
    Power Supply: amzn.to/3PykooI or bit.ly/2uG5mJR or s.click.aliexpress.com/e/_Deo...
    ESP32 Breadboard friendly: s.click.aliexpress.com/e/_DkW...
    The links above usually are affiliate links that support the channel (no additional cost for you).
    Supporting Material and Blog Page: www.sensorsiot.org
    Github: www.github.com/sensorsiot
    My Patreon Page: / andreasspiess
    Discord: / discord
    If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission on your purchases to buy new stuff for the channel
    My Amazon.com shop: www.amazon.com/shop/andreassp...
    For Banggood bit.ly/2jAQEf4
    For AliExpress: bit.ly/2B0yTLL
    For Amazon.de: amzn.to/2r0ZCYI
    For Amazon UK: amzn.to/2mxBaJf
    For ebay.com: ebay.to/2DuYXBp
    profile.php?...
    / spiessa
    www.instructables.com/member/...
    Please do not try to email me. This communication channel is reserved for my primary job
    As an Amazon Associate, I earn from qualifying purchases
    #no#midroll#ads
  • НаукаНаука

Комментарии • 173

  • @stijnvandrongelen5625
    @stijnvandrongelen5625 Год назад +22

    14:03 For anyone wondering, like me: in #133, Andreas explained that most supercapacitors are only rated for 2.7 volts, which is the reason why you typically need two of them in series to stay above 5.25 V, the specified upper limit for USB power.

  • @Agni_Puthra
    @Agni_Puthra Год назад +50

    I always like how you concentrate on the basic stuff. I mean all your videos are so educating and insightful I think because you come up with videos that are not sophisticated but bang on on the fundamental issues of electronics. Thank you! I am learning a lot here.

    • @AndreasSpiess
      @AndreasSpiess  Год назад +5

      Glad you like the videos. Thanks!

    • @nmidu
      @nmidu Год назад

      Like andreas said .” We want more”

  • @BW-eu6pc
    @BW-eu6pc Год назад +7

    Well done!
    Yes these components are indeed used in professional devices. I have designed industrial embedded computers for the sawmill and railroad industries for 30+ years and they are a no-brainer for me.
    Power supervisor circuits should be standard equipment on all processor based electronics.
    You knocked this one out of the park!

    • @AndreasSpiess
      @AndreasSpiess  Год назад +2

      Thank you! (I had to google the meaning of "You knocked this one out of the park!")

  • @AerialWaviator
    @AerialWaviator Год назад

    Seems like a simple topic, but there is lots more to it when explored a bit. Great dive into this topic.

  • @planker
    @planker Год назад +1

    Excellent, considerations well taken. If only I had a loose jumper wire Supervisor, they get every where. Behind the soldering station, stuck to magnets and sometimes just laying on the floor.

  • @pr0tux
    @pr0tux Год назад

    I always wondered why simple professional hardware has much more components than needed for my nooby eye. This might be one of the additional components.
    Thanks for the great video!

  • @emmanuelr6698
    @emmanuelr6698 Год назад

    Hello Andreas, thanks a lot for your video! I now understand why I had stability issues with some of my projects...

    • @AndreasSpiess
      @AndreasSpiess  Год назад +1

      Glad the video was helpful!

    • @emmanuelr6698
      @emmanuelr6698 Год назад

      @@AndreasSpiess I self educated myself in electronics and this is very frustrating to see that most educational stuff doesn't go deep enough to really master the subject. Thanks to your video, I feel a bit enlightened, which is very cool. You're the expert ! (Check out RUclips for the pun). Cheers

  • @Afrotechmods
    @Afrotechmods Год назад +2

    Excellent, thorough tutorial 👍

  • @davestech6357
    @davestech6357 Год назад +2

    It's funny I just built a battery isolator that uses MC34064 4.6 volt supervisor chip. It turns on a relay at 13.3 volts and back off at 13.1 volts using a voltage divider, a mosfet and a few resistors. Supervisors work easier than using a tl431 and do it all in one package.

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      I agree that the supervisors are more specialized parts. The tl431 is very versatile.

    • @davestech6357
      @davestech6357 Год назад +1

      @@AndreasSpiess Its a voltage reference, comparator, Schmitt trigger with built-in hysteresis.

  • @handyguy4814
    @handyguy4814 Год назад

    Thank you sir, now i know the answer for the problem that occur on my project, exactly like you just explained. Almost 2 month fiddling around, finding for the correct answer, thank you so much

  • @KingErasmos
    @KingErasmos Год назад

    Your videos continue to inspire me.

  • @Kieran_McNally
    @Kieran_McNally Год назад +1

    Thanks, very useful and informative.

  • @buzhug35
    @buzhug35 Год назад

    Thanks a lot for your video! I understand non some phenomenons in my esp32 devs, specialy with solar power systems.
    Best regards from France 🇫🇷

  • @JasonRobards2
    @JasonRobards2 Год назад

    I was just looking into building a protection circuit with comparators when I saw this video. What a cosmic coincidence :)

  • @DonzLockz
    @DonzLockz Год назад

    Interesting info, I did not know of this problem. Thanks :)

  • @DanielLopez-kt1xt
    @DanielLopez-kt1xt Год назад +5

    Quite useful information. I installed an arduino with a NFC reader at the entrance of the hotel i work to automatically open the door to the hotel's staff, so they don't have to ring the bell to get in, and since the power supply slowly increases voltage until the set poisition, the arduino crashes at the start (the LCD screen makes it very clear), so i have to reset it once the PSU is on to boot it up... if it ends up being a problem, now i know how to solve it!!!

  • @tjwatts100
    @tjwatts100 Год назад

    Thank you. Most informative.

  • @ifell3
    @ifell3 Год назад

    Really helpful content, thank you muchly.

  • @eduarddreiling7444
    @eduarddreiling7444 Год назад

    Always int er interesting and informative.

  • @scotty3114
    @scotty3114 Год назад

    Thank you, I did not know about this. Now I do!

  • @neonteepee8453
    @neonteepee8453 Год назад

    really useful video - thankyou

  • @olafschermann1592
    @olafschermann1592 Год назад

    Great content.

  • @JohnDeaux
    @JohnDeaux Год назад +1

    so very interesting video. However especially with the ESP32(as with any other MCU having an ADC) I usually just put a voltage divider between bat+/bat-, and measure an estimate of the battery voltage using the ESPs ADC(since its ADC is fairly crappy to be honest). As long as the ESP gets powered from the battery through the 5V pin, as in its power goes through the voltage regulator and thus has a constant 3.3V, you can easily measure when the battery gets into the dropout range of the LDO. I usually set the ESP to deep sleep for an hour if it goes below a certain threshold. With solar powered projects this is an easy way to just have it go dark until there's enough sun to charge the battery again

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      I agree. This is a also good solution. I usually also transmit the battery voltage with the sensor readings and create a low voltage alarm with node-red

  • @rickharold7884
    @rickharold7884 Год назад

    Awesome. Love it

  • @ignaciojesus
    @ignaciojesus Год назад +1

    Great andreas. I liked it

  • @XavierGr
    @XavierGr Год назад +4

    Wouldn't the brown-out detector, at least on Atmel microcontrollers, help with this issue without the need of external components?

    • @AndreasSpiess
      @AndreasSpiess  Год назад +2

      It helps. But the ESP32 also has a BOD. They usually work fine with lowering voltages and fail with increasing voltages (as you saw in the video. The flash was not ready and crashed the ESP at a certain voltage level)

  • @jrioublanc
    @jrioublanc Год назад

    Thanks

  • @chuxxsss
    @chuxxsss Год назад +1

    Afternoon mate, Looking at snow tomorrow down to 500 metres. lol Australia crazy. 5CR hey Andreas. Oh my virtual server had that problem with my solar system.

    • @rjung_ch
      @rjung_ch Год назад

      Here we got fog this morning. It's strange for summer, but after weeks of hot dry weather it seems right after two days of rain not to heat up so quickly.
      Stay safe in the snow!

    • @AndreasSpiess
      @AndreasSpiess  Год назад +2

      Here the weather was so bad for a day that my battery was completely discharged and I had to buy a few kWh :-(

    • @rjung_ch
      @rjung_ch Год назад

      @@AndreasSpiess Me as well, but that's not as bad as the drought has been, the melting of the glaciers, etc.

    • @chuxxsss
      @chuxxsss Год назад

      @@AndreasSpiess My BMS failed. 😢 But Second 5 KW on it's way.

  • @TheAlpineflyer
    @TheAlpineflyer Год назад

    Recently I faced a power issue with a device that combines an ESP32 with a GSM (SIM7000G) module. The issue there was, that the GSM module introduced regular high current draws and caused low voltage spikes. A low voltage protection with a voltage supervisor didn't work in this situation, as the voltage supervisor would 'trip' with each GSM transmission power spike. What ultimately worked was a deep sleep mode of the ESP32 that was invoked if voltage dropped below a certain level for a prolonged (minutes) period of time. I also ended up adding a TPL5110 automatic reset circuit to the project that resets power every two hours. That way, whatever happens, the circuit will always recover from a low power situation.

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      I am glad you were able to solve the problem. I would have probably chosen a different route (try to create a stable supply).

  • @tonysfun
    @tonysfun Год назад

    I agree with Sureshkumar K P 100%! Andreas is the most interesting teacher I know! The wealth of knowledge Andreas demonstrate is next to NONE! Love your videos Andreas and your kind personality as well. This video came very handy right now, I'm helping to redesign a "rat feeder" for University, here in Lincoln, Nebraska. Everything is running on 28V and I'm using a tiny Arduino and one Servo Motor to lift the feeder arm for 4 seconds.... So I use LM317 buck board to step down to 5V and a second one, that is used as a 5V trigger (even the signal voltage is 28V). I am trying to protect the Arduino from the 28V and its possible problems. Do I need some kind of "protection" from the 28VDC ? Thank you again Andreas!

    • @AndreasSpiess
      @AndreasSpiess  Год назад +1

      I probably would not use a linear regulator for such a voltage difference because I assume it heats up. A buck converter would be a better fit here.
      After the voltage regulator your voltage is 5 volts and you do not need an additional protection. If the converter is killed, your whole setup will be dead. But the chance should be small and the damage small if you include a fuse on the 28V side.
      For the trigger, a simple voltage divider would be enough, I think. The voltage does not need to be very precise.

    • @tonysfun
      @tonysfun Год назад

      @@AndreasSpiess Will do fuse for sure, but I'll leave the 2nd buck board that also steps down the 28V to 5V - I know it is an overkill. It costs only $1.x and if they decide to use the power on for a longer than 4 seconds, the small PLA box that houses all of that, could get hot.... I'll make a short video once it is done, so you can see the entire project finished. How well it will perform I don't know but that is why I'm making 3 prototypes and let them use it for while, before finalizing it. One more idea I have is to fill up the small PLA box I've printed for the boards with silicone caulking, so the possible moisture don't make it to the PCB's and the wiring.
      Thank you Andreas again for your help! You are the best!

  • @Username22712
    @Username22712 Год назад +2

    There is also MAX809 which is probably as popular as 555 timer, is extremely cheap and has huge variety of voltage options. What is missing from your your story though: to achieve reliable startup from discharged battery state it is good to have some hysteresis. Not all reset controllers are capable of that

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      They are really "dirt cheap"! I thought I mentioned hysteresis when I showed the curves on the oscilloscope. I agree this is important. But I was not aware that not all supervisor chips have this feature.

    • @marcind9814
      @marcind9814 Год назад

      MAX809 has 12μA Supply Current
      TPS383x has 150nA so almost 100 times less than MAX809

  • @bobdoritique7347
    @bobdoritique7347 Год назад

    Merci.

  • @john_hind
    @john_hind Год назад

    Good explanation! However surely the main reason for a voltage divider on the comparator input is that both the comparator and the voltage reference need some voltage headroom to operate properly?

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      Well possible. For sure an important feature.

  • @JimMaz
    @JimMaz Год назад

    Great video. What oscilloscope would you recommend for light use?

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      One from a known manufacturer like Siglent or Rigol (maybe others too) which fits your budget. The market is very competitive and you get what you pay for.

  • @c1ph3rpunk
    @c1ph3rpunk Год назад

    Glitching was used recently to hack the SpaceX satellite terminal, in theory even able to gain access to the bird itself.
    Excellent timing, trying to drive a Pi 3 using an LM2596 module and there appears to be a number of issues related to under-voltage. Hint: it goes into a reboot loop and eats the filesystem on the SD card.

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      Indeed, the Pi seems to be quite picky when it comes to undervoltage...

  • @brucehanson4147
    @brucehanson4147 Год назад

    Thank you, good information here👍. It is appreciated, however I would caution against using your product links in the description as some are dishonest scalpers that you should not support.👎

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      With my links you only have to trust AliExpress, Amazon, or Ebay. They give you the money back if you are cheated and can prove it.

    • @brucehanson4147
      @brucehanson4147 Год назад

      @@AndreasSpiess they are cleaning out legitimate sellers and reselling at triple the price set by the Raspberry pi foundation to keep them affordable for learning purposes...enjoy your kickbacks from the scumbags as a reward lying about them in what could have been a beneficial youtube channel.

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      @@brucehanson4147 I usually publish the links I bought from.

  • @adingbatponder
    @adingbatponder Месяц назад

    Which sigal generator device did you show in the video at 09:03 ? Lovely video! Thanks.

    • @AndreasSpiess
      @AndreasSpiess  Месяц назад

      You see it’s brand and type in the video.

  • @fortheregm1249
    @fortheregm1249 Год назад +1

    A reupload video ? this was one of your most useful videos, thank you.
    based on your video I did get a pack of KA75330 and been using them around for uses other than MCUs. best feature of them being hysteresis.
    But its a bit of pain to use because the KA75 operates in 3 regions if used with a pullup resistor on output. Because below 1 volt on input you'd still get high output (0-1v=High. 1-3.3V LOW . 3.3+ High).
    Is there a jellybean voltage supervisor like this which i can find even on aliexpress which has a active high output ?
    Edit ( usually i get around this with feeding the input also to a optocoupler or mosfet so there is no output below 1v)

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      Maybe you have a look ath the MAX809/810. Both should be available on Aliexpress

  • @YigalBZ
    @YigalBZ Год назад +1

    Great video, touching a point usually neglected. Thank you! I think the ESP32 dev kit already includes it, right?: So far I am using the dev kit but I start thinking of making a dedicated USB with ESP32, yet still afraid of soldering SMTdevices. So far sticking with good old through holes.... If I do this jump, I will certainly need such a device.

    • @AndreasSpiess
      @AndreasSpiess  Год назад +3

      I never saw that an ESP board had such a supervisor chip. But the ESP32 has a brown out detector which helps when the voltage decreases. It does not help with slowly raising voltages as we saw.

    • @mumbaiverve2307
      @mumbaiverve2307 Год назад

      @@AndreasSpiess And I thought BOR works in both directions. Is this the same case for all uC with built in brown out reset ? TIA.

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      @@mumbaiverve2307 I do not know.

    • @mumbaiverve2307
      @mumbaiverve2307 Год назад +1

      @@AndreasSpiess Ok , very vague question I know :D

  • @johnmoser1162
    @johnmoser1162 Год назад

    Great stuff - would like to hear your opinion about alternatives to Raspberry Pi's (seems extremely out of stock currently)

    • @AndreasSpiess
      @AndreasSpiess  Год назад +1

      We discussed this in an earlier video. For the moment I have no recommendation. I placed orders with several distributors and the current delivery date is beginning of December. So I hope I get at least one ;-)

  • @1828fernando
    @1828fernando Год назад

    I always use max6749 or internal Brown out detector of avr micros. Thank you,!!!

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      The ESP32 also has a brownout detector. They usually work well when the power goes down (as their name says). They do not work if the voltage switches on too slow as you saw in the video. Maybe they work better with other MCUs.

    • @1828fernando
      @1828fernando Год назад

      @@AndreasSpiess thank you

  • @ndegroff
    @ndegroff Год назад

    Andreas, Greatly appreciate your videos like this... I'm new to the circuit game and have been fighting this issue with my ESP32 boards. They are powered by 5v Meanwell power supplies, but periodically go wonky. I've been cheating my way around this startup issue by using an NE555 Timer delay switch and waiting 8 seconds for the power supply to warm up before supplying voltage to the ESP32.
    For your first solution with a resistor/capacitor circuit on your enable pin, it doesn't outline specifically the resistor/capacitor values. Right now I have a bunch of 330ohm resistors and 1000mF capacitors. Could I use these to pull down the enable pin until it warms up? I'm powering on the WT32-ETH01 with 5v instead of the 3v3, so it doesn't appear to be working.
    Thanks in advance for your time.

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      You can calculate the time a resistor and a capacitor have to charge up. But I fear you have different problems. As I mentioned, most boards have such parts built-in.
      Concerning the WT32-ETH01: It seems to have a 5V pin.
      I would start with a blink sketch and see if you have instabilities (you see crashed in the serial monitor).

    • @ndegroff
      @ndegroff Год назад

      @@AndreasSpiess, Thanks for the feedback. I'll double check the board's whitepaper. I've found that the 8s delay before powering on the boards seem to work each time. I have 4 boards flashed with WLED and it's a hit or miss startup when using the meanwells to start the board, but the delay works each time.
      I really appreciate the videos. Every so often one of your videos touches a challenge i'm facing, so thanks in advance!

  • @convolution_talk_show
    @convolution_talk_show Год назад +1

    I think I should try all your projects to improve my electronics

    • @Reach41
      @Reach41 Год назад

      That would take YEARS!

    • @AndreasSpiess
      @AndreasSpiess  Год назад +1

      It took me years, too ;-)

    • @convolution_talk_show
      @convolution_talk_show Год назад

      @@AndreasSpiess thank you for the motivation spiess

    • @convolution_talk_show
      @convolution_talk_show Год назад

      @@Reach41 anything worth having is worth the years

    • @Reach41
      @Reach41 Год назад +1

      @@convolution_talk_show Agree. I’ve got 25 years into this so far. The guy with the Swiss accent has been a great help.

  • @marcobuzzanca
    @marcobuzzanca Год назад

    I Andreas, very great video as usual! there are two things that are not completely clear to me: 1) on a nodemcu board, where the EN pin is internally connected to vcc, how can i use this approach? 2) how can I have a reference value for this voltage regulator, since the battery voltage is dropping? Which is the best way? Thanks a lot.

    •  Год назад

      1) I think you'd have to cut the trace with a sharp knife.
      2) The reference voltage is internal to the device. It's intentionally at a low voltage (I've seen 1.1v references) so that it can do its job while the power is still too low for the MCU. This is also a reason for that resistor network, to lower Vcc to the same level as that reference voltage.

    • @AndreasSpiess
      @AndreasSpiess  Год назад +1

      I agree with Sybren. Usually, EN often is connected to VCC through a 10k resistor. Then you can connect the supervisor directly to the pin of the board.

  • @616ck
    @616ck Год назад +1

    On the oscilloscope what happened? All the different colours, i have a basic Chinese handheld oscilloscope, question for example would be how could I replicate this test on your oscilloscope different colours? could you please make a video about that, thanks

  • @mikepaul6688
    @mikepaul6688 Год назад

    Can these voltage supervisors be used to detect an AC power loss and then make a quick backup of variables to the EEPROM, or is there a better IC for that purpose?
    For example, if you had an esp32 devkit powered by a 5v wall adapter and a 5v supervisor IC to monitor the 5v output, could you make a detection of power loss through attaching the 5v supervisor to an input pin of esp32, and then quickly backup variables to EEPROM ?
    thanks!

    • @AndreasSpiess
      @AndreasSpiess  Год назад +1

      An easier way would be to measure voltage at a particular place using the built-in ADC of the ESP32 and react if it is too low. You could also use a supervisor for that purpose, of course. But still you need a pin to read its signal.

    • @mikepaul6688
      @mikepaul6688 Год назад

      @@AndreasSpiess I see, thanks Andreas!

  • @noahluppe
    @noahluppe Год назад

    You could also connect to the EN pin of the uC, don't you? So it would completely shut off everything, just holding reset low still has considerable power consumption with a WEMOS D1 mini based board (don't have a bare ESP-12 to test rn), while dropping EN low gave sub 1mA whole system consumption (still pretty high, but probably voltage regulators and such).

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      I think this is what I proposed in the video. Just using the supervisor IC to do the job.

  • @sanjikaneki6226
    @sanjikaneki6226 Год назад

    So regarding battery operated devices i think a version with 2.5V would work better since it should always be above 2.3V as the ESP32 datasheet said AND also prolong battery life since now you can train it a bit more (not great for single cell Li ion but may not be as bad with other battery types )

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      You chose what is best for you ;-)

    • @sanjikaneki6226
      @sanjikaneki6226 Год назад

      @@AndreasSpiess well i am building a small weather station with a cut off for li ion at 2.97V ( 3v was not available 😅) but in theory it should be fine

  • @tolikche
    @tolikche Год назад

    Thanks for the video) But what about BOD? Is there any sense in using Voltage Supervisors if BOD on MCU is enabled and device isn't battery powered ?

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      BOD work good when the voltage comes down. They often do not work when the voltage is slowly increased as with solar (the ESP32 has a BOD)

    • @BerndFelsche
      @BerndFelsche Год назад

      Depending on the chip, not enabled by default. ☹️
      Works fine on powering down... But check battery voltage if you have a spare analog input so you get an early warning and can e.g. conserve power to stay alive longer..

  • @TechUpBuilds
    @TechUpBuilds Год назад

    Could you use this on the gate of a mosfet as low voltage protection for a single cell 18650?

    • @AndreasSpiess
      @AndreasSpiess  Год назад +1

      I do not think so. You need a stable voltage to compare to.

    • @TechUpBuilds
      @TechUpBuilds Год назад

      ​@@AndreasSpiess Thank you for your time!

  • @Masudrana-vi7sy
    @Masudrana-vi7sy Год назад

    Hello, first of all thanks for your fantastic way of teaching . I want to know, is it correct connections for TPS3839 and ESP32[10:55] . Cause the reset of ESP32 is Active HIGH and TPS3839 is Active low. TIA

    • @Masudrana-vi7sy
      @Masudrana-vi7sy Год назад

      And can I connect the reset to GND to reset the ESP32 on power? Will not it make a short circuited?

    • @AndreasSpiess
      @AndreasSpiess  Год назад +1

      The ESP32 has an enable pin which has to be high when the ESP runs. If it is connected to GND (with a 10k resistor) then the ESP stops (resets). So this chip should work. But I never tested it.

  • @Peter_A1466
    @Peter_A1466 Год назад

    The internal voltage reference in the supervisor has to be lower than the operational voltage, because if the voltage drops below that reference there would be nothing to compare it with...

  • @alexandruconstantinsirbu4697
    @alexandruconstantinsirbu4697 Год назад

    Hi Andreas can you make a guide to esp8266 freezing after waking up a couple of times from deep sleep when powered by batteries. I have this issue and it's hard to tackle any ideea to fix this would be great. I power my esp on 3 x ni-mh 2100mAh cells. for Voltage regulator i use ht7333 and my circuit uses a 1000uf and 100nf cap. I was thinking to connect a smalled capacitor between gpio16 and rst. Or should I ditch it in favor of an external rtc to rst

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      ESPs are very sensitive to voltage drops because they draw up to 500ma peak current. If they crash, they often write a message and sometimes it contains "brownout".
      I would connect your device to a proper lab power supply and see if the behavior is still there. Then, most probably it is a software error. If the behavior is gone, you know that you have to work on the power supply.

    • @alexandruconstantinsirbu4697
      @alexandruconstantinsirbu4697 Год назад

      @@AndreasSpiess thanks for reply, i had it powered via uart for a couple of days, didn't had any issues.

  • @JonnyWaldes
    @JonnyWaldes Год назад

    Had no idea you could use voltages that low on RPis

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      I would not try it because it starts to complain much earlier... But it does not crash.

  • @eugy2008
    @eugy2008 Год назад

    Is this one of the old videos re-posted? 🤔

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      Yes, as mentioned in the intro and the pinned comment ;-)

  • @Cyklonus
    @Cyklonus Год назад +1

    👍👍

  • @MisterkeTube
    @MisterkeTube Год назад

    What is unclear to me is: if these things are so useful to protect against unstable behavior of a cpu or soc and apparently relatively simple and cheap, then why do cpu/soc-manufacturers not immediately include this into their design to ensure that their part doesn't get into such misbehaviour? You mentioned some adding a resistor+cap to delay the reset going high, but they apparently would be way better protected by just including such a comparator as I'm guessing that any chip with an A/D convertor already has a reference voltage, reducing the cost uplift further. Is it just the "1000000 parts sold x 1ct saved" argument keeping them from including such protection?

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      As I mentioned they are standard in higher level products. For cheaper products every cent seems to count.

  • @user255
    @user255 Год назад

    I'm surprised that this is not already build into Arduino... is it really true?

    • @AndreasSpiess
      @AndreasSpiess  Год назад +1

      Yes. Most MCUs (also the ESP32) have so called "Brownout detectors". They work ok with falling voltages. But usually not with increasing voltages (as you see in the video where the flash is the real problem).

  • @kaihatkeinenaccount
    @kaihatkeinenaccount Год назад

    Why is the 4,5V version so much more expensive than the 3v version?

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      I do not know. Maybe they are less common?

  • @pararera6394
    @pararera6394 Год назад

    8:52 pin 1 is GND.

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      My datasheet says something different (Fairchild)

    • @pararera6394
      @pararera6394 Год назад

      @@AndreasSpiess I mean on schematic. Look at battery symbol, you placed pin one on - side of battery.

    • @AndreasSpiess
      @AndreasSpiess  Год назад +1

      @@pararera6394 My battery symbol is wrong :-(

  • @jbarker2160
    @jbarker2160 7 месяцев назад

    Even cheap MCUs have brownout protection circuitry these days. Why not just use that?

    • @AndreasSpiess
      @AndreasSpiess  7 месяцев назад

      Brownout detection works if voltage decreases. It does not prevent bad things happen if voltage rises (and the MCU does not work). The ESP32 has a brownout detector, BTW.

  • @ugetridofit
    @ugetridofit Год назад

    ESP32 has this as a setting in menuconfig. Unfortunately, Arduino does not expose this you need to use ESP-IDF.

    • @scr1ptery642
      @scr1ptery642 Год назад

      CONFIG_ESP_BROWNOUT_DET_LVL_SEL ?

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      You can do this also with the Arduino IDE, if I remember right. But it only changes the threshold voltage, not the problem with the flash chip.

  • @Hex-Mas
    @Hex-Mas Год назад

    Plunder Volt🌩

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      ???

    • @MichalKottman
      @MichalKottman Год назад

      Plundervolt is the name of an undervolting attack on Intel SGX to corrupt the integrity of the security enclave of the processor.

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      @@MichalKottman Thank you. I always learn something from my viewers!

  • @ixopac
    @ixopac Год назад

    Red battery drawn the wrong way ?.

  • @mb106429
    @mb106429 Год назад

    Has anyone experienced an MCU's program memory becoming corrupted by power supply irregularities?
    I have made some battery monitor circuits that watch battery voltage with the ADC via a voltage divider (battery voltage is well above vcc) and powered by a buck USB supply.
    Their purpose is to change the LED color as the battery runs down
    They all 'fail' in the same way... The output colors change from what they should be.
    They are all fine again (for a time) if I re flash reflash the program

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      I did not experience such behavior. But using parts outside their specs is never safe...

    • @mb106429
      @mb106429 Год назад

      @@AndreasSpiess yes, I'm definitely check the Brown Out Detector settings and try to optimise them, if that doesn't work I will try these voltage detector chips in your video. They are ATTINY1614 s
      I 'm pretty sure the flash program memory is being corrupted in my case, not damage to the ADC
      (the adc pin is behind a 39k + 2k resistor divider)
      because they work ok again if I re program them

  • @theabyss5647
    @theabyss5647 Год назад

    Or we might use voltage regulators.

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      I do not think that they will do the same job.

  • @schuballaa
    @schuballaa Год назад

    Hello Andreas, i bought this Devices just to build an Hardware whatchdog. 1 Day before your Video was released.
    I use my Doorbell to open my outdoor.
    Fornatly i Was at Home because i womdering why my Bell not work as the postmam came.
    The esp8622 Was freeze (i already used your Software Whatchdog) and thaught something like that cant Happen.
    I Googled how to build a ,,Hardware" whatchdog.
    2 esp8622 observes eatch other is possible but is an never endling Story (this Chip can of cause crash too).
    I found the Chips you explaind in the Video but not said it is possible to build a Hardware whatchdog.
    was i wrong and this Chip is not support to use it as Hardware whatchdog?

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      I do not understand your question :-(

    • @schuballaa
      @schuballaa Год назад

      @@AndreasSpiess ok vielleicht ist mein Englisch zu schlecht... Ist es möglich mit den ics einen Hardware whatchdog zu bauen der vom esp Impulse erwartet und wenn diese ausbleiben (weil esp,,hängt'') den esp resettet? Das hatte ich eigentlich vor mit den Chips also einen whatchdog zu bauen. Dein Software whatchdog hat leider nicht funktioniert.

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      @@schuballaa Das kannst du sicher machen. Google einfach "watchdog NE555".

    • @schuballaa
      @schuballaa Год назад

      @@AndreasSpiess ah, vielen dank, habe ich wohl zu kompliziert gedacht ;) stimmt mit diesem Dinosaurier sollte das gehen, vielen Dank

  • @mayankraichura
    @mayankraichura Год назад

    Me first!

  • @1yyymmmddd
    @1yyymmmddd Год назад

    Great video. But can't you just use brown out interrupt that many microcontrolers have to control low voltage programatically?

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      While discharging this is possible. But not during power up as I showed in the video. Then, the MPU does not yet work.