#315

  Рет қаралды 116,390

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.
I am a proud Patreon of GreatScott!, Electroboom, Electronoobs, EEVblog, and others.
Links:
Raspberry Pi4 US: amzn.to/3pP32HZ
Raspberry Pi4 DE: amzn.to/3avMgaG
Raspberry Pi4 : ebay.to/3n1sPef
KA75330: s.click.aliexp...
KA75450: s.click.aliexp...
TPS3839G33: s.click.aliexp...
Power Supply: bit.ly/2uG5mJR or s.click.aliexp...
ESP32 Breadboard friendly: s.click.aliexp...
The links above usually are affiliate links which support the channel (no additional cost for you).
Supporting Material and Blog Page: www.sensorsiot.org
Github: www.github.com...
My Patreon Page: / andreasspiess
My Bitcoin address: 19FSmqbBzb5zsYB1d8Bq4KbxVmezToDNTV
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 (of your purchases the next 24 hours) to buy new stuff for the channel
For Banggood bit.ly/2jAQEf4
For AliExpress: bit.ly/2B0yTLL
For ebay.com: ebay.to/2DuYXBp
www.facebook.c...
/ spiessa
www.instructab...
Please do not try to Email me or invite me on LinkedIn. These communication channels are reserved for my primary job

Пікірлер: 457
@jvgorkum
@jvgorkum 4 жыл бұрын
Yet another gem, I could use this for my supervisor (when my energy is to low)
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
:-) The question is then how he is wired: On at low level or off at low level...
@jaynottelling5892
@jaynottelling5892 4 жыл бұрын
Might need the gas soldering iron!?
@DimitrisPaterakis1
@DimitrisPaterakis1 4 жыл бұрын
Thank you for the video. I am using the MAX809S (2.93V) for this purpose because it costs nothing ($1.51 50pcs). It has push-pull output (no need for pull-up resistor).
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Good choice. Thanks!
@easynow6599
@easynow6599 4 жыл бұрын
thanks for the advice, but i have a question: according to datasheet: "The MAX803/MAX809 have an active-low RESET output", but esp32 is activated when reset pin is high..so how it can be used for esp32 activation?
@spehropefhany
@spehropefhany 4 жыл бұрын
Easy Now MAX810 has the inverted output. Needless to say you need to be very careful to pick the correct voltage range including tolerances.
@DimitrisPaterakis1
@DimitrisPaterakis1 4 жыл бұрын
@@easynow6599 According to the datasheet of MAX809: "RESET output remains low while VCC is below the reset voltage threshold, and for a reset timeout period after VCC rises above reset threshold". We talk about ENABLE pin of MCU and not reset. Don't be confused.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I mentioned it in the video that the "reset" pin on the ESP32 is called "enable" pin.
@Hugatry
@Hugatry 4 жыл бұрын
Thanks for informational video, answering questions "What? Why? and How?". For simple microcontrollers, like ATMegas, brown-out detection could do the job. It holds the core in reset-state, when voltage is below the threshold. There is limited amount of threshold values (ATMega328p for example has programmable thresholds of 1.8V, 2.7V or 4.3V). But even for these simpler micros, external supervisor has benefits of wider range of thresholds, start-up delays and other specs. Just thought to add this tidbit, even though this might not be as applicable to ESP and Raspberry Pi.
@juanmontes8905
@juanmontes8905 4 жыл бұрын
I know I heared about that internal undervoltage protection module before
@BerndFelsche
@BerndFelsche 4 жыл бұрын
BOD seems effective for loss of power but not so much for slow recovery.
@McTroyd
@McTroyd 4 жыл бұрын
I've seen in other places that, at least on AVR microcontrollers, the brown-out detection can cause an increase in idle current draw on the order of milliamps. That could still present an over-discharge problem in a battery-operated circuit. The FET-based switching solution Andreas presents here, using one of these supervisors, could still be useful in that case.
@donpalmera
@donpalmera 4 жыл бұрын
@@BerndFelsche >BOD seems effective for loss of power but not so much for slow recovery. That would be part of the Power-On-Reset block.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
You can fool the Arduino, too, if you want ( kzbin.info/www/bejne/bIHJZKOPaKyreK8 )
@si98justme1
@si98justme1 4 жыл бұрын
I went into this video thinking he was referring to Voltage Regulators, but due to a language/interpretation issue was calling them Supervisors, and that I wasn't going to learn much if anything... Whoops my bad, and I learned two things to add insult to my hubris: I'm not as smart as I thought I was, and learned about a part, that even as a professional (many years ago), I didn't know about.
@abhijitborah
@abhijitborah 4 жыл бұрын
This Swiss' videos are always perfectly researched. And satisfying to learn from.
@whitefields5595
@whitefields5595 4 жыл бұрын
@@abhijitborah He's Swiss .....
@abhijitborah
@abhijitborah 4 жыл бұрын
@@whitefields5595 Seeking a thousand pardons. My bad. Thanks, edited it out.
@ralfhesterberg3346
@ralfhesterberg3346 4 жыл бұрын
For the Esp32 you need to configure your brownout detection voltage: docs.espressif.com/projects/esp-idf/en/latest/api-reference/kconfig.html#config-esp32-brownout-detox then you not need any external voltage supervisors.
@davefiddes
@davefiddes 4 жыл бұрын
The brownout detector is useful but doesn't cover all possible failure scenarios as Andreas shows in the video. This is why Espressif have the additional recommendation to include an external supervisor.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
@Ralf: I tried to change the BOD threashold voltage as well as the alarm in Arduino IDE. I only was capable to switch BOD off, but not more :-( I would be glad if you have more info. And BOD only worked if the CPU still worked. So no protection against "gibbersh" and Flash error.
@browaruspierogus2182
@browaruspierogus2182 4 жыл бұрын
Exactly. For such low currents and voltages no need for some supervisor complicating the project. Even decent Zener diode will do here Besides you can power your esp with small power bank that has all the protections you need
@NikolaiVarankine
@NikolaiVarankine 2 жыл бұрын
@@browaruspierogus2182 I tend to think ESP and others are targeted to button cell power primarily as they all fight for the less consumed power as possible.
@timmyfingaz100
@timmyfingaz100 2 жыл бұрын
RGH (reset glitch hack) on the xbox 360s was fun. The original Jtag hack used a few resistors and small diodes, not much cost at all! Thanks for the great info, I am looking into circuit protection atm!!
@AndreasSpiess
@AndreasSpiess 2 жыл бұрын
You are welcome!
@g3i0r
@g3i0r 4 жыл бұрын
I had this startup problem with an ESP8266 design. Now I finally know what the problem is! 😎
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
And not difficult to solve...
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 4 жыл бұрын
This is OK for simple embedded uP, but if there is any storage requirements in the system then it does not fully remove the problem. The Raspberry PI would still crash and not recover if you just hit the reset, if it's writing to the memory card at that point game over. re-install of memory card might be required. So if there is a memory storage of important information required we need to add a little bit extra. Capacitors to hold up the supply and a diode to stop the falling incoming power discharging the caps. the voltage detector instead of hitting the reset should be connected to a non-maskable interrupt, So the controller has time to do a bit of house keeping, save data to non-volatile memory, etc, and go into a safe state ready for power down. Quite a few uP have the reset driven from the clock oscillator, the clock has to run for a number of cycles before the reset is released, making sure that there is a stable clock running before your code is let lose. When you have to design of power glitch's there are other issues involved, Hot or COLD starts. do you want to load defaults in to system (cold start) or do you want to reload the settings last set while running (HOT start), so the need to save settings as power is lost, because if power is only removed for 100ms or so , you don't want the usre to have reset all the controls back to where they had set them. Still a great video if you read all the way down to here. :)
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Concerning the protection of the RPI: I showed how it can be done at the end of the video (GPIO3, Super Caps)
@BerndFelsche
@BerndFelsche 4 жыл бұрын
Thanks for introducing the device type. Perhaps a follow-up video comparing them to brown-out detection built into microcontrollers?
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Maybe in hte future. I looked at the brownout detector of the ESP32, but it was not well documented. Especially not with the Arduino IDE. It seems that the Arduino also can be fooled ( kzbin.info/www/bejne/bIHJZKOPaKyreK8 )
@christopherguy1217
@christopherguy1217 4 жыл бұрын
Why doesn't the Raspberry Pi have this as part of its board? Would save many a SD card from getting corrupted. Great video, I'll need to get some of these parts and start incorporating them with my boards.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Ihe Pi4 seems to have one. But because the Raspberries have an operationg system you have to shut them down, not just switch them off. This is the reason for my proposal at the end of the video.
@puriap250
@puriap250 3 жыл бұрын
This was so absolutely informative! I had never thought about this. I always put large capacitors on my ESP boards because they are sensitive to power but it never occurred to me that the power-up could also cause bugs. Maybe I've been lucky so far. I will definitely use the capacitor+resistor on reset pin trick next time I'm designing a board. Also I had no idea these voltage supervisor chips exist. They are so useful! Unfortunately they don't seem to be available where I live but it's still good to know that they exist. Maybe I can find similar parts. Thanks a lot for this video.
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
You find many suppliers for such parts. They are widely used.
@ugetridofit
@ugetridofit 4 жыл бұрын
Just as a FYI. The ESP32 has a setting in menuconfig where you can select its reset detect level. Arduino people don't know this because Arduino does not allow access to the many, many options in the ESP32 menconfig system.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I tried it in the Arduino IDE, but I was not able to chage the brounout level. And it works only, if theMCU runs, as I showed in the video :-(
@alexbik
@alexbik 4 жыл бұрын
Am I missing something or is the diagram (7:49) incorrect? It seems to me that the + and - inputs of the opamp/comparator are reversed. As it is drawn, if the input voltage is higher than the reference voltage the output becomes high and the transistor pulls the output pin to ground.
@brewman467
@brewman467 4 жыл бұрын
Indeed. In the KA75xxx datasheet it is connected to a uC which has RESET active high. Seems like a contradiction to the Scope shots...
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I copied the diagram in the data sheet. They do not disclose how the comparator work. Maybe tehy use the same diagram for components with active low nad high ;-)
@PanosKontogiannis
@PanosKontogiannis 4 жыл бұрын
Thanks, Great video. What about the TL7702 series. I use it on sensitive applications but never tested if they actually perform. I took the word of Texas instruments for granted
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
They seem to be a little more sophisicated chips. But with a similar purpose.
@reinholdu9909
@reinholdu9909 4 жыл бұрын
Andreas .. YESSS! 15min listening to KZbins most tech savy "swiss accent" and the day is gonna be "GUAT"!
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
:-) Today, I had to do a little more. I had to give a "Indoor Cycling" class with my daughter...
@recomoto
@recomoto 4 жыл бұрын
@@AndreasSpiess having quality velo time :D
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
So you must be Swiss ;-) (Velo)
@electronic7979
@electronic7979 4 жыл бұрын
Helpful video 👍
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Thank you!
@kbxbr
@kbxbr 4 жыл бұрын
Mr. Spiess thank you so much for all your well-made incredible videos! Cheers from Brazil!
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
You are welcome!
@pierrefpv
@pierrefpv 4 жыл бұрын
Perfect timing! I just ran into a similar issue this weekend setting up a ESP32-cam as a doorbel. When the bel is pressed the voltage drops and resets the board, but leaves the camera in a weird state and needs a hard reset. Sometimes this also happens when flashing OTA.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I hope such a part will help!
@eliotcougar
@eliotcougar 3 жыл бұрын
Some supervisors, like ADM1232, even have an integrated watchdog to reboot the device if it gets stuck... I didn't know such devices exist, I will use them more in my home-made lab equipment...
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
Good idea!
@dannygeilen9656
@dannygeilen9656 2 жыл бұрын
I have an ESP32-CAM powered with 6 nimh 8.4v-7.2v 1100Mah rechargable batterys. can i use a boost converter mt3608 to boost to 10V and use a voltage divider so I have a reference 7V for the LM393? I am no circuit expert but i would love an auto cutoff at 7v so esp32 stops getting power.
@AndreasSpiess
@AndreasSpiess 2 жыл бұрын
You can add a boost converter if you need. But why would you boost to 10 volts and reduce to 7v after? Maybe you find a Low-dropout regulator for 7 volts? Go to the Mouser homepage and add this selection to find an LDO chip: /c/semiconductors/power-management-ics/voltage-regulators-voltage-controllers/ldo-voltage-regulators/?dropout%20voltage=15%20mV~~500%20mV&number%20of%20outputs=1%20Output&output%20current=300%20mA~~10%20A&output%20type=Adjustable&polarity=Positive&rp=semiconductors%2Fpower-management-ics%2Fvoltage-regulators-voltage-controllers%2Fldo-voltage-regulators%7C~Dropout%20Voltage%7C~Output%20Current . KZbin does not allow links. For auto cutoff you have to google.
@donovanrichards5681
@donovanrichards5681 3 жыл бұрын
I have a NO/NC basic 5vdc relay already in hand. Do you think I could use that to replace the KA75450 voltage supervisor? In my raspberry pi 3 setup I'm using a 5v 10A switching power supply to power the pi, touch screen display and Arduino. I'm using the GPIO3/GND pins to safely turn on/off the pi but would like to add the (2) 2.7v 10F super capacitors as shown in your awesome videos. I would wire the Coil in the relay to the 5v power supply and wire the COM/NC pins to the GND/GPIO3 pins on the pi. Now if I turn off or lose power from the 5v power supply the relay will close and the GPIO3 pin will make contact with the GND pin thus activating a safe shutdown meanwhile the caps provide power. Please note I would need to provide a diode up stream of the super caps to prevent them from energizing the coil.
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
You need a very sharp and reliable cutoff voltage which you will not get with a relay. The relay will once switch at a higher and sometimes at a lower voltage.
@andrewtitcombe8378
@andrewtitcombe8378 2 жыл бұрын
Good explanation . So i am using the KA75330 with an esp32 Epaper to wake when the battery gets to low. to display a low battery warning and then putting the esp to sleep only to be wake when the KA75330 signal goes high to clear the low voltage warning. As one of the big issues with epaper is if the battery goes flat.Iit just sits there displaying the last thing displayed, and the user has no idea that it is not functioning or updating. It would be useful for esp32 e-paper such as LILYGO® TTGO T5 V2.3.1_2.13 Inch E-Paper added a battery monitor chip to the board as standard.
@AndreasSpiess
@AndreasSpiess 2 жыл бұрын
Good point! And a good implementation of a solution.
@giorgioboiero
@giorgioboiero 2 жыл бұрын
Andreas, could you propose a new video with new Voltage Supervisors available on the market (shortage)? There are some of Onsemi, Dallas, Microchip also in THS TO92 size
@AndreasSpiess
@AndreasSpiess 2 жыл бұрын
I have no such plans. I think it is easy to find other such parts because they are simple and you only have to select the desired value.
@el_pedriyo
@el_pedriyo Жыл бұрын
Hello, I am testing the ka75330 and it seems it switches on at 3.29V and off at 3.26V, I see the off voltage is to close to the PSU 3.3V specs. Wouldn't it be better a lower voltage like 3.1 or 2.9 to reset the esp32?
@AndreasSpiess
@AndreasSpiess Жыл бұрын
The supervisors have to make sure that the CPU does not start until the voltage is high enough for it. So everything above 2.8volts should be perfect.
@bartjes2509
@bartjes2509 4 жыл бұрын
Thanks for this video ! I did a nice project using a Wemos D1 WROOM mini clone ESP32 board (from Aliexpress) letting it drive a stepper motor to move my big Canon DSLR for making timelapses. It is fully functional (twitter.com/Bart47234384/status/1254873140699766784) except it most of the time resets once at startup (it did this even when nothing was connected). The serial log tells me it detected a brownout. No problem for me when it runs steady afterward. Problem is that when I re-connect my phone to the ESP32's WiFi during the timelapse, I risk it resetting. A 10 uf capacitor between 3V3 and GND does not help. I am not an electronics specialist, so can you share more detailed schematics what component to connect to which pin labels and also in what orientation (if polarity is important) ? I will check & play with the settings later though.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Maybe 470-1000uF is better.
@marinehm
@marinehm 4 жыл бұрын
This was awesome. I think it explains what happened to my Raspberry Pi when the mains cut off during a bad storm.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
The Raspberry has a different problem because it has an operating system and has to be shutdown, not only switched off. At the end of the video I showed how it has to be done for a Pi.
@andrefvdm
@andrefvdm 2 жыл бұрын
how can I modify the 4056 LIPO charger to cut load current at battery under voltage of 3V instead of 2.5V ? This may serve the purpose too ? (we are doing research for smoke free world - a soil moisture sensor system that can function independently in remote locations, and respond to wifi when available)
@AndreasSpiess
@AndreasSpiess 2 жыл бұрын
The 4046 has no undervoltage protection. You have to add this functionality or buy a board with this feature.
@GoatZilla
@GoatZilla 4 жыл бұрын
The annoying thing with running off battery is that it can kind of "bounce back" after powered off for a while. So you get a much slower, but still annoying and useless oscillation. I'd like something with a pretty large hysteresis to combat this.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Good point. You could measure the voltage as one of the first commands after booting and shutdown if it is in the hysteresis.
@user6193
@user6193 4 жыл бұрын
Very helpful video for me as it help me to get the idea to solve the problem in flight controller for a mini quad powered with 1s 3.7volt lipo where it got discharged below 3volt if I continue to fly the quad for some more time after low battery indication (a small camera connected with battery will keep on consume current even after landing the drone)... by using this small component i can protect my lipo by cutting the supply if Vbat < 3volt. Thanks for this informative video as always :)
@superdau
@superdau 4 жыл бұрын
Aren't the inputs of the internal comparator of the KA75330 the wrong way round? According to the blockdiagram if the input (through the resistive divider) is higher than the reference the comparator switches on the transistor, which pulls the output low. Most devices have an active low reset pin, which means the KA75xxx would reset them as soon as the voltage reaches the desired level instead of the other way round.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I used the diagram from the datasheet..I do not know how the comparator is wired internally.
@vincentiuswahyu8701
@vincentiuswahyu8701 4 жыл бұрын
Hello Andreas. Does 18650 battery module shield already have this mechanism ? or we have to make this on our own. Thanks
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Some have it. You have to read the specifications
@Autotrope
@Autotrope 3 жыл бұрын
Can anyone help me understand the KA75330 datasheet: what current does this consume all the time (eg relevant for deep sleep power consumption)? It says it has a leakage current of 0.1uA, but also a circuit current of typically 30uA while voltage is above limit. Is that second one the relevant one? If so that's a bit high to prevent deep discharge etc and I'd want another, but the ones with smaller current use seem to all be surface mount and I'm not there yet in my electronics.
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
It is 30uA
@ronaldhofman1726
@ronaldhofman1726 4 жыл бұрын
I tested with ka75330 and do not get this behaviour, like shown in the end of the video i use a variable power supply , i power the ka75330 and the led with resitor of 100 ohm , when lowering the power supply i did not get the led to light up., the package that i got from aliexpress state ka75330 on the to92 package , but when i measure it with my semiconductor meter is states that is it a scr thyristor but it does not act as a thyristor , the meter i use is Peak DCA Pro DCA 75 for this purpose.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
It should work if you use the diagram here: www.mouser.com/datasheet/2/149/KA75330Z-90129.pdf p.3 figure 4
@cardre
@cardre 4 жыл бұрын
Please check, but I think you have your battery symbol positive and negative mixed up in some of your circuit diagrams. The positive line in the battery symbol is longer (more positive) and the negative is shorter (or minus) is how I remember.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Thank you!
@lmamakos
@lmamakos 4 жыл бұрын
Thank you for bringing this topic to our attention! I knew these things were out there, but never thought about their application in my hobby projects. Now I have yet another thing to put on my long list of stuff to think about! (Also, I think your battery schematic symbol is backwards?)
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
You are right. A few viewers "complained" about the battery symbol. I was too lazy to look it up because I felt it was not so important (for me)
@any123-og
@any123-og 4 жыл бұрын
There is a supervisor by texas instruments in a TINY SMD package
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
You are right. there are many different parts available.
@brozz156
@brozz156 4 жыл бұрын
I am testing a KA75330 when I conect to supply the LED flashes is that correct?
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Maybe you consult its datasheet. There you see how it has to be used
@gtpumps
@gtpumps 4 жыл бұрын
I have been doing micro-controller electronics for over 30 years we simply call these "reset devices" not "voltage supervisors". They don't do anything with the voltage they control the reset pin.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
You are right
@mikepaul6688
@mikepaul6688 2 жыл бұрын
The 2.9v version is so hard to find, but could I cheaply construct one of these using an op amp, zener diode and voltage divider?
@AndreasSpiess
@AndreasSpiess 2 жыл бұрын
You can do that of course. But maybe you find another one with 3 or 2.8 volts...
@MGKday
@MGKday 4 жыл бұрын
in order to protect the Pi with a safeshutdown, should we use this ? or to rephrase : I always hear that Pi are very sensitive when turned off, and that we need a hardware safeshutdown, but also a software that will be triggered (script) to shutdown properly the device. i never understood why is this not by default in the Pi...But anyway , my question is : would this help to solve this matter or would you recommend something else ? if so, what ? thanks !
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I made a video and showed how it can be done at the end of this video. It is now part of the standard. But you have to use it.
@waltsteinchen
@waltsteinchen 4 жыл бұрын
Thank you Andreas for another really very userful video! ... I'm using your videos very often as a "reference" to look up things if needed in my projects.. this is definitiv one I'll remember ;-)
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Sometimes, I use them as a reference, too ;-)
@williamlucid8907
@williamlucid8907 3 жыл бұрын
Will this circuit; allow the TP4056 to fully charge the 18650 battery? Circuit: drive.google.com/file/d/1yBjyTcDbusaraLV4qvelBY7eVnsRRic-/view?usp=sharing
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
I used a similar design for my light sensor. It works so far. I assume it would have problems around or below 3 volts battery voltage (The TP4056 only does trickle charge which probably will not charge the battery enough). Maybe you use one ADC to monitor battery voltage. That is what I do. BTW: I am not sure what your KA... should do.
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
I thought the output of the KA... was connected to GND1 of the ESP and not to the enable pin...
@fabian9163
@fabian9163 4 жыл бұрын
Danke für das tolle Video, weiter so! Habe mir gleich den TPS3839G33 für mein Lipo-Sensor-Projekt geholt und den Reset-Ausgang über 10K mit dem Enable-Pin des ESPs verbunden. Und jetzt leider eine Reset-Loop beim Start, hoffe ihr könnt helfen. Weitere daten: Low-Dropout-Spannungsregler HT7333-A mit 1000uF vor und 100nF + 100uF Kondensator danach. Eingangsspannung von 4.2 bis leer also ~3V. Ursache: Laut Oszilloskop verbraucht der esp8266 beim Start zuviel Strom das die Spannung kurzzeitig unter die 2,9x Volt fällt und der Reset ausgelöst wird. Der ESP geht aus, die Spannung stabilisiert sich und nach den 200ms beginnt der Spaß von vorn. Beobachte ich die Spannung mit überbrücktem Enable-Pin fällt diese kurzzeitig auf 2,90V erholt sich dann aber wieder. Der ESP funktioniert währenddessen. Ich muss also nur irgendwie den Start überbrücken. Jemand eine Idee?
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Mach den 1000uF Kondensator direkt von 3,3 v zu GND des ESP. Du musst diesen Spannunsabfall vermeiden.
@ammarsyaf3035
@ammarsyaf3035 4 жыл бұрын
this video has reveal the mystery I faced when working with power hungry gsm module
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Then maybe a large capacitor is a better idea to prevent such situations ;-)
@mathieusan
@mathieusan 4 жыл бұрын
Would this component be needed if we have a voltage regulator providing 3.3V at all time?
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Only if you have batteries which can be depleated below 3 volts
@peterpepo9232
@peterpepo9232 3 жыл бұрын
Gruzi Andreas, please could you advise how to combine Low Dropout Regulator (LDO) with Voltage Supervisor (UVLO). I'm powering ESP8266 + single DS18b20 (minimum voltage 3.0V). DS18b20 is powered from I/O port of ESP8266. I'm trying to regulate battery down from 3.7V > 3.0/3.3V. At the same time, I need to cut the battery off < 3.0V (due to DS18b20). At the moment I'm thinking of voltage supervisor. Feeding the output of voltage supervisor to Enable Chip/Pin of HT7833 in SOT23-5 package. Please could you help me with schematics/parts? Regards, Peter
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
I made various videos about these topics. Maybe you find there what you need.
@RamPrakash-ow4wy
@RamPrakash-ow4wy 3 жыл бұрын
Hi Peter, There are many available ICs that include LDO, as well as voltage supervisors, both functions in one package. I would suggest you use MAX6469, XC6413, TPS77301, etc. You can check out the reference schematic for powering ESP8266 using MAX6469. www.flux.ai/ramprakashvishnoi8/voltage-regulator-with-supervisor-reset Let me know any questions you have in your mind, I am here happy to help you. Cheers, Ram
@manuelohnenix
@manuelohnenix 3 жыл бұрын
Hello Andreas, one question: i want to use the KA75290, to disable my ESP if VCC is lower than 2.75V. But .. what if my LiFePo4-Battery is charged, and gets more than 3.05V? Wouldn't the Supervisor set its output to HIGH, and my ESP will be switched off? 3.05V is the Max Detecting voltage of the KA75290 according to the Datasheet.
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
If you connect it to RST your ESP should start at around 3.05 volts. Below 2.9v it should be reset.
@manuelohnenix
@manuelohnenix 3 жыл бұрын
@@AndreasSpiess Thank you! Sometimes the answer is just easy :-) I continued and ran into two more problems. First, the RST-Pin is also connected to D0 of my Wemos-Mini, for waking up from DeepSleep. Since D0, and the Voltage-Supervisor are not always at the same state (high, low) it comes to the situation, that there is a level of 1,7V on RST (maybe the built-in resistors in GPIO and the voltage-supervisor act as a voltage divider). I solved this, by adding two diodes to decouple them. Second problem appears, when Vcc rises above 2,63V (Reset-Voltage of my SGM809B-RXN3LG). The supervisor starts bringing its output high, and then the whole system starts oscillating. This only stops when Vcc gets a bit higher - maybe the hysteresis of the SGM809B is too small, or my cap is too small (470µF). The ESP doesn't like this at all, and Tasmota even loses part of its config!
@MrAbrandao
@MrAbrandao 4 жыл бұрын
it would be interesting a signaling device the does not consume power. like a e-paper with the message battery low...
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
The only one I know is my Amazon Button shown in a earlier video...
@naimfuad5913
@naimfuad5913 4 жыл бұрын
So, to sum up, if i were to design a UPS with TP4056 charger ,DW01 protection IC ,LM6206 Boost IC,i should add these Voltage Supervisor IC to enable/disable the Boost IC? P/S : been waiting for the answer for your video #250 since then about UPS and somehow i think you're trying to relate these two? Please, correct me if i'm wrong.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
This video has nothing to do with UPS. It protects the MPU and does not care where the voltage comes from.
@naimfuad5913
@naimfuad5913 4 жыл бұрын
@@AndreasSpiess Thank you for your replies! Really appreciate your time for going through comments from your fans here! Keep up your good work!
@chuxxsss
@chuxxsss 4 жыл бұрын
Enjoy this one Andreas, very claming. Need to do a vlog tomorrow on my old spot welder. Have a great week. And as we say in Australia, don't forget the toilet roll. Lol
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I can imagine, in a large country like yours, this detail is even more important than around here ;-)
@OmarMekkawy
@OmarMekkawy 4 жыл бұрын
You could use the Tl431A for the same purpose it will be handy.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
You are right. With a few more parts...
@OmarMekkawy
@OmarMekkawy 4 жыл бұрын
@@AndreasSpiess Yep. it has a programmable threshold.
@Darkfuturee
@Darkfuturee 3 жыл бұрын
This video is very useful, that state I called the zombie state and I guess is what happens in old cctv cameras when seems like are on, but there is no video output
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
It can happen in many electronic devices, you are right.
@romixlee6643
@romixlee6643 3 жыл бұрын
Could a similar mechanism be used to boot up an wemos d1 mini on a supply that shuts off at 100mA. An elco on the power line can buffer the Esp spikes during boot and wifi, but keeping the esp8266 powered off during elco charge (say 3300u) is then required. Older Dutch smart meters have 100mA power shut offs, newer ones have 250 or even 500mA shut-offs. Any advice?
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
These parts do what I described. They only act on voltage.
@romixlee6643
@romixlee6643 3 жыл бұрын
@@AndreasSpiess thanks, but the operative concept was ‘similar mechanism’. Do you have ideas on how to prevent (say 100mA) current shut off supplies, from shutting off if powering esp8266’s that produce, as far as I can see, 470 mA spikes?
@klassichd10
@klassichd10 4 жыл бұрын
quiescent current: KA75330 50µA - not really good for battery operated systems TPS383x
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
The TPS should be better. What application do you have in mind? In my applications, the battery will be recharged as soon as possible because I use these devices as protectors. And during operation, the quiescent current is not very important compared to the current used by the ESP.
@klassichd10
@klassichd10 4 жыл бұрын
@@AndreasSpiess Some people manged to optimze deep sleep to get 1year ESP-sensor running out of a 18650 charge. And 50µA over 1year means 0.43Ah, ergo ca. 15%. I myself are using ESP sensors grid driven only. As of today I have uptimes of 601 days and the related blackout has been produced by an excavator in road construction works. For battery driven sensors I am using 868MHz (Homematic) and cheap 433MHz sensors and for these applications additional 50µA are way too high when the total quiescent current of these sensors is
@jstro-hobbytech
@jstro-hobbytech 2 жыл бұрын
The word glitch originally meant power issue in digital electronics didn't it?
@AndreasSpiess
@AndreasSpiess 2 жыл бұрын
I do not know where its origins are. But it is used for that fact, too.
@ronaldhofman1726
@ronaldhofman1726 4 жыл бұрын
i tested again and it works allrght, i ordered a Adafruit Feather HUZZAH with ESP8266 WiFi , with loading circuit and enable pin, so i can drive this pin with the ka75330 , i have ordered a 18650 battery of 2600 mAh i now use a 8266 with battery shield but this is not stable enough , is it solar powered, the lipo battery that i now use is getting charged but the esp8266 is in undefined state so need the voltage monitor to switch it of and on , the lipo battery that i have right now is 750 mah this is not enough (was a gamble) , that's why i order a other battery and board with charging and other circuitry for charging batttery and should work correct i use it with a SHT30 outdoor temp_hum sensor, it runs on tasmota and is connect via MQTT to Domoticz.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
The ESP chips need lots of current during transmission. So a 1000uF capacitor across VSS and GND is always a good thing and might help.
@ronaldhofman1726
@ronaldhofman1726 4 жыл бұрын
@@AndreasSpiess Hi, it looks that it's working okay, the solarcell is loading the lipo correctley, updated tasmota to latest version because once in al while it crashed after a week, so i am going to test further, i am going to build a new one with pressure sensor on board that's fun.
@adityapandya8098
@adityapandya8098 2 жыл бұрын
This video is so amazing for me keep it up sir and keep make us knowledgeable. Thanks
@AndreasSpiess
@AndreasSpiess 2 жыл бұрын
Glad you liked it! Thank you.
@ronaldhofman1726
@ronaldhofman1726 4 жыл бұрын
i was glad to watch your video, i was experimenting with KA75330 ordered on ali but i got a TO-92 thyristor instead of the real ka75330 i followed your link and ordered new one and those where the right parts. ik took me some time to figure out what was wrong, it did not act as a comparator and let my Peak DCA-75 decide what it is , and the answer was thyristor and a quick test with multimeter on ohm range and connecting anode to gate proved it , yesterday i received the correct parts, tested it, i use a 180 ohm pull up and on 3.17 volt the output drops to 0 volt , and on 3.22 volt it returns to normal high level, so i was glad to have received the correct parts, i emailed the supplier on ali that his parts are wrong , did not get a answer from him yet. one thing that suprises me, if you look at the datasheet of a KA75330 the - input is the voltage reference, So if V-in drops below the voltage reference the output transistor is being shut- off so the output should rise to VCC but instead is is being dropped to 0 volt ,so the output transistor is on and the collector voltage drops to 0 volts, is this a bug in the datasheet?, with this behaviour it can be connected to a ESP8266 and will be halted if the voltage drops below 3.17 volts and release at 3.22 volts so that's gooed but it contradicts the datasheet, the - input wil be higher so the op-amp output goed to zero.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I think you want this behavior because it is needed. (Think I showed it in the video). Sometimes datasheets only show a simplified version.
@ronaldhofman1726
@ronaldhofman1726 4 жыл бұрын
@@AndreasSpiess Yes indeed this is the desired behaviour it can be directly connected to reset pin.
@eugy2008
@eugy2008 3 жыл бұрын
Very interesting topic. The only issue I see here is with boards that have LiPo battery connector. If internal power gets very low/off the on-board battery kicks in. But what would happen if external power is still low/off by the time the battery power drops to low voltage? :-/
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
You have to place the supervisor at the power pin of the MCU
@eugy2008
@eugy2008 3 жыл бұрын
@@AndreasSpiess Oh, I havent thought of that. Thanks!
@roidroid
@roidroid 4 жыл бұрын
IIRC you can power 3.3V MCUs like the ESPs by simply using a LiFePO4 cell (w' it's protection-&-charging circuitry) *without any voltage regulator.* You may have even already had a video about this, i forget. The cell won't get charged above 3.6V, and the protection circuit will probably kick-in and cut off the battery when it gets down to around --2.5V. So you'll never get outof the ESP's voltage range.-- _Edit: LiFePO4 protection circuits cut it off at 2.1V, so it may still be a problem on the low end._
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Changing the battery technology is not a solution.But if your battery has a low voltage protection, you do not need this part.
@nogrend
@nogrend 4 жыл бұрын
Thank you for the nice-to-know-stuff!
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
:-)
@lottery248
@lottery248 4 жыл бұрын
wish you could collaborate with ExplainingComputers lol.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I think we cover different things with a small overlap.So it could be possible. So far I do not know him personally
@lottery248
@lottery248 4 жыл бұрын
oh. he is from the UK :)
@jamboyce
@jamboyce 3 жыл бұрын
What value pull up resistor did you use with the KA75330 and the ESP32?
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
I do not remember. I would start with 4.7k
@jamboyce
@jamboyce 3 жыл бұрын
@@AndreasSpiess thanks for the reply Andreas
@ryebis
@ryebis 4 жыл бұрын
voltage divider and a npn transistor should work the same way.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I do not think you will get a precise switch point with your proposal.
@williamlucid8907
@williamlucid8907 4 жыл бұрын
Based on illustration at 12:31 in the video; are additional parts required to connect a Telcom TC54VN2902EZB to an International Rectifier IRLZ44N? No circuit designer here; just an Arduino/ESP coder. How are R1 and R2 calculated? Thank you Mr. Spiess for the video.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I would try it with 2 4.7k resistors. But the values are not critical.
@williamlucid8907
@williamlucid8907 4 жыл бұрын
@@AndreasSpiess Thank you Mr. Spiess.
@RamPrakash-ow4wy
@RamPrakash-ow4wy 3 жыл бұрын
Hi William, I’m a designer and would like to help you with your query. Calculation R1&R2::: The R1 & R2 value used to make adjustments in the tripping point of VDET- value. Usually this VDET- is pre-programmed during prototyping. Let’s say the tripping voltage should be 2V at 100uA bleed current (The IRLZ44N’s threshold value of the gate terminal voltage is 2V). Then, the R1+R2 value will be 2V/100uA = 20kOhms. The battery used is 5V, and the requirement for the IRLZ44N is 2V for gate voltage. 2V/5V = R2/R1+R2 0.4 = R2/20kOhms R2 = 8kOhms, R1 = 17kOhms; The below-shown reference schematic will help you with understanding more clearly, I have drawn TC54 voltage supervisors with an IRLZ44N rectifier. www.flux.ai/ramprakashvishnoi8/tc54-voltage-supervisor-with-irlz44n-rectifier Let me know if you any questions in your mind. Cheers, Ram
@devluz
@devluz 4 жыл бұрын
Great video. That was exactly what my solar temperature sensor was missing!
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Fortunately, not complicated to add ;-)
@AhmetTasdemirDJLuds
@AhmetTasdemirDJLuds 4 жыл бұрын
Yeah. I was found it from adafruit. com and buy it from AliExpress and used it last year. Its realy good component. Thanks for details. I didnt know when the voltage down hackers can be attack.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
You are welcome!
@TonyTrupp
@TonyTrupp 4 жыл бұрын
I've been experiencing a problem with my esp32 pcb not starting up correctly at 2.8v, where my OLED screen doesn't turn on correctly at low voltages. I thought this could have been the issue, but I already had the 0.1uf 10k rc delay circuit on the enable pin, same as the adafruit huzzah 32. It looks like there's a brief power drop out from the esp32 after about 0.5 seconds after startup, which I suspect is causing the issue. Does anyone have any ideas why there might be that brief power dropout from the esp32? I did try adding an extra 100uf cap on the VIN, but that power at the input source looks stable. Seems like it's something happening within the MCU itself, not the power source dropping out. Suggestions appreciated.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I would measure the current. Or disable WiFi. It consumes lots of current.
@TonyTrupp
@TonyTrupp 4 жыл бұрын
Thanks @@AndreasSpiess! It does look like the voltage drops on a regular interval when VIN is only 2.7, so you're probably right about it being the wifi. I do need to connect to wifi really quick after startup though. I'm using the RT9080-33GJ5 linear voltage regulator, capable of delivering 600mA, and have 100uf, 10uf and 1uf caps on the esp32 VIN to try to keep it stable. Should 600mA be sufficient? Any suggestions on how to avoid the voltage drop with the wifi pings?
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
A more stable power supply, shorter wires, and a large capacitor between Vin and GND
@RobinGerritsen1995
@RobinGerritsen1995 4 жыл бұрын
Thanks for the heads-up! Got some nasty problems with undervoltage. I can't find a voltage detector for >4v threshold with to-92 footprint on AliExpress. I am currently working with the wemos development boards and had some problems with undervoltage. Now I want to keep the reset pulled to GND untill the 5V supply voltage is above 4V.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I use the ka75450 for 4.5 volts. It does not come in a TO-92. This is a very old case.
@solidfuel0
@solidfuel0 2 жыл бұрын
Please more content like this. I order pcb designs from freelancers and they just execute, I need to tell them everything. I had one esp8266 board designed without this component because I didn't know about it. Now I'm paying the price when battery voltage goes down. And it's hard to reach to rest 😪 😞
@AndreasSpiess
@AndreasSpiess 2 жыл бұрын
Bad luck. Next time you know ;-)
@solidfuel0
@solidfuel0 2 жыл бұрын
@@AndreasSpiess my comment was removed. did I break any rules?
@AndreasSpiess
@AndreasSpiess 2 жыл бұрын
@@solidfuel0 KZbin does no more allow links :-(
@najeebshafi1665
@najeebshafi1665 4 жыл бұрын
I am having a problem with capacitive sense library it turns ahen connected to any powersupply cn u make a video how to use capacitive touch with 5 mm glass with power supply not on battery
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Maybe you google. You should find how to do it...
@najeebshafi1665
@najeebshafi1665 4 жыл бұрын
@@AndreasSpiess i did a lot but didnt got how to get it done great Scott did hd d same pblm as i did
@craiglarson2346
@craiglarson2346 Жыл бұрын
One small thing I learned from exploring the voltage supervisors: a voltage supervisor is not a battery supervisor. When these devices turn off (Output goes to zero volts) the VCC/GND supply current increases substantially. The KIA7029’s I’ve been testing consume very little amperage when output is high. As a dropping supply voltage approaches the 2.9V trigger the device current use is about 16 uA. Once output goes to zero the device current rises to over 500 uA. Andreas solves this problem too with the N-channel FET idea at 12:30 in the video - it just took me a while to understand it. Hope this helps other viewers of this great channel.
@AndreasSpiess
@AndreasSpiess Жыл бұрын
I have to admit: I did not focus on the powr supply of these parts. So I learned something. Thanks!
@craiglarson2346
@craiglarson2346 4 жыл бұрын
Andreas, @ 8:50 you give a gift. The RC circuit solves my problem and stability returns! (R=68K, C=10uF)
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Good to know it helped!
@doit1374
@doit1374 4 жыл бұрын
Thank you for this video. I had made a solar panel powered ESP8266, and on grey clouded days it drained the last juice of the battery, making it stop forever. I had to go to my balcony and disconnect it for a day and then hope for sunnier days ahead. These supervisors I had thought of, but being a mechanical engineer could not figure out how to make some circuitry that is also very power efficient. A relay would not work. This video will bring a solution to that! BUT, maybe an obvious one for others, but how to I cap (maximize) off the battery-power from frying the ESP8266 at say 3.6 Volt. Is there in existence that springs to your mind, like an inverted supervisor for that? Thanks for all the videos. I feel like the cowboy movies, when they were made at the time it was normal, and people were not surprised with next Robert Mitchum movie. The enormous efforts to make these movies with cattle and all, makes them impossible to make today. I hope I have not seen the last of your 'movies' from your hand, thanks again!
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
The „inverted supervisor“ is called „LDO“ low dropout voltage regulator.
@mvadu
@mvadu 4 жыл бұрын
RapsberryPi uses an internal power management chip (PMIC, MxL7704 in Pi 3&4) has some of these power management built in. BMC Chip actually works at ~1V range, and it does boot up and it has a section during bootup where it detects if the voltage is enough to continue boot process. During the operation is you draw too much power, and supply voltage dipped below 4.63V is tags is and you can examine it using vcgencmd get_throttled command.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I think I mentioned it. But still you need to shut it properly down
@idontwantachannelimjustcom7745
@idontwantachannelimjustcom7745 4 жыл бұрын
Case 2.... isnt that what killed one of the mars rovers?
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I do not know :-(
@webslinger2011
@webslinger2011 4 жыл бұрын
Very informative. I knew my esp32cam resets due to low power on my arduino toy mobot but didn't know how to prevent it. Had to power it separately. Thanks for sharing this.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
It is always better to use a stable power supply...
@nigeljohnson9820
@nigeljohnson9820 4 жыл бұрын
The first voltage supervisor I used was the TL7705, this had a problem that it released the reset when its own supply voltage is low. When my company switched from the NMOS to the CMOS 8085, the processor continued to operate below the supply voltage at which the reset circuit stopped working. The result was that the processor would restart (leave reset) during the time it was being switched off. It is worth checking that the reset signal is maintained until the processor is safely off. Ideally the reset signal should be maintained all the way down to zero supply volts, One solution to this problem is make the reset a passive resistor pull down signal and "NOT in reset" active high.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
You are right. I showed that the three switch on again at around 0.7 volts. Which should be ok for a 3.3 volt MCU.
@ulrichfrei3893
@ulrichfrei3893 4 жыл бұрын
Hallo Herr Spiess. Danke für viele sehr interessante Videos, die mir schon oft bei der Lösung von Problemen geholfen haben. Eine kleine Anmerkung zu diesem Video: Die Batteriesymbole sind vermutlich falsch gepolt. ( Der längere Strich ist beim Batteriesymbol der Pluspol. )
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Ja, unterdessen weiss ich es. Obwohl es für mich logischer ist, den Minuspol grösser zu zeichnen...
@ulrichfrei3893
@ulrichfrei3893 4 жыл бұрын
Eselsbrücke für meine Schülerinnen und Schüler: Aus dem langen Strich könnte man noch ein plus machen :-)
@Nono-hk3is
@Nono-hk3is 4 жыл бұрын
In the beginning of the video, you said the raspberry pi runs at 3.3v. I understand that the broadcom chip runs at 3.3v, but the board is designed to fun at 5v, with an LDO that powers the processor and gpio at 3.3v. I assume you meant to refer to the rpi as an example of where you use the 4.5v supervisor.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Yes
@bayareapianist
@bayareapianist 4 жыл бұрын
Why do you think CPUs do not have such a chip inside? Most of battery powered microchips have this function already!
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I am not sure. Otherwise nobody would buy such chips. The example of the ESP32 shows that the protection is not sufficient, and here kzbin.info/www/bejne/bIHJZKOPaKyreK8 you see, that you can fool an arduino, too.
@68HC060
@68HC060 4 жыл бұрын
Indeed a very good video, but I think you got carried away, because you forgot to tell us how to protect against overvoltage. :) In my house, the AC from the wall outlet is specified to be 230V, but since this is on an island, where the power-cables are more than 10 km long, you can imagine that there are some quite large spikes when the neighbour turn on their high-power farming machinery (or if someone on the island descides to weld some stuff). I've measured voltages below 220V and above 240V. This is way out of the official spec. Now if my 230V power supply gets too high a voltage, it translates that voltage to a too high DC and passes this voltage onto my single-board computer (I've tried that with a CubieBoard2). My CubieBoard2 popped and so did the step-down converter I had between the power supply and the CubieBoard2. -So it'd be great to have a good way of preventing this kind of thing happening. To some extend, capacitors would help, but I'd like to clamp over-voltage too.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
This is a matter of choosing a proper AC power supply, I think. Not very much linked to this topic.My cheap USB wall charger is rates from 110 - 240 volts. So I assume it will survive also 250 volts. Maybe you had another problem?
@68HC060
@68HC060 4 жыл бұрын
Thank you for your reply. :) Well, the problem is that the voltage may spike over 300V sometimes (that is in addition to the AC not being within spec) and that I have my server (harddisks, network and single-board-computer) running on this grid. If one gets a spike, it's very likely that it'll fry more than one unit. I think it's fairly within reach to turn off the power if it goes above a certain voltage. A MeanWell power supply allows 90VAC to 264VAC, which means if the voltage climbs above 260V, I could hard switch (eg. a relay) the power to the PSU on the primary side, while keeping capacitors on the secondary side and having zener diode protection on the secondary side (probably before the capacitors). The larger capacitors, the better, because I figure they'll just "divide" the voltage down to a harmless level. Then after the capacitors, one could have either zener or a final voltage regulator. All this would of course be a bit bulky and I guess that if lightning stroke, then it'd all be wasted anyway.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I would work on the primary side, not on the secondary to prevent such spikes. As you describe it does not fry only one piece.
@68HC060
@68HC060 4 жыл бұрын
My concern about only turning off the primary side is that if you take a standard transformer (without regulation added), you will get a high spike on the secondary side when turning off the transformer. That's why I'd add the capacitors, zeners and regulator. There's likely a much simpler or better solution than the one I've been thinking of - but sometimes it's difficult to see obvious solutions. ;)
@tonysfun
@tonysfun 4 жыл бұрын
Very practical! This should prevent a lots of problems! Thanks again Andreas!!! Have a great week!
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Thanks. You too!
@MrBrian9107
@MrBrian9107 4 жыл бұрын
hi Andreas thanks for your video!, i have a question how do the wiring if i put a regulator HT7833A? , please help me
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I think you find the diagram with a LDO in the video
@kwazar6725
@kwazar6725 4 жыл бұрын
You need a batt ups with pi as they corrupt fat sdcards easily. This is a cool/geil way to monitor voltages and shutdown and on safely. Thanks andreas!👍
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
This is particularly true if you add a few super caps or a small battery as shown at the end of the video.
@fingerprint8479
@fingerprint8479 4 жыл бұрын
Interesting and useful. It is a perfect addition to my battery powered project. One question: on 12:30 minutes on your video you show a diagram of a circuit to shut down not only the ESP32 but also all peripherals when the battery is under 3.3v but show no values for the resistors. How can I calculate the resistors for the circuit? Thanks again.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
You do not need to do any calculations. Just pick two (If I remember I used 22k). But they do not matter too much.
@anthony2623
@anthony2623 3 жыл бұрын
I hope you'll see this!!! My question is this. What's the function of the brownout detector in the esp32 in place of a voltage supervisor. It doesn't work at startup?
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
I do not know because the ESP always boots and crashes in this state (and drains your battery very fast (as you see in my newest video)
@anthony2623
@anthony2623 3 жыл бұрын
@@AndreasSpiess thank for the prompt reply. Unlike the atmel AVR that the brownout detector resets the MCU, that of of ESP just detects and crashes. However, do you have much idea about brownout detector in the atmega328p used on the famous Arduino. I'm aware that the BOD resets the MCU from brownouts during operation by resetting the MCU. My question is this, does the BOD protect it under startup too?
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
I do not know the BOD of the Atmega chips :-(
@anthony2623
@anthony2623 3 жыл бұрын
@@AndreasSpiess thank you 😀
@osamahnajjar2824
@osamahnajjar2824 4 жыл бұрын
tl431 found in PC power supply works with 2.45 volts
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
TL431 is very flexible. But needs additional parts.
@karama300video
@karama300video 4 жыл бұрын
The last time I came this early I didn't know what a MCU is! xD
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I hope you know it by now ;-) Otherwise I suggest to subscribe to this channel...
@karama300video
@karama300video 4 жыл бұрын
@@AndreasSpiess I know but I did subscribe long ago. Keep up the good work!
@TheTotalGeek
@TheTotalGeek 4 жыл бұрын
Hi Andreas and everyone else here. I was holding off on a sensor project because I wanted to use the 18650 Li-ion battery as the sole power source for an Esp32. I wanted to know how long is it safe to leave the battery connected when the voltage supervisor has disabled power? Ie Does the voltage supervisor still draw from the battery and will that itself eventually damage the battery if left for a few months of a year without recharging the battery?
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
The supervisor as well as the ESP will draw current. You find the values in the data sheets. However I do not see a reason to keep a battery down for a long time. Usually we build systems which work.
@TheTotalGeek
@TheTotalGeek 4 жыл бұрын
@@AndreasSpiess I guess I was trying to understand if there is a way to run from battery for long time but when battery level drops to cut off completely and draw no current at all?
@TheTotalGeek
@TheTotalGeek 4 жыл бұрын
Ps. I love the videos you make and am grateful you replied. 😊
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
No current is tough. Very little current can be achieved by using a FET transistor.
@rb3d797
@rb3d797 2 жыл бұрын
Why didn't you activate the subtitles on this video? Can you do it, thank you
@AndreasSpiess
@AndreasSpiess 2 жыл бұрын
Subtitles should work automatically. I only add Spanish subtitles in newer videos.
@rb3d797
@rb3d797 2 жыл бұрын
@@AndreasSpiess ok
@albygnigni
@albygnigni 4 жыл бұрын
thanks andreas for this video! very informative as always! As many other viewers have suggested, most modern MCUs, even smallest ones (e.g. ATTiny), have brownout detection capabilities. In another way, also the raspberry pi has undervoltage detection capabilities (the "yellow lightning bolt") and you can write a script that powers it off. As for new designed boards, I suggest to use single PMICs that have all those function built-in. Otherwise, selecting a LDO or a Battery IC with a V_OK pin could be another solution.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
What PMIC would you use for a 3.3 volts project? And what LDO? This couls be interesting for other viewers, too.
@albygnigni
@albygnigni 4 жыл бұрын
@@AndreasSpiess From Texas Instruments: - TPS3702 Supervisor IC has capability for UV and OV monitoring - TPS778 LDO has a power-good output - As for integrated solutions, the BQ25570 you showed in video #278 has all those capabilities but is not so cheap By the way, TI, Analog, ST and many more companies are making these kinds of ICs, but they are using really small and often BGA packages, so it is difficult for a maker to use them in prototyping. Those ICs are also application-specific and not general purpose, so I suggest to take a look at the catalogs.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Thanks for the part numbers. The ones I saw were also for smaller voltages...
@BitsOfBoris
@BitsOfBoris 4 жыл бұрын
@@albygnigni Unfortunately not found on aliexpress for 2-3$ 10-20pcs like other parts :( Thanks for the tips !
@albygnigni
@albygnigni 4 жыл бұрын
@@BitsOfBoris You can try to look at LCSC, I have found the TPS3705-33 that is similar to the TPS3702 and it is 0.45€/piece , while the LDO can be found in the adj version (TPS77801D) for 3.82€/piece
@anthonycross901
@anthonycross901 4 жыл бұрын
Hi Andreas, Have you got your battery terminals the wrong way round or am I missing something?
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
You are right, I checked now. I did not remember how it is done correctly. For me, the diagrams are quite clear. But maybe next time I remember to do it the other way round...
@anpr
@anpr 4 жыл бұрын
Thanks. Is there a similar video for over voltage, surge, spikes? thanks
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I do not know.
@Graham_Wideman
@Graham_Wideman 4 жыл бұрын
Andreas: Nice video on a useful and perhaps lesser-known part. A minor point -- in your schematics the battery symbol is upside down. The long bar represents positive in the standard symbol.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
You are right.
@pulesjet
@pulesjet 4 жыл бұрын
I have a number of LiIon battery projects these would be handy for. Preventing Over charge and or Over Discharge situations. Been using the LM393 and resistor divider. This would be much easier I think. 3.3v version is just about ideal for the task on LiIon cells and with a added resistor would work for the LeFePo4 type. Just ordered 10 to mess with. Thank You. China is having some rather serious issues with the virus thing . Orders are taking quite a bit longer then the normal long times in the past. Guessing this one will take two months to show up.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Overvoltage protection is often built-in into the charging chips.
@frogeye22
@frogeye22 4 жыл бұрын
Thanks, a very interesting and well presented lesson.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
You are welcome!
@donpalmera
@donpalmera 4 жыл бұрын
Isn't this what a brownout detector is for? Almost all MCUs have one.
@ristomatti
@ristomatti 4 жыл бұрын
ESP32 definitely has one but it doesn't appear to trigger in this case as Andreas demos.
@donpalmera
@donpalmera 4 жыл бұрын
@@ristomatti It probably needs to be configured.
@ristomatti
@ristomatti 4 жыл бұрын
@@donpalmera Thanks for making me dig into this a bit, I gained new knowledge! It seems to be enabled and configured to 2.43V by default in the Arduino core for ESP32. See CONFIG_ESP32_BROWNOUT_DET in the documentation: docs.espressif.com/projects/esp-idf/en/latest/api-reference/kconfig.html#config-esp32-brownout-det and in the Arduino core code: github.com/espressif/arduino-esp32/search?q=CONFIG_BROWNOUT_DET
@ristomatti
@ristomatti 4 жыл бұрын
I guess it's just not perfect.
@ristomatti
@ristomatti 4 жыл бұрын
@@donpalmera Actually after thinking this for a while - maybe initialising it to a higher voltage would make it more likely the MCU has enough power to detect/handle the situation? But in the case of Arduino it'd be difficult or cumbersome to change the setting.
@jawolllinger
@jawolllinger 4 жыл бұрын
Hi Andreas, thanks for the awesome video. As I'm still quite new to making my individual electronics projects so your videos help me quite a lot. I have a question regarding the supercapacitors for using with the KA75450 as a safe shutdown system for the raspberry Pi: In your video #133 you suggested 15-20 F supercaps to have enough time for the Pi to safely shut down. That video was before the Pi4 and I was wondering whether the 15-20F recommendation still applies with the Pi4's power consumption? Thanks in advance.
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
You have to try. I do not know. I assume the Pi for will also shutdown faster.
@samuelm.2608
@samuelm.2608 4 жыл бұрын
Quick question : can a zener diode achieve a similar fonctionnality as a voltage supervisor?
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
In principle:yes. But they are not very sharp an precise.
#260 Most used tools, tips and tricks to spend your money wisely
15:11
Andreas Spiess
Рет қаралды 157 М.
БЕЛКА СЬЕЛА КОТЕНКА?#cat
00:13
Лайки Like
Рет қаралды 2,7 МЛН
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 32 МЛН
How Strong is Tin Foil? 💪
00:26
Preston
Рет қаралды 136 МЛН
From Small To Giant Pop Corn #katebrush #funny #shorts
00:17
Kate Brush
Рет қаралды 71 МЛН
#408 Are LiFePO Batteries better? How to Use them For Small Projects
14:17
#328 ESP32 Secrets: Interrupts, and Deep-Sleep under the Hood
18:57
Andreas Spiess
Рет қаралды 177 М.
#363 Which ESP32 pins are safe to use?
11:53
Andreas Spiess
Рет қаралды 130 М.
End the line: The last Sun Sparc Workstation
37:32
RetroBytes
Рет қаралды 58 М.
When you Accidentally Compromise every CPU on Earth
15:59
Daniel Boctor
Рет қаралды 830 М.
Forget WiFi! This Wireless Method is WAY Better?
12:14
GreatScott!
Рет қаралды 614 М.
БЕЛКА СЬЕЛА КОТЕНКА?#cat
00:13
Лайки Like
Рет қаралды 2,7 МЛН