Ahh but just checking the period doesn't reveal the direction of rotation only that by comparison they are all there. There is another complication caused by the real world if the supply is taken via a delta / star transformer and a motor is connected to the secondary you are monitoring, a failure in the primary supply will not change the period only the voltage (of two phases)as the motor will continue to run and help reinstate the third phase. It maybe necessary to monitor the voltage using a voltage sensing arrangement depending upon application. You have to do this in a UPS to ensure correct operation of the static switch under failure conditions. Regards Steve -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Andre Abelian Sent: 05 January 2007 18:07 To: Microcontroller discussion list - Public. Subject: RE: [PIC]: Phase failure detection Anand, if you compare together they may not be the same and you will end up an error. This is what I would do. connect all 3 phases thru optoisolater and mux connect to pic CCP input and capture the speed. 1. select first phase capture and save it 2. do same thing on all other 2 now you have 3 variables that you can decide what to do with them. they may or may not be exact same values but will be very close. Andre Abelian -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf Of Anand Dhuru Sent: Friday, January 05, 2007 8:32 AM To: Piclist Subject: [PIC]: Phase failure detection Hi folks, I am building a circuit that needs to monitor the 3 phases in the mains, and detect if (a) any one phase fails, and (b) if the phases are connected improperly. After some search I found http://www.picbasic.org/forum/archiv...hp/t-2134.html to be pretty close to what I need. What would be the best way to go about it? Would this logic work? Detect positive edge on phase 1 Start Timer 0 Detect positive edge on phase 2 Read Timer 0 as variable 1 Detect positive edge on phase 3 Read Timer 0 as variable 2 Stop + Reset timer If Variable 1 is equal to (almost) = (Variable 2)/2 = 6.67 ms (for 50 hz) then all is ok. Start again. Am I on the right track, or is there a better/easier way to do this? Regards, Anand -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist