Arduino bot stops running after I unplug it from the PC
jemartin390
Posts: 10
My Arduino uno shield bot runs good and always have, until today. My robot will run while it's plugged up to the PC, but it completely stops once I unplug it. Power remains and sometimes the servos will twitch, but the uploaded program stops running. I use visual studio and never had this issue before. Suggestions?
Comments
Jim
Did you get this resolved? How are the Shield-Bot batteries doing? Perhaps they are drained, and it has been running off of USB power. Remember, the Uno draws power if the battery pack is plugged into it, even if the power switch on the Board of Education shield is in position 0. So, I always turn off the switch and also unplug the battery pack from the Uno when I'm done with a session.
I have noticed that if I plug in different bots using the same USB cable, then the number of the serial port changes. Not sure if that has anything to do with it.
That is the expected behaviour.
Each robot usb interface has a unique serial number, and your computer will assign a new com port number to each different usb device it meets, each identified by that unique serial number.
Are you using rechargeable or alkaline cells?
Also... are you getting power to the parallax shield when the usb is unplugged? Is there some sort of indicator?
Do you still lose total power if you unplug all but one servo?
I've tried both types of batteries.
The power remains on, and the light indicators are on. Sometimes the servo motors will randomly twitch, but the uploaded program stops running. If I plug it back up, then the program will resume.
The LED flash can help tell you if the Arduino power is browning out for whatever reason. If so, there are more specific troubleshooting steps you can take. If the Arduino is getting insufficient battery voltage or current the sketch will repeatedly restart.
Try one at a time:
Different USB cable
Different Port
Different Computer
You must first eliminate secondary hardware issues.