Author Topic: Relay on Mains  (Read 10251 times)

0 Members and 1 Guest are viewing this topic.

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Relay on Mains
« on: March 20, 2014, 08:38:08 pm »
So I'm building a device that uses a triac to cut mains power to another device at a certain point in the AC waveform (using a 393 to measure both voltage and dv/dt (via a differentiator)). Isolation is a big concern, and I haven't done mains voltage sensing before, so I'd like some feedback to make sure I'm handling this right:





Also, what are the pros and cons of triac vs. relay for an application like this? Current through the device under test would be up to 15A
« Last Edit: March 21, 2014, 04:24:50 am by Phaedrus »
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21681
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Triac on mains
« Reply #1 on: March 20, 2014, 08:46:58 pm »
Eww, that opto is toast.

You can't "cut power" with a thyristor, only turn it on (and hope it turns off later in the cycle).  You want the opto wired in parallel with the TRIAC (MT2 to G), not opposite it.  Also, it has to be a phototriac type (e.g. MOC301x).

The voltage sense is fine.  That technique is called using a potential transformer; purpose-made devices usually have much better specs than a little power transformer, in order to get very tight tolerances on the measurement, but it'll still work.
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Triac on mains
« Reply #2 on: March 20, 2014, 08:47:48 pm »
Forgive my lack of knowledge, but what's a 393?

The simplest way to measure voltage and dV/dt would be to use a resistive divider and tap off a suitably scaled voltage for the sensor or A/D converter.

Isolation depends on the details of the system. If you can put the whole system inside a sealed enclosure that the mains cable passes through, then you don't need electrical isolation. The enclosure will provide that for you. You could use a simple non-isolated power supply for the low voltage electronics contained within the same enclosure.

If you need to get signals to/from the outside world, then I imagine an opto-coupler would be ideal, but then of course the external side of the signal path would need a separated and isolated power supply.

(Note: if there was a picture attached to the original post I cannot see it. Perhaps blocked by local net filter here?)
 

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Triac on mains
« Reply #3 on: March 20, 2014, 08:59:41 pm »
@IanB

LM393 is a dual channel voltage comparator. I did attach a schematic, guess you can't see it. I'll be using channel 1 to compare mains voltage (drawn through transformer and resistive divider) vs. output of an LM431 reference voltage, and using channel 2 to compare differential of mains voltage vs. GND. Both outputs will be latched and they should both switch just a few ms after the waveform peaks. The outputs will be ANDed. I use two measurements to protect against transients. Upon detecting mains peak, I want the circuit to cut mains voltage to the device under test, and send a trigger signal to an oscilloscope.

@T3sl4co1l

Thanks for the feedback. Can you do a quick sketch of what you mean, regarding the triac and opto? Having trouble picturing it.
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Online David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Triac on mains
« Reply #4 on: March 20, 2014, 09:06:45 pm »
Check out the data sheets and app notes for the MOC30xx series of TRIAC output optos.  That will show how they interface with the TRIAC, supply and load.
 

Online Monkeh

  • Super Contributor
  • ***
  • Posts: 7992
  • Country: gb
Re: Triac on mains
« Reply #5 on: March 20, 2014, 09:06:57 pm »
I suspect a datasheet speaks a thousand (or more) words: https://www.fairchildsemi.com/ds/MO/MOC3031M.pdf?
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Triac on mains
« Reply #6 on: March 20, 2014, 09:23:56 pm »
@IanB

LM393 is a dual channel voltage comparator.

Ah, LM393, I see. Just "393" wasn't very clear.

Quote
Upon detecting mains peak, I want the circuit to cut mains voltage to the device under test, and send a trigger signal to an oscilloscope.

As others are mentioning, a TRIAC cannot interrupt or break the current the current in the circuit, it can only enable it. It is like a switch that can only turn on, but not turn off.
 

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Triac on mains
« Reply #7 on: March 20, 2014, 09:34:37 pm »
Reading around, it seems like both relays and triacs have serious drawbacks when it comes to quickly switching AC power, at least when it comes to my application. Although I'm confident when it comes to the low voltage analog stuff, I'm not sure what the best course of action is for switching the mains.
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Triac on mains
« Reply #8 on: March 20, 2014, 09:37:48 pm »
Reading around, it seems like both relays and triacs have serious drawbacks when it comes to quickly switching AC power, at least when it comes to my application. Although I'm confident when it comes to the low voltage analog stuff, I'm not sure what the best course of action is for switching the mains.

You need to use the kind of devices used for variable frequency motor drive systems. To my knowledge possibilities include MOSFETs, gate turn-off thyristors (GTOs) or IGBTs.
 

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Triac on mains
« Reply #9 on: March 20, 2014, 09:46:45 pm »
That'd take a monster FET.

Something like this, I think?
http://www.fairchildsemi.com/ds/FD/FDPF2710T.pdf

And it would have to be heatsinked. Not impossible for me to do, but damn.
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21681
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Triac on mains
« Reply #10 on: March 20, 2014, 10:34:15 pm »
What are you doing that requires sub-10ms power control?
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Triac on mains
« Reply #11 on: March 20, 2014, 10:35:56 pm »
At a guess it might be something to do with power factor correction on the input side of a switching power supply?
 

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Triac on mains
« Reply #12 on: March 20, 2014, 10:45:22 pm »
What are you doing that requires sub-10ms power control?

I need to measure hold-up time for ATX power supplies. This is the time that the PSU maintains voltage in-spec after AC power is removed. However, the duration of this time varies depending on the point in the AC waveform at which power is lost. So the industry standard way to do it is to cut power at the positive peak of the AC waveform, for consistency and comparability between tests and between labs. Normally this is done by using an AC source with cycle-by-cycle modulation, like the Chroma 61500 series. An oscilloscope is used to monitor both the AC waveform and the PSU's +12VDC output, and measure the time between loss of AC power and loss of DC output.

However, many companies can't or won't shell out $20k+ for an AC power source, and so can't perform this test in a reliable and consistent way.

I want to make a sub-$100 solution that will, at the push of a button, perform the following functions:
1. Detect when the AC waveform peaks (at 170V)
2. Cut power to the device under test within 1ms of this happening
3. Send a trigger signal to an oscilloscope
4. Do all of this with minimal risk of fire or electrocution

And when power is not cut it needs to be able to carry up to 20A@120VAC to the device under test.
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Triac on mains
« Reply #13 on: March 20, 2014, 11:02:04 pm »
If you rectify the mains, you could then use an IGBT to switch on/off your DUT. There would be no difference to the hold-up time as the front-end of your DUT is also a rectifier.

Suitable IGBT: IRG4PC40UDPBF, drive it using a discrete circuit or the excellent IRS21867 or isolated FOD3182.



https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Triac on mains
« Reply #14 on: March 20, 2014, 11:09:26 pm »
There'd be a couple volts loss due to the diode drop, but maybe not enough to effect it. That's an idea.
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Triac on mains
« Reply #15 on: March 20, 2014, 11:24:22 pm »
Put a variac on the front end to compensate and/or get your voltage cock-on.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
Re: Triac on mains
« Reply #16 on: March 21, 2014, 04:11:48 am »
Don't forget that you have to rectify 15-20 amps worth. And it still seems like it could affect the test results, especially if it's still connected when you test efficiency or power factor. Active PFC inputs will behave quite differently and you can't completely rule out the possibility that a supply might be harmed or destroyed when fed DC.

As a general principle, it seems like test gear should not feed DUTs something considerably different from normal operation. But maybe the tradeoff is worth it.
 

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Triac on mains
« Reply #17 on: March 21, 2014, 04:24:34 am »
I've decided that feeding the PSU DC is probably not going to be a fair test, certainly not directly comparable to other test setups. So an IGBT is out. I've looked at GTO Thyristors, but they look to start at $200 and go up from there. So yeah no.

I think a relay will be the best way to do it. I think I've got this hooked up right--



A3 is rectified mains dropped down to 10-20V or so. I may be able to drive the relay directly from the optocoupler, but in case I can't I drew it with an extra driver stage.




Going to work on the analog circuitry now, unless I did something bonehead with that relay. I figure when I build it I'll do a prototype with dead bug HV and Veroboard analog just to try it out. At this low frequency the parasitics shouldn't matter much. If I get promising results I'll go to PCB.
« Last Edit: March 21, 2014, 04:28:31 am by Phaedrus »
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Relay on Mains
« Reply #18 on: March 21, 2014, 04:30:09 am »
The resistive divider for the mains sensing will be in the range of several dozen k, is that high enough impedance to need a voltage follower before the LM393?
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Relay on Mains
« Reply #19 on: March 21, 2014, 05:31:21 am »
I love schematics than run from right to left.
Makes life so much more interesting.
Don't ask a question if you aren't willing to listen to the answer.
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3383
  • Country: us
Re: Triac on mains
« Reply #20 on: March 21, 2014, 05:45:10 am »
I've decided that feeding the PSU DC is probably not going to be a fair test, certainly not directly comparable to other test setups. So an IGBT is out. I've looked at GTO Thyristors, but they look to start at $200 and go up from there. So yeah no.

I think a relay will be the best way to do it.

You can wrap an IGBT (or giant MOSFET) in a bridge rectifier to switch AC.

I don't see how you'll be able to get consistent timing with a relay.  It will arc when you open it, and who knows when it will extinguish.

 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21681
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Relay on Mains
« Reply #21 on: March 21, 2014, 07:15:23 am »
Beware that the IGBT has to switch surge current into a supply capacitor; peak current will likely be limited by line impedance and could be 500A easily.
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Triac on mains
« Reply #22 on: March 21, 2014, 08:33:25 am »
Two concerns here
1) I might be mistaken but I think your requirement:
Cut power to the device under test within 1ms of this happening 
is not going to be realized with a relay which is mechanical and does NOT have a 100% reliable repeatable switch on/off time, nor takes <1ms to disengage.

2) If you are going to switch 16 Amps with a relay you better create some snubber or MOV's around the contacts to counter arcing.
 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
Re: Relay on Mains
« Reply #23 on: March 21, 2014, 12:47:12 pm »
Instead of trying to control the timing to within 1ms, perhaps simply measure the timing you got after the fact. Worst case it means you can keep trying until you get it right at the peak. Best case you can do some verification about how far off you can be without affecting the holdup test, and maybe don't need to compensate.
 

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Relay on Mains
« Reply #24 on: March 21, 2014, 04:18:22 pm »
@gxti
Maybe, but it would be nice to get it working as originally intended. Not ready to give up yet.



Couldn't I put an N-channel and P-channel mosfet in series? This should block in both directions.
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Offline commongrounder

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: us
Re: Relay on Mains
« Reply #25 on: March 21, 2014, 04:35:06 pm »
What about a Solid State Relay?  The ones I've seen will switch on or off in less than a half-cycle.  This would be repeatable, which should allow you to compensate for the timing, and do your hold-up calculation.  Here is a typical unit rated at 25 amps:
http://www.opto22.com/site/pr_details.aspx?cid=3&item=120A25
 

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Relay on Mains
« Reply #26 on: March 21, 2014, 04:59:06 pm »
Ooooh. And isolation built in. I'll look into this one.
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3383
  • Country: us
Re: Relay on Mains
« Reply #27 on: March 21, 2014, 05:13:48 pm »
What about a Solid State Relay?  The ones I've seen will switch on or off in less than a half-cycle.  This would be repeatable, which should allow you to compensate for the timing, and do your hold-up calculation.  Here is a typical unit rated at 25 amps:
http://www.opto22.com/site/pr_details.aspx?cid=3&item=120A25

Turn-off Time: ½ cycle maximum

And it has a built-in snubber  >:(
 

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Relay on Mains
« Reply #28 on: March 21, 2014, 05:23:21 pm »
What about a Solid State Relay?  The ones I've seen will switch on or off in less than a half-cycle.  This would be repeatable, which should allow you to compensate for the timing, and do your hold-up calculation.  Here is a typical unit rated at 25 amps:
http://www.opto22.com/site/pr_details.aspx?cid=3&item=120A25

Turn-off Time: ½ cycle maximum

And it has a built-in snubber  >:(

What's wrong with a built-in snubber?
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21681
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Relay on Mains
« Reply #29 on: March 21, 2014, 07:10:34 pm »
No need for complements, you can use a pair of N channel MOSFETs (or IGBTs), source-to-source (or emitter) from a single isolated gate driver.  In the case of IGBTs, they must be co-pack (antiparallel diode) types.

Peak current and turn-off surges (snubbing) still apply.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3383
  • Country: us
Re: Relay on Mains
« Reply #30 on: March 21, 2014, 07:43:05 pm »
What's wrong with a built-in snubber?

It makes the turn-off time more uncertain.
 

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Relay on Mains
« Reply #31 on: March 21, 2014, 08:20:38 pm »
Hm.

Main contenders at the moment are:

SSR
Dual MOSFET
Dual IGBT

I wonder if Dave might have any feedback?
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3383
  • Country: us
Re: Relay on Mains
« Reply #32 on: March 21, 2014, 08:27:18 pm »
Hm.

Main contenders at the moment are:

SSR
Dual MOSFET
Dual IGBT

I wonder if Dave might have any feedback?

You don't need a dual MOSFET or dual IGBT, you can use a single part in a bridge (actually this can be simplified since you only have to switch one polarity, but it doesn't really matter).

An SSR is out since you don't know what's inside and can't control the turnoff accurately enough.

I don't see any advantage to IGBT over MOSFET for this application.

Conclusion: use an FCH25N60N inside a bridge...
« Last Edit: March 21, 2014, 08:29:08 pm by edavid »
 

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Relay on Mains
« Reply #33 on: March 21, 2014, 08:33:31 pm »
I want to avoid using a bridge, as A. it might interfere with the PFC circuitry on some of the more advanced supplies (though a simple boost would probably be fine), B. I'm not sure how this would effect the PSU's conductive EMI and how that might interfere with my circuit, and C. the voltage drop might throw off the results.

Using two MOSFETs in series base-to-base seems like a much better solution than a MOSFET behind a bridge. There will still be a bit of voltage drop, but at least I'm still feeding the PSU AC, which will avoid any potential EMI and PFC issues.
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3383
  • Country: us
Re: Relay on Mains
« Reply #34 on: March 21, 2014, 11:29:32 pm »
I want to avoid using a bridge, as A. it might interfere with the PFC circuitry on some of the more advanced supplies (though a simple boost would probably be fine), B. I'm not sure how this would effect the PSU's conductive EMI and how that might interfere with my circuit, and C. the voltage drop might throw off the results.

Using two MOSFETs in series base-to-base seems like a much better solution than a MOSFET behind a bridge. There will still be a bit of voltage drop, but at least I'm still feeding the PSU AC, which will avoid any potential EMI and PFC issues.

You misunderstand the bridge approach... the power supply sees AC and the switch sees DC.

If you need to control the PSU input voltage, you're going to need a variac anyway.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Relay on Mains
« Reply #35 on: March 22, 2014, 12:25:17 am »
See schematic:



The switching element could be a MOSFET or an IGBT.
 

Offline PhaedrusTopic starter

  • Frequent Contributor
  • **
  • Posts: 714
  • Country: us
Re: Relay on Mains
« Reply #36 on: March 22, 2014, 01:02:20 am »
OH. I feel like an idiot now. I thought you meant rectify the mains input to the PSU itself. Ok, yeah, that should work.
"More quotes have been misattributed to Albert Einstein than to any other famous person."
- Albert Einstein
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Triac on mains
« Reply #37 on: March 22, 2014, 01:02:31 am »
Reading around, it seems like both relays and triacs have serious drawbacks when it comes to quickly switching AC power, at least when it comes to my application. Although I'm confident when it comes to the low voltage analog stuff, I'm not sure what the best course of action is for switching the mains.

How about this arrangements ? Both relays driving circuit can be easily build since its isolated and low volt DC, also the driving signals can be adjusted for both to fire at the desired interval (T-Off).

The signals can be generated from a simple logic + 555 circuit or from microcontroller.




« Last Edit: March 22, 2014, 01:10:15 am by BravoV »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf