I want to know procedure how to calculate Phase angle of Input AC signal using PIC 18fXXXX. _________________ sarada
MiniMe
Joined: 17 Nov 2009 Posts: 50
Posted: Wed Mar 31, 2010 5:36 am
I suggest you to use 3 ext interrupts and timer0. (do not forget to use pullup resistor on ext interrupt pin)
if you are looking into precise measurements i suggest to use timer overflow interrupt count + timer flow value.
How to calculate is up to you... You need to get into few not so complicated equations.
Good luck ! hope to hear something back about your progress.
Ttelmah
Joined: 11 Mar 2010 Posts: 19480
Posted: Wed Mar 31, 2010 7:15 am
For normal measurment like this, you need two zero crossing detectors. measure time between them triggering. If you know the frequency, then the period, is the reciprocal of this, and the angle is simply:
((time between the two zero triggers)*360)/period (for angle in degrees).
If you don't know the frequency, then you can measure the period between successive triggers of the reference zero crossing detector instead.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum