plugging issue

Hi, I'm trying to make an Arduino based device which goes plugged to the power outlet.
I'm repurposing one of those "USB outlet" cell phone chargers (like the one in the pic) since I have a lot of them.

But there is a problem: If I plug the charger, and then the arduino, everything works perfect. But, if I connect first the arduino to the charger, and then to the power outlet, the arduino won't start until the reset button is pushed.

I've tried to solve it adding a delay in the void setup() hoping that it allows some "power stabilization" (I know, not even me buy this BS)
I was thinking in some kind of capacitor in order to delay the power feed (is it even worst BS?)

thanks for reading!
JD

Are you using an actual Arduino, or a home-made system based on an Armel processor?

If it is a home-made system, you can probably get it working by changing the fuses that control the clock startup time and the brown-out detection.

If it is an Arduino and you can't or don't want to modify the fuses, then try connecting a high value capacitor (100uF or greater) in series with a low-value resistor (say 100 ohms) between the reset pin and ground. The idea is to hold the processor in the reset state until the power has stabilised.

Hi, thanks for your answer it's Arduino Uno original. I have no idea how to change the fuses (looks like I have to dig a little bit into it).
If I use the capacitor solution, is there no side effect, like resets when I don't want to?

The capacitor solution won't causes resets when you don't want it to, but it may stop the bootloader working while it is connected (because the bootloader relies on getting a reset pulse at the start).

You can get longer delays before reset is released by using a capacitor in conjunction with an NPN transistor or a 555 timer.

The 555 solution sounds very good, and it's easier for me to calculate the delay. I'll go that way.

Thank you so much.