Friday, April 23, 2010

L298 current sensing

The L298 pulls the current from the source voltage(not to be confused with the logic voltage) supply, to the current sensing pins--NOT the main ground. The resistors that are recommended? The power to the motor/load is going through that resistor, as well as the load. If the resistor is too big, it blocks the power and the motor won't run until the voltage is high enough to overcome the resistor. I put the recommended 10 ohm resistor in, and it was keeping the motor from running. I didn't quite realize what was happening until I touched it and realized it was hot--Kirchoff's Law says that the resistor will have the same current as the motor--.6 amps in this case, which was also "letting the magic smoke" out of the resistor--9V * .6A = 5 watts, not 1/4. When I put a potentiometer on the circuit, I found that the motor would slow around 4-5 ohms, and stop at 5-6, well below the 10 ohms from before.

For future reference, unless you REALLY want to limit the current, just put the sensing contacts straight to ground. If you need the resistor for whatever reason, get a potentiometer(preferably one rated for the desired power), and adjust it to get the desired outcome. Check it with a multimeter, and you have the reistance you want. Also make sure that you have the power rating needed--most likely anything above 3-5 volts will draw more than the 1/4 watt most resistors people use for hobby electronics are rated for. Magic smoke is only fun if you're deliberately trying to get it, though resistor smoke is cheaper than L298 smoke, which I got when putting 9 instead of 5 volts on the logic supply.

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. 10 Ohm for the Rsense seems way to much for me !
    At 2A it would give 20V !
    The L298N talks about 2V needed.
    Don't you mean 1 Ohm instead ?

    ReplyDelete