Thread Starter

Rudy0123

Joined Nov 14, 2023
1
I'm sharing a discovery on this forum as I have found solutions to problems I had on a few occasions. It's time for me to give back to the community...

I designed a custom PCB with an ESP-WROOM-32 micro controller. On my workbench, everything was working perfectly, every time. However when I installed some of my units in the field, they were often NOT doing the job they were designed to do. Without going into detail, the job it needs to do has to do with real time switching ON/OFF and deal with power outages.

It took me quite a lot of time to establish what was happening. My first suspicion was a bug in the code. However, it turned out to be a very mandane issue: about 50% of the time, the ESP would not reset when the power came on.

The main difference between my test unit in my lab is that this unit was powered from a USB port. The unit in the field is powered from a compact AC/DC power supply containing a DC/DC buck converter. This buck converter needs to charge a fairly large output capacitor (100uF or thereabout). This results in a slow rampup time of about 7ms.

Many many hours went by, trying to find an article about VDD and EN pin rise times requirements, looking at different circuit diagrams from different breakout board manufacturers. Brown out detection was a possible cause. Eventually, I found out the EN pin (also known as a reset pin) must have a slower rise time than the VDD pin. The RC circuit on my GPIO0 (EN pin) used a 10K pullup with a 100nF cap to GND so a 1ms time constant. By changing the capacitor to a 1uF, my problem was solved.

Such a simple solution, but what an involved investigation (about 3 days!!!)
Hope this post helps some of you with a similar problem.

In the trace below: yellow=VDD blue=ENpin with 10K/1uF


DS1Z_QuickPrint1.png
 

Ya’akov

Joined Jan 27, 2019
9,275
Welcome to AAC.

Thanks for the write-up.

You should probably be using a voltage supervisor rather than a simple RC network. There are many options, like these from TI for single channel use cases. A voltage supervisor handles under- and over-voltage conditions and is closed loop not just depending on timing but actually measuring the state of the power rail(s).

Your solution is a simple one, and will certainly work for many cases, but voltage supervisors have grown increasingly capable and having them as a standard item in your designs is certainly a good idea. There are devices from nearly every diversified manufacturer, and so you often choose something that should be highly compatible with your MCU/MPU/&c. but you don’t have to use a matching set. TI’s offerings are excellent.

Once again, thanks for your contribution, it’s exactly the sort of thing that makes AAC such a good resource. I expect your post will indeed help many people who will find it via search, and attract more members who can pay forward as you have.
 
Top