How to detect the peak value of sine wave using 8051 microcontroller

1. How to detect the peak value of sine wave using 8051 microcontroller

hi all,
i am using 8051 in my project

•

2. Re: How to detect the peak value of sine wave using 8051 microcontroller

1. Detect the zero crossings

2. measure the period (20 ms), ie. the time between 2 positive going zero crossings

3. divide the period by 4

4. wait that time after a positive going zero crossing

5. measure the sine voltage at that point.

•

3. Re: How to detect the peak value of sine wave using 8051 microcontroller

Originally Posted by ljcox
1. Detect the zero crossings

2. measure the period (20 ms), ie. the time between 2 positive going zero crossings

3. divide the period by 4

4. wait that time after a positive going zero crossing

5. measure the sine voltage at that point.
in circuit u need ADC also ....and interface it to the controller ..Apply the above algorithm as given by ljcox .
from the programming angle it will be easier if you make use of the interrupts external.

---------- Post added at 23:49 ---------- Previous post was at 23:31 ----------

•

4. Re: How to detect the peak value of sine wave using 8051 microcontroller

Originally Posted by ljcox
1. Detect the zero crossings

2. measure the period (20 ms), ie. the time between 2 positive going zero crossings

3. divide the period by 4

4. wait that time after a positive going zero crossing

5. measure the sine voltage at that point.
hi thanks for u r reply
will u please give me the example code for what u said

5. Re: How to detect the peak value of sine wave using 8051 microcontroller

Originally Posted by rajendra_415
hi thanks for u r reply
will u please give me the example code for what u said
I have not written any code for it.

--[[ ]]--