Go Down

### Topic: L298 motor driver with two 5V dc geared motors (Read 6470 times)previous topic - next topic

#### jimba

##### Apr 12, 2013, 09:24 pm
hi. I am interested in making a motor driver circuit for a robot.
I have:
two 5V, 100 rpm dc geared motors
Eight 1N4007 diodes.
L298 motor driver IC which can control 2 motors at the same time.
could you please tell me which of the following circuit is better?

http://www.instructables.com/file/FT8ERG4GYVDJSP8

http://www.haoyuelectronics.com/Attachment/L298N_module/L298N%20module%20schematic.jpg

Any help is appreciated.. thank you

#### Erdin

#1
##### Apr 12, 2013, 10:30 pm
They are the same. But if I have to choose: the first one at instructables.com.

If the motors require a lot of current, the L298 has a large voltage drop. You have to investigate that. The motors could get only 3V or so.

#### jimba

#2
##### Apr 13, 2013, 07:32 am
could you please help me with the following doubts..?

1. if the motors require 1A, then is it a lot ryt?

2. By the way can i use 1N4007 diodes instead of 1N4001? (thats what i have)

3. should the arduino' supply voltage be connected to the Vcc   or the Vs??

4. what are the sense resistors for?

5. Which type of L298 should I use with this circuit?

thank you

#### Erdin

#3
##### Apr 13, 2013, 09:37 am
You can find most anwers in the datasheet of the L298.
Do you want to use the L298 as a component, a breakout board is easier: https://www.sparkfun.com/products/9670

1) The motors require 1A ? You have to know the maximum current, that is called the "stall current". Once you know that, you can choose the right driver. Can you post a link to the motors please ?

2) You can use the 1N4007. The 1N4007 is for a higher voltage, but they are the same as the 1N4001.

3) According to the datasheet:
pin 4 = Vs  = Supply Voltage for the Power Output Stages. That is the power supply for the motors.
pin 9 = Vss = Supply Voltage for the Logic Blocks. That is the Vcc, the 5V of the Arduino.

4) According to the datasheet: "Between this pin and ground is connected the sense resistor to
control the current of the load
"

5) The 'normal' L298N has a heatsink.

The question is: should you use the L298 ?
I think not.
At 1A, the voltage drop of the L298 is 1.35 and 1.2V (read the datasheet). So the motors get 5V - 1.35 - 1.2 = 2.45V ! That is way too low.
So lets drop the L298 and use a mosfet driver. Power mosfets have only little voltage drop.
Sparkfun has a nice selection: https://www.sparkfun.com/categories/179
But there are many more.

You have to know the stall current, and the mosfet driver should be capable to operate at 5V motor voltage.

#### jimba

#4
##### Apr 13, 2013, 05:43 pm
thank you for all the information.

http://www.lankatronics.com/smart-car-robot-plastic-tire-wheel-dc-gear-motor-48-1.html

OK i have decided now to use the motor in the second column of the link.
So its a small current ryt? now can i use  L298N ?
breakout board is good but i wanna make this. Ill gain more knowledge ryt..
can i use a  12V 2AH battery pack for the 5V motor?

#### JimboZA

#5
##### Apr 13, 2013, 06:04 pm
Quote
can i use a  12V 2AH battery pack for the 5V motor?

No.... Erdin points out:

Quote
At 1A, the voltage drop of the L298 is 1.35 and 1.2V (read the datasheet).

.... but at low current you'll only lose the 1.35 leaving over 10V to the 5V motor. Even if you did lose 2.55, you still will be putting about 9V in.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

#### cr0sh

#6
##### Apr 13, 2013, 06:04 pm

So its a small current ryt? now can i use  L298N ?
breakout board is good but i wanna make this. Ill gain more knowledge ryt..
can i use a  12V 2AH battery pack for the 5V motor?

You can, but for your needs and current and such, the voltage drop (and the heat output) of the L298 is going to be horrendous; at 1 Amp, according to the datasheet (and alluded to by Erdin above ya!) - total drop is close to 5 volts. So - if you used a 12V pack, that would leave 7 volts to the motor, which is too high for a 5 volt motor. Now - if you went with a 9.6 volt pack, that would be much better - leaving you with close to 5 volts for the motor needed (and dumping less voltage through the h-bridge, as heat).

As far as actually "making" such a board - you need to realize that the L298 does not have a standard 0.1 inch pin-spacing pinout. Basically, both sets of pins -are- 0.1 inch between pins, but one row of pins is shifted by 0.05 inch. This makes it nearly impossible to use on a breadboard or standard perfboard.

You can try to bend the pins to fit - it's possible to do - but it's also very easy to break the pins off the IC as well. A better alternative is to get one of these:

http://www.jrhackett.net/L298adapter.shtml

...or - if you still want to assemble it, but gather the parts yourself - he also sells this:

http://www.jrhackett.net/L298brdInfo.shtml

Final note: You -will- need a real heatsink bolted (with heatsink grease/paste) to the L298. The problem is, of course, finding one. I have yet to find where to get the aluminum extrusion profiles (let alone just the heatsinks) the chinese companies use for the L298 Multiwatt15 devices. But you can't skip using one; it is needed, otherwise the chip will go into thermal shutdown when it overheats. So think about what you will use, if you go this route.

Personally, with all of these drawbacks, I would look for a different solution (preferably MOSFET based).

Good luck!

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

#### jimba

#7
##### Apr 14, 2013, 11:52 am
thank you . seems like i have to do the reading all over again and this time for MOSFET.

well could you please share a schematic for MOSFET driver controlling two 5V dc geared motors of around 100 to 200 rpm if you got one?

thank you in advance

#### MarkT

#8
##### Apr 15, 2013, 02:09 pm

thank you for all the information.

http://www.lankatronics.com/smart-car-robot-plastic-tire-wheel-dc-gear-motor-48-1.html

OK i have decided now to use the motor in the second column of the link.
So its a small current ryt? now can i use  L298N ?
breakout board is good but i wanna make this. Ill gain more knowledge ryt..
can i use a  12V 2AH battery pack for the 5V motor?

That motor takes 100mA nominal, but the datasheet doesn't say if thats under load or no-load.
Sounds plausible to be able to drive with L298 at least.

12V battery isn't such a problem so long as you use PWM to reduce the drive to the motors to 50%
or less - not ideal and you may need to experiment with PWM frequency - the Arduino default is
too slow for a small motor really.  Without using PWM I'd say a 7.2V battery pack would be a sensible
choice.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up