DPRG List  

[DPRG] Current Sensing -- How to Do It?

Subject: [DPRG] Current Sensing -- How to Do It?
From: Quinones, Jose jquinones at ti.com
Date: Mon Jul 19 08:42:06 CDT 2010

Hi Dick,

The way I have done this is by putting a low ohmage high power SENSE resistor (say 100 mOhms) at the low side of the H Bridge. Then, I use a current shunt monitor such as the INA196 from Texas Instruments, which will amplify by a gain of 20, the voltage read on the SENSE resistor.

This voltage I then feed to my ADC or comparator and I can use for all sorts of things such as current regulation, stall detection, or in this case, whether there is a car or not.

The INA196 will give you a positive voltage output whether the SENSE resistor voltage is positive or not. This is important because during fast decay current regulation, SENSE resistor voltage can be slightly negative.

You don't have to worry about reading current while the PWM is on the OFF Cycle, because on a DC motor, current is pretty much continuous. If the current is not continuous, then the PWM frequency is to low, which is pretty much undesirable as it messes up motion quality and results on audible noise. You will want a PWM frequency larger than 20 KHz. 30 KHz is pretty much standard.

I have one design with this scheme and I can send you a schematic if you want. I never made it Open Source because there was one bug in the first prototype and I have never went ahead and fixed it. It was for a stepper driver with up to 70A current capability, but the design was too bulky so I discontinued it. But the current control scheme worked flawlessly!

Best regards,

size=2 width="100%" align=center tabindex=-1>
From: dprglist-bounces at dprg.org [mailto:dprglist-bounces at dprg.org] On Behalf Of Dick Swan
Sent: Sunday, July 18, 2010 10:57 PM
To: DPRG List
Subject: [DPRG] Current Sensing -- How to Do It?

I kept my kid's old model slot car race set with the intent to eventually make it computer controlled. I want to run one of the two cars via computer control and leave the second one for manual control. That way you could play against the computer.

My idea is to split the track powering into several segments each with its own feed from the output of a single H-Bridge used to power the car. I need some kind of detector circuitry for each segment to determine whether it contains the race car.

There's a similar need for this detection in model railroading where I found several approaches for "track occupancy" detection. The best approach seems to be a current sensing detector which is triggered from the current draw of a motor operating on the segment. Other approaches include small magnet on the car triggering hall effect sensor or light sensors interrupted as the train passes over.

What I couldn't find is an easy to build circuit - many of them pre-date inexpensive modern single chip current detecting IC circuits. But I am not skilled enough to design a circuit that uses one of these ICs.

A further complication that I worry about is how PWM might impact the output - if I'm polling the detector and the poll just happens to be during PWM "off" then it won't detect any current? I'd like to "smooth" the output

Can anyone help me here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.dprg.org/pipermail/dprglist/attachments/20100719/bf90e4da/attachment.html

More information about the DPRG mailing list