This time I've got this question and it's one I've been having for some time now.
First of all let's explain the project a little bit.
The H-bridge is a MOSFET H-bridge build by me.
The H-bridge uses only N-type MOSFETs through boot strapping which actually means that the high side can't be 100% of the PMW's period at conducting state.
It's driven by PWM and drives a motor.
The motor is installed in a RC vehicle. Although not that cheapy small China toys (So the need for a big H-bridge is justified)
Also the motor is geared and unfortunately the gears are plastic (there is a point for wanting to tell the current consumption)
The running current should be around 3 - 4Amps on ground and it's about 1.7 - 2.5 with the wheels free spinning.
The stall current should be well over 10Amps. But never fully tested cause I was afraid of breaking the gearing.
I have also installed in the gear casing a quadrature encoder. I want to be able to control both speed and relative position.
Now the current measuring "problem".
I have though of some things and tested other still I'm in test "mode".
My first guess has been to actually use the wire from the battery to the H-bridge as a shunt resistor.
Although that's a nice and easy to implement though it generates some big problems.
The H-bridge is PWMed meaning that the battery isn't going to supply the motor with current all the time of the duty cycle. So I must extract the DC potential out of the PWM reading. Ok, that's easy enough a simple RC or LC will do... but passive filters are usually slow. And that's the problem.
The PWM frequency is around 20kHz while I want a sampling rate of ~1 - 2kHz (although a big variance it's depended on a lot of things that I haven't yet completed to be sure of the sampling frequency).
It's a good to point out here that I don't want only see if the motor draws a lot more than needed current (dangerous and erroneous situations ) but also to graph the battery usage.
So big question comes here! Is there a way to have a fast response low pass filter active or passive. Just basic guide lines will do!
Second method. And that's what I have also been suggested of.
To use a clamp with a op amp integrator. Is that a good idea? I have played before with both but not much. The inductive clamp will provide me with the differential of current used and the integrator theoretically will provide me with the current in volts.
Is that a good idea? How accurate can it be.
Anyhow these are my though and what I have thought of so far.
PS. Because there will be a wild difference at the current measured (from some mA, maybe less, when the H-bridge idles to some Amps, I will go with scaled solutions each for each scale so don't mind about that, but probably two scales will do 8) )
Anyhow, thanks in advance guys!
You always deliver :D