Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

using a pic as a zero cross detector

Status
Not open for further replies.

williB

New Member
On a slightly different tac, i think i can use a PIC as a zero cross detctor..
what i could do is use an op-Amp to attenuate the signal comming from the generator so the PIC can read it.. ie 0-5v..wow i could even make it adaptive , say the voltage comming from the generator is only 15V , the PIC could then choose a different resistor for the op-Amp..Thus allowing the A2D read full scale again ...
EDIT :: i could just use one of the comparitors but this wouldnt give me any indication that the zero was about to occur
..which could be as useful as knowing after the fact..
 
How PIC will know its reading 15V?
If you want to change resistor depending on input circuits its better to have comparator circuits which will switch the resistors depending on input voltage level.
Zero Cross detector, I think are use to find the zero point in a wave which is varying in time and I guess it can go to negative amplitude also. As far as I know PIC ADCs can read positive voltages (If I am wrong do correct me) only so any thing below 0V will also be ZERO which is not what a zero cross detector is supposed to do.
 
HI
I had read that post before but didnt followed it
even I couldnot understand the link between this post and the one you refered to
All I can understand is you had made a rectifier circuit and may be you want to detect the zero crossing point of the output

you can convert the 15V ac voltage to a small positive voltage so that you can feed it to to PIC but for that you need to use opamp attenuator and also offset (this will be a good choice if you want to measure the voltage also) if you just need to detect the zero cross point its better to use a zero cross detect ic or comparator ic (which will be more accurate then the previous method)
 
instruite said:
HI
I had read that post before but didnt followed it
even I couldnot understand the link between this post and the one you refered to
Sorry , i misread what you were saying , my mistake..

upand_at_them said:
Willi,

Here is a link to a project that does just that, a PIC as a ZCD: https://www.ringolake.com/pic_proj/zcd/zcdmodem.html

Two versions on that page. One uses an Op-Amp and the other doesn't.

Mike
cool i'll check it out..
 
williB said:
On a slightly different tac, i think i can use a PIC as a zero cross detctor..
what i could do is use an op-Amp to attenuate the signal comming from the generator so the PIC can read it.. ie 0-5v..wow i could even make it adaptive , say the voltage comming from the generator is only 15V , the PIC could then choose a different resistor for the op-Amp..Thus allowing the A2D read full scale again ...
EDIT :: i could just use one of the comparitors but this wouldnt give me any indication that the zero was about to occur
..which could be as useful as knowing after the fact..

You probably won't use the ADC because it's rather slow. A comparator is more appropriate. Interfacing the AC signal with the PIC is probably not practical at all because the ground is flipping from one side to the other.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top