Author Topic: Mains Zero Crossing Detection  (Read 11503 times)

0 Members and 3 Guests are viewing this topic.

Offline BryanTopic starter

  • Frequent Contributor
  • **
  • Posts: 618
  • Country: ca
Re: Mains Zero Crossing Detection
« Reply #25 on: February 18, 2021, 06:47:18 pm »
Built that one a couple of times and it worked very well, the pulse is symmetric around the zero crossing point.

Yes, ordered the parts today from Dig along with a H11AA1.

Another project I have in mind is reusing a older aquarium controller that utilized X10 for the outputs to control equipment. X10 is too unreliable so I wanted to probe the output and use a separate MCU to drive some relay boards. I suspect the output from the controller will only send out X10 data when it receives a zero detection pulse from a PL503 (wrong name?) module. At least that is my understanding of the X0 protocol
-=Bryan=-
 

Offline BryanTopic starter

  • Frequent Contributor
  • **
  • Posts: 618
  • Country: ca
Re: Mains Zero Crossing Detection
« Reply #26 on: February 18, 2021, 07:04:25 pm »
I suppose I am interpreting the graph incorrect but doesn't it show that the rising edge of I(d6) at 30volts?

Yes, if you look the pulse is centred around the zero crossing, with the component values chosen to make the pulse width ~1ms. It has a predictable and consistent delay (subject to the usual factors that effect drift in any analogue circuit, tempco of components etc.). One can adjust the component values to make the pulse narrower, subject to the capacitor holding enough charge to adequately drive the LED in an optocoupler.

That it comes before the zero crossing is no particular issue, a circuit that triggered exactly at the zero crossing would in practice, because of propagation delays, deliver the zero-crossing indication after the zero-crossing. Having the signal trigger slightly beforehand is actually an advantage for many applications - if you want to switch something at the zero crossing it's more useful to know that the zero crossing is coming up in ~500us rather than has just departed 100us ago. If you're using the zero-crossings just to measure the frequency of the mains you don't care about the delay either way as it's indication-to-indication timing that's of interest.

And I suspect that is consistent with any zero detection circuit. Some may zero cross at different points (phase) on the ac signal depending on design, but as long as it is consistent one could incorporate that in software or other means and yes knowing ahead of time is always better than trying to catch up in most applications. If I look at the Ltspice  example and if one delayed in software by 1-2 ms or so it would be a consistent crossing at zero.
« Last Edit: February 18, 2021, 07:09:01 pm by Bryan »
-=Bryan=-
 

Offline cellularmitosis

  • Supporter
  • ****
  • Posts: 1111
  • Country: us
Re: Mains Zero Crossing Detection
« Reply #27 on: October 08, 2022, 12:05:15 am »
A problem with that circuit is fairly high power dissipation in the resistors.
Here is a better solution, which only fires the LED for a short pulse at the zero crossing
https://dextrel.net/design-ideas-2/mains-zero-crossing-detector.html

Looks like the link has changed: https://dextrel.net/dextrel-start-page/design-ideas-2/mains-zero-crossing-detector

Thanks for recommending it, great little circuit!
LTZs: KX FX MX CX PX Frank A9 QX
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2485
  • Country: gb
  • Recovering Electrical Engineer
Re: Mains Zero Crossing Detection
« Reply #28 on: October 08, 2022, 09:11:35 am »
Its going to costy more time, effort, risk (to life and your project) and parts cost than buying a rerady rolled. BM1Z001, 4 loonies.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf