cancel
Showing results for 
Search instead for 
Did you mean: 

How to measure a AC voltage by using stm8s micro-controller's inbuilt ADC ?

JEda
Associate

I came across a situation where I have to measure the input to my board and I will be receiving a half sine wave dc voltage. Please help me if any one has a solution or a technique to measure the AC voltage.

1 REPLY 1
henry.dick
Senior II

it depends on your requirement which you didn't articulate.

the dumbest: adc the rectified ac signal and fft the results;

the less dumb: adc the rectified ac signal and picked the highest for its peak value;

the smarter approach: adc the filtered ac signal;

the smartest: put the ac signal through a precision rectifier circuit and adc its output

pick whichever works best for your application.