Problem with DC Motor and L298N driver

Thread Starter

alexsoad

Joined Apr 3, 2011
14
Hello,

For my project i am using a L298N motor driver to command 2 DC Motors (200 mA, 6-9V).
For beginning, let me post the part of the schematic where the problem occurs:


I made a test board , but i cannot make the motors to start. I set IN1 to 5 volts, IN2 to 0 volts, and EN A to 5 volts (always enable). This must rotate the motor in one way. I used a multimeter to measure the voltage from OUT1 to OUT2, and all looks fine: 6-9 volts, depending on what voltage i select. But when i connect the 2 outputs to a motor, nothing happends.
I have connected two wires to the motor, directly from DC Source, and it does starts, so the problem must be from the driver.
The only thing that does not follows the L298N's data sheet is C7 capacitor. I used a 47uF instead of 470uF, but i do not think this is the problem.

Here is the datasheet of the motor driver:
http://www.farnell.com/datasheets/36721.pdf

I am waiting for any advises .
 

HallMark

Joined Apr 3, 2011
89
Hello Alexsoad,
As said by hgmgr, First reduce the Sense resistor as i too have implement this type of circuit for my Robot project and by trial and error i found that this resistor are also important so please try to change it and report back.
 

SgtWookie

Joined Jul 17, 2007
22,230
Actually, if you look in the L297 datasheet you'll find that they recommend 0.5 Ohm current sense resistors.

If you are not using current sensing, you can simply ground pins 1 and 15.
 

Thread Starter

alexsoad

Joined Apr 3, 2011
14
.update to my problem.
I have removed the 1k Resistor, and i connected the sense pin to ground.
New improvments:
I measure the voltage between OUT1 and OUT2, and it is all ok. (6-7V)
I connect the wires to the motor, and for a short period of time (0.2 sec) the motor starts, but after that it stops.
I measure again the voltage between OUT1 and OUT2, and it isn't ok. (0.2V)
I reset the board=> the voltage between OUT1 and OUT2 is again 6-7 V.

So the L298N stops the motor, and i can't figure out why.....
 

Thread Starter

alexsoad

Joined Apr 3, 2011
14
problem solved :)

the resistance from the sensing pin is clearly too big and this is the main reason for having no power to supply the motors.
i let for one terminal block the sensing resistance connected, and the motor doesn't starts, and for the second terminal block i removed the sensing resistance, and the motor does work. so this is the problem.

the second thing is that the voltage meassured by me is different with the voltage shown on my variable traf. When i select the traf to output 6 volts, on the board i do have 9 volts. I can't explain why.
The problem was that i was selecting the traf at 4,5 volts to have on the board 6-7 volts. This was not enough for the motors.
I raised the voltage from the traf up to 6 volts, and on the board i had 9 volts. The result: motors are working !

thank you very much for help, and i will come back here with other problems as well, because i just started to test practically my project.
 

HallMark

Joined Apr 3, 2011
89
problem solved :)

the resistance from the sensing pin is clearly too big and this is the main reason for having no power to supply the motors.
i let for one terminal block the sensing resistance connected, and the motor doesn't starts, and for the second terminal block i removed the sensing resistance, and the motor does work. so this is the problem.

the second thing is that the voltage meassured by me is different with the voltage shown on my variable traf. When i select the traf to output 6 volts, on the board i do have 9 volts. I can't explain why.
The problem was that i was selecting the traf at 4,5 volts to have on the board 6-7 volts. This was not enough for the motors.
I raised the voltage from the traf up to 6 volts, and on the board i had 9 volts. The result: motors are working !

thank you very much for help, and i will come back here with other problems as well, because i just started to test practically my project.
Thats Good Mate !!
Looking forward to see you an active member on AAC.
 

HallMark

Joined Apr 3, 2011
89
Of course. I really enjoyed the fast responses for my problem.
Now i need to test some IR sensors, made by me ;))
I will post here any problems that may occur.

Alex
You are most welcome on AAC.

I too believe that AAC is the fastest response forum. :)
 

Thread Starter

alexsoad

Joined Apr 3, 2011
14
update:
I made some tests and i cannot explain some results, so i need some help again.
At 12 V, both motors are working fine, but if i lower the voltage down to 9 V, sometimes the motors just don't start.
I don't get it... why? At 9 V sometimes the motors start, but other times they start for only 0,2 sec, and then they stop. After some resets and other retries, the motors start, and i cannot explain this.
I do not understand the cause of this malfunction. Maybe the Shottcky diodes do this stop? Or maybe the L298N?

The second problem is with my IR sensors.
I used a IR emitter, a Photo Diode and some resistances and i created my own sensors. This is the circuit :D


When i use a white paper for the reflection i get on the output ~ 0,3V. When i use black paper for the reflection, i get on the output ~0,05V.
The problem is if i will be able to to differentiate these two voltages. If i will use ADC from uc it will be ok?
 

Audioguru

Joined Dec 20, 2007
11,248
How many websites is this posted on?
This morning I replied then saw the same thread on another website and now it is on this website.
 

SgtWookie

Joined Jul 17, 2007
22,230
At 12 V, both motors are working fine, but if i lower the voltage down to 9 V, sometimes the motors just don't start.
I don't get it... why? At 9 V sometimes the motors start, but other times they start for only 0,2 sec, and then they stop. After some resets and other retries, the motors start, and i cannot explain this.
The L298 may drop from 3v to 4.2v across itself depending upon the load. So, if you're starting out with just 9v, your motor might see just 9v-4.2v = 4.8v; about half what you're supplying the L298 with.
If you're trying to use a 9v PP3 "transistor" battery - that's not going to work well at all. Those PP3 batteries are designed for small loads (<25mA).

The second problem is with my IR sensors.
I used a IR emitter, a Photo Diode and some resistances and i created my own sensors. This is the circuit :D


When i use a white paper for the reflection i get on the output ~ 0,3V. When i use black paper for the reflection, i get on the output ~0,05V.
The problem is if i will be able to to differentiate these two voltages. If i will use ADC from uc it will be ok?
That's a pretty small voltage differential.
Try increasing the 10k resistor to 50k, 100k, or more.
 

hgmjr

Joined Jan 28, 2005
9,027
I for one think your approach to seeking mulitple suggestions from numerous forums is a valuable strategy. It is good to get as many takes on a circuit as you can obtain.

Keep the questions coming.

hgmjr
 

Audioguru

Joined Dec 20, 2007
11,248
The same question on multiple websites means that viewers of this thread do not see the simple correction I gave (use a photo-transistor that has plenty of gain instead of a low signal photo-diode) on another website then they might think a solution is impossible.
 
Top