swiching mains on and off with a micro - Page 1
Forum section: electronics / general

author: funfairEE
author_rank: Contributor
timestamp: October 09, 2012, 03:35:44 pm
content: 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.

author: SeanB
author_rank: Super Contributor
timestamp: October 09, 2012, 03:58:32 pm
content: 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.

author: ColinB
author_rank: Contributor
timestamp: October 09, 2012, 04:41:46 pm
content: Quote from: SeanB on October 09, 2012, 03:58:32 pmWhat is this 'optoswitch', really? Is it based on a TRIAC or other thyristor device, a mechanical relay, or a MOSFET switching device?

author: nctnico
author_rank: Super Contributor
timestamp: October 09, 2012, 05:35:38 pm
content: Quote from: funfairEE on October 09, 2012, 03:35:44 pmSmall 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.

author: SeanB
author_rank: Super Contributor
timestamp: October 09, 2012, 05:48:24 pm
content: Optically isolated triac, basically a replacement for a relay that does not have contact troubles, does not wear and is reliable and lasts well.

author: krish2487
author_rank: Frequent Contributor
timestamp: October 09, 2012, 06:09:20 pm
content: Might be something of interest to the OPhttp://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.

author: nctnico
author_rank: Super Contributor
timestamp: October 09, 2012, 06:49:39 pm
content: Quote from: SeanB on October 09, 2012, 05:48:24 pmDid 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.

author: SeanB
author_rank: Super Contributor
timestamp: October 09, 2012, 07:23:29 pm
content: 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.

author: ejeffrey
author_rank: Super Contributor
timestamp: October 09, 2012, 08:13:36 pm
content: 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.

author: ColinB
author_rank: Contributor
timestamp: October 09, 2012, 08:36:39 pm
content: Quote from: nctnico on October 09, 2012, 06:49:39 pmI'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?

author: David_AVD
author_rank: Super Contributor
timestamp: October 09, 2012, 09:36:08 pm
content: Plenty of solutions for DIY switching of Christmas lights over at theDIYCforums.

author: nctnico
author_rank: Super Contributor
timestamp: October 09, 2012, 10:47:06 pm
content: Quote from: ColinB on October 09, 2012, 08:36:39 pmFirst 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.pdfMinimum lifetime is 90.000 operations when swithing a 15A inductive load. That should keep SeanB awake for 240 years!

author: ColinB
author_rank: Contributor
timestamp: October 09, 2012, 11:13:49 pm
content: Quote from: nctnico on October 09, 2012, 10:47:06 pmThe 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 enoughIn 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.)

author: David_AVD
author_rank: Super Contributor
timestamp: October 10, 2012, 12:11:57 am
content: 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.

author: SeanB
author_rank: Super Contributor
timestamp: October 10, 2012, 04:44:06 am
content: 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.

author: Psi
author_rank: Super Contributor
timestamp: October 10, 2012, 05:22:30 am
content: Quote from: SeanB on October 10, 2012, 04:44:06 amwow, that's pretty awesome.Was it like a milspec relay with a ball bearing on each side of the swing arm?

author: ptricks
author_rank: Frequent Contributor
timestamp: October 10, 2012, 11:43:32 am
content: 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.

author: Codemonkey
author_rank: Regular Contributor
timestamp: October 10, 2012, 01:26:39 pm
content: 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.

author: funfairEE
author_rank: Contributor
timestamp: October 10, 2012, 01:51:16 pm
content: Quote from: David_AVD on October 10, 2012, 12:11:57 amThe 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.

author: tom66
author_rank: Super Contributor
timestamp: October 10, 2012, 02:48:03 pm
content: 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...

author: SeanB
author_rank: Super Contributor
timestamp: October 10, 2012, 03:25:50 pm
content: 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.

author: ColinB
author_rank: Contributor
timestamp: October 10, 2012, 07:30:35 pm
content: Quote from: tom66 on October 10, 2012, 02:48:03 pmAn 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.)

author: ptricks
author_rank: Frequent Contributor
timestamp: October 10, 2012, 09:00:20 pm
content: One other thing to keep in mind with controlling lighting, the load changes as the lamps heat up.