random hardware reset

ves011
Posts: 59
Joined: Fri Oct 07, 2022 2:31 pm
Location: romania
Contact:

random hardware reset

Postby ves011 » Mon May 12, 2025 4:41 pm

I have an issue which drives me crazy in the last week.
Long story short: i have an ESP32 custom board which drives a relay, which I plan to use it to control a water pump. There is a pressure sensor, and a flow meter connected to the board. All pretty simple. I wrote a small Android application which communicates over BLE with ESP32 to set-up the running parameters.
The board is designed by myself and i have used it in several applications around my home since 2 years. I had no single hardware issue.
All good, but during final tests i started to face random hardware reset... or something which makes my board to reboot. And this reset happens randomly. It might take few seconds or few minutes. I call it hardware reset because it behaves like i push the reset button. The console, connected over JTAg/USB , display only this message
--- Error: ClearCommError failed (PermissionError(13, 'The device does not recognize the command.', None, 22))
--- Waiting for the device to reconnect
And after that i see the logs from the boot sequence. No brownout, no sw crash, nothing.
Since i struggle with this issue I changed everything: cables, connectors, esp32 module, shield board ... everything.
The only way i can avoid the reset is to solder a floating wire (~8cm) to the enable pin of the module. Avoiding here means that in more than 2hrs i got no reset.
Did anybody face similar issues and found the cause?
Does this floating, wire soldered to EN pin, have some meaning for someone of you?
Any suggestion is more than welcome.

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: random hardware reset

Postby Sprite » Tue May 13, 2025 2:08 am

Long story short: i have an ESP32 custom board which drives a relay
Please post the schematic and the PCB design of that board.

ves011
Posts: 59
Joined: Fri Oct 07, 2022 2:31 pm
Location: romania
Contact:

Re: random hardware reset

Postby ves011 » Tue May 13, 2025 6:25 am

Here they are
Thera are 3 shields mounted in a sandwich.
From bottom to top: 1 - relay shield, 2 - cpu, 3 - leds and sensors shield
On the relay shield board only 1 relay is populated
the floating wire i'm talking about is soldered to J2 Reset - pin 2
Hope the resolution is good enough to get the needed details
Screenshot 2025-05-13 091440.png
cpu
Screenshot 2025-05-13 091440.png (351.07 KiB) Viewed 195 times
Screenshot 2025-05-13 091510.png
relay shield
Screenshot 2025-05-13 091510.png (281.16 KiB) Viewed 195 times
Screenshot 2025-05-13 091602.png
leds and sensors shield
Screenshot 2025-05-13 091602.png (245.81 KiB) Viewed 195 times

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: random hardware reset

Postby Sprite » Tue May 13, 2025 6:53 am

I'm not seeing much bulk decoupling capacitance - 3x100nf at some ics and that's about it. I'd put some large-ish (say 22uF to 100uF) capacitors between 3.3V and ground and 5V and ground. Not having much decoupling can be an issue as you're switching inductive loads, namely the relay coils.

ves011
Posts: 59
Joined: Fri Oct 07, 2022 2:31 pm
Location: romania
Contact:

Re: random hardware reset

Postby ves011 » Tue May 13, 2025 7:19 am

Thanks @Sprite for your quick review.
+5V already has 2x100uF caps. 1 on the power board and 1 on the sensors shield (not shown in the schematics, because i added it later to reduce the noise at the ADC level). Will place another 100uF on 3.3V and let you know if any improvment.
Anyway the issue happens no matter the relay is switched or not.

ves011
Posts: 59
Joined: Fri Oct 07, 2022 2:31 pm
Location: romania
Contact:

Re: random hardware reset

Postby ves011 » Tue May 13, 2025 7:51 am

I place the cap but it doesnt help :(
Anyway its a good finding. Will keep it there.

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: random hardware reset

Postby Sprite » Wed May 14, 2025 2:17 am

Do you normally have anything connected to j2?

ves011
Posts: 59
Joined: Fri Oct 07, 2022 2:31 pm
Location: romania
Contact:

Re: random hardware reset

Postby ves011 » Wed May 14, 2025 5:32 am

No, nothing connected. Just a 2 pin header, the same like IO0, just in case i need to plug a switch.
Yesterday i tested it "in production" with the pump and sensors connected and all good but with the floating wire connected.
Its amazing and puzzling how that bloody wire does the trick!?!?!?!

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: random hardware reset

Postby Sprite » Thu May 15, 2025 1:59 am

It's odd for sure. Do you have more boards like these, and do they have similar issues?

ves011
Posts: 59
Joined: Fri Oct 07, 2022 2:31 pm
Location: romania
Contact:

Re: random hardware reset

Postby ves011 » Thu May 15, 2025 6:34 am

Tested with 2 CPU boards. Same!

Who is online

Users browsing this forum: Qwantbot and 4 guests