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

  Рет қаралды 59,493

Andreas Spiess

Andreas Spiess

Күн бұрын

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 Жыл бұрын
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.
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Thank you for the additional info!
@sureshkumarkp8802
@sureshkumarkp8802 Жыл бұрын
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 Жыл бұрын
Glad you like the videos. Thanks!
@nmidu
@nmidu Жыл бұрын
Like andreas said .” We want more”
@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!
@AndreasSpiess
@AndreasSpiess Жыл бұрын
You are welcome!
@planker
@planker Жыл бұрын
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.
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Thank you.
@AerialWaviator
@AerialWaviator Жыл бұрын
Seems like a simple topic, but there is lots more to it when explored a bit. Great dive into this topic.
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Glad you liked it!
@BW-eu6pc
@BW-eu6pc Жыл бұрын
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 Жыл бұрын
Thank you! (I had to google the meaning of "You knocked this one out of the park!")
@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
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Glad this video was helpful to you!
@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 Жыл бұрын
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 KZbin for the pun). Cheers
@Afrotechmods
@Afrotechmods Жыл бұрын
Excellent, thorough tutorial 👍
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Thank you!
@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 🇫🇷
@AndreasSpiess
@AndreasSpiess Жыл бұрын
You are welcome!
@JasonRobards2
@JasonRobards2 Жыл бұрын
I was just looking into building a protection circuit with comparators when I saw this video. What a cosmic coincidence :)
@AndreasSpiess
@AndreasSpiess Жыл бұрын
True!
@KingErasmos
@KingErasmos Жыл бұрын
Your videos continue to inspire me.
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Wow, thank you!
@Kieran_McNally
@Kieran_McNally Жыл бұрын
Thanks, very useful and informative.
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Thank you for your support!
@DanielLopez-kt1xt
@DanielLopez-kt1xt Жыл бұрын
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!!!
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Cool! I hope it will work...
@DonzLockz
@DonzLockz Жыл бұрын
Interesting info, I did not know of this problem. Thanks :)
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Happy to help!
@scotty3114
@scotty3114 Жыл бұрын
Thank you, I did not know about this. Now I do!
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Glad the video was useful!
@tjwatts100
@tjwatts100 Жыл бұрын
Thank you. Most informative.
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Glad you like it!
@JohnDeaux
@JohnDeaux Жыл бұрын
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
@ifell3
@ifell3 Жыл бұрын
Really helpful content, thank you muchly.
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Glad it was helpful!
@davestech6357
@davestech6357 Жыл бұрын
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 Жыл бұрын
@@AndreasSpiess Its a voltage reference, comparator, Schmitt trigger with built-in hysteresis.
@neonteepee8453
@neonteepee8453 Жыл бұрын
really useful video - thankyou
@AndreasSpiess
@AndreasSpiess Жыл бұрын
You're welcome!
@eduarddreiling7444
@eduarddreiling7444 Жыл бұрын
Always int er interesting and informative.
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Glad you think so!
@rickharold7884
@rickharold7884 Жыл бұрын
Awesome. Love it
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Thank you!
@olafschermann1592
@olafschermann1592 Жыл бұрын
Great content.
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Thank you!
@ignaciojesus
@ignaciojesus Жыл бұрын
Great andreas. I liked it
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Thank you!
@XavierGr
@XavierGr Жыл бұрын
Wouldn't the brown-out detector, at least on Atmel microcontrollers, help with this issue without the need of external components?
@AndreasSpiess
@AndreasSpiess Жыл бұрын
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)
@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).
@jrioublanc
@jrioublanc Жыл бұрын
Thanks
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Welcome!
@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...
@Username22712
@Username22712 Жыл бұрын
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
@chuxxsss
@chuxxsss Жыл бұрын
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 Жыл бұрын
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.
@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.
@bobdoritique7347
@bobdoritique7347 Жыл бұрын
Merci.
@AndreasSpiess
@AndreasSpiess Жыл бұрын
De rien!
@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 Жыл бұрын
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!
@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
@616ck
@616ck Жыл бұрын
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
@johnmoser1162
@johnmoser1162 Жыл бұрын
Great stuff - would like to hear your opinion about alternatives to Raspberry Pi's (seems extremely out of stock currently)
@AndreasSpiess
@AndreasSpiess Жыл бұрын
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 ;-)
@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
@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 Жыл бұрын
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.
@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!
@YigalBZ
@YigalBZ Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@AndreasSpiess Ok , very vague question I know :D
@fortheregm1249
@fortheregm1249 Жыл бұрын
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
@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.
@adingbatponder
@adingbatponder 22 күн бұрын
Which sigal generator device did you show in the video at 09:03 ? Lovely video! Thanks.
@AndreasSpiess
@AndreasSpiess 17 күн бұрын
You see it’s brand and type in the video.
@convolution_talk_show
@convolution_talk_show Жыл бұрын
I think I should try all your projects to improve my electronics
@Reach41
@Reach41 Жыл бұрын
That would take YEARS!
@AndreasSpiess
@AndreasSpiess Жыл бұрын
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 Жыл бұрын
@@convolution_talk_show Agree. I’ve got 25 years into this so far. The guy with the Swiss accent has been a great help.
@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..
@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.
@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 Жыл бұрын
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!
@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...
@AndreasSpiess
@AndreasSpiess Жыл бұрын
I agree
@TechUpBuilds
@TechUpBuilds Жыл бұрын
Could you use this on the gate of a mosfet as low voltage protection for a single cell 18650?
@AndreasSpiess
@AndreasSpiess Жыл бұрын
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 Жыл бұрын
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.
@Cyklonus
@Cyklonus Жыл бұрын
👍👍
@AndreasSpiess
@AndreasSpiess Жыл бұрын
:-)
@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.
@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 Жыл бұрын
@@pararera6394 My battery symbol is wrong :-(
@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.
@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.
@user255
@user255 Жыл бұрын
I'm surprised that this is not already build into Arduino... is it really true?
@AndreasSpiess
@AndreasSpiess Жыл бұрын
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).
@eugy2008
@eugy2008 Жыл бұрын
Is this one of the old videos re-posted? 🤔
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Yes, as mentioned in the intro and the pinned comment ;-)
@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.
@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.
@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
@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!
@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?
@theabyss5647
@theabyss5647 Жыл бұрын
Or we might use voltage regulators.
@AndreasSpiess
@AndreasSpiess Жыл бұрын
I do not think that they will do the same job.
@ixopac
@ixopac Жыл бұрын
Red battery drawn the wrong way ?.
@AndreasSpiess
@AndreasSpiess Жыл бұрын
Well possible...
@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!
@AndreasSpiess
@AndreasSpiess Жыл бұрын
:-)
@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.
#328 ESP32 Secrets: Interrupts, and Deep-Sleep under the Hood
18:57
Andreas Spiess
Рет қаралды 173 М.
Wait for the last one! 👀
00:28
Josh Horton
Рет қаралды 122 МЛН
The child was abused by the clown#Short #Officer Rabbit #angel
00:55
兔子警官
Рет қаралды 19 МЛН
Decoupling Capacitors - And why they are important
7:39
Lalo Solo
Рет қаралды 324 М.
Why you should avoid using charger modules!
16:44
Electronic Wizard
Рет қаралды 116 М.
467 Radar Sensors from $3 to over $100: Which one is Best?
14:31
Andreas Spiess
Рет қаралды 161 М.
Battle of the Zeros
19:44
Maker by Mistake
Рет қаралды 48 М.
#363 Which ESP32 pins are safe to use?
11:53
Andreas Spiess
Рет қаралды 126 М.
Cadiz smart lock official account unlocks the aesthetics of returning home
0:30
Неразрушаемый смартфон
1:00
Status
Рет қаралды 2,1 МЛН
После ввода кода - протирайте панель
0:18
Что не так с яблоком Apple? #apple #macbook
0:38
Не шарю!
Рет қаралды 161 М.
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,6 МЛН