100mA 12V Motor Current Monitor

Thread Starter

GioD

Joined Mar 20, 2009
30
Hi to all,
I'm designing a motor driver circuit. The H-bridge is already ok. I want now to stop the motor if it’s current reach 100mA. So, I’m thinking about a circuit that sense the 100mA and send a signal to the 5V microcontroller. I’m searching for a simple circuit, with 1 transistor that amplifies the shunt voltage of a resistor. I don’t need a lot of precision. I don’t want to use opamp.

Any idea ?
 

JDT

Joined Feb 12, 2009
657
Because you are using an H bridge, the motor current can go both ways. The usual solution is to connect the sources of the bottom two transistors together and connect these to ground through a low-value current measuring resistor. No matter wich way the motor is going, the current through this resistor is always same direction.

For example you could make this resistor 2 ohm. At 100mA there will be 0.2V drop. Feed this into a comparator that switches at this value. The output of the comparator goes to your micro-controller.
 

Thread Starter

GioD

Joined Mar 20, 2009
30
Yes I have already think to make a single resistor.
The issue is about the voltage amplification of R shunt. I don't have the AD converter, I need a 5V signal or a open collector, when the current go over 100mA.



Because you are using an H bridge, the motor current can go both ways. The usual solution is to connect the sources of the bottom two transistors together and connect these to ground through a low-value current measuring resistor. No matter wich way the motor is going, the current through this resistor is always same direction.

For example you could make this resistor 2 ohm. At 100mA there will be 0.2V drop. Feed this into a comparator that switches at this value. The output of the comparator goes to your micro-controller.
 

SgtWookie

Joined Jul 17, 2007
22,230
Yes I have already think to make a single resistor.
The issue is about the voltage amplification of R shunt. I don't have the AD converter, I need a 5V signal or a open collector, when the current go over 100mA.
That is what a comparator will do for you.
Take a look at an LM339 quad comparator or LM2903 dual comparator.
Datasheets are available at http://www.national.com
 

Thread Starter

GioD

Joined Mar 20, 2009
30
I know opamp, and is easy to do this with them. My need is to build the circuit with a transistor.
 

SgtWookie

Joined Jul 17, 2007
22,230
OK.
Well, you could use just a single transistor, but it will be very inefficient.

Use a 6.2 Ohm resistor from the bottom of the H-bridge to ground.
Connect the high side of the 6.2 Ohm resistor using a 100 Ohm resistor to the base of an NPN small signal transistor, like a 2N3904.
Connect the transistor's emitter to ground.
Connect the collector to Vcc using a 4.7k transistor.
When current through the 6.2 Ohm resistor exceeds about 100mA, the transistor will turn on, causing Vce to decrease.
 

Thread Starter

GioD

Joined Mar 20, 2009
30
I'm agree with you, russ. But I don't have space on the board and the application is very low power. Every uA is important. If I use an opamp I have to power off it. And the precision isn't important.
 

SgtWookie

Joined Jul 17, 2007
22,230
Well, the single transistor suggestion I gave you will waste 62mW via the 6.2 Ohm resistor when the motor is running at 100%. Keep that in mind.
 

Thread Starter

GioD

Joined Mar 20, 2009
30
Right, but the motor run only few second a day. An opamp waste power 24h/day. I already do some calculation, in my application the problem is to reduce the continuous (24H/day) current. The momentary current consumption isn’t a problem.
The issues of the circuit that you suggest, is the value of the Rshut that cause a 0,62V loss in motor voltage. I have to verify this.
And I have to test also the precision and repetitiveness.
 

SgtWookie

Joined Jul 17, 2007
22,230
You could use something like a LMC6762 dual micropower comparator. It has push-pull outputs, which wouldn't require a pullup resistor on the output. 10uA current draw max per channel. You could power it using a uC pin set high. Set the pin low before putting the uC to sleep.

You could then use a 0.5 Ohm or less resistor to sense motor current. You'd still need a couple of resistors to use as a voltage divider. That could also be powered by the uC output pin.
 

SgtWookie

Joined Jul 17, 2007
22,230
Roman,
Ran your circuit in simulation; it didn't perform very well. Using a 2N5088 helped, but I was not able to get a reasonably accurate window.

Adding the load of the LED and current limiting resistor really throws things out of whack.

I've attached a simulation that shows your basic circuit, plus another using a channel from an LM339 comparator.
The b and a 'scope markers correspond to 95mA and 105mA through R1, respectively.
Much of the time, the output from your circuit is at an indeterminate voltage level for TTL or CMOS.
 

Attachments

Top