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.

Detect crossover of mains

Status
Not open for further replies.

Scarr

Member
Hi,

I want to detect the crossover point of a mains supply and being a novice I am looking for a IC solution or simple solution if there is one?

Thanks
 
Note:

forgot to mention, I am using a PIC could zero crossover of AC mains be detected using the PIC somehow?

Thanks
 
Re: Note:

Scarr said:
forgot to mention, I am using a PIC could zero crossover of AC mains be detected using the PIC somehow?

Thanks

Yes, it's commonly done, the easiest way is probably to use a bridge rectifier feeding through a series resistor to the base of an NPN transistor. The transistor will turn OFF around the zero-crossing point on all half cycles.

If you only want to use every full cycle, you can use a simple series resistor feeding directly in to the PIC pin, see the MicroChip application notes for details.
 
Thanks Nigel, more question

OK, first, thanks Nigel

I am happy with either half or full cycles, I have been looking whilst wating for a reply and this whole zero-crossover is a nightmare!!!!

I am looking for the simplest way to determine the actual zero voltage point, will using a PIC pin give me this? if so can you point me at the microhip article that shows this?

Thanks
 
Re: Thanks Nigel, more question

Scarr said:
OK, first, thanks Nigel

I am happy with either half or full cycles, I have been looking whilst wating for a reply and this whole zero-crossover is a nightmare!!!!

I am looking for the simplest way to determine the actual zero voltage point, will using a PIC pin give me this? if so can you point me at the microhip article that shows this?

Thanks

Not to be picky, but the app note method will determine the zero-crossing only to the level of the input threshold of the logic buffer. Despite the fact you mention _actual_ zero crossing, I assume you would be ok with this voltage and not actually zero volts.
 
Re: Thanks Nigel, more question

Optikon said:
Not to be picky, but the app note method will determine the zero-crossing only to the level of the input threshold of the logic buffer. Despite the fact you mention _actual_ zero crossing, I assume you would be ok with this voltage and not actually zero volts.

Every component you use is subject to tolerances, there shouldn't be any problem with the zero-crossing point being subject to similar tolerances. Generally all you need is a reliable, repeatable, switching point close to the actual zero-crossing.
 
How close to zero?

I am acutally wanting to dectect as close to the zero volts as posible so anything that puts a slew on this I need to know about, this is why I was looking for a IC to give me a nice pulse / square wave. as neear to zero as possible and without many external components

I have found the UAA2016P will this do the job?

Thanks
 
Re: How close to zero?

Scarr said:
I am acutally wanting to dectect as close to the zero volts as posible so anything that puts a slew on this I need to know about, this is why I was looking for a IC to give me a nice pulse / square wave. as neear to zero as possible and without many external components

I have found the UAA2016P will this do the job?

I can't say I've ever heard of it?, what actually are you trying to do?.
 
Quick update, here's a simple circuit to generate zero-crossing pulses in the PSU of a PIC circuit. The pulses are positive going, will start just before zero-crossing, and end just after, with the zero point pretty well in the middle. However, it's perfectly satisfactory for triac control of faders etc.

If required you could always tweak the software to give a slight delay after detection of the rising edge.
 

Attachments

  • zero-cross.gif
    zero-cross.gif
    3.9 KB · Views: 525
Nigel, just out of general interest, isn't there a 90 degree phase shift between the input and output of a transformer? If so, how does that affect this zero crossing detection scheme?
 
JohnBrown said:
Nigel, just out of general interest, isn't there a 90 degree phase shift between the input and output of a transformer?

I don't know? - if I get time I'll dig a transformer out and measure it. But this sort of circuit is commonly used to generate zero-crossing pulses.
 
I've dug out a 30-0-30 toroidal transformer and tested it, the primary and secondary are perfectly in phase with no load!, or with a 48 ohm load (2 x 24 ohm 17W in series).
 
O.K. Thanks. I've no idea where that notion came from, probably something my father said 40 years ago that I misconstrued!
 
Transformer phase-shift

Just butting in to confirm ...
there is NO voltage phase-shift across a transformer, if there were the power generation and distribution systems would be a mess - we rely on known phase angles when switching massive systems in and out.

Maybe you are remembering something of the AC current being out of phase with a voltage? (pure inductance gives a theoretical 90 degrees phase lag ?)

Actually, to be pedantic, a single phase transformer can give a 180 degree shift if primary or secondary terminals are reversed.
 
Re: Thanks Nigel, more question

Nigel Goodwin said:
Optikon said:
Not to be picky, but the app note method will determine the zero-crossing only to the level of the input threshold of the logic buffer. Despite the fact you mention _actual_ zero crossing, I assume you would be ok with this voltage and not actually zero volts.

Every component you use is subject to tolerances, there shouldn't be any problem with the zero-crossing point being subject to similar tolerances. Generally all you need is a reliable, repeatable, switching point close to the actual zero-crossing.

Of course, but some ways are more accurate than others.. I normally would have thought nothing of it had he not said "actual" zero volts. I agree generally these cookbook circuits do fine.. but he hasnt really explained his application so I make no assumptions.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top