Offline
Newbie
Karma: 0
Posts: 17
|
 |
« on: November 19, 2012, 02:04:16 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Queens, New York
Offline
Edison Member
Karma: 31
Posts: 1730
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #1 on: November 19, 2012, 02:06:18 pm » |
where did you plug in the 9V battey?
|
|
|
|
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
Boston
Offline
God Member
Karma: 3
Posts: 520
Arduino rocks
|
 |
« Reply #2 on: November 19, 2012, 02:08:27 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 30
|
 |
« Reply #3 on: November 19, 2012, 02:12:33 pm » |
as said above, how r u powering it ? if its through the vin pin then try lowering the current mine works fine at 5v
|
|
|
|
|
Logged
|
|
|
|
|
Queens, New York
Offline
Edison Member
Karma: 31
Posts: 1730
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #4 on: November 19, 2012, 02:17:11 pm » |
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.
|
|
|
|
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 282
Posts: 15443
Measurement changes behavior
|
 |
« Reply #5 on: November 19, 2012, 02:35:28 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 282
Posts: 15443
Measurement changes behavior
|
 |
« Reply #6 on: November 19, 2012, 02:41:15 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Queens, New York
Offline
Edison Member
Karma: 31
Posts: 1730
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #7 on: November 19, 2012, 02:54:38 pm » |
@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.
|
|
|
|
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 17
|
 |
« Reply #8 on: November 19, 2012, 03:33:53 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 17
|
 |
« Reply #9 on: November 19, 2012, 03:42:23 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Tesla Member
Karma: 100
Posts: 6784
-
|
 |
« Reply #10 on: November 19, 2012, 04:21:46 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 3
Posts: 230
|
 |
« Reply #11 on: November 19, 2012, 05:00:12 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 17
|
 |
« Reply #12 on: November 19, 2012, 05:57:43 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Queens, New York
Offline
Edison Member
Karma: 31
Posts: 1730
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #13 on: November 19, 2012, 06:37:11 pm » |
I think your board is half retarded.
|
|
|
|
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
UK
Offline
Tesla Member
Karma: 100
Posts: 6784
-
|
 |
« Reply #14 on: November 19, 2012, 07:49:33 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
|