Go Down

Topic: L298 H-bridge motor controller (Read 12 times) previous topic - next topic

blamski

looking at the schematic and the board itself it appears that the sense pins of the L298 are already connected to ground...

gbulmer

blamski, I agree that your schematic has no sense resistors in the grounf path.

But the OP referenced http://www.pyroelectro.com/tutorials/l298_control/schematic.html as the schematic that they were following, and it has 10 ohm resistors in the Current Sensing B path to ground. Looking at the datasheet that connection is the from the 'bottom' of the H-Bridge to ground.

The http://www.pyroelectro.com/tutorials/l298_control/schematic.html schematic has got a connection from the pin marked GND to ground, but, looking at the datasheet, that GND pin is not the H-bridge ground. It is very probably the 'logic' ground.

HTH
GB

kunkmiester

Blamski, Try hooking the other input pin to ground.  It might not work if the pin is simply not connected.

The current sensing resistor is in series with the load--the bridge ground is separate than the chip ground, as stated.  If the resistor is too big, a motor won't run--I found this the hard way, using pyroelectro's suggested setup.  My .6 amp motors weren't running on 9V with 10 ohms, a potentiometer indicated that the max for the current sensing resistors is 4-5 ohms for my motors. ;)

Technically, you don't need the resistors if you're not trying to limit the current.  Running them straight to the breadboard's ground bus seems to work for me.  There's a few situations where a resistor makes sense, but I can't see most setups needing it.

If you feel you need a sensing resistor, then you need to put a potentiometer in to start, and find out where the cut-off is, and what value works best.  Then you need to make sure the resistor is rated properly--most people will use a 1/4 watt since that's the most common, but my motors for example pull over 5 watts, and so I'd need a much larger resistor to run it properly.

gbulmer

#18
Apr 24, 2010, 03:53 am Last Edit: Apr 24, 2010, 04:07 am by gbulmer Reason: 1
Quote
Technically, you don't need the resistors if you're not trying to limit the current.


These resistors are not intended to limit current.

Quote
If you feel you need a sensing resistor, then you need to put a potentiometer in to start, and find out where the cut-off is, and what value works best.


Don't do this. As explained in the datasheet. It is not there to limit current, it is there to allow measurement of current.

[edit]Unless it is a low resistance 'power' potentiometer designed to dissipate heat, it would be lucky to get close to a reasonable value before getting damaged.

Low value power potentiometers are often wire wound, with significant inductance, which will likely react with the motor, so the DC resistance value measured with an ohmeter will probably be misleading.

If the motor uses such a small amount of power that an ordinary potentiometer is okay, then the motor used so little power that the L298 would be very unlikely to be damaged by the motor.[/edit]

The purpose of the sense resistors is so that an external system can detect how much current is flowing through each motor (load).

By measuring the voltage drop across a fixed resistor (the sense resistor), the current flowing through the motor can be deduced from Ohm's Law:
I = V / R

Put a low value resistor in the path from the sense resistor pin to ground (say 0.1 ohm, to make the arithmetic easy, with a power dissipation, of say 1W), and
Measure the voltage dropped across the sense resistor using an analogue input on the Arduino
I = V * 10 (for an R of 0.1, and remembering that 1V is approx 100)

This allows the Arduino to be used to monitor the current through the motor, and even decide if it is stalled, and switch it off.

HTH
GB

kunkmiester

The data sheet says to use filter diodes to protect the motor controller from back EMF from a motor.  Would a similar setup between a wire wound resistor and the motor do the same, or just be a pointless exercise?

Go Up