i have built a simple vehicle robot.im using two dc (3 to 6 volt) gear motors, an ultrasonic sensor,arduino uno,hc-sr04 bluetooth module and an app built in MIT APP INVENTOR.
My robot is working fine while it is connected with my pc using usb.But the problem is while using external power source.I used 9 volt battery to power up the arduino board and the light on arduino turns on so i guess its powered.For controlling the motors im using l293d ic.so i connected pin 8 of l293d with 5 volt provided by arduino board and connected pin 16 of l293d with another 9 volt battery.but the motors do not move while sending command from mobile but it works fine while it is connected with pc using usb.so i tried to use 9volt battery with pin 8 of l293d and 5 volt (provided by arduino) with pin 16 l293d but nothing happened.
After doing this i again used usb to connect arduino with pc and it works nice then.
heres one thing that i guessed is while the arduino board connected with pc ,it does not need external power to move the motors.
i can not understand why its behaving like that.
Could you suggest me how to solve the problem so that i can use external power to move the motors while my robot is not connected with pc?
I am sorry if i have had any errors.
A 9V battery only supplies ~60ma of current. Your USB connection is typically capable of ~500ma. What's assuredly happening is that as soon as you try moving your motors the power draw becomes too much for the 9V battery and the Arduino resets.
Use a battery with more ‘Ah’ rating, preferably rechargeable cell.
Thanks for your response.
i used two 9 volt batteries in series with l293d. within a moment i heard a sound in motor but the motors do not move.
what wrong with me?Please im willing your response again.
the message is: use a BIG battery ( from a car )
If you use two 9V battery parallel there is a chance for working. But 9V battery are having less Ah, so better to use rechargeable cells. with > 700mAh.
Ah is relevant to how long ( how much time ) it will run. The most important requirement, for your problem, is much current you need to get the thing to work. That would be an amp rating, not an amp-hour rating. You need to figure that out, before you get to solving how much time it will run for.
You might want to run the motors off an external power source, separate from the arduino, BUT must be grounded common. I.E. the tank robot I'm trying to get working, I have two 1.5-Ap regulators off the 12V gel cell. a LM7809 (Yes, they actually make a 9V version), and a LM7805 connected to the output of the 7809. the 12V is dropped to 9V for powering the Arduino, But voltage for the continuous rotation servos (two VEX Motor Drives), the Radar servo (a single VEX Servo Drive), the power for the VEX Ultrasonic range finder (similar to the 4-pin PING, but 2 separate 3-wire plugs, 1 in, 1 out.), and 3 line sensors, are all powered off the single 7805. (both regulators are mounted on a single 2" Square X 3/16" thick heat sink. (Scavenged from an old ATX power supply)) Yes, I've run into the overloading & resetting of the Arduino's on-board regulator. I had thought of it, but someone else on the discussion board advised against back-feeding the +5V from the regulator, to the +5V pin of the Arduino. (apparently could fry the switching circuit that turns off the USB supplied +5, when you use the Coaxial plug. which steps down through the on-board regulator.) So-far, modules I've used on my project have worked. (each function run separately), the motor drives work fine, the servo and Ultrasonic sensors work fine, the line follower sensors work fine, BUT.... I'm still trying to write the code of all of them together, and to react to remote control over a series-1 XBEE...