Prince Vegeta
Member level 5
- Joined
- May 29, 2012
- Messages
- 84
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 2,011
Hi everyone.
I'm measuring 2 AC sources - 50Hz 230v RMS.
I read this subject about offsetting AC voltage to make it 0-5v DC one to get it in the ADC pin of PIC MCU for measuring it.
I have some questions after that:
1- How can I calculate RMS value of the signal?
I need code example of this question if you can. now 0v will be -380v peak AC voltage in real and 2.5v will be 0v and so on... now, do I need to worry about negative voltage (- signal in code?) or just calculate it then converting ADC value to actual voltage value?
2- I'm not good with op-amps so I did my offset circuit without them... like this:
is this applicable with 230v RMS means?
3- if there is harmonics, will it affect the readings made by THIS method?
4- I'm using PIC16F877A MCU, with 16MHz crystal (or should I use another?)... will it be enough to sample and measure 2-4 AC voltages (50Hz each) and display them at LCD with other small functions? gimme your recommendations.
5- I read a blog-post here that suggested adding a voltage follower to the voltage divider, then a filter... after them a 5.1v Zener diode THEN to ADC pin... is that applicable with this sinewave signal?
THX ALL
I'm measuring 2 AC sources - 50Hz 230v RMS.
I read this subject about offsetting AC voltage to make it 0-5v DC one to get it in the ADC pin of PIC MCU for measuring it.
I have some questions after that:
1- How can I calculate RMS value of the signal?
I need code example of this question if you can. now 0v will be -380v peak AC voltage in real and 2.5v will be 0v and so on... now, do I need to worry about negative voltage (- signal in code?) or just calculate it then converting ADC value to actual voltage value?
2- I'm not good with op-amps so I did my offset circuit without them... like this:
is this applicable with 230v RMS means?
3- if there is harmonics, will it affect the readings made by THIS method?
4- I'm using PIC16F877A MCU, with 16MHz crystal (or should I use another?)... will it be enough to sample and measure 2-4 AC voltages (50Hz each) and display them at LCD with other small functions? gimme your recommendations.
5- I read a blog-post here that suggested adding a voltage follower to the voltage divider, then a filter... after them a 5.1v Zener diode THEN to ADC pin... is that applicable with this sinewave signal?
THX ALL