2025-03-07 10:17 PM - edited 2025-03-08 1:02 AM
Hello everyone,
I’m working on a project where I am using the motor controller’s current sense circuitry (shunt + op amp). Here are my key details:
1. Hardware Setup:
- Board: X-NUCLEO-IHM08M1 with NUCLEO-H755ZI-Q
- Op Amp: TSV994
- Shunt Resistor: 0.01 Ω, 3 W rating (from BOM)
- Supply: 12 V, measured ~0.45 A from the power supply
2. Observations:
- At no load (no supply connected, only 3.3 V to the controller), the amplifier output is around 1.65–1.7 V, which I treat as the zero-current offset.
- When I measure actual load with the 12 V, 0.45 A supply, my code calculates 8–9 A from the ADC, which seems impossible because the supply is only delivering ~0.45 A total.
- I attempted to validate the amplifier gain using resistor ratios and the op amp datasheet. It suggests a total gain of around 13.7.
- I also used the approach of “maximum possible voltage” across the shunt (0.01 Ω) with a 3.3 V rail, concluding ~13–14× hardware gain.
- Yet, the measured “current” is far too high compared to the actual supply current.
3. What I’ve Tried:
- Offset Calibration: I subtract the ~1.65 V offset at zero current in code.
- Known Resistor Checks: I physically measured some resistors to confirm they match the BOM.
- Known Current Test: I tried a partial approach but the readings still show inflated current.
4. Questions
- Why might the amplifier or code still report 8–9 A if the supply is only 0.45 A?
- Could there be a second stage or firmware multiplier that’s boosting the reading?
- Is there a recommended method to measure the actual net gain or confirm the offset beyond the typical approach?
Any guidance or insight would be greatly appreciated. I suspect either a hidden second stage gain, incorrect offset usage, or a mismatch between BOM and real population. If anyone has seen similar overestimated current readings with TSV994 or a 0.01 Ω shunt, please share your debugging steps.
Thanks in advance!
2025-03-08 2:09 AM - edited 2025-03-08 2:16 AM
Hi,
so you use this circuit:
Offset is about 3v3 / (6k8+680) * 680 * 5.7 = 1.71 V ;
gain (1 + 4.7) = 5.7 ; and from input x / (6k8+680) *6k8 = 0.909 -> gain 5.18 ;
so 1A in the 10 mOhm = 10mV -> * 5.18 + 1.71 = 1.762 V;
0.45A -> 1.733 V ;
So your zero offset is ~ 1.71 , measure it at start with no current , and use this as offset;
what you measure then from ADC, when having 0.45A in use ?
2025-03-08 2:25 AM
Hi AScha.3,
When checked with similar parameters, my ADC reads a voltage of 2.5V at 0.45A.
2025-03-08 2:54 AM
And check with DMM, what IS real voltage at this ADC in ! (maybe there is 2.5 V ...)
-> to know, what to look for : hardware or software wrong..?
2025-03-08 3:44 AM
When checked on the oscilloscope, it validated the reading on the adc.
2025-03-08 6:54 AM - edited 2025-03-08 7:48 AM
So what we have now :
- offset 1.7V - ok.
- at 0.45A -> ADC shows 2.5V , real check on pin: 2.5V - right ?
- so whats real voltage at the 10 mOhm shunt ?
+ check shunt , if possible: is it still 10 mOhm ...or other value now ?
+ btw , is current measurement by ADC at shunt a static/continuous current, or is it pulsed ?
What you see on scope ? (show it...)
2025-03-10 6:17 AM
Hello Ascha.3
Shunt resistor verification
Nature of ADC current measurement
Oscilloscope observations
Before JP1 Removal (Fixed Voltage at Varying Duty Cycles)
After JP1 Removal
Attached Images for Reference