- So many options. My design problem is this:
- Measure the current going into (DC) a motor controller (H-Bridge) OR at the high-side output which is a bipolar square wave (trying to decide)
- Measure either 0-5A (likely) or may need to measure 0-10A
- At the low end, should read something drawing just 20mA
- Resolution should be about 5mA, up to 20mA might be ok
- Bottom line need to read something that at idle is drawing 20mA and then gives me a 60mA pulse for 6ms (so 80mA total)
- So I am measuring the difference here. If my resting current was 500mA, then I would need to sense a pulse that for 6ms raised the current to 560mA
- Output a value for the entire current range of 0-5V DC for connection to an analog pin of a microcontroller (or 3.3V for a device with 3.3V GPIO pins)
- Bi-Directional devices usually have 2.5V being 0 current (for a 5V output) with 5V being + max amps and 0 being - max amps, which is ok.
The easier thing to do would be to just measure at the DC input to the motor controller. Often this is a board with 2 full H-Bridges. So the disadvantage here it two-fold, A. I would be measuring the current the board is using in addition to the current the load is using. I would also have to turn off the second H-Bridge when measuring the current pulse and low current of the first H-Bridge. It would allow for just one board though, if sensitive enough, to do the job since I can't tap into a dual full h-bridge board to get at the power input to each h-bridge. In situations where I could use 2 different H-Bridge boards (like the IBT_2) I could only have to worry about the current for each H-Bridge. I could even use a lower current board and different current sensor in that case, like one IBT_2 or 0 to 10A) and a board based on the LMD18200 or L298P.
The more difficult thing to do would be to measure the outputs of the dual H-Bridge. I could have 2 sensor boards then. The challenge is this is a bi-polar square wave of 12-V to 18V peak and around 8kHz. Depending on the power supply, let's look at a motor controller using 12V DC input, the output would be 24V p-p with 58us 1 bit and twice that for 0 bits:
The advantage of measuring at the output is that it is "universal". It doesn't matter what the motor controller is, I am sensing the current for whatever is connected at the output and I can connect 2 current sense boards to measure each output for boards that have two outputs (An example is the Arduino Motor Shield or the IRF3205 MOSFET Motor Driver from China)
We will create small boards just for current sense, but then also design circuits for our own dual H-Bridge Motor Controller to handle the high current (0-5 or 0-10A) Full H-Bridge and the lower 1A Full H-Bridge.
For comparison, the simple shunt resistor and 11X opamp on the Arduino Motor shield works perfectly for its 0-2A range. And the MAX471 (discontinued) works perfectly for 0-3A. Thank you for any help.
[edited by: FlightRisk at 2:51 PM (GMT -4) on 7 Jul 2021]