What Is Better Triac Or Relay?

General discussion on mikroC PRO for PIC.
Author
Message
nart_schinackow
Posts: 122
Joined: 28 Apr 2009 16:16

What Is Better Triac Or Relay?

#1 Post by nart_schinackow » 27 Jun 2010 17:22

Hello,

I Used Relays With 220 Volt Loads And They Worked Fine.
What is Better Using Triacs Or Relays?

I wish Any one give a triac circuit (the safest to interface with a microcontroller)(Optoisolated).
Please Leave me A Link Or Something Thank You ALot For Your HElp;

ISL_Dave
Posts: 695
Joined: 29 Jul 2009 09:48
Location: Sheffield

Re: What Is Better Triac Or Relay?

#2 Post by ISL_Dave » 28 Jun 2010 10:28

Triacs and Relays are kind of similar and both have their own advantages and disadvantages.

A relay has contact bounce, slow switching speed, relatively high coil currents (generally unsuitable for direct micro drive) and a relatively low mechanical switching lifespan. They are also inductive and require a flyback diode and if the relay is not correctly selected (the make/break contact material) can suffer from arcing and contact welding. The main advantage of a mechanical relay is the high contact current capability.

A triac if correctly chosed and implemented has very little disadvantages although generally are not able to handle as much power as a relay (I say generally because there are some really hefty triacs).

A triac can be used to switch AC signals on the zero crossover (kinder to heating elements/bulbs) and has no contacts to weld together.

It really depends on what you are wanting to switch as to which is best.

Just to point out, cars used to use 'electromechanical connections to pulse a coil to generate the EHT for the spark plugs' which was a mechanical switch that switched on every revolution of the engine but these used to generate EMF noise, required suppression and eventually burned out and requried replacement. Cars now use solid state devices for switching as they are more reliable and do not generate noise.

I am working on steam sterilizers at the moment and at the side of my desk are two machines from two different manufacturers. They both do more or less the same thing but one uses solid state switching for the heater and pump/valves and the other uses relays. The one using relays is an older machine.

For data on Triacs, just download the data sheet from the manufacturer as they contain all the information you require to use them, including examples on driving them from micros.

nart_schinackow
Posts: 122
Joined: 28 Apr 2009 16:16

Re: What Is Better Triac Or Relay?

#3 Post by nart_schinackow » 28 Jun 2010 14:28

Thanks Really Alot I got The Idea now, Also In Relays You Must Add Some Capacitors because the relay produces inductive loads which may produce an instant reset to the pic micro! Thanks alot!

ISL_Dave
Posts: 695
Joined: 29 Jul 2009 09:48
Location: Sheffield

Re: What Is Better Triac Or Relay?

#4 Post by ISL_Dave » 28 Jun 2010 19:54

To be honest, you do not really need to add more capacitors just because you are using a relay. You should be sufficiently decoupling the supply rails anyway and if you have to add more capacitors then your design is too borderline to be reliable under noisy power supply conditions. Keep the relay or triac traces well away from the logic circuitry.

If you are switching inductive loads then you really need to be fitting a snubber network regardless of the type of switching although it is less critical with Triacs, you can still turn a Triac into a molten blob of silicon inside the casing. :(

It is best if the inductive load is electrically isolated from the micro circuit, including ground. You can use a star point to ground if they have to contain the same reference ground for some reason.

I designed a games machine and the audio circuit was driving an inductive loud speaker and the logic circuit was driving 12V, 100mA light bulbs (through a ULN2803 driver). When the bulbs turned on and off, there was a popping noise from the speaker and I spotted that I had accidentally wired the amplifier ground and bulb ground to the same ground as the micro and although they were supposed to be at the same potential, the grounds needed connecting to the supply input directly. It make the circuit act like it needed more smoothing capacitors but no amount of additional capacitors would have fixed this problem.

ISL_Dave
Posts: 695
Joined: 29 Jul 2009 09:48
Location: Sheffield

Re: What Is Better Triac Or Relay?

#5 Post by ISL_Dave » 28 Jun 2010 20:01

Sorry, just spotted what you mean about the relay itself being inductive. A flyback diode across the relay coil should be sufficient to stop back emf from causing problems.

You need to remember that if your relay is powered from the same supply as the micro (i.e. a 5V switched relay) then the moment you turn the relay on it is similar to putting a big load across the supply so you need to consider the track layout and reservoir capacitor, otherwise micro lockup or reset/brownout can occur.

It is much better to have the relay on a seperate supply to the micro (i.e. use a 12V relay or a 5V relay with 3.3V logic).

piort
Posts: 1379
Joined: 28 Dec 2005 16:42
Location: Laval,Québec,Canada,Earth... :-)
Contact:

Re: What Is Better Triac Or Relay?

#6 Post by piort » 28 Jun 2010 20:34

hi,
when i have to work with AC load, i use opto and triac for light load (- 5 amp) and SSR for higher load. Relay is now obsolete for load under 50 amp. and bring all the prob alrdy mentioned (inductive load of the coil, need 2 source board , welding contact etc, etc ... ).

this is my 2 cents ;-)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: What Is Better Triac Or Relay?

#7 Post by Dany » 29 Jun 2010 10:40

Extra points (not mentioned yet I think):
- A triac may need cooling (load depending), a relay does not.
- A triac is silent, no clicking when switching on or off
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

ISL_Dave
Posts: 695
Joined: 29 Jul 2009 09:48
Location: Sheffield

Re: What Is Better Triac Or Relay?

#8 Post by ISL_Dave » 29 Jun 2010 14:09

Good points about relay click. One product I updated to use solid state previously used relays and was located above hospital patients in the hoist control used to lift them. It was not ideal for loud clicking noises to be heared above them when the hoist was activated.

Saying that though, Triacs can certainly go with a bang when they fail :( although this can be preferable to welded relays making a patient travel skywards whilst the nurse is furiously trying to pull the emergency stop! :lol:

Olivia
Posts: 39
Joined: 12 Feb 2010 12:31

Re: What Is Better Triac Or Relay?

#9 Post by Olivia » 30 Jun 2010 20:07

The relay has a limited life.
If you read the datasheet for your relay, it will tell you how many times can go on-off.
It's got two different numbers: one for electrical and one for mechanical.

I've done once a design for a customer that wanted some lights to go on-off so many times per minute.....
He wanted to use a relay.
I told him that if he wants to use a relay, then he has to replace the relay every 5 months, acording to the datasheet.

So, if you turn on-off the relay too many times a day, do a calculation to see how long will last.

Regards.

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: What Is Better Triac Or Relay?

#10 Post by Dany » 04 Jul 2010 12:05

A tip: when using triacs it is a nice idea to use a special opto coupler (designed for triac drive) to do the mains isolation: the MOC3041, see
http://www.sonelec-musique.com/electron ... v_001.html
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

nart_schinackow
Posts: 122
Joined: 28 Apr 2009 16:16

Re: What Is Better Triac Or Relay?

#11 Post by nart_schinackow » 09 Jul 2010 23:44

Hey All Thanks For Your Replies!

Dany I have a Question On The Link You Have SEnt ME?
http://www.sonelec-musique.com/images2/electronique_interface_230V_001.gif
in the following pic can i apply at the +5 directly from MCU ? with the led or is it better to place a 330 ohm resistor to protect the led ?
or better take of the led and apply directly ?

wich s better

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: What Is Better Triac Or Relay?

#12 Post by Dany » 10 Jul 2010 09:23

nart_schinakow wrote:http://www.sonelec-musique.com/images2/ ... 0V_001.gif
in the following pic can i apply at the +5 directly from MCU ? with the led or is it better to place a 330 ohm resistor to protect the led ? or better take of the led and apply directly? wich s better
I am not sure what you actually want to do, leave the led out?
If so, then connect the pin2 of J1 (5V coming out of the PIC) directly to pin 1 of the optocoupler, and change R1 into 220 ohms (you always need a resistor to llimit the current).
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: What Is Better Triac Or Relay?

#13 Post by Dany » 10 Jul 2010 09:27

Another difference on triac/relays, in favour of the relay this time:

The triac only switches on/off one mains wire to the load (single pole), while relays exist in double pole versions.
If the load needs both poles (wires) switched then one will need 2 triacs and 2 optocouplers.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

nart_schinackow
Posts: 122
Joined: 28 Apr 2009 16:16

Re: What Is Better Triac Or Relay?

#14 Post by nart_schinackow » 10 Jul 2010 13:55

Thank you Danny I got It thanks alot !

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: What Is Better Triac Or Relay?

#15 Post by Dany » 08 Aug 2010 09:37

Some remark on the triac usage with energy-efficient lamps (compact fluorescent lamps) as load:

The "snubber" network (C of 100nF in series with a low ohmic resistor) across the triac cuses problems when trying to switch e.g. energy-efficient lamps (compact fluorescent lamps).
The small current through the snubber network causes, when the triac is switched off, flickering of the lamp.

Solution: :D
- place the snubber network across the load (lamp) in stead of across the triac.
- add an extra capacitor of 100nF (275V~) between the mains wires.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Post Reply

Return to “mikroC PRO for PIC General”