When I made my controller for my washing machine I used a bridge rectifier without any smoothing caps and used this to drive an NPN transistor to buffer to the PIC. Transformer (12 volt) to bridge rectifier Bridge rectifier -> 10k resistor -> BC547 transistor base BC547 Transistor emitter to gnd BC547 emitter to Pic interrupt pin BC547 emitter to +5v via 4.7k resistor When the mains potential was at zero the transistor was off and the Interrupt pin was at +5 volts When mains potential was greater than zero the transistor was on and interrupt pin was at 0 volts This gives you the zero crossing of the mains. If you increment a simple counter each time the interrupt occurs you'll get an accurate timebase of 100 interrupts per second. I used TMR0 with a suitable prescaler to work out my timing to fire the triac depending on what part of the phase I needed it to fire at - all worked pretty well for an induction motor speed controller (with a tacho feedback from the motor). Dom -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of techy fellow Sent: 06 January 2005 08:12 To: Microcontroller discussion list - Public. Subject: [PIC]: Newbie Needs Help (was: HELP REQUIRED FROM NEWBIE) Hi Bob, Received an error message from the list stating that my reply is too huge (> 40KB) after trying to attach a picture of the Ac Opto Triac Relay board. Hence, resending the message. Thanks so much for your advices, help, tips and links. Colombain, Eisermann, Bob and to those who has provided me with help, many thanks to you guys too. I spotted the potential problem of using mechanical relays as they have limited life-span. Hence, I have purchased a AC Opto Triac relay board (with 4 Triac relays) from www.futurlec.com (I am not related to them). I will hook it up to the final PIC circuit. I will visit all the links as advised while waiting for my AC opto Triac relay board to arrive. By the way, how to count 50/60 Cycle power to have a very accurate time base ? I thought of using a 12V DC transformer to power the AC Opto Triac relay board and reduce the 12V to 5V via 7805 or 78L05 to power the PIC circuit. Thanks, Davis -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.8 - Release Date: 03/01/2005 -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist