ESP32-S3 Devkit brownout and need USB to reset

Hi guys, this is my first post here and I have been dealing with this issue for months.

I have been programming for around 20 years but with C and Arduino just 1 year.

I'm using an ESP32-S3 Devkit, powered with a Mean well power supply 5v 3A. The Algo controls 11 relays, 2 led and 2 joysticks. It uses wifi, witch I think issues can come because of it.

Its a device that controls water pumps and electrovalves in a swimming pool.

It has been running without any problem for months but then started to brownout (500mAh)

Due to this, I changed 5v power supply for a quality one (Mean well 1A)It worked for some more months but after a while, brownout appears again.

I buyed a more Ampere power supply and bigger (Mean well 3A with volt regulator).

It worked again for some months.

Then, randomly started to brownout. I mean, it worked smooth for a week and then, constantly reboots (I managed to reduce brownout to increase power V to 5.5V) I found there was a slight drop in Devkit Power regulator, so increasing a little worked for a while). This same behaviour happened with the other power supplies too.

This week, this happened again, but with a difference.

Now I need to disconnect the devkit from my custom board pins because now it stops working and I don't have notification (I setup notification of reboot reasons). Because power of and power on does not reboot the device properly. I need to connect to USB and that way it works again. Then I go to my setup and connect the pins, power on and it works again. Just to remember, this happens this last week after almost 1 year.

Same code, same environment.

And with that, I'm a bit lost now.

Is there anyone with more experience than me who can point me in any direction?

I have been thinking to put some sleeps before and after of every wifi transmission, but I don't really know if it makes sense.

1 Like

Quick update:
I changed the ESP32-S3 with a new one. Initially worked good. But then failed after a few minutes.

Then changed power supply for a new one.
It worked since yesterday night.

So there must be something with the power supply + some components fatigue.

I will try the capacitors solution and post here any update and resolution for the community.

Check your connections, they could be oxidizing increasing resistance causing your brown out.

That's a good one. Will do visual checking.

I didn't see any oxidation, but your words make a lot of sense.

Here's what I did recently:
I tried a brand new Mean well power supply. It worked perfectly 1 week. After that, brownout again.

Then I put 2x capacitors at the 3.3v output of ldo. Same result.

Then remove that and put 1 microfaradios capacitor at the 3.3v pin of esp32 cpu. Same result.

I measured and esp32 receive 3.25-3.26v, so I'm started to think it must be a board issue.

Yesterday I bought Amazon what I think it's an espressif original PCB board and not this one bought at Aliexpress.

Will keep updated.

Please provide a schematic of your system and photos of the project as built.

I notice you mention 'brownout' a couple of times, but have you actually determined that a brownout condition is indeed the cause for your system resets? If so, how have you determined this?

That sounds fine.
If brownout conditions are indeed the cause of your troubles (which I doubt at this point), it's not so much the constant voltage you measure with a DMM, but brief dips in supply voltage. You'd have to monitor the Vcc rail for some time (e.g. with a scope) to see how stable it is. Note that dips in Vcc can cause spurious resets, but so can spikes on Vcc or any other line. At this point, it's unclear whether your problem is power supply related at all, and if so, what its nature is. Hence the question about schematics + project photos.

Hello @rsmls thank you for your time and your reply.

I provide you what you asked for. Sorry for the pictures. As I said before, this worked normally and the change comes with time and also with the power supply change. Some work for a while and then, they cause brownout.

Here there is what I have. You can see on the top right the slot for the Devkit (unplugged) and the ESP32-S3 Devkit in the next picture.


Well, the App connects to a MQTT and provides information. Everytime it resets, it send a message with the reason. I get the reason with esp_reset_reason() and it is returning ESP_RST_BROWNOUT. I transfer some data diagnosis by MQTT.

Its important to note that this has been running for months without a problem with a Meanwell Power supply 5v 3A. But it doesnt work now. I tried same brand and other brands. They work for a while and then, they dont and cause constant resets. For example, this morning the system worked with a 1 microfaradio as can be seen in the picture for 3h, then started to brownout and restarted around 40 times until I arrived home and disconnected.

I think there is an small drop, but I cant measure it with my DMM. I dont have an scope to do that task for a while.

Sadly I didnt prepare any schematics because this is a one time project. Im more on the side of programming than electronics (and thats the reason this is causing me headaches).

Also, the 5V for the elements attached are getting not from the ESP32 Devkit, I get directly from the Power supply. It has connected (and controls) an array of 6 relays, 2 joysticks, 4 leds, 2 high ampere relays and a single relay. I the picture can be seen 2 devices to control power consumption, but they are disconnected and not used.

Hope anybody can guide me in any direction.

Today I expect to receive a Devkit manufactured by Espressif, will try and post results.

Okay, so, lacking a schematic, we're likely to miss something crucial and otherwise obvious. I really recommend making one.

Given the brownout reset reason, the question still is what the nature of the supposed brownout is. Is it really due to a power supply issue, or is something else going on that ends up being registered as a brownout by the ESP? For instance, the wiring in your project means that there will be a lot of noise within that enclosure and for all we know, this may result in odd fluctuations in your supply voltage (and signal lines). Note that it's considered bad practice (due to stability and safety concerns) to have live AC and low-voltage wiring intertwined the way you have there.

I'd be strongly inclined to suggest to basically do the wiring all over again just to exclude the odds of problems, and to keep live AC wiring confined to one side of the housing, as far away as possible from the low voltage electronics. Where are the fuses on both the live AC and low voltage part of your project? I see none!

The good news is that your relays are in fact relay modules and we can safely assume they will have diodes across the coils and the drivers are likely adequate. On the other hand, we can also assume a lack of snubber circuits, and switching of pumps etc. can involve inrush currents (and associated voltage drops on your incoming AC) resp. voltage peaks when they shut off.

Another area of attention is soldering; it's hard to teel from your photos because most of the soldering is on the side of the perfboard not shown. But I do see decidedly sketchy soldering on your AC connectors; esp. the black wire on the bottom connector. And I see several screw and duPont style connectors that may give contact problems - especially over time.

1uF across your Vcc is not going to make any difference whatsoever. It's insignificant in relation to the output capacitor in the power supply (which will likely be a few hundred uF) and the bulk capacitance (usually 47uF to 220uF or so) at the input of the ESP board. If you want to make a difference, replace the 1uF with something like 470uF or even bigger.

In short, it's not very surprising that you're running into these intermittent problem; the main challenge will be to rework the project so it becomes a little more reliable. I'd start with drafting a schematic, then take the whole thing apart, decide on a more sensible layout (reducing the necessity to spread live AC all over the place) and then doing the wiring over, preferably getting rid of any duPont connectors in the process. If you keep them, at least make sure that you physically join adjacent duPont plugs since singles have a way of working themselves loose and creating intermittent contact problems.

Apart from the reset problem, the safety situation is reason enough to revise this system. I feel I cannot emphasize this strongly enough!

Thank you @rsmls there is a lot to process from your message.

There are no fuses in my circuit, you're right. Honestly I have no idea where to put them.

I'm going to start with your suggestion about AC & DC Wiring.
After that, will remove any Dupont connector with non solid connection.

Then, I will try to get a 470 uF capacitor.

In parallel I will prepare a new enclosure with new wiring. I will probably try to prepare a PCB, because honestly I know there is a little mess. I know where each cables goes, but I know after some manipulation, there is a high risk of bad connections.

Will let you know after all this changes are made.

I would like to solve my problem but also offer to the community a way to diagnose and solve this type of issue.

Thank you!

Yes, 470uF at least for a ESP32 3V3 rail is almost mandatory if you want reliable device, I have 1000uF on my board and never had a problem.
The question is how do you know it's a brownout?
But, with your "birds nest" wiring , problem could be anywhere, it looks really messy.

Since the problem has only occurred after entire system was assembled, you are doing the ONLY method of finding the bug. Replacing obviously potential problems, like the power. Since that didn't work, can you tell us what other device are connected to your mains AC supply? Can you tell us what other devices may have wiring close to your project wiring? Anywhere your wires go?

@noobmastha would you like to tell me where is the correct point to put the capacitor? Honestly I feel a little bit lost with capacitor location.

I tried at the ldo 3.3v output and also at the 3.3v input of the ESP32-S3 CPU. None of it worked. Tomorrow I get a capacitors kit and will try your suggested configurations.

I just want to remember that this assembly has worked nice for months. Only changed component was power supply. So wiring can (and it is) messy, but it's correct.

As I said, it's a brownout because esp os has an specifics function that return the cause of last reset.

@Paul_KD7HB last summer I started developing it and I was testing it for some weeks and it worked smoothly. Just after 2 months started to get problems. Nothing changed in that time. I didn't made any change in hardware. Just small changes in software to gather more info.

The main ac is used to power the 5v power supply and 2 water pumps. The water pumps are controlled by 2 relays. But it doesn't affect the system, because problems don't seem to be related with the relays on/off .

There are not more related devices connected different than seen on picture. Well I think the power supply is not shown in the picture. That's the only device.

Thank you both for your time. Really appreciated.

Today I got the new esp32-s3. Sadly width is different and doesn't fit in my rack. I got Dupont cables and tomorrow will try to test.

Are you saying the AC power coming to your system has no other device connected, all the way back to the breaker box?

I don't understand what do you mean by input and output 3V3?
You should connect capacitor between 3V3 pin on the dev board (witch is output of voltage regulator) and GND. Maybe a cap on 5V pin could help (input of the regulator).
Schematic would be helpful, are joysticks connected to 3V3 rail also?

BTW, I`m curious, how exactly you did this?
And one more question, when you turn on your gadget and shake a that box while it's working, is it all ok, no loose connections or something like that?
Cheers.

An additional bulk capacitor should go to the input side of the onboard regulator. Loading the output side (i.e. the 3.3V rail) with additional capacitance is unnecessary and can in fact be counterproductive due to the peak current it'll draw from the regulator on startup. Most regulators will handle this fine and in these cases, the additional capacitor just has no influence.

So you place the additional 470u or 1000u or whatever on the Vin pin of your ESP board. NOT the 3.3V pin.

Yes, that's it. It's installed in a swimming pool house built last summer and there is a dedicated connection only for this box.

I mean I put a capacitor, in Devkit board at the 3.3v in LDO and also, direct to the ESP32-S3 CPU 3.3v input. Same result.

I agree schematic would be helpful, but didnt made it yet. Joysticks are connected to the 3.3V output board due to their low consumption. Same for LED.

I get brownout info with this function (I said some messages before): esp_reset_reason() and it is returning ESP_RST_BROWNOUT.
The startup process is something like this:

  1. Start Wifi
  2. Connect to MQTT server
  3. Notify sistem startup MQTT
  4. Get esp_reset_reason() and send to MQTT
  5. Some more ops, of course...

That way I know each time there is a reset or power off event, what happened and why.

Thanks for your word. I buyed a capacitors kit just in case.

UPDATES:

I followed some @rsmls suggestions yesterday morning and have some good news.
First I replaced the 5V cables with a better one. Also made the ones I could, shorter. Removed a dupont connector too.

I moved the AC circuit that was near the ESP32-S3 devkit board. Now its aside. If it was around 3-4cm near, not is around 10cm.

I also forgot to tell that there was a 24V circuit near there. I also moved the cables far away from ESP32-S3 area.

As I said earlier, I also got a brand new ESP32-S3 Devkit board. This one is different than the last I was using. Sadly the board width was different and didnt fit my rails. Fortunately I had a ton of Dupont cables and for testing purpose was enought for me. So I made this monster yesterday morning.

GOOD NEWS AND BAD NEWS

The good news is that I works perfectly with same power supply.
The bad news are that I dont know yet what was causing the problem. Some of the options I handle (in my supect order) are:

  • AC cables noise. They could have been reduced not only because I moved them, also because now the ESP32 is far away from before position.
  • ESP32-S3 board components. Better LDO that can handle power required.
  • Better energy because better and shorter 5V cable used.

Of course the project doesnt stop here. I need to rebuild the box because now is a mess.
My priority here is to try to understand better what is going on and where the problem was coming from.

Also this situation can change today, in a week or this summer.

Will post updates if I have them. Im also more than opened for suggestions.

Thank you guys for your messages, I think you helped me a lot.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.