Electronics > Electronics

L298 question

(1/2) > >>

Eco19R:
hello - I had a couple questions regarding the L298 dual h bridge.

Do I need to put a cap between the outputs on the L298 chip ?

Also can I directly interface my MCU to the inputs of it? or should I "protect" the MCU with like a resistor and diode to stop any reverse current.

They suggest a .1uf cap between the power and ground connections - since its just a filter cap to smooth out any spikes I can substitute that value for another one as long as its with the current/voltage requirements - correct ?

Thanks for any information you can provide on this.

rgcustodio:
Maybe you can use the design from Solarbotics as a reference.

http://downloads.solarbotics.net/PDF/Solarbotics%20-L298_schematic.pdf
http://downloads.solarbotics.net/PDF/Solarbotics-L298_Schematic_complete.jpg

They use the L298 on several of their motor drivers.

HTH

- Rommel

dunk:

--- Quote ---Do I need to put a cap between the outputs on the L298 chip ?
--- End quote ---

it's not strictly necessary but it's often a good idea (especially with cheaper motors).
putting a capacitor close to the motor terminals would be one of the first things i would try if you start getting interference from the DC motors in the rest of the circuit. (symptoms would be the circuit working without the motors connected but becoming temperamental with the motors.)


--- Quote ---Also can I directly interface my MCU to the inputs of it? or should I "protect" the MCU with like a resistor and diode to stop any reverse current.
--- End quote ---

nope. you should be good connecting your MCU inputs straight on to the motor driver. the motor driver will take the strain of any back EMF traveling through the wire from the inductive load (motors).
you will need shotkey diodes between the motor and the motor controller though as demonstrated by the application note on figure 6 of the datasheet:
http://www.st.com/stonline/products/literature/ds/1773.pdf
it might be worth going to a bit of effort to keep the wires between the MCU and motor controller fairly short this close to the motors though.
likewise any capacitors should be soldered on reasonably close to the component they are working with.
this is all because motors create a lot of EMF interference that can be picked up by other bits of wire. the linger the wire, the more the effect.
for a demonstration, listen to an AM radio close to a running motor.


--- Quote ---They suggest a .1uf cap between the power and ground connections - since its just a filter cap to smooth out any spikes I can substitute that value for another one as long as its with the current/voltage requirements - correct ?
--- End quote ---

so while having exactly .1uf is not critical you want close enough. somewhere between 0.01uF and 1uF should do.
too big a capacitor will not reduce high frequency ripples.
too small a value will not have enough stored charge to prevent longer drops in power.
most digital circuits require a .1uf cap between the power and ground connections so i always make sure i have a big bag of them clearly labled as it stops me from having to dig through my capacitor draw....

question: do plan to make use of the current sense pin connected to an analogue input on your MCU?
i'm in the process of designing my own motor controller board and i was thinking motor current sense might be a good alternative to "bump sensors" on the robot.
if the load on the motors has gone up it means the motors are stalled which in turn means the bot has found a chair leg to crash into...


good luck with your motor controller,

dunk.

Eco19R:

To measure the current aren't you just making a voltage divider that the analog pin on the MCU is hooked up to? Or am I being stupid and reading the schematic wrong.

Wouldn't you need a high power resistor for that?

A 1/2 or 1/4 Watt wouldn't be enough - also wouldn't you lose allot of power - even with a small Ohm value?

Thanks for the information.

dunk:

--- Quote ---To measure the current aren't you just making a voltage divider that the analog pin on the MCU is hooked up to? Or am I being stupid and reading the schematic wrong.

--- End quote ---
so looking at the datasheet, presuming i'm interpreting it correctly (it doesn't have much information on this)
the output on the on Voltage Sensing pin is between "-1 to 2.3" volts so you shouldn't need a voltage divider but it's not the most straight forward either having a possible negative voltage...


--- Quote ---Wouldn't you need a high power resistor for that?

--- End quote ---
either that or several higher value resistors in parallel.


--- Quote ---also wouldn't you lose allot of power - even with a small Ohm value?

--- End quote ---
yup. quite a lot. but then you are using a 2 Amp motor driver so i was presuming your project was going to be quite power hungry anyway.

dunk.

Navigation

[0] Message Index

[#] Next page

Go to full version