Why does my DIY clock module reboot the second I plug in USB?

Oct 31, 2026 Last reply: 14 hours ago 4 Replies

First reply

Sam_Granite_1984

And keep pulling the ribbon while flashing if you want, that's still good habit even with the diode fitted, just for peace of mind while you're poking at firmware.

Read the full reply

So I've got a little clock module I built on perfboard, runs fine off the ribbon cable in my case. Start, stop, tap tempo, all good. But the moment I plug a USB cable in to flash new firmware, the display flickers and the whole thing resets. Unplug the cable and it's happy again right away. Someone told me I need a diode between the USB 5V and the rail 5V so they don't fight each other, but I honestly don't follow where it's supposed to sit or wich direction it points. Is the USB trying to push power back into the case supply, or the other way around? I always figured the two just coexisted. For now I just pull the ribbon out whenever I flash it, which works, but it feels like I'm avoiding the actual problem rather than fixing it. Does this even matter for a one-off build, or is it only somthing you'd care about if you were handing boards to other people? I'd rather sort it now than get burned later, but I'm clearly missing something basic about how the two supplies interact.


And keep pulling the ribbon while flashing if you want, that's still good habit even with the diode fitted, just for peace of mind while you're poking at firmware.

I've seen this happen with other little electronics I've built. It feels like when the USB connection starts up and tries to talk to the board, it suddenly needs a lot of power, right? Maybe that sudden change in how much electricity is being drawn is what is causing the reset, even if the voltage stays fine. It is not just the power going in, but how quickly the chip demands it. Does the process of flashing firmware pull a lot of current that the rest of the circuit cannot handle?

The problem is almost certainly related to current draw rather than voltage polarity, which is why the flashing resets it. When the firmware loader initializes over USB, there is a massive transient current spike. My last board failure happened when I pushed a module drawing 400 milliamps onto a power rail rated for 300 milliamps. The voltage simply dropped too much to keep the microcontroller stable, even for a second. You need a rail capable of handling that sudden surge during the flash process.

I had a wierd thing happen on a diffrent little board I put together and it was similar, but not the same issue. I thought it was more about noise than the power spikes, which is a guess. I tried just dropping in a big capacitor near the USB connector on my end and it seemed to settle things down when the firmware was flashing. It felt like whatever is happening on the data lines is also causing a sort of internal hiccup during the reset phase.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required