Sketch stops working when board disconnected from


I’ve just finished a simple sketch to control some digital I/O, with a few timer functions - pretty basic stuff. I got the program working perfectly to my expectations: all the pretty LED’s go on and off when I expect them to 8-).

I disconnected my board (Duemilanove with the ATMEGA328P chip) from the USB computer connection, and all of a sudden the output goes psycho, flickering and flipping off - consistently incorrect. :-?

I tried resetting, disconnecting power and reconnecting etc - no go. But when I reconnect the computer USB - it all goes back to normal, without even resetting the board. :-?^2

My sense tells me there might be some kind of grounding issue, but I haven’t really found anything in the Arduino website to give me a clue on this.

Has anyone seen this before, confronted it, solved it?

So how are you powering it when it is disconnected? Is that power supply connected correctly? Is the ground connected correctly inside the power supply.
It sounds like a power supply problem, have you tried another one?

I was using a 400mA, 9VDC supply. I managed to track down a 1.5A, 7.5VDC supply, and it's all better again. ;D

Many thanks, that just about finishes up this project for me.