Maker Pro
Maker Pro

Problem with DC Motor and L298N driver

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 .
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
What values are R11 and R12? -- are they really 1k? that will limit the current to your motors to 5mA -- which I guess is too small.

I would be expecting values between 0R1 and maybe 4R7 in that position. Page 8 of your specs shows 0R5
 
What values are R11 and R12? -- are they really 1k? that will limit the current to your motors to 5mA -- which I guess is too small.

I would be expecting values between 0R1 and maybe 4R7 in that position. Page 8 of your specs shows 0R5


.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.....
 
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.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
I'm not sure what you mean by "traf", but I assume you're using some sort of variable voltage power supply. It sounds like the output is not regulated and you seem to be suffering from the voltage sagging under load.

As long as the IC and all other components can handle the higher (off load) voltage then you won't damage anything, but I'd suspect that along with poor regulation, the power supply may also be poorly filtered -- that may case problems with some circuits.
 
hmm, not really. because i use a on board voltage regulator that outputs 5 volts for the ic and the rest of the components.
by "traf "i meant tha power suply for the board, that converts 220V to 3-12V, depending on how much i select.
 
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




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?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Check your diagram. I'm pretty sure that your output is between the 10K resistor and the photodiode.

There are several ways to increase the output to something more useable:

1) Amplify it.
2) Use a phototransistor instead of a photodiode
3) use a photoresistor.

I would go for (2) initially.

If you need to amplify the signal, it would be far better to use an oscillator to pulse the LED on an d off very quickly. This allows you to use an AC coupled amplifier which will improve a number of aspects of operation, ignoring ambient light being one of them.
 
Top