Hey everyone!
I'm currently designing a PCB for a device controlled by a remote (both based on the ESP32). I want to clarify upfront that I'm not a professional electronic engineer—just a hobbyist.
A quick overview of the PCB's main functions:
It controls a NEMA17 stepper motor through a TMC2208 driver. A low-voltage relay disconnects the motor when it's not in use. The device is powered by a 7.4V battery. Power is converted from VCC to 5V using an AMS1117 regulator for the relay, then from 5V to 3.3V to power the ESP32-WROOM-32U.
View attachment Schematic.jpg

3V3 rail highlighted


5V rail highlighted
The problem:
The PCB works for a few hours from the battery but then stops. However, when I supply 3.3V directly to the ESP32 through the pins (for sketch uploading), it works (receives and sends data, and the seven-segment indicator works as well, though the motor and relay don’t activate due to insufficient current). What could be the issue?
A few thoughts:
UPDATE
It turns out that when I connect the board only to the 3.3V and GND pins of the programmer, it doesn't work as well. However, when I also connect the BOOT, EN, RX, and TX pins, it works well — even when the programmer is powered by a power bank or another external source. This suggests that the issue might be related to the boot process of the microcontroller itself. But everything was fine previously, what might have caused that issue? I use this programmer:

I'm currently designing a PCB for a device controlled by a remote (both based on the ESP32). I want to clarify upfront that I'm not a professional electronic engineer—just a hobbyist.
A quick overview of the PCB's main functions:
It controls a NEMA17 stepper motor through a TMC2208 driver. A low-voltage relay disconnects the motor when it's not in use. The device is powered by a 7.4V battery. Power is converted from VCC to 5V using an AMS1117 regulator for the relay, then from 5V to 3.3V to power the ESP32-WROOM-32U.
View attachment Schematic.jpg

3V3 rail highlighted


5V rail highlighted
The problem:
The PCB works for a few hours from the battery but then stops. However, when I supply 3.3V directly to the ESP32 through the pins (for sketch uploading), it works (receives and sends data, and the seven-segment indicator works as well, though the motor and relay don’t activate due to insufficient current). What could be the issue?
A few thoughts:
- During my search for solutions, I discovered that a flyback diode should be added to the relay. I'm planning to include a 1N4007 in the next revision. The boards that experienced this issue didn’t have a flyback diode, but could we rule out the relay’s harmful impact since the ESP32 itself still works fine?
- While the PCB was functioning, the relay produced a ticking sound (it wasn’t activating, just slightly ticking), which seemed to coincide with moments when the MCU sends data (it’s programmed to send data every second). Could this indicate some form of interference? Any tips on how to eliminate it?
- After the PCB stopped working, I tried several power supply configurations from the battery. I dismantled the relay (to eliminate potential harmful magnetic fields) and connected the battery directly to the AMS1117 3.3V. I also tested an MP1482 buck converter, but nothing seems to bring the PCB back to life.
- It’s worth noting that when the PCB first stops working from the battery, it briefly turns on for a short period, but this period keeps getting shorter until it fails to power up at all. I’ve assembled a few boards, and they all have the same issue.
UPDATE
It turns out that when I connect the board only to the 3.3V and GND pins of the programmer, it doesn't work as well. However, when I also connect the BOOT, EN, RX, and TX pins, it works well — even when the programmer is powered by a power bank or another external source. This suggests that the issue might be related to the boot process of the microcontroller itself. But everything was fine previously, what might have caused that issue? I use this programmer:

Last edited:
