Author Topic: swiching mains on and off with a micro  (Read 5580 times)

0 Members and 1 Guest are viewing this topic.

Offline funfairEE

  • Contributor
  • Posts: 20
swiching mains on and off with a micro
« on: October 09, 2012, 03:35:44 pm »
Any one know a good way of switching 240V AC at 13amps rapidly using a micro controller. Project is a light sequencer so manically relays are out because wont switch fast enough.

Thanks in advance.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15338
  • Country: za
Re: swiching mains on and off with a micro
« Reply #1 on: October 09, 2012, 03:58:32 pm »
Optoswitch. 3-24V input one side, mains contacts at the other. Rated up to 20A depending on what you buy. They have screw terminals on the bigger ones, and are easy to mount to a flat plate heatsink.
 

Offline ColinB

  • Contributor
  • Posts: 23
Re: swiching mains on and off with a micro
« Reply #2 on: October 09, 2012, 04:41:46 pm »
Optoswitch. 3-24V input one side, mains contacts at the other. Rated up to 20A depending on what you buy. They have screw terminals on the bigger ones, and are easy to mount to a flat plate heatsink.
What is this 'optoswitch', really?  Is it based on a TRIAC or other thyristor device, a mechanical relay, or a MOSFET switching device?
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 18900
  • Country: nl
    • NCT Developments
Re: swiching mains on and off with a micro
« Reply #3 on: October 09, 2012, 05:35:38 pm »
Any one know a good way of switching 240V AC at 13amps rapidly using a micro controller. Project is a light sequencer so manically relays are out because wont switch fast enough.

Thanks in advance.
Small mechanical relays switch in about 20ms to 30ms. That is almost as much as a 50Hz cycle. No way you can see a difference. Even a TRIAC based solution will have some delay because most wait for the next zero crossing.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15338
  • Country: za
Re: swiching mains on and off with a micro
« Reply #4 on: October 09, 2012, 05:48:24 pm »
Optically isolated triac, basically a replacement for a relay that does not have contact troubles, does not wear and is reliable and lasts well.
 

Offline krish2487

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: dk
Re: swiching mains on and off with a micro
« Reply #5 on: October 09, 2012, 06:09:20 pm »
Might be something of interest to the OP

http://www.electronics-lab.com/projects/misc/005/

unless you are using a unusually large inductive load, switching rapidly should not be an issue.

solid state relays  are essentially the same, as mentioned by seanB, but integrated onto a single die.

PS: you should scale up the BT136 according to your current requirements.
« Last Edit: October 09, 2012, 06:11:10 pm by krish2487 »
If god made us in his image,
and we are this stupid
then....
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 18900
  • Country: nl
    • NCT Developments
Re: swiching mains on and off with a micro
« Reply #6 on: October 09, 2012, 06:49:39 pm »
Optically isolated triac, basically a replacement for a relay that does not have contact troubles, does not wear and is reliable and lasts well.
Did you ever try to design a triac in a circuit? Power dissipation and transient suppression are a real PITA. A relay really is much cheaper and more reliable than a triac.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15338
  • Country: za
Re: swiching mains on and off with a micro
« Reply #7 on: October 09, 2012, 07:23:29 pm »
That is why I like the puck shaped devices. All done for you, all you need is to connect and add an optional snubber and VDR. Have had one running a light to wake me for 25 years now, the first one was a pull from a copier, and did 15 years with no suppression before it went leaky. New one is a 25A unit with built in snubber.
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 2054
  • Country: us
Re: swiching mains on and off with a micro
« Reply #8 on: October 09, 2012, 08:13:36 pm »
I've seen plenty of triacs fail, but they are the right solution for a light sequencer.  Relays can switch reasonably fast, but I expect a light sequencer can burn through the rated cycles of typical mains relay pretty fast.
 

Offline ColinB

  • Contributor
  • Posts: 23
Re: swiching mains on and off with a micro
« Reply #9 on: October 09, 2012, 08:36:39 pm »
Did you ever try to design a triac in a circuit? Power dissipation and transient suppression are a real PITA. A relay really is much cheaper and more reliable than a triac.
I'm curious why a TRIAC is more likely to fail than other solid state switch solutions? (e.g., MOSFET or IGBT solutions, what other solid state switches are available?)

If transients and issues with spurious triggers are an issue, can't you use two back-to-back thyristors (SCRs) instead of a single TRIAC to get a more robust solution?  I recall reading about this somewhere.  You shouldn't need a snubber when the load is incandescent lighting (nominally non-inductive), right?
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: swiching mains on and off with a micro
« Reply #10 on: October 09, 2012, 09:36:08 pm »
Plenty of solutions for DIY switching of Christmas lights over at the DIYC forums.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 18900
  • Country: nl
    • NCT Developments
Re: swiching mains on and off with a micro
« Reply #11 on: October 09, 2012, 10:47:06 pm »
Did you ever try to design a triac in a circuit? Power dissipation and transient suppression are a real PITA. A relay really is much cheaper and more reliable than a triac.
I'm curious why a TRIAC is more likely to fail than other solid state switch solutions? (e.g., MOSFET or IGBT solutions, what other solid state switches are available?)

If transients and issues with spurious triggers are an issue, can't you use two back-to-back thyristors (SCRs) instead of a single TRIAC to get a more robust solution?  I recall reading about this somewhere.  You shouldn't need a snubber when the load is incandescent lighting (nominally non-inductive), right?
First of all there is about 0.5V to 1V across a triac. At 10 Amps that makes 5W to 10W of power dissipation. Heat reduces the life of every semiconductor so you'll need a heatsink. Secondly there are a lot of spikes reaching several kV on the mains. These spikes need to be kept away from the triac which requires filtering and snubbers. And even then a triac will be a whole lot more susceptible to the effects of lightning.

And a relay really is reliable. In SeanB's example: switching on/off every day for 15 years stands for less than 5500 operations. Take a look at this relay which costs €0,72 (yes that is 72 euro cents):
http://www.farnell.com/datasheets/1318173.pdf
Minimum lifetime is 90.000 operations when swithing a 15A inductive load. That should keep SeanB awake for 240 years!
« Last Edit: October 09, 2012, 10:50:55 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline ColinB

  • Contributor
  • Posts: 23
Re: swiching mains on and off with a micro
« Reply #12 on: October 09, 2012, 11:13:49 pm »
And a relay really is reliable. In SeanB's example: switching on/off every day for 15 years stands for less than 5500 operations.
The OP isn't asking about switching on and off once a day.  From the original post:

Project is a light sequencer so manically relays are out because wont switch fast enough

In a light sequencer we may be switching more frequently than once per second.  That means your relay might wear out in a day or two.  Not really acceptable.

(But, I did make a light sequencer of my own when I was a kid, using relays to animate some strings of Christmas lights on the roof.  I accidentally let the magic smoke out of my 386 PC that was controlling the pattern though, so the relays didn't have a chance to wear out.)
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: swiching mains on and off with a micro
« Reply #13 on: October 10, 2012, 12:11:57 am »
Using mechanical relays for rapidly switching lights is just nuts in the age of TRIACs.

Some more info about the load will help people steer you in the right direction.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15338
  • Country: za
Re: swiching mains on and off with a micro
« Reply #14 on: October 10, 2012, 04:44:06 am »
I have had relays doing 2 times a second switching. That did 30 years before failing mechanically. Replaced with another, which has done around 5 million cycles so far. A SSR would be better, but I need to put 3 in the space that will only fit one, and the motor it drives will kill the SSR's fast. Added RC snubbers using 2kV foil capacitors and 1W resistors to help contact life. Class X capacitors were too low rated to survive.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 7513
  • Country: nz
Re: swiching mains on and off with a micro
« Reply #15 on: October 10, 2012, 05:22:30 am »
I have had relays doing 2 times a second switching. That did 30 years before failing mechanically.

wow, that's pretty awesome.

Was it like a milspec relay with a ball bearing on each side of the swing arm?
« Last Edit: October 10, 2012, 05:24:34 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 670
  • Country: us
Re: swiching mains on and off with a micro
« Reply #16 on: October 10, 2012, 11:43:32 am »
Looks like you are switching about 3000 watts worth of an inductive load. Triacs can do that just fine but you will need some heat sinks to keep the parts cool.  I would target 4000 watts minimum for the design to give yourself plenty of room. Make sure to optically isolate the design and put some noise filtering on all the wiring so the switching noise doesn't turn the wires into radio broadcast antennas.


 

Offline Codemonkey

  • Regular Contributor
  • *
  • Posts: 223
  • Country: gb
Re: swiching mains on and off with a micro
« Reply #17 on: October 10, 2012, 01:26:39 pm »
For those sugesting using relays, if this thing is controlling tungsten halogen / filament lamps, the inrush current on 13A's worth of those is going to be significant! Doubt relays big enough would be able to switch that fast anyway, you're looking at contactors.

If you do go down the triac route, you might also want to look into zero point crossing detection and switch as close to that point as possible to reduce the inrush current to the lamps.
 

Offline funfairEE

  • Contributor
  • Posts: 20
Re: swiching mains on and off with a micro
« Reply #18 on: October 10, 2012, 01:51:16 pm »
Some more info about the load will help people steer you in the right direction.

The lode in this case is large strings of 10W incandescent lights, 60v but wired in groups of 4 to give the 240v. No more than 13amps lode on each channel.
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 3616
  • Country: gb
  • Electron Fiddler, FPGA Hacker, Embedded Systems EE
Re: swiching mains on and off with a micro
« Reply #19 on: October 10, 2012, 02:48:03 pm »
I've often wondered:
Could you full wave rectify AC then switch it using a FET?

No need to generate DC, feed the bulbs with full-wave AC. Also allows for (in theory) "infinite dimming" as the FETs can be completely switched on or off.

Only major problem (I can think of) is high voltage high current FETs are expensive, so maybe that's why it's not used in practice...
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15338
  • Country: za
Re: swiching mains on and off with a micro
« Reply #20 on: October 10, 2012, 03:25:50 pm »
Psi, they were Brown Boveri industrial contactors, that have a 16A inductive load switching capacity, or 1HP of motor. They were driving a take up spool which uses a 3 phase motor with no DC brake. I want to upgrade at some point with a inverter, but will need  to interconnect it to the other inverter and add a brake chopper, along with using a 2.2 kW inverter to get the drive braking fast enough and not have the inverter complain.

Failure mode is the core itself physically spreading from impact flow and jamming against the housing. That takes a long time to flow a laminated steel core by the clearance of the housing, which is about 2mm each side.
 

Offline ColinB

  • Contributor
  • Posts: 23
Re: swiching mains on and off with a micro
« Reply #21 on: October 10, 2012, 07:30:35 pm »
I've often wondered:
Could you full wave rectify AC then switch it using a FET?

No need to generate DC, feed the bulbs with full-wave AC. Also allows for (in theory) "infinite dimming" as the FETs can be completely switched on or off.

Only major problem (I can think of) is high voltage high current FETs are expensive, so maybe that's why it's not used in practice...

An IGBT might be slightly more suitable.  For a 13 A, 240 V load, a quick check on Digi-Key for (a) MOSFETs and (b) IGBTs shows that appropriate IGBTs are both less expensive and be more efficient than a MOSFET.  (Compare P_MOSFET = ID^2 * Rds(on) with P_IGBT = ID * VCE(sat) and you'll find that MOSFETs are more efficient for low voltages and low currents, but at a certain point the IGBTs surpass them in efficiency and in cost.)
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 670
  • Country: us
Re: swiching mains on and off with a micro
« Reply #22 on: October 10, 2012, 09:00:20 pm »
One other thing to keep in mind with controlling lighting, the load changes as the lamps heat up.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf