Hi all,
I'm a bit of a newbie at electronics so please be patient
I need to measure the peak voltage of a square wave oscillating at approximately 8kHz, I need to take a reading 100 times a second. I am already using an ATmega328p in my circuit and was hoping that one of the ADC pins would do the job.
I am not sure if the MCU will simply measure the average voltage in which case I'd need to multiply whatever voltage by some factor to get the actual voltage? The speed of the ADC is much higher than 8kHz I think, so would the MCU resolve the zero voltage sections and I'd have to do something clever in my code to ignore the lows and find the peak voltage? Am I thinking about this the wrong way completely?
A beautifully drawn representation of the signal I want to measure:
Thanks in advance,
Calloutman
I'm a bit of a newbie at electronics so please be patient
I need to measure the peak voltage of a square wave oscillating at approximately 8kHz, I need to take a reading 100 times a second. I am already using an ATmega328p in my circuit and was hoping that one of the ADC pins would do the job.
I am not sure if the MCU will simply measure the average voltage in which case I'd need to multiply whatever voltage by some factor to get the actual voltage? The speed of the ADC is much higher than 8kHz I think, so would the MCU resolve the zero voltage sections and I'd have to do something clever in my code to ignore the lows and find the peak voltage? Am I thinking about this the wrong way completely?
A beautifully drawn representation of the signal I want to measure:
Thanks in advance,
Calloutman