Current sensor sampling

ebeowulf17

Joined Aug 12, 2014
3,307
You could use both rising and falling edge interrupts to detect when each cycle starts and how long it lasts. This would give you duty cycle. If you multiply peak current times duty cycle, you'll have average current, right? This way you you don't need so many samples to get meaningful averages.
 

Thread Starter

Xavier Pacheco Paulino

Joined Oct 21, 2015
728
You could use both rising and falling edge interrupts to detect when each cycle starts and how long it lasts. This would give you duty cycle.
But I actually know my duty cycle, because I'm controlling it. I decide when to send certain percentage.

If you multiply peak current times duty cycle, you'll have average current, right? This way you you don't need so many samples to get meaningful averages.
That's assuming I'm reading peak currents from the sensor?
 

ebeowulf17

Joined Aug 12, 2014
3,307
But I actually know my duty cycle, because I'm controlling it. I decide when to send certain percentage.



That's assuming I'm reading peak currents from the sensor?
If you know your start time, your frequency, and your duty cycle, you should be able to sample at the right moment to catch peak current right?

Do you have a two channel oscilloscope? If so, you could visualize the current waveform and see how consistent it is. My assumption is that there are fairly predictable rise and fall times with (relatively) long, flat plateaus in the middle. Once you're confident in what your waveforms look like, adjust timing to airways read in the plateau.
 
Top