Hi, I like Mr Doug's Idea as its the cheapest and would save quite some space required by the transformer. I could just rectify the AC Voltage and then use a resistive divider to scale the voltage down to say 3 volts. But i'll have to add a couple of Mica Capacitors of say 0.47mfd/300 Volts to flatten out the DC. And after the Voltage Divider, I might also put up a small LC network based Low Pass Filter. And finally, a Kamikaze Zener Diode of say 5.2 Volts to Commit Suicide and Protect the PIC if one of the Divider resistors is to fail. So, the voltage I'll be getting will be the peak voltage. How do I get the RMS Voltage ? Any ready made algorithms on PICList would be great. And finally, anyone's got any comments on this design ? Jeethu Rao www.jeethurao.com -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Douglas Butler Sent: Friday, June 22, 2001 7:06 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: Reading Mains Voltage From a PIC If you rectify the 230VAC first you can use a very non-perfect rectifier. The errors will be insignificant vs. the 300VDC result. Then use a resistive divider to reduce the 300V to 5V for the PIC A/D. The will give you the average voltage level. If you are looking for single cycle dropouts you will have to do something faster, probably synchronized to the power line frequency. Do you need to isolate the PIC ground from the AC mains? Sherpa Doug -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.