| Electronics > Projects, Designs, and Technical Stuff |
| Isolated zero cross detection w/ AC mains |
| (1/15) > >> |
| iroc86:
I'm working on a hobby circuit that requires an isolated zero cross detector based on AC mains voltage. I've seen this done many different ways, often using an optocoupler and full-wave rectifier. I've also seen transformers used to step down the voltage to something more reasonable, like 15 V, which is then fed into an op-amp or TTL switch. The latter approach seems to be more common when a transformer is already being used in a power supply, since the component is already there. How do these two methods compare to one another? When would one be more suitable than the other? Is it ever common practice to combine both techniques, stepping down the high-voltage AC and then running that through an optocoupler? I know it's tough to make generalizations without seeing schematics, so I'm just looking for a rule of thumb. |
| coppice:
Do you just want to see that crossing are occurring, or do you need a low latency means of detection so you can see the exact time of each crossing? |
| floobydust:
What are you doing with zero-cross? AC mains is always dirty, so you need transient protection and low pass filtering. Any delay or phase-shift from a LPF or transformer needs to be corrected for. Mains is high voltage so you need safe isolation unless your device is referenced to neutral. |
| iroc86:
Sure, I can provide some more details. I'm using the zero cross detection to fire a solid state relay for a certain number of AC waveform periods. The zero cross will be used to determine the starting point and then count a number of full cycles. I don't need this to be super accurate, but within 5% of a period would be good... I'm in the US, so that'd be around 1 ms for 60 Hz. Thanks for the reminder about transients and filtering, floobydust. Many of these DIY circuits on the Internet don't take that sort of thing into account. |
| floobydust:
A textbook method is an opto-coupler fed from mains. But this is highest cost and risk as far as wiring and the opto's pcb traces. You have to be mindful of proper clearances for mains. Assuming your project is powered from a small transformer, it's easiest to use the secondary AC as the transformer did all the work of safely lowering and isolating mains for you. There is a small phase-shift due to the transformer but you can check with a scope if it is significant. Zero-cross switching SSR's can trigger above 20V so they are a little late already. You need an even number of 1/2 cycles so the big transformer core does not saturate and many examples (fig.3a) show it's best to switch in on the AC peak, not at zero cross, to have lowest inrush current by exploiting the transformer's inductance. https://www.electronics-lab.com/project/mcu-controlled-spot-welder Zero Crossing Detectors and Comparators - Rod Elliott (ESP) Your firmware should trigger on a zero cross and ignore anything for almost 1/2 cycle say 7-8 msec, as any incoming zero-cross in that interval is going to be noise, unless you initially have triggered on noise. I wasn't sure if you are only counting cycles, or also doing phase-control for start or control. |
| Navigation |
| Message Index |
| Next page |