Problem with Arduino power supply...

Hello, I came across a strange problem and I can't find anything relevant.

I am working on a small RC car with 2 small motors (moving and steering) driven by a L293D H-bridge. The problem I have is this:

While everything works fine when the board is connected to the usb port of my pc, everything goes wrong when I connect a battery through the 5.5mm socket of Arduino.
Then, I only get the front motor (steering) to move while the back is dead. I've tried every possible battery (9V, 2 9V parallel, 8xAA) and nothing works.

Any ideas on what I'm missing? I'll be grateful for any help! Thanks!

9 volt batteries I can understand having problems, they are pretty useless as their current capacity is very low and not suitable for powering loads such as motors. However the AA cells should have worked, are you sure you used good quality fresh alkaline cells?

Perhaps a block diagram showing how you are trying to power up everything, arduino, motor driver, motors, and any other devices or components requiring power would help us uncover a problem in your layout.

Thanks for your answer!

Actually I have used quite simple circuits. I am using breadboards. These are the circuits I have connected so far and work fine with usb connection:

Two of these:

And this one with 2 motors:

The motors are supplied by 8xAA in series. They are quite small and 12V is more than enough I just use this much because the vehicle became heavy and needed more power to move and turn. Don't know if you can make something out of this because I haven't made a block diagram.

I used the same 8 AAs to supply both the motors and the arduino board, maybe that's wrong? I just don't get why it will work with 5V and 500mA of the usb port and not with the batteries. Maybe faulty plug..?

According to your pictures you are wiring +9vdc to the arduino +5vdc pin, that would damage the arduino? You must use the Vin pin for voltage over around +7vdc and then the on-board +5vdc regulator uses it to power the arduino board.

Lefty

PS: actually I don't see how you are getting any voltage over to the arduino board, that drawing is really a mess or I just can't make sense of it.

A more appropriate way yo power things is to use 2 supplies with their negative or grounds tied together. This means that the Arduino will always have the power it needs, no matter what the load is on the motor power supply.

retrolefty:
According to your pictures you are wiring +9vdc to the arduino +5vdc pin, that would damage the arduino? You must use the Vin pin for voltage over around +7vdc and then the on-board +5vdc regulator uses it to power the arduino board.

Lefty

PS: actually I don't see how you are getting any voltage over to the arduino board, that drawing is really a mess or I just can't make sense of it.

You probably misunderstood, or I just got the whole thing wrong. As I see it, the 9V battery in the picture (12V in my case) supplies the h-bridge only, which in turn supplies the motors. It has nothing to do with the arduino! The arduino board is given either 5V through the usb port (which in my case works fine) of the pc or 12V from the 5.5mm pin (which doesn't work for me).

kf2qd What do you mean exactly? I tried connecting 2 9V batteries parallel (+ to + and - to -) and it just won't work :frowning:

But what is in that picture? Because that kind of connection might not work at all.
You can power arduino with 9volt battery and use diffirent power source to motors.
Only need to connect digital outputs and signal ground to motordriver, exactly same way like powering via USB, only diffirence is arduino powersource connection.

Try connecting a 1000uF 16V (or greater) capacitor, +ve side to pin 8 of the L293D, -ve side to one of the ground pins of the L293D. Preferably, also connect a 0.1uF ceramic capacitor between the same points. For both capacitors, be sure to make the connections close to the L293D. Then power the Arduino by connecting a wire from pin 8 of the L293D to the Vin pin of the Arduino. The capacitors should help prevent motor noise from reaching the Arduino.