Making an X-10 lamp module immune to dimming

I assume that means that his | "When the zero-crossing circuit detects a zero crossing | voltage and the LED is illuminated, the gate on the triac in the | optoisolator is triggered with the same phase as the phase of the line | voltage. This line phase current is then used as the gate trigger to the | alternistor."

If I understand this correctly, it doesn't matter what the width of the pulses coming out of the X-10 IC are. Nor does it matter how many small pulse occur within each half cycle. When the ON signal arrives at the module, current starts flowing because the current used to power the gate circuit is activated. However, it no longer gets any information about the bright or dim levels because the triac is "beating" to the ZC data that now comes from the optoisolator/AC powerline instead and not the IC output. Is that correct? I assume what turns the module off is an OFF command that interrupts the output from the optoisolator so that there's no longer any pulses being sent. I thought Isaac said there was always a pulse going to the triac, even when the unit was off.

-- Bobby G.

Reply to
Robert Green
Loading thread data ...

If the line driving the triac is not pulsed in any way, but is constantly powered, I thought that the output of the triac will always be 100% but obviously it's more complex than that. Not only is the light output chopped each A/C cycle, but it seems that from Isaac said that they number of pulse occurring during each A/C cycle is chopped into smaller pulses. More pulses, more light. Might that be to keep the triac cooler than it would be with longer pulses? Why would they do it that way instead of a variable width pulse that lengthed as the brightness was turned up?

I've been reading about triacs all night and it says at Wiki: "Triac is one of many power-enhancing Mini-Cons who help the Autobots search the galaxy for pure energon ore." No, wait, that's: "It should be noted that once avalanche breakdown has occurred, the thyristor continues to conduct, irrespective of the gate voltage, until either: (a) the potential VG is removed or (b) the current through the device (anode-cathode) is less than the holding current specified by the manufacturer.

So it seems that even keeping the gate high all the time wouldn't work It seems that one of the mods extracted the ZC via an optoisolator and that implies that the triac has to be pulsed in phase with the AC cycle for it to allow current to pass. That's not how I thought of a triac, conceptually. When the author warns "this circuit only works if line current is fed into pin 6 of the optoisolator. If you hook the circuit up wrong, the zero-crossing circuit will not detect the voltage zero crossing and will not trigger the alternistor" it seems to imply that to pass A/C current, the triac must be synched to deal with the constantly reversing polarity of the AC current.

-- Bobby G.

Reply to
Robert Green

I was so perplexed by this I went looking for the powerflash module's instructions and this fault is indeed described (sort of as a benefit) and explained why I remembered lamp module lights flashing and ending up off. Those were all set to the alarm's own unit code so they would turn off, but none of the 15 other unit codes would.

What's the difference? A blip in the PIC? The wall switches obey ALL LIGHTS OFF; why not the lamp modules? I thought they shared the same circuit design?

The worst part about it is that I am sure you've told me this before. Probably more than once. I plead Mad Cow.

-- Bobby G.

Reply to
Robert Green

No; you are correct.

Absent a drive signal to the gate, a triac does not conduct at all. When a gate signal is applied, and if there is a voltage across the triac, it will turn on (start to conduct). Once it is conducting, the gate can no longer control it (it can not be turned off by the gate). At the next zero crossing, the triac will stop conducting until a signal is applied to the gate again. There are other weird conditions that can make the thing turn on, but they don't affect this discussion.

So, by delaying the gate signal with respect to the zero crossings, the triac can be turned on for any desired percentage of time.

No. The "earliest" pulse gates the triac; the others don't do anything. I don't know why the others are there. Maybe it's just an artifact of how the chip does phase control.

Triacs "keep cool" automatically, because of the way they work. When off, there is no current flowing, so no heat. When on, there's very little voltage drop across them (less than a fully saturated transistor) and so again, very little energy is turned into heat. The only time they show much dissipation is during the time they are switching from off to on, and they are designed to make that happen as fast as possible -- which is precisely why they generate electrical noise.

That would work; as I said, I don't know why the X-10 unit uses a string of pulses. Most inexpensive "lamp dimmers" use a very simple circuit that drive the triac with a varying width pulse. In higher power circuits, it's important to get the device turned on as fast as possible, and doing that requires a very fast, high-power drive signal which, if it were applied all the time, would destroy the gate. Usually that is provided by a single very short but high-energy pulse.

That would cause it to turn on shortly after each zero crossing, and stay on until the next. If what you want is a silent on-off switch (like a relay), that works just fine.

It does need to be synched to the AC phase, but not "to allow current to pass", but rather to vary the percentage of time the current is passing; if you pulse that gate, say, at each voltage peak, the triac will deliver power for the second half of each half cycle. Remember, it turns itself off at every zero crossing.

Triacs will conduct for both polarities of the AC signal; their cousins in the thyristor family, SCRs (Silicon Controlled Rectifier), will only conduct for one polarity, and then only when a gate signal is applied. Because of the way they are built, SCRs can handle hugely greater currents than triacs (thousands of amperes or more). When it's necessary to control that sort of power, two SCRs are connected back-to-back, and the gates are driven alternately, on alternate half cycles.

Isaac

Reply to
isw

That is correct.

As successive "brighten" commands are sent, the leading edge of the first pulse moves to occur earlier in the half cycle, so the triac is turned on for progressively greater percentages of time -- and the lamp grows brighter.

X-10 commands are sent right at zero crossings, so the triacs in all the modules are "off".

I did. But that pulse occurs so late in the half cycle that essentially no energy gets to the lamp -- just a tiny "blip".

Isaac

Reply to
isw

--snippety-snip--

That is precisely why they are so useful.

Sort of; they can turn on very rapidly, but getting them off again can be a bit tricky.

They pass AC freely, in both directions, from when a trigger pulse arrives until the next zero crossing.

Isaac

Reply to
isw

The level of light is determined by when the leading edge of the earliest pulse arrives. The other pulses have no effect.

The fact that there is a train of pulses is probably an artifact of the way the IC in the X-10 unit accomplishes phase delay (to retard the timing of the gate drive).

I was interested in using X-10 units to remotely control stuff other than lamps and coffee pots. Getting an optically isolated variable width pulse was a good starting place. I was not going to use that signal to drive a triac in amy way.

Yup. It allows the pulses from the IC to pass into a capacitor (for filtering them to an average DC level), while preventing the internals of the IC from (possibly) drawing a current that would prevent taht filtering from taking place.

Yup. In this case, I raised the value to allow a smaller capacitor to be used to get the time constant I wanted.

That's the cap that integrates the pulse train into a DC value

Simplistically, the 12K resistor determines how fast the cap charges (but not discharges, because the diode prevents that), while the 2.2K controls the discharge time.

--snip--

True, but if you're careful to make sure it's not plugged in while you have your fingers in it, there's not much to worry about. There are no components in there that can store large chunks of energy, for example.

Keep on hacking; that's the way to get better and more confident at it.

Isaac

Reply to
isw

The pulses do not have to alternate in polarity; that's one of the neat things about triacs.

It sounds like you're attributing too much functionality to the optoisolator; it doesn't *extract* anything. It's just a transistor that turns on when light shines on it. And the light is the LED that's inside it. The output of the opto just repeats whatever is on its input while isolating the possibly dangerous voltage levels on the input side.

I don't quite follow you, but I don't think that's right.

The gate pulse (optically isolated or not) turns the triac on; the next following zero crossing allows it to turn off. The "latching" part is provided by the triac itself, because it's not necessary to continue applying the gate signal after it's turned on.

Isaac

Reply to
isw

| You're correct. At first glance I thought he was talking about putting a | solid state relay inside an appliance module to eliminate the clack. After | your comment, I went and tested the modules I have and while the wall | switches respond to All Lights ON/OFF, the lamp modules don't. They only | respond to All Lights ON.

Although All Lights Off was part of the original command set it was not implemented by X10 until pretty late in the game. I don't think most of my cheap wall switches respond to it either. The relay wall switches have responded to it for a long time, though; possibly since their introduction.

| Bummer. Well, that makes the project somewhat | less attractive. At least the All Lights ON command is more useful to me | than All Lights Off would be. How is that the X-10 security system flashes | the house lights?

It alternates All Lights On with All Units Off.

| My whole premise | was based on a misunderstanding of how triacs work. I thought they were | merely high speed electronic relays.

They are to a first approximation, but there are a lot of details that can trip you up.

| It's become apparent that the triac can only do its magic when synched to | the zero crossing.

You can turn a triac on any time, but unless you are dimming it is usually best to turn it on near a zero crossing. You can't turn it off unless there is no current flowing.

| Perhaps you could be kind enough to explain what would happen if the line to | the triac gate was high all the time. Would it conduct only on the first | half cycle, or not at all or would the magic smoke escape? (-:

Having the gate "high" is probably not the best way to think of it. A triac is triggered by current flowing between gate and MT1. There are two possible directions for that current and two possible polarities for the voltage between MT1 and MT2. Together this gives you four combinations which are commonly referred to as quadrants of operation. (If you google the terms you will find pictures.) Most garden variety triacs can be triggered in any quadrant; however, it may require more current to trigger in some quadrants than in others. Some triacs are designed to be triggerable in only three of the four quadrants to reduce certain kinds of false retriggering. There may be more exotic variations.

Note that the requirement for the trigger current to flow between gate and MT1 is independent of the quadrants. I've read claims that some triacs are symmetrical with respect to MT1 and MT2 but I wouldn't want to count on it.

So, assuming you have satisfied the triggering polarity requirements (if any) and you drive current between the gate and MT1 all the time, the triac will conduct all the time.

Dan Lanciani ddl@danlan.*com

Reply to
Dan Lanciani

| > As I understand it now, the pulse to the triac has to occur twice every | > cycle and has to be alternatingly negative and positive to allow each half | > of the AC cycle to pass. | | The pulses do not have to alternate in polarity; that's one of the neat | things about triacs.

Though it is possible that you might want them to alternate to stay in the optimal triggering quadrants.

| > It sounds like the mod that uses the alternistor and the optoisolator does | > just that. It seems that the optoisolator extracts the ZC data and then the | > additional circuitry creates its own full width pulse independent of | > whatever length pulse comes out of the IC. | | It sounds like you're attributing too much functionality to the | optoisolator; it doesn't *extract* anything. It's just a transistor that | turns on when light shines on it. And the light is the LED that's inside | it. The output of the opto just repeats whatever is on its input while | isolating the possibly dangerous voltage levels on the input side.

The MOC3042 used in the modification is more than a simple optoisolator; it includes its own zero-crossing detector. The internal triac is fired near the next zero crossing if the LED is on, i.e., if there is input drive. This is convenient since the main triac will also fire near the zero crossing independent of when the integrated drive signal reaches the activation threshold.

Dan Lanciani ddl@danlan.*com

Reply to
Dan Lanciani

The triggering sensitivity is different, but the triac can always be triggered.

Yes, it is. I was not aware that was the device being used. Since the output of the X-10 unit's IC is already phase synchronized, it's not clear why something like that is necessary though.

Isaac

Reply to
isw

introduction.

It's a mix here. When I get a moment I'll try to figure out which lights do and which do not. What's clear is a lot more units go on than go off when using the All Lights On and Off commands.

Indeed. I'm tripping all over the place.

OK - that's a point I was missing and why I thought they had to be synched to the ZC.

combinations

I'm having a hard enough time with the garden variety triac.

I am still a bit confused about one thing. When the AC waveform crosses over, does current through the device drop to zero and the triac stops conducting simply because there's no current at that point on the sine wave? Does the triac have to be "retriggered" at that point and after each subsequent recrossing or does it start firing again as soon as current begins to flow again in the opposite direction?

I have another question. When taking apart the lamp module, I noticed that the tiny triac has an enormous aluminum heat sink. What process generates the high heat developed? I know it can get pretty hot from someone accidentally plugging a 1400W hairdryer into one. It ran the hairdryer, even as the case melted around all the components. )=:

FWIW, there's an interesting looking three wheeled car called the Triac:

formatting link

"The TRIAC is essentially a large, covered trike. The 20kw electric motor can achieve a very reasonable 80mph, and will take you on travels up to 100 miles on any given charge. It takes about 6 hours for its lithium-ion battery to recharge fully and, as with most electric vehicles, it comes with a regenerative braking system. The package for all of this three-wheeled fun runs about $20,000 dollars."

And the even more interesting stackable car from MIT:

-- Bobby G.

Reply to
Robert Green

Oops - sorry for the truncation:

. . . And the even more interesting stackable car from MIT:

formatting link

And this interesting tidbit:

"Why does a gas lantern use a silk mantle? How does it produce such intense light -- BW, Santa Clara, CA

The mantle of a lantern is actually a ceramic ash. The silk itself burns away completely and leaves behind only of the oxides of materials that were incorporated in the silk mantle when it was manufactured. The principal oxide formed when the standard Welsbach mantle is burned is thorium oxide, with a few percent of cerium oxide and other oxides. This use of thorium oxide or thoria, is a rare example of a radioactive element (thorium is radioactive) permitted in common household use. Thoria glows brightly when heated because it can tolerate extremely high temperatures without melting and because it is a very effective emitter of thermal radiation at temperatures of roughly 2200° C."

But wait, there's more (don't you just love research on the net - you always learn at least three more things than the thing you were looking for. I found this interesting because I know we've had reports like this here.

Subject: What does it mean when the lights brighten when a motor starts?

This usually means that the neutral wire in the panel is loose. Depending on the load balance, one hot wire may end up being more than 110V, and the other less than 110V, with respect to ground. This is a very hazardous situation - it can destroy your electronic equipment, possibly start fires, and in some situations electrocute you (ie: some US jurisdictions require the stove frame connected to neutral).

If this happens, contact your electrical authority immediately and have them come and check out the problem. If you say "loose neutral", they will come.

Note: a brief (< 1 second) brightening is sometimes normal with lighting and motors on the same 220V with neutral circuit. A loose main panel neutral will usually show increased brightness far longer than one second. In case of doubt, get help.

OK. Enough electrivia. Back to reading up on triacs.

-- Bobby G.

Reply to
Robert Green

As I looked at the mod schematic, I realized that the switching was occurring without any polarity reversal of the trigger. I am assuming that the pulse has to be given after each ZC because the triac has turned itself off because of a lack of current flow. It's probably a bad analogy but it reminds me of the timing of spark plugs in cars to coincide with top dead center. If the spark comes too late or too early, bad things happen.

I worded that badly. I should have said that the support circuitry in the mod detects the ZC and then feeds that to the optoisolator which then pulses the triac with power that is independent of the existing module circuitry. I assume that's done because of the line voltages involved and to prevent any unintended interaction of the modification circuitry with the module's circuits.

What I was trying to say is that the no matter what the length, duration and frequency of pulses the X-10 IC generates, and no matter where they occur on the sine wave, the triac will now conduct full time because the gate signal no longer comes the IC but from the AC line via the optoisolator.

Jeff, if you're reading this, it sounds a lot like Schelte's debugging trick of feeding the ZC information from the TW-7223(?) and data information from the XTB.

OK. That explains what I thought was happening elsewhere in the support circuitry. Is it correct to say the triac just goes off when the ZC is reached (because no current flows at that point in an AC waveform) and then the gate pulse turns it back on again for another cycle?

(Thanks for taking the time to explain this stuff. Hopefully, it will also be helpful to others. I was a little hesitant to even discuss triacs since the great "Triac Thread War" of a while back!)

-- Bobby G.

Reply to
Robert Green

optoisolator

Are you saying they could have taken the IC output and processed it so that as soon as a pulse was detected, the triac would be gated on until the next ZC? I'm not sure I follow . . .

-- Bobby G.

Reply to
Robert Green

I just wanted to prove I was paying attention. (-: I that I at least have a little sense of what turns the triac on and off and how dimming is accomplished. I have to confess that I am still a little hazy on how the module itself turns on and off and just how the sequence of events occurs from button push to lamp lighting.

-- Bobby G.

Reply to
Robert Green

Would another way to say that be the light level is determined by the point on the sine wave where the gate pulse arrives and that that unit stays on until the end of the cycle, no matter what happens afterward in that cycle? So it's not possible to have a sine wave that has four "bands" of on/off pulses? Or is it just that way for the X-10 modules? I thought, when you talked about pulses, that each one of them turned on the triac for a tiny bit of time, and that all of them added together in each cycle increased the power output. That would require switch the triac on and off multiple times within the cycle. That description is true of how all the chopped A/C cycles add up, but I think you're saying the pulses that follow are not having any effect on the state of the triac.

After reading more, what I envision now from your description is a sliding window sort of thing where the amount of current flowing depends on how far you slide the ON window to the left-most window stop, which in this case, is the zero crossing. That sound anywhere near right?

So it might even be possible it's really just noise with no particular function but no particular harm to the operation of the module. I assume you detected it with some sort of logic analyzer?

Sounds interesting. Wouldn't such an extension give you trouble with standard repeaters?

So with the capacitor, the signal is being smoothed out from a pulse train to voltage level. Usenet II is going to need a whiteboard. At least ten times now I've wanted to show something with a simple sketch. What does that pulse train look like? Is it a square wave with the lowermost part at

0 volts and the uppermost part at Vcc+ (not sure if that the right term). Would the resulting DC level be Vcc+/2 or something close to that?

At least I remember that much from reading my 555 cookbook 20+ years ago.

You said "average DC level" before. Is it safe to assume that DC value is still going to show some trace of the underlying pulses because of how it has been generated? Is that called ripple or is that something else entirely?

Is that capacitor discharging during the time the pulse is at zero, thus providing current in the circuit where there would have been none without it?

I learned that lesson with an 555 design that reversed an agitator motor by charging up a fairly large capacitor. They bite.

Thanks for the encouragement and the input. I feel a little like I felt on the first day of kindergarten when I saw all the sixth graders writing in cursive, reading big books and most impressive of all, taking the stairs two at a time!

I suppose this means I'll have to finally break down and open an account at Digikey or Mouser. (=;

-- Bobby G.

Reply to
Robert Green

^^^^^ ^^^^^ half-cycle half-cycle

Right. Only one per zero-crossing = two per complete cycle = one per half-cycle..

This is true for all TRIAC-based dimming of AC.

Right. Dimming by TRIACs is called "phase-control" dimming for a reason. One can characterize the amount of dimming by stating the number of degrees after zero crossing ("phase") that the TRIAC goes into conduction. The relationship between phase and light output is very non-linear and is called the dimmer curve. Turning the TRIAC on as late as 20 degrees (out of 180 degrees peer half cycle) still results in nearly 100% light output, but less than 10% of fully on if delayed to 110 degrees.

I have constructed a spreadsheet of conduction ("phase") angle, turn-on delay, resulting light intensity for typical incandescent lamp, RMS voltage, and DMX-512 and 0-10vdc control signals that can be downloaded at

formatting link

It also provides the relevant equations and graphs of conduction angle vs light intensity and conduction angle vs RMS voltage.

HTH ... Marc

Marc_F_Hult

formatting link
Visit my Home Automation and Electronics Porch Sale at
formatting link

Reply to
Marc_F_Hult

| As I looked at the mod schematic, I realized that the switching was | occurring without any polarity reversal of the trigger.

No, you were right the first time. The direction of the gate current is reversing in step with the line, keeping the triggering in the more sensitive quadrants. The unmodified module uses its own DC supply to drive the gate current independent of the line polarity. Using the more sensitive quadrants (or, in general, using two quadrants with the same sensitivity) keeps the triggering times as symmetrical as possible minimizing the DC component in the output.

| I am assuming that | the pulse has to be given after each ZC because the triac has turned itself | off because of a lack of current flow.

You assume correctly.

| I worded that badly. I should have said that the support circuitry in the | mod detects the ZC and then feeds that to the optoisolator which then pulses | the triac with power that is independent of the existing module circuitry.

Again, you were right the first time. This optoisolator has extra circuitry to synchronize with the zero crossing. Although the output of the module's IC is synchronized to the line, once it is integrated and passed through a threshold detector there is no guarantee that the resulting transition will be anywhere near a zero crossing of the supply. The MOC3042 insures that the switching will happen only near the zero crossing. Note that we are talking about the single transition from off to on when the module is so commanded, not a transition that happens twice per cycle. Whether this is important is up to you.

| I assume that's done because of the line voltages involved and to prevent | any unintended interaction of the modification circuitry with the module's | circuits.

I suspect you are correct. The zero crossing synchronization is just an extra (but nice) feature that comes for free with a part that happens to do just what is needed for the modification.

Dan Lanciani ddl@danlan.*com

Reply to
Dan Lanciani

That's how it works without any processing. A pulse from the IC, "amplified" by that transistor, drives the triac directly.

Adding a "standard" opto-isolator to drive an external (perhaps larger) triac would not need any more synchronizing.

Isaac

Reply to
isw

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.