ESP32-Wroom Weird Problem
Posted: Mon May 01, 2023 1:13 am
Hi all,
I have designed a custom PCB which has some I/O s to use. As you can see from the schematics. (C2:1uF, C3:22uF Tantalium)
I have XL4015 as main input power connected (3S9P 18650 LG batteries / 3S40A BMS) to lower it for stable 5.1V (used by RPi) and HT7833 for ESP32 while active mode and deepsleep.
Im measuring the voltage with ADS1115 with a divider 1:10 ratio.
2 output Relays to control on/off RPi and another 12V load (2A max current drawn idle 250mA).
How the system works:
Firstly ESP32 wakes from the deepsleep and measure the battery. Then set Relay1 HIGH to start RPi. Then set Relay2 to start Load.
Waiting for RPi to do its own things and wait for Serial Communication.When RPi asks for current battery level answer it and download the new deep sleep configs.
Wait for RPi to shutdown safely. Set both Relays LOW goes back to sleep.
Where the Problem Starts:
Everything works flawless for the first run. No problem at all. When ESP goes to deep sleep LED on the GPIO13 randomly fades, blinks, flashes..... Just randomly no pattern. I can desolder it but there must be something wrong with it. <br/>
Another and BiGGER problem is the Relay2 (controlling load) randomly clicking. Which is strange because its floating (GPIO25) and LED floating (GPIO13) but Relay1 is stable as rock (GPIO26). Thats a huge problem bc it draws my battery and I cant trust it apperantly.
So there must be something wrong with the design... Something floating somewhere but after 2 weeks for debugging Im lost. <br/>
What I tried:
I have changed ESP32 for at least 20 times with new ones...............Nothing changes. Relay1 still rock solid.
I have changed the Relays with 4 different brand..........................Nothing changes. Relay1 still rock solid.
I have added a Pull-Down resistor with 10K (BC547 base to GND).......Clicking of Relay2 decreases but random blinks on LED increases. Relay1 still rock solid.
I have changed the batteries and switch to DC outlet.....................Nothing changes. Relay1 still working as expected.
I think its not related with the code since I 'm using the same code for breadboard prototype with devkit and its working flawlessly.
Any help would be appriciated.
I have designed a custom PCB which has some I/O s to use. As you can see from the schematics. (C2:1uF, C3:22uF Tantalium)
I have XL4015 as main input power connected (3S9P 18650 LG batteries / 3S40A BMS) to lower it for stable 5.1V (used by RPi) and HT7833 for ESP32 while active mode and deepsleep.
Im measuring the voltage with ADS1115 with a divider 1:10 ratio.
2 output Relays to control on/off RPi and another 12V load (2A max current drawn idle 250mA).
How the system works:
Firstly ESP32 wakes from the deepsleep and measure the battery. Then set Relay1 HIGH to start RPi. Then set Relay2 to start Load.
Waiting for RPi to do its own things and wait for Serial Communication.When RPi asks for current battery level answer it and download the new deep sleep configs.
Wait for RPi to shutdown safely. Set both Relays LOW goes back to sleep.
Where the Problem Starts:
Everything works flawless for the first run. No problem at all. When ESP goes to deep sleep LED on the GPIO13 randomly fades, blinks, flashes..... Just randomly no pattern. I can desolder it but there must be something wrong with it. <br/>
Another and BiGGER problem is the Relay2 (controlling load) randomly clicking. Which is strange because its floating (GPIO25) and LED floating (GPIO13) but Relay1 is stable as rock (GPIO26). Thats a huge problem bc it draws my battery and I cant trust it apperantly.
So there must be something wrong with the design... Something floating somewhere but after 2 weeks for debugging Im lost. <br/>
What I tried:
I have changed ESP32 for at least 20 times with new ones...............Nothing changes. Relay1 still rock solid.
I have changed the Relays with 4 different brand..........................Nothing changes. Relay1 still rock solid.
I have added a Pull-Down resistor with 10K (BC547 base to GND).......Clicking of Relay2 decreases but random blinks on LED increases. Relay1 still rock solid.
I have changed the batteries and switch to DC outlet.....................Nothing changes. Relay1 still working as expected.
I think its not related with the code since I 'm using the same code for breadboard prototype with devkit and its working flawlessly.
Any help would be appriciated.