I’m using a nano and a ACS712 (20A) to read the “instant current” of a PWM driven motor and I get very unstable readings… After trying different ACS chips and comparing to a series installed multimeter and a amp-clamp (showing both the same value) I came to the conclusion that the problem was the PWM. The ACS showed the same value as the amp-clamp and the multimeter “from time-o-time”
- I’m using the PWM frequency library from runnerup to set 20kHz PWM
- The usual values I read are between 0 and 5 amps
- In my code I have apply a moving average to my readings and at an specific duty cycle I get a factor of 3 less current reported by the ACS than the “real” values… —> This factor changes at a different duty cycle.
- (In case you ask) I’m using 20kHz because under that value I get wining noise and yes, I got a MOSFET with a huge heatsink
- the main purpose of the current reading is to stop the motor if consumption goes higher than the safety limit.
So my questions would be:
- How the amp-clamp and the multimeter do to read he current value in such conditions? I mean, do they take systematically the highest value?
- Who is actually showing the “real” value? because if amp-clamp and multimeter are showing max values and with ACS I’m averaging a bunch of samples, I’d believe the ACS is closer to reality and that the real calculation would be MaxAmp*DutyCycle[%]
- Any advise in how to read this?