No restart on UNO after power down

Ok,
Here is the problem I am having with my Arduino Uno. I have a program that I wrote for a stepper motor drive. It starts by turning a stepper motor 36º, stop for the time you have set by a voltage input on A0. The program works find, but here is the problem. I can down load the program to my UNO and it will run after the down load, but if I disconnect the USB cable and connect a 9 volt battery to the power input of the processor it will not start. If I hit the reset button it has no effect on starting the program. If I remove the 9 volt battery and reinstall the USB cable, hit the restart button the program will not start. I can go back and reinstall the program and it will start to run again.
HELP!!!!!!!!!!!!!!!!!!
john
Mims,Fl

where did you plug in the 9V battey?

Sounds like a power issue.
How did you wire this up?
Are you powering ther motor from a different power source or through the Arduino?

as said above, how r u powering it ? if its through the vin pin then try lowering the current mine works fine at 5v

If it is not going back on when you plug the USB back in then it is possible that you fried it. OR you have a possible short somewhere.
Remove all your wire and try the USB again.

I suspect you are powering the stepper motor from the arduino 5V shield pin, is that the case? If so, your symptom means that a small 9 volt battery simply can't supply enough current to operate the motor, but the USB current (it can supply up to 500ma) does have enough current capacity to operate your motor. Those small 9 volt batteries are almost useless for powering an arduino project in almost all cases and they are an expensive power source for the small amount of power they can deliver. Find a proper external power source for your board and you will be much better off.

Lefty

HazardsMind:
If it is not going back on when you plug the USB back in then it is possible that you fried it. OR you have a possible short somewhere.
Remove all your wire and try the USB again.

Note that he said:

I can go back and reinstall the program and it will start to run again.

That wouldn't be possible if something was 'fried' or 'shorted'.

Lefty

@retrolefty

true but I was referring to this.

If I remove the 9 volt battery and reinstall the USB cable, hit the restart button the program will not start.

May be he made a typo when he wrote the following line, I dont know.

He has to respond back.

Ok,
I have a 10 turn photometer across the UNO 5.0 volt pins this is only 2.5 ma of current drop on the 5 volt bus. I’m taking the wiper output which is from 0 to 5.0 volts and inputting it to the A0 pin to convert a voltage to a stop time. I tried the blink program and it did the same thing. The blink only uses the onboard led. With nothing connected to the board it will run the blink program as it should but if I power down and repower with either a 9 volt battery or the USB cable it will not start the blink program. And I pressed the reset button.
john
Mims,Fl

Also,
If there was a power problem, the USB cable would not work to load a sketch. The blink sketch only uses a on board led and it will not restart after power down and repower with the USB cable or a battery.
john
Mims, fl.

I agree with the other advice that it sounds like a power supply issue. If you upload the 'blink' example sketch, disconnect all the hardware and just power the UNO from the battery, does it run correctly? Does it then also work correctly when you disconnect the battery and power it from the USB again?

It's the pot what it sounds like to me I have had some go bad on pic before what happens is you have no resistor on the wiper and when your code starts your pot is at five volts on the wiper and the pin is sinking to ground. Can happen I've had more then one pot go bad this way so I now always use a resistor to limit the wiper
to about 5 mA.

be80be
The 10 turn pot is from the 5.0 volt pin to ground, the wipper picks up a voltage form the 2.0K resistor in the pot it can be from 0 to 5.0 volts the A0 input just reads the voltage. Anyway my UNO will not start with the pot in the circuit or out of the cirucit. Also I am just running the blink sketch and it it willnot restart. Yes PeterH it will not work on the blink sketch, with nothing connected to the board (just power, USB or Battery). Right now I have it running the blink sketch with the USB cable but if I remove the USB cable and REconnect it the blink sketch will not start.
john
Mims, Fl

I think your board is half retarded.

jdmac:
Right now I have it running the blink sketch with the USB cable but if I remove the USB cable and REconnect it the blink sketch will not start.

Can you confirm this is just with the basic Arduino board plugged into a USB cable to the PC - no additional hardware or shields of any sort attached?

The only way I can account for that behaviour is a flash memory failure, but I've never seen that problem mentioned and it seems a bit unlikely.

All,
It is working now. the only thing I didwas reload the Arduino solfware for Windows 7.
Don't aske me what I did, but it works. Thank you all for your help.
john
Mims, Fl