ESP32 Brownout Problem
ESP32 Brownout Problem
F r i d a y, J a n u a r y 1 0 , 2 0 2 0
I have been doing a lot of tests and projects on the ESP32. And just as
with the Arduino or ESP8266 you just write a program, upload it from
your computer and it works.
The programs would not start and the Serial Monitor showed the above
text: Brownout Detector was triggered. This did not occur all the time but
only when some heavy programming was involved. In my particular case
it happened when I was develloping a program that included multiple
libraries:
#include <Time.h>
#include <TimeLib.h>
#include <WiFi.h>
#include <NTPClient.h>
#include <WiFiUDP.h>
And an extra speech synthesizer library, on which I'll come back in a later
story.
Please note that I am using the ESP32 Devkit board V1 from DOIT. This
problem might not occur with other boards. I also noted that the
problem occured when Wifi was activated (and therefore power
consumption was increased).
Brownout detection.
I thought it was strange that this error occured as I knew from the Attiny
85 micro controllers that Brown-out Detection (BOD) is activated when
the chip gets to low Voltage. And I had nothing attached to the ESP32.
So nothing was drawing power except the ESP32 itself. Therefore the
voltage should not get too low for the microcontroller to work.
Nevertheless the ESP32 detected the brownout and kept resetting itself.
Searching the internet revealed that many others encountered the same
problem and some solutions were suggested:
- You are using a poor quality USB cable. Try to use a good quality one
- Not enough power supplied through the USB port: Use a USB Hub with
an external power supply.
The solution.
In the end I found a software solution and I do not want to keep that
from you.
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
Solution number 2
The setback is that this is only good when your program is finished as
you are not able to monitor anything through the Serial Port.
Solution number 3
This one is a bit tricky, so you have to be absolutely sure of what you are
doing.
I plugged the USB port of the ESP32 into my computer and attached a
second power USB supply to the V-IN pin of the ESP32 and that worked
flawlessly !!! Be aware that the actual connections on your USB
breadboard connector might be different as displayed above. GND and
VCC might be on different pins !! And I see I mixed up the colors of the
wiring. GND should be blue and VCC should be red.
The ESP got enough power to work and at the same time had a
connection with my computer so I could monitor data through the Serial
Monitor.
If you do this make sure you use a decent 5Volt power supply. You are
connecting an external power-supply indirect to the USB port of your
computer. If anything fails you are in risk of damaging your computer !!
So make absolutely sure that you are using an excellent external power
supply, which does not deliver more as 5 volts.
Luc Volders
luc
op
10:06 AM
Share
‹ Home ›
View web version
About Me
luc
Email: [email protected]
View my complete profile
Powered by Blogger.