I’ve been building a board using the bare Arduino approach (mostly for the fun of it, frankly). I built a working prototype on one of my breadboards and then used it as a model to reproduce a much more compact, refined, soldered version for real-world use.
I’m using a couple of voltage regulators (5v for the main power and a downstream 3.3v for a Nordic wireless unit that can’t tolerate 5v). Everything tested fine on my breadboard version, but I ran into all kinds of wild problems as I completed the soldered version. Not appearing to power on, erratic behavior (mostly visible with the 16x2 LCD acting nuts) and even a couple of cases where I thought I’d blown the AT328 but, apparently, just hosed the code in flash and was able to reload my program via my stable breadboard unit.
ANYWAY… turns out my problem was leaving out the input/output 10uf caps on the main 5v regulator. What was getting me was that the board simply would not work when using an external 9v adapter… but if I put the FTDI board on the header I designed into the board, it would work fine (NOT attached to USB… just mounted bare on the header). Remove the FTDI and it crapped out again. I realized that my breadboard version had the same problem, but I hadn’t been testing it without the FTDI prior to discovering this. One of the ways I wigged out the AT328 was stupidly popping the FTDI off the running unit while powered by the capless regulator. The AT328 required a reload of code after that move.
I ran in circles for a good while. But, that’s why I’m doing this… the running in circles = learning. This was my first use of voltage regulators, BTW.
So my theory is that the cap-less regulator was dropping out immediately causing a reset or other under-voltage condition on the AT328. When the FTDI was connected, however, I was unknowingly adding caps or in some other way stabilizing the circuit.
Does this sound correct? I’d appreciate any other advice and hindsight-insights that might come to mind in a situation like this. On a related note - what measures should one take for the safest coexistence of a power supply w/regulator and USB attached simultaneously? Diodes in various spots, for instance?