H-bridge motor spinning slow (1.45 volts when I need 5.00 volts)

Hi. This is based off of this topic http://arduino.cc/forum/index.php/topic,72791.msg545937.html#msg545937.

I got it all working with the arduino, however the motor is spinning really slow.

It is a 6 volt motor, and I am getting 1.40 volts from the 2 motor terminals out of the h-bridge IC (http://www.datasheetcatalog.org/datasheet/stmicroelectronics/1330.pdf).

I have the H-bridge running off of the arduino's 5 volt supply (USB).

I have in a voidloop,

if (digitalRead(switchPin) == HIGH) {analogWrite(motor1Pin,255);}

But it still spins slow...

Any ideas?

Thanks.

You're probably drawing too much current. Try using a separate supply.

Ok. Thank you. I will reply in a few minutes with the results :)

I now get 1.77 volts off of the motor line, instead of 1.40 volts.

This is because, the power supply is giving roughly 7.85 volts instead of 5 volts. It is a 2.0 amp adaptor also.

So, it is not because of low amperage.

Can you provide a schematic or wiring diagram of how you have the motor, H-bridge, and Arduino connected and powered, along with the complete source code being used to drive the H-bridge?

I do not have schematics, but I have these kiddie drawings on a breadboard :roll_eyes:

Code can be found here http://itp.nyu.edu/physcomp/Labs/DCMotorControl

Thanks.

Your 7v is going into the breadboard for just the VCC2 (Pin 8 ) on the SN754410, correct? Then you also need 5v to the VCC1 on the SN754410 (Pin 16). This can be run from the 5v line from the Arduino itself. Make sure the IC is facing the correct way (Notch at one end).

The site you listed does work, and I have used it as reference on making my first hbridge PCB last week. Both the code and schematics were solid as far as I can remember.

Edit: Also, try taking out the analogWrite and just using the code in the site and see if it runs full speed that way. I have noticed some wonkyness with analogWrite and varying motor speeds that I haven't had time to work out yet.

Is the 7.85v measured at the input to the barrel jack of the Arduino, or at pin 8 of the SN754410? If it's measured at the barrel jack and you have pin 8 connected to Vin from the Arduino as shown in your wiring diagram, you will be losing nearly 1v in the diode on the Arduino. It's better to power pin 8 of the SN754410 directly from the power supply +ve terminal rather than from the Arduino Vin pin.

That said, the voltage drop in the 754410 should be no more than 4v at 1A, so this still doesn't explain why you are only getting 1.77v across the motor.

Does not make any sense.

I will just buy another IC as it is probably fried or something...

If you are only seeing 7.85V out of the 9V battery, perhaps the battery is on its last legs. Have you been testing long with it? That kind of battery is only good for 500mAH. You should really get a 9V DC wallwart for testing.

Should not be using a 9v PP3 for motors. From what I understand they do not have enough current to do anything other than keeping a circuit going for a long time. Smoke Detectors, etc. Mix that in with PWM and you would probably see weird stuff happening like the OP.

Also the L293 isn't the right choice for low voltages, it loses 2.5 to 3.8V in darlington Vsat losses. Its designed for 24V really... Its cheap and easily available but a poor performer alas.