Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 5th October 2004, 06:40 PM   (permalink)
Default Detect crossover of mains

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
Scarr is offline  
Old 5th October 2004, 07:03 PM   (permalink)
Default Note:

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

Thanks
Scarr is offline  
Old 5th October 2004, 07:15 PM   (permalink)
Default Re: Note:

Quote:
Originally Posted by Scarr
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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 5th October 2004, 07:47 PM   (permalink)
Default 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
Scarr is offline  
Old 5th October 2004, 07:57 PM   (permalink)
Default

This is a application note for a 12c508 based light dimmer. It also contains zero crossing detection

http://ww1.microchip.com/downloads/e...tes/40171a.pdf
Exo is offline  
Old 5th October 2004, 08:31 PM   (permalink)
Default

Quote:
Originally Posted by Exo
This is a application note for a 12c508 based light dimmer. It also contains zero crossing detection

http://ww1.microchip.com/downloads/e...tes/40171a.pdf
Thanks Exo, it saved me looking it up 8)
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 5th October 2004, 09:55 PM   (permalink)
Default Re: Thanks Nigel, more question

Quote:
Originally Posted by Scarr
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.
Optikon is offline  
Old 6th October 2004, 07:21 AM   (permalink)
Default Re: Thanks Nigel, more question

Quote:
Originally Posted by Optikon
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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 6th October 2004, 08:37 AM   (permalink)
Default 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
Scarr is offline  
Old 6th October 2004, 09:08 AM   (permalink)
Default Re: How close to zero?

Quote:
Originally Posted by Scarr
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?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 6th October 2004, 09:46 AM   (permalink)
Default

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.
Attached Images
File Type: gif zero-cross.gif (3.9 KB, 300 views)
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 6th October 2004, 11:11 AM   (permalink)
Default

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 is offline  
Old 6th October 2004, 01:06 PM   (permalink)
Default

Quote:
Originally Posted by JohnBrown
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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 6th October 2004, 01:16 PM   (permalink)
Default

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).
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 6th October 2004, 01:49 PM   (permalink)
Default

O.K. Thanks. I've no idea where that notion came from, probably something my father said 40 years ago that I misconstrued!
JohnBrown is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:22 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

eXTReMe Tracker