TRIAC gate control problem

Hello All

We have a problem with the a TRIAC device we are using.

We are using it to switch 230V AC mains on and Off.

The gate is connected directly to the output of our Attiny processor. The whole cct is at mains level with + 5V generated from the mains for the processor.

THE PROBLEM: using a lead from the PSU to the gate of the TRIAC we can turn the device (and the mains) on and off. we cimply connect to +5V for on, disconnect for off.

HOWEVER, with the processor we can turn the device on but not Off.

On investigation(circuit with gate connected to processor) we find that on the gate we have a component from the mains, roughly at 0.2V peak. This appears to be coming to the gate through the other mains connected pins on the device. This mains component is capable of keeping the device on. The pull down capability of the ATTiny processor is poor and is having little effect on this mains component on the gate.

the device is a 2N6073 from On Semi

formatting link

Should I be using an isolated gate TRIAC? or is there some solution to removing this component getting on the gate.

Many thanks for any responses

Denis __________________________

formatting link

Reply to
Loading thread data ...

My first thought is that you have a mains signal to the processor which is being clamped to 0-5V by the input protection diodes of the processor. On some ICs this causes a signal on other pins.

I always clamp signals that could exceed exceed either supply with a BAT54S dual shottky diode. This prevents a signal forward biasing input protection diodes.

You can easily check for this with a scope. Make sure no pin goes outside the supply by more than about 0.3V.

Reply to

# turn the device (and the mains) on and off. we cimply connect to +5V # for on, disconnect for off.

With a series resistor, one hopes ?

# On investigation(circuit with gate connected to processor) we find # that on the gate we have a component from the mains, roughly at 0.2V # peak. This appears to be coming to the gate through the other mains # connected pins on the device.

Mains connected pins cannot mean what it says. How exactly do these pins connect to the mains

# This mains component is capable of # keeping the device on. The pull down capability of the ATTiny # processor is poor and is having little effect on this mains component # on the gate.

Many things here do not add up. The pull down of uC's NFETS is not poor, and 0.2V peak is not enough to trigger a TRIAC

General Tip: If this is at Mains potential, negative 5V will trigger better than +5V, as triacs work better in that quadrant.


Reply to

Why don't you buffer the processor output with a device that has got a decent pull-down capacity? An NPN transistor or a logic level MOSFET would be the traditional choices; you will have to add a pull-up resistor from collector/drain to +5V to turn the triac on when the buffer devies isn't pulling down, and you'd need a second resistor between the base of the bjt and and the processor output to define the base current.

This kind of simple buffer does invert the signal, so you'd want to modify the processor software accordingly, but that should be trivial.

-- Bill Sloman, Nijmegen

Reply to

Is the ATtiny really guaranteed to supply enough current to reliably trigger that triac in both of the quadrants you are using, and over temperature and unit-to-unit variations?

I suggest swapping the triac for a Teccor alternistor or other "snubberless" triac and adding a buffer (Triacs work better with negative gate drive, BTW, so quadrants II and II. They are most insensitive in QIV (positive gate, negative MT2)-- some are not even specified.

Sensitive-gate triacs tend to be more susceptible to lack of commutation from dv/dt.

A triac gate can act as a low impedance low voltage source when it is on, which could cause your processor to malfunction if connecte directly. (It can also act as a low impedance *high* voltage source if the triac or a connection fails).

Best regards, Spehro Pefhany

"it's the network..."                          "The Journey is the reward"             Info for manufacturers:
 Click to see the full signature
Reply to
Spehro Pefhany

I'd use an opto-coupler with it. The opto-coupler will have a spec for the led current, just use the right resistor in series with it for you 5v. Also prevents you from having your logic side physically connected to the mains. Safety issue in case of component failure.

Reply to

ISTR reading in an application note that triacs work better with negative gate voltage, making Vcc the ground reference would turn your pull-up into pull-down.

An alternative would be to drive a triac O/P opto-isolator with your micro and using that to control the main triac gate - this would give your micro excellent protection as well.

Others have mentioned snubbers - you do have one don't you? (or use snubberless triacs).

Reply to
ian field


formatting link

Optical isolation is an excellent way, but.... On one side there is AC withits neutral (ground), and the other side is the MPU, its isolated supply, inputs and drivers. My question is what should be used to tie these grounds together to prevent ESD (and other damaging voltages)?

Reply to
Robert Baer

neutral is *not* ground.

The OP may have cost constraints that prevent an isolated supply for the MPU.

floating an isolated MPU w/ I/O might be fine. Tying the MPU to the line can also work. Or, you can use the 3rd wire (earth ground, not neutral) if you have it - you might not have it. A lot depends on the I/O, which hasn't been described.

I wonder if the OP has the knowledge to make a safe and reliable design. From the description of the problem, I'm doubtful.


Reply to

Say the MPU inputs are switches that go from MPU gtound to MPU supply and outputs drive optically isolated triacs. Those triacs switch solenoids that are tied to 480/240/120VAC inputs and their return (relative ground so to speak) is neutral. What is the standard / safety scheme that is used to tie the MPU ground to that neutral? A resistor between 10K and 1meg? A capacitor? What?

Reply to
Robert Baer









Depends on locale. Locale defines the electric distribution properties. These then drive what is good safety in equipment design.

Reply to

If the processor pin pull-down capability is low, the gate is practically floating and hence sensitive to any leakage through the triac or capacitively coupled inside the triac or in the circuitry.

Using a buffer stage between the processor and the gate that actively pulls up/down, creating a low impedance path for the gate leakage.

How is the circuitry connected ?

I assume that the load is from Live to MT2 and MT1 is connected to Neutral. How are the MPU Vcc and Gnd terminals connected ? Do you have MPU Gnd connected to Neutral, i.e. Vcc is +5 V relative to Neutral or did you connect MPU Vcc to Neutral and MPU Gnd is at -5 V relative to neutral ?

Look carefully at the diagram in the triac data sheet, there is a 7400 gate driving the gate through a resistor, the power supply pin 14 (Vcc) is connected to MT1 and hence Neutral and pin 7 (Gnd) is connected to -5 V. This would also explain why other say that this triac works better with a negative supply.

So you really would have to generate a -5 V (relative to neutral) power supply for the MPU Gnd and you could get away even with the buffer.


Reply to
Paul Keinanen

I my case, there is no connection between the MPU and AC Neutral (yet). So, it seems you advocate a direct connectionfrom MPU ground to AC Neutral.

Reply to
Robert Baer

There are two ways of doing this.

You can isolate the MPU from the triac gate/MT1 (e.g. using an optoisolator) and then you can connect the MPU to any potential you like or even let it floating. This simplifies any MPU input signal processing, since you can connect the MPU Gnd to the signal source potential.

The other option is that the MPU board is directly connected to gate/MT1, in which case the MPU signals are close to the MT1 potential. Please remember, that if the triac is powered through an unpolarized mains plug, there is a 50 % chance that the gate/MT1 and hence MPU input terminals are sitting on top of the mains voltage and hence the input terminals can be momentarily 300-400 V above any grounded objects. Thus each input must be separately isolated to prevent any mains voltage from harming any people, depending on which way the mains plug is inserted.

If there are many inputs that needs to isolated, it is easier to put a single isolation barrier between the MPU and triac and using direct connections to the MPU input pins rather than isolating each input separately, when directly connected to the triac. However, as long as all the inputs are from potentiometers with isolated knobs, well isolated mechanical switched or an IR receiver, the MPU could as well be directly connected and possibly sitting on the Live potential,

With the 2N6071 triac referenced in this tread, when using direct connection, it might be better to connect the MPU Vcc directly to MT1 and MPU Gnd to -5 V relative to Neutral.

In the old days, tube TVs, at least in Europe, had a single rectifier diode from one mains plug pin to form about +200 V anode voltage and the other mains pin was connected directly to the chassis. Depending on which way the mains plug was inserted, the chassis had either Neutral or Live 220 V connected to the chassis. Thus it was very important to use a isolating wooden box as well isolated knobs on all potentiometers and switches. Any electrical connections were very rare, however, adding an external speaker connection was easy, since the audio output pentodes required an audio transformer anyway, which isolated the speaker terminals from mains and potentially from direct Live connection.

When servicing such TVs and other devices with universal (AC/DC) power supply, the first thing was to check which way the plug was inserted in order to avoid having 220 V mains all over in the chassis and getting nasty shocks from it.

Current regulations require that when servicing such beasts that an isolation transformer must be used, so that when touching the chassis, the chassis potential will be the same as your potential.

These days when using MPU controlled systems controlling directly a triac and hence sitting with 50 % likelihood directly on the Live line that an isolator transformer should be used, when developing and servicing such systems, if they are connected by an unpolarized plug to the mains.


Reply to
Paul Keinanen

The gate of a triac needs to float to fully turn it off, the best you can do is provide a low impedance from M2 to the Gate via a R or secondary coil from a trigger transformer to help prevent lingering external effects.

for a full on condition, using a photo coupled triac isolator to operate the gate of the Main triac is the easiest to do..

Operating at variable output (phase control) requires some timing and the coupled signal to be pulsed at the correct moment for both sides in which case, a trigger pulse transformer can also be used.

P.S. it's not a good idea to use Triacs in a bridged type system, they are known to latch up due to their internal characteristics, the Q4 types help out in this respect.

formatting link

Reply to

ElectronDepot 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.