Electronics > Projects, Designs, and Technical Stuff

Isolated zero cross detection w/ AC mains

<< < (9/15) > >>

uer166:
Lots of over-complication happening.. I would just use somewhere between 4 and 8 1206 resistors in series with appropriate values (1-2meg total, depends on isolation requirements). Something like this appnote:
http://ww1.microchip.com/downloads/en/AppNotes/Atmel-2508-Zero-Cross-Detector_ApplicationNote_AVR182.pdf

It also works when the MCU is mains-GND referenced, but the pulses become slightly asymmetric, which can be compensated in FW if you need high resolution within an AC cycle..

iroc86:

--- Quote from: Circlotron on October 15, 2019, 01:52:09 am ---If the load is switched with a triac or pair of SCRs it will remain energised until the current zero crossing despite the gate drive to the semis being removed. If you needed to, you could detect this by the sudden rise in voltage across the semis as they unlatch.

--- End quote ---

Ah, absolutely right--I should have clarified what I meant. I was referring to having the triac unlatch between periods and not having full cycles reach the welder (in other words, shutting off at any zero cross instead of consistently at either the rising or falling crosses). This was discussed a few posts up by floobydust and Ian.M in terms of AC half-cycles and transformer saturation. My first welder used a Crydom D2425 solid state relay; without any feedback on the control circuit, I was wondering if the inconsistent weld quality was due to transformer saturation and shutting off at random zero crosses (and not necessarily corresponding to the phase angle at the "on" state).


--- Quote from: floobydust on October 15, 2019, 02:04:41 am ---Your weld inconsistency can be caused by transformer residual magentization, and you don't want to zero-cross switch a transformer. You switch on during a peak for inductive loads.

--- End quote ---

I'm not sure if you were referring to me or beduino, but I think you're confirming what I was just pondering in my response to Circlotron above :). I gotta remember the bit about switching on peaks--to balance the positive and negative AC cycles, how might we switch off the triac at a peak?


--- Quote from: floobydust on October 15, 2019, 02:04:41 am ---For welding batteries, double-pulse is used where a ~1/8 time pulse clears any oxidation or plating, dirt as a weak weld- then a pause then the main welding pulse.

--- End quote ---

Yep! Two-stage operation with a preheat pulse is on my list of project requirements, too. :-+

beduino:

--- Quote from: floobydust on October 15, 2019, 02:04:41 am ---There is a phase-shift due to the opto's actual turn on point. EL817 CTR is all over the place 5-600% so they won't be matched and there is always a deadband.

--- End quote ---
My zero crossing calculation is based on something like trying to find peak time of positive opto output, than the same minimum for negative opto outputs. Now we have time of positive peak and time of negative minimum, so by calculating average I estimate zero crossing time between maximum and minimum (next minimum maximum and so on averaging 16), so maybe slighly different CTR of those thwo not matched EL817s doesn't matter too much?
I haven't time today make experiments with MPU running external crystal, but 0.020078 s mains 230VAC 50Hz looks quite good for me while ATTiny85 is running internal oscilator 8Mhz @ ~3.9V without any voltage regulator directly from Li-ion 18650 battery.


--- Quote from: floobydust on October 15, 2019, 02:04:41 am ---You switch on during a peak for inductive loads.

--- End quote ---
I know that and shown something like pulse train of zero crosses was only to see that concept of two EL817 probably might be usable, since I've got quite nice mains 50Hz period based on moving average (16) zero crossing periods from those two optos.
I've in my spot welder two thyristors in antiparallel configuration on transformer primary.

chris_leyson:
Just as luck would have it I've been looking around for ideas for low power zero crossing detectors. In the not too distant future regulations may recommend a 300mW AC power demand when appliances are in standby, it won't be mandatory but it's a nice feature to have. A 300mW power budget sounds like a lot but it isn't really very much.
If want to cover 80VAC to 264VAC and you also want a zero crossing detector then you have to design for low power. There is a really neat circuit published in Electronic Design April 5 1999. It's designed for 120VAC but needs an isolated DC supply. If you have a flyback as part of the overall design then you can tweek the component values and use the flyback's auxiliary supply for the DC, another alternative might be a small capacitve dropper supply. There is also a nice design from EDN that uses very few parts and if you tweek up the input resistors to 470k or so and reduce the value of C1 to shorten the pulse then you can achieve less than 100mW standby power, however, the LED drive current is only a few mA, but a few mA is all need with 100% current transfer ratio opto. Onsemi app note added for good measure. Mitigating for fast transients and surges is not so easy however.

beduino:

--- Quote from: floobydust on October 15, 2019, 02:04:41 am ---Your weld inconsistency can be caused by transformer residual magentization, and you don't want to zero-cross switch a transformer.

--- End quote ---
Yep, that is why I start pulse (~100us)  train which lasts multiply of 20ms mains period at 50Hz in updated attiny85spot welder software always on some chosen offset from positive peak and do not rely only on zero crossing.
In one of the tests below, there is no offset from predicted peak voltage, but now I can easy change offset time in the range 0ms-4ms with 1ms margin, to do not make pulse at the begining of the next opposite mains waveform half period  8)



Of course, pulse duration also can be increased (probably should be to ensure fire eg. thyristor) or forced to last eg. up to 1ms before next predicted voltage zero crossing.

I think, it is now time add external oscilator 8MHz or better 16MHz for 5V attiny85 and make experiments with spot welder transformer  :-/O

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod