I have a simple cigarette car adapter 12V - USB. I am connecting a standard USB cable to my Arduino Nano. 1 out of 5 times I connect it to the car adapter, the Tx and Rx LEDs will light up and remain on constantly.
I never happens when I connect it to my PC, only with the car adapter.
If I unplug it and plug it back again, it's back to normal. It happens pretty much randomly and only on power up i.e., if it didn't happen right when I plug it in, it won't happen. But if the LEDs turn on, they remain on until I unplug it...
I want to add that even when the Tx and Rx LEDs are on, the program runs normally on the Nano.
Some cheaper 12v to 5v adapters aren’t very well regulated under light loads. If the Nano has a Vin pin you could try connecting a 25uf electrolytic capacitor between it and ground and see if that works. That might help smooth out the voltage.
Even if it's voltage problem, why is it random? What makes the Tx and Rx LEDs stay lit?
If the 12V-USB adapter is designed as a battery charger, it may not be well regulated (rechargeable batteries are generally not too fussy about the voltage you supply them with).
If the supply voltage is out of range during that initial connection you may be provoking a logic fault in the processor causing it to crash. It could happen because the voltage is too high, too low, not smooth enough ...
If it's marginal, it could easily happen sometimes and not others. Adding a little bit of smoothing may be just enough to stop it being a problem.
I'm just making a power supply and my arduino has the same symptoms when I connect it up, I have been told on another thread that there is probably too much ripple.
so does indeed sound like the supply is not clean enough and some capacitance is needed
Where can I add the capacitor?