dc motors without arduino motor shield

hi there,

i m trying to run two dc motors with one bridge l293ne and as long as the motors are not touching the ground they work perfectly,as soon as i left the project down the stop and they use too many amperes. (the project is a little car neither heavy or light and the motors run at 5 volts each)

ANy ideas whats going on?

thanks,

You've answered your own question - they take too much current under load for the L293

You haven't provided us with any details of the motor or load (gearing? wheel size?)

"neither heavy or light" - could mean anything really!

gerontas1: hi there,

i m trying to run two dc motors with one bridge l293ne and as long as the motors are not touching the ground they work perfectly,as soon as i left the project down the stop and they use too many amperes. (the project is a little car neither heavy or light and the motors run at 5 volts each)

ANy ideas whats going on?

thanks,

Tell us about your power supply(batteries?).. How do you know they draw too many amperes? Have you measured it using a multimeter? If they stop rotating when on ground then they don't work perfectly at all !!! Have you tried powering everything up using a wall wart(5V)?

The 293 drops around 2V. If you are supplying 5V, the motors are seeing about 3V.

groundfungus: The 293 drops around 2V. If you are supplying 5V, the motors are seeing about 3V.

groundfungus i didn't know that. However i think that his car should be able to run on ground even when motors are supplied with 3V each... maybe he should use a multimeter and make some measurements first ..

the power supply i m using is one 9volt battery wich sends directly ~8,7 volt to the l293 and then they splitted to the motors. i have also another 9volt batttery that supplies the arduino,the l293 and whatever needs 5volt (with voltage regulator).

i cant weight the car but after some talks i had with the guy that i bought the motors,he said that its not heavy and it can be moved easily with 2 dv motors.

the motors are these--> http://www.why.gr/#/state/itemCard/ID/523013/language/el_GR and the wheels are these--> http://www.why.gr/#/state/itemCard/ID/700106/language/el_GR

zaxarias:

gerontas1: hi there,

i m trying to run two dc motors with one bridge l293ne and as long as the motors are not touching the ground they work perfectly,as soon as i left the project down the stop and they use too many amperes. (the project is a little car neither heavy or light and the motors run at 5 volts each)

ANy ideas whats going on?

thanks,

Tell us about your power supply(batteries?).. How do you know they draw too many amperes? Have you measured it using a multimeter? If they stop rotating when on ground then they don't work perfectly at all !!! Have you tried powering everything up using a wall wart(5V)?

yes i used multimeter to measure the amperes,no i havent tried use a wall wart but its kinda weird not moving a single step when i leave it on the ground.

i dont know guys any help is appreciated,thanks a lot!!!

Are you applying the 9V on VCC1 or VCC2 ? I think it's really important to upload either a photo of your project or the wiring so we can help.. I guess it's something wrong to your wiring !!!

gerontas1: the power supply i m using is one 9volt battery wich sends directly ~8,7 volt to the l293 and then they splitted to the motors. i have also another 9volt batttery that supplies the arduino,the l293 and whatever needs 5volt (with voltage regulator).

If you mean PP3 sized 9V battery they don't have enough current output to drive motors at all. Think 50-100mA as the kind of load they are designed to handle. Motors need amps. Your motors aren't getting enough current, in fact.

A suitable battery pack would use high current NiMH / alkaline / SLA / LiPo cells, at least AA sized if NiMH or alkaline. Quality branded ones, note...

zaxarias: Are you applying the 9V on VCC1 or VCC2 ? I think it's really important to upload either a photo of your project or the wiring so we can help.. I guess it's something wrong to your wiring !!!

i m applying it on Vcc2 which is the pin that gets the voltage you want for the motors as i read,am i wrong?

MarkT:

gerontas1: the power supply i m using is one 9volt battery wich sends directly ~8,7 volt to the l293 and then they splitted to the motors. i have also another 9volt batttery that supplies the arduino,the l293 and whatever needs 5volt (with voltage regulator).

If you mean PP3 sized 9V battery they don't have enough current output to drive motors at all. Think 50-100mA as the kind of load they are designed to handle. Motors need amps. Your motors aren't getting enough current, in fact.

A suitable battery pack would use high current NiMH / alkaline / SLA / LiPo cells, at least AA sized if NiMH or alkaline. Quality branded ones, note...

havent thought of that.yes im using pp3 type and it seems like she cant handle the current.i m gonna try another type of battery and if the bad luck is still by my side im gonna upload pics of the wiring

thanks,

ok guys im back,its not working even though i replace my 9v battery pp3 type with alcaline 9v.
It has more power with this battery and when im holding it works like its gonna fly but when i leave it on the floor it stops and the dc motors make some sound weird.

this is the part of my code that im using for the motors:

int motor1= 3;
int motor2= 6;
int enable= 5;
int motor3= 9;
int motor4 =10;
int enable2 = 11;

void setup() {
// initialize the digital pin as an output.
pinMode(motor1, OUTPUT);
pinMode(motor2, OUTPUT);
pinMode(enable, OUTPUT);
pinMode(enable2,OUTPUT);
pinMode(motor3,OUTPUT);
pinMode(motor4,OUTPUT);

}

void loop() {

digitalWrite(enable,HIGH);
digitalWrite(motor2,HIGH);
digitalWrite(motor1,LOW);
digitalWrite(enable2,HIGH);
digitalWrite(motor3,HIGH);
digitalWrite(motor4,LOW);
delay(2000);
digitalWrite(enable,HIGH);
digitalWrite(motor1,HIGH);
digitalWrite(motor2,HIGH);
digitalWrite(enable2,HIGH);
digitalWrite(motor3,HIGH);
digitalWrite(motor4,HIGH);
delay(2000);
}

also is it ok to upload photos via photobucket so tha you can see them easily?
please help…
thanks,

also is it ok to upload photos via photobucket so tha you can see them easily?

Many folk are reluctant to go to sites like that. Probably better to attach them to your post in Additional Options… But make sure you resize them to 100k or so and make them fit the screen without a hundred miles of scrolling.

Those connections and code look right to me, so I fear it’s a simple matter of the motors not being able to turn the loaded wheels, coupled with a voltage drop under current.

Your circuit should look like the attached then (different pins).

Not sure exactly what you mean by "alkaline 9V", it is probably like the other one, has several tiny batteries in one package and cannot supply large current.

Why not hook the power straight up to the motors, with the L293 out of the picture- see if that makes a difference.

Also measure the voltage at the L293 outputs with a) motors disconnected b) motors connected but running free in the air and c) motors connected and car on the floor.

gerontas1: ok guys im back,its not working even though i replace my 9v battery pp3 type with alcaline 9v. It has more power with this battery and when im holding it works like its gonna fly but when i leave it on the floor it stops and the dc motors make some sound weird.

We need to know something about the motors, in particular the no-load current draw and stall-current.

A 9V alkaline battery is a PP3, PP6 or PP9 - if PP3 sized its hopeless, it won't work, it doesn't work for anyone. A 7.2V 6xAA NiMH pack would be much more powerful.

gerontas1: also is it ok to upload photos via photobucket so tha you can see them easily? please help....

Yes, I use photobucket. Get the direct link to the picture and place it in your post between IMG tags, à la [img]photobucket link[/img]

JimboZA:

also is it ok to upload photos via photobucket so tha you can see them easily?

Many folk are reluctant to go to sites like that. Probably better to attach them to your post in Additional Options.... But make sure you resize them to 100k or so and make them fit the screen without a hundred miles of scrolling.

Those connections and code look right to me, so I fear it's a simple matter of the motors not being able to turn the loaded wheels, coupled with a voltage drop under current.

Your circuit should look like the attached then (different pins).

my circuit is like the photo you send,but after some search,i saw that for the hardware of the H-bridge they also use some diodes and capacitors as you can see -->http://www.instructables.com/id/Dual-H-Bridge-L298-Breakout-Board-Homemade/ how important are those?i only use 2 capacitors for the motors.The motors are bigger than other projects ive seen so i think they can move the little "headache" i have here.

JimboZA: Why not hook the power straight up to the motors, with the L293 out of the picture- see if that makes a difference.

Also measure the voltage at the L293 outputs with a) motors disconnected b) motors connected but running free in the air and c) motors connected and car on the floor.

the voltage is big enough when its in the air running free,if the battery pack is full ~9,4v the outputs have 4,5 each stable.When i leave it down the battery voltage goes down at ~6,4v and the outputs very low and if i lift it up again the start working again..

the battery is pp3 sized same pack with the regular 9V but seems to have more power.

...and there's your lone 9V transistor battery. That just is not going to make it. You have to fabricate a battery pack. Like a 6 X AA [for 9V] or two 4 X AA packs for 12V. Anyway, something substantial, as others have called out.

Not only that, but those tiny hobby motors are directly connected to the wheels with no discernible gearing whatsoever!

@gerontas1:

If you want this to work (and it can!) - the first thing you need to do is position some kind of gearing mechanism between the motor and the wheels. Even it is just some pulleys and rubber-bands, that will be better than nothing.

Indeed, a simple rubber band around the outside of the wheel and using the shaft of the motor (maybe with a pencil eraser as a small pulley) should be enough of a gear reduction to get you the torque you need. Shift the motors forward of the wheels, put the wheels on an axle (so they can rotate freely and independently of each other, of course).

Secondly - drop the use of that small transistor battery as everyone else here has noted, and use a proper battery pack to power the motors. Your 9V can still power the Arduino (not ideal, but it will work) - if you have things hooked up in that manner.

ok let me try those....

thaks guys,