Reading PWM pulses with Netduino3 and ACS712

Hi, everyone! I’m trying to use an ACS712 current sensor (the 5 A version) to measure the current during a PWM cycle. The PWM signal to read has variable frequency and duty cycle. I tried to do it by directly connecting ACS712 to the analog input of the N3 board. The problem is that the read values are not reliable, probably because the whole process is too slow, it has latency.
I read that it can be fixed by using an ADC (analog to digital converter). Here is suggested that an ADS1115 converter works fine.
Does anybody have any more info about this? Maybe a schematic and some sample code?
Thank you

Is anybody reading my post?

Found this in the thread entitled “Having trouble with the .Netmicro Framework” on this forum
written by Jade_Perreault

Might help with measuring pwm current.

Just curious - why are you measuring this current. Why not measure the voltage with an oscilloscope?

The LTC®2945 is a rail-to-rail system monitor that measures current, voltage, and power. It features an operating range of 2.7V to 80V and includes a shunt regulator for supplies above 80V to allow flexibility in the selection of input supply. The current measurement range of 0V to 80V is independent of the input supply. An onboard 0.75% accurate 12-bit ADC measures load current, input voltage and an auxiliary external voltage. A 24-bit power value is generated by digitally multiplying the measured 12-bit load current and input voltage data. Minimum and maximum values are stored and an overrange alert with programmable thresholds minimizes the need for software polling. Data is reported via a standard I2C interface. Shutdown mode reduces power consumption to 20µA. The LTC2945 I2C interface includes separate data input and output pins for use with standard or opto-isolated I2C connections. The LTC2945-1 has an inverted data output for use with inverting opto-isolator configurations.

Hey, Mark

I’m trying to detect the phases of the current pulse (storage and decay) and run some custom code. Everything needs to be synchronized, but it looks like any solution that involves Hall effect sensors is very inaccurate. Solutions based on shunt resistors look like a superior alternative.