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
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