PDA

View Full Version : Can you explain zero-cross necessity?



Blackbeard
08-14-2009, 11:58 AM
I'm going to show my knowledge level here, so take this with a grain of salt and be kind.

I'd like to better understand the need for zero-cross detection for something like DMX. As I see it, at 250K speeds, and using something like PWM, is zero-cross detection really overkill, as the changing phase is happening 60 times a second (twice that for half wave)?

A little help here in making my very old mind understand what it's needed for, please. And I hope this is the right forum for this type of question. Sorry if this is misplaced.

LabRat
08-14-2009, 01:45 PM
http://www.dv-fansler.com/Computer%20Lights/dimmers.htm

How's that fer ya? ;)

Blackbeard
08-14-2009, 03:12 PM
Thanks LabRat,

As I understand this now, I only need zero-cross detection whenever I'm controlling AC-driven devices. If I were to use pure PWM, say to drive an LED from the microcontroller output directly with digital pulses, there is no need for the zero cross. Sounds like it would be a handy external timer though with a fairly precise accurarcy, though.

Good article.

steve

LabRat
08-14-2009, 03:29 PM
Thanks LabRat,

As I understand this now, I only need zero-cross detection whenever I'm controlling AC-driven devices. If I were to use pure PWM, say to drive an LED from the microcontroller output directly with digital pulses, there is no need for the zero cross. Sounds like it would be a handy external timer though with a fairly precise accurarcy, though.

Good article.

steve

In todays micro-electronics.. I don't think a 60Hz clock is going to do too much for us (given the internal oscillators on the PICs etc , run anywhere from 4 to 16 MHz) ;)

Blackbeard
08-14-2009, 03:40 PM
I agree about the 60 hz stuff. I was laying out a little RGB controller for some flux leds I've got, and couldn't see where I needed the zero crossing. Funny how, when you think about one particular thing, it can cloud your thought process concerning something else. But everytime I looked at other controllers, there it was. I just didn't associate AC light control with ZC while I was working on DC LEDs, even though I'd get my power from AC.

Thanks for the clarity.

fkostyun
08-14-2009, 03:50 PM
To make it short and simple, you need the zero cross for dimming AC powered lights (regardless of voltage.)

RGB Flux LED's that are connected to a DC source will not need the zero cross.

One good example is the Ren24 LV. There is the option for controlling standard SSRs, and also for driving LEDs. If you are controlling standards SSRs, you need to enable the zero cross, but, if you are driving LEDs, there is no need to have the zero cross installed.

jasonhuff
08-14-2009, 10:00 PM
To make it short and simple, you need the zero cross for dimming AC powered lights (regardless of voltage.)

RGB Flux LED's that are connected to a DC source will not need the zero cross.

One good example is the Ren24 LV. There is the option for controlling standard SSRs, and also for driving LEDs. If you are controlling standards SSRs, you need to enable the zero cross, but, if you are driving LEDs, there is no need to have the zero cross installed.

Hey where did the fog go? Thats clears a lot up for me

Blackbeard
10-18-2009, 03:33 PM
http://www.dv-fansler.com/Computer%20Lights/dimmers.htm

How's that fer ya? ;)

That's great and it makes things so clear. After more thought, I find myself overthinking again, so .....

Now, one more question. In the link above, they use the trailing part of the AC cycle as the "on" for the PWM. I can't see where it matters if you use, for instance, the first part of the AC cycle or the last part. As usual, I don't express my thoughts very well, so, to give an example:

If I want one quarter of full intensity, the above link waits three fourths of the AC half cycle before it turns on the triac. Would that be the same as turning on the triac the first quarter of the AC cycle and turning it off the last three quarters of the cycle? What if I used the middle eighth of each side of the peak amplitude?

Thanks for the help.

djulien
10-18-2009, 04:18 PM
Now, one more question. In the link above, they use the trailing part of the AC cycle as the "on" for the PWM. I can't see where it matters if you use, for instance, the first part of the AC cycle or the last part.

Triac and SCR devices generally "latch" once they are turned on, and will stay on as long as voltage is applied (assuming that some minimum conditons are met). Since they can be turned on but not off, they are not turned on until part-way thru the AC cycle, which results in the trailing part of the cycle being used.

There is a newer, different device (IGBT?) that allows it to be turned off part way through the cycle (kinda the opposite of a Triac or SCR in that regard), but I think it tends to be more expensive.

don

P. Short
10-18-2009, 05:46 PM
And the reason for using triacs (other than being relatively cheap) is that they can be easily used as full-wave switches. Transistors and SCRs can only be turned on during one phase of the power cycle, and transistors must be protected from the reverse voltage during the other phase. Triacs can be turned on during either phase of the AC cycle, although some of them can be a bit picky about triggering in certain phases of the power cycle.

Blackbeard
10-19-2009, 07:33 AM
djulien,

The part about inability to turn them off is throwing me now. I googled a little, and saw something similar to what you were saying, but does that mean the gate won't control on-off, just "on". I'm guessing that a port on an MCU isn't what normally controls the gate? I'm thinking PWM here.

P.Short,

The triac part of the question was meant to be relative to each half wave. Assuming that each half wave is 180 degrees, If I want one quarter intensity, does it matter which degree point of the 180 is the "turn-on" point" as long as the gate is on for only 45 degrees? In other words, is there a difference in turning on the gate at 18 degrees through 63 degrees than if I turn it on at 135 degrees through 180 degrees? What about on at 67.5 degrees and off at 112.5 degrees? Each lasts for only 45 degrees (one quarter of the 180 degree half cycle).

Of course, if I find the answer to the first part, it may explain the second part. I'll keep researching this, as it seems a little dangerous without me really understanding.

Thanks,

steve

ErnieHorning
10-19-2009, 07:56 AM
The MCU does turn on the gate, through the opto-cupler. Once turned on, the TRIAC will stay on until the current though it drops to zero. So the micro turns it on and it turns off by itself.

The longer in the half cycle that the TRIAC is on, the bright the lights will be.

The 0 to 100% timing doesn’t produce exactly 0 to 100% brightness on the lights. If the AC voltage was a square wave it would, but because it’s a sinusoidal wave it’s not linear. Its possible to compensate for this with Vixen 2.5.

Blackbeard
10-19-2009, 10:41 AM
The 0 to 100% timing doesn’t produce exactly 0 to 100% brightness on the lights. If the AC voltage was a square wave it would, but because it’s a sinusoidal wave it’s not linear. Its possible to compensate for this with Vixen 2.5.

That was what I was asking about. Thanks for the Vixen 2.5 notice also, as I was still using 2.1.

I'll get a datasheet for one of those triacs and maybe I'll leave you guys alone for a while. That "turning off" thing was something I wasn't aware of.

steve

djulien
10-19-2009, 03:53 PM
That "turning off" thing was something I wasn't aware of.

Also, if there is not enough current through the triac (so that it doesn't latch on), then it actually can be turned off again mid-cycle simply by removing the voltage to the gate. This is typically evident when trying to run LED strings using a triac. In that case, the 2 common work-arounds are either to use the PWM firmware (which leaves the control signal on for the remainder of the AC half-cycle), or to put something like a C7 or C9 in parallel with the LED string so it draws enough current for the triac to latch.

Besides the non-linearity of the "dimming curve" itself, there is also slight asymmetry favoring the tail end of the cycle for incandescent lights. For example, when power is first applied it takes a moment for the bulb filaments to heat up and glow (which would introduce a slight delay until visible), and they will continue to glow for a moment after power is disconnected (a slight delay which would prolong the visible light). So using the leading portion of the cycle (IGBT-style dimming) would give off slightly more light than using the tail end (Triac/SCR-style dimming) for the exact same phase angle. LEDs have much shorter on/off transition times, so dimming from the leading vs. trailing edge would be nearly the same.

don

Blackbeard
10-19-2009, 07:10 PM
So when using the triacs, PWM doesn't really come into play. More like a calculated turn-on time based on a percentage of the frequency? In other words, take the percentage of intensity, calculate the period (or period of the half wave), multiply the period by the percentage of intensity, and turn the triac on when that much of the period is left. I guess I thought PWM was what most of these controllers use, but then, that usually starts at the front of the period, if I'm not mistaken.

Guess you can tell, I'd like to design my own controller, but so far, I've really got it all wrong for non-LED stuff. I'll think a little longer on this one.

Thanks all for the education and patience.

steve

dirknerkle
10-19-2009, 08:35 PM
I'll think a little longer on this one.



Careful... thinking can get you into trouble sometimes...

ErnieHorning
10-19-2009, 09:52 PM
Normally the TRIAC gate is turned on and then immediately turned off. PWM for TRIAC control is the same except that the gate is left on until zero crossing is detected.

I’d have to see TRIAC and IGBT control side by side to believe that anyone could tell the difference.