0

I built a Arduino robot car which accepts instructions via bluetooth. The instructions are pretty simple, they tell the car to stop, go forward, reverse, turn left or turn right.

When I have the car powered through the computer USB (ie when I have just uploaded the sketch), all works fine. However, when I run off independent battery power, the arduino seems to restart whenever I give the car an instruction which means the motors have to operate.

I know the sketch is restarting inside the Arduino because the blue tooth terminal displays the startup text which is inside the 'setup' function.

What is going wrong here? What issue am I encountering?

The board is an Arduino UNO with an Arduino Motor Shield attached. The blue tooth and two sonic sensors are attached to the motor shield pins.

Also, I have a 9V battery attached to the motor shield. Plus 4 times 1.5V batteries powering the UNO. Am I screwing up the power at all? Getting too much? Or too little?

  • What sort of 9 V battery? One of the ones you put in a smoke detector? Almost certainly it is underpowered. I would also be interested to see the wiring. – Nick Gammon Aug 2 '15 at 0:42
  • It probably is the kind that goes into a smoke detector. It is a Varta Longlife. – radiobrain77 Aug 2 '15 at 0:43
  • Please sketch or photograph the wiring setup. – Nick Gammon Aug 2 '15 at 0:44
  • The wiring is very minimal. The sonic sensors and the bluetooth module are attached to pins on the motor shield. The motors are in the screw in terminals, as is the 9V battery. Here's a photo:drive.google.com/file/d/1Ev7B0DkuhxZA6TcpqyLhaMbF5M7nmoaPmQ/… – radiobrain77 Aug 2 '15 at 0:54
  • Did you cut the "Vin Connect" jumper on the back of the board? I suspect you need to. – Nick Gammon Aug 2 '15 at 1:00
0

You seem to be using your heavy-duty batteries for the Arduino and the light-duty 9 V battery for the motor. To me this seems backwards. Also the Vin pin to which you have the 9 V battery connected is by default connected to the Arduino as well. This means that if the motors draw a lot of current it will drag the Arduino's voltage down and it will probably reset (thus cutting power to the motors, and then it reboots).

From the Arduino Motor Shield page:

Vin on the screw terminal block, is the input voltage to the motor connected to the shield. An external power supply connected to this pin also provide power to the Arduino board on which is mounted. By cutting the "Vin Connect" jumper you make this a dedicated power line for the motor.

You should cut that jumper so that the Arduino and the motor have dedicated supplies.

Also, arrange better batteries for the motor. You may find you can run the Arduino from the 9 V battery, and then make sure you have enough AA batteries to drive the motors.

0

it sounds like the motors are pulling down the battery voltage enough to reboot the Arduino; and the USB-port is able to supply enough current without as much voltage drop.

We'd need to see a schematic, but check that the power supplied to your Arduino and power supplied to the motors are completely independent; that the Arduino only supplies current to a switch or a relay in the motors' power circuit but not to the motors themselves.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.