Prince Vegeta
Member level 5
I need to measure 2 220vp/50Hz AC voltages (in an ATS project). I chosen PIC16F877A as the MCU.
my problem is to measure the 220vAC signal. I made a circuit to convert voltages as follows:
+230v -> 5v
0v -> 2.5v
-230v -> 0v
but now how can I feed it to the MCU the proper way?
I can get the ADC but I need to measure the voltage so that if it get less than a certain value (say 200v on both +and-), the MCU will switch to the other supply... and so on.
I'm confused of the -ve half cycle! if it's just DC voltage I would have done it properly.
I hope you help me with the code too.
Here is my measuring circuit (does it need zener?):
THX
my problem is to measure the 220vAC signal. I made a circuit to convert voltages as follows:
+230v -> 5v
0v -> 2.5v
-230v -> 0v
but now how can I feed it to the MCU the proper way?
I can get the ADC but I need to measure the voltage so that if it get less than a certain value (say 200v on both +and-), the MCU will switch to the other supply... and so on.
I'm confused of the -ve half cycle! if it's just DC voltage I would have done it properly.
I hope you help me with the code too.
Here is my measuring circuit (does it need zener?):
THX