[HH] cheapest/simplest way to control a relay from a PC

Tom Metro tmetro+hhacking at gmail.com
Tue Nov 13 13:49:06 EST 2012


Greg London wrote:
>>> Powerswitch Tail - $25
>>> https://www.adafruit.com/products/268
> 
> My concern would be that it's actually an SCR internally,

We're talking AC control, so actually a TRIAC, which is modeled as two
SCRs in parallel, each with opposite polarity.


> which doesn't work with DC.

SCRs work beautifully with DC, as long as you don't need them to turn
off while under load. :-)


> SCR's are (were?) commonly used for switching AC stuff (dimmers and
> motors and so on)...

A single SCR was rarely used for AC control except on really cheap
circuits as it rectifies the power, so if you used it as a dimmer, even
when fully on your light would still be at half power.

I believe SCRs were sometimes used in high power motor controls, but
they use multiple SCRs were configured like a TRIAC. Multiple discrete
parts accommodated greater power dissipation.


> Fuzzy SCR lesson follows for those interested:

Good summary, except...

> on until the voltage you're controlling goes negative.

Technically I think it turns off when the current is 0 A.


> I think true solid state relays are more expensive.

They are, but they command a premium mostly for the convenience factor.
A solid state relay usually combines the two obvious components - an
optocoupler and power TRIAC (if an AC SSR) - with some additional
discrete components, like EMF snubbers (filters made from caps and
resistors to suppress the switching noise), a series resistor for the
optocoupler's LED, and other things you'd typically find in a "best
practices" optocoupler driven TRIAC circuit. (Also common is to use a
circuit that only switches on the TRIAC at the zero crossing of the AC
waveform to minimize switching noise. But you can get this integrated
into optocouplers.)

All that stuck into a single package sealed in epoxy and with a
guaranteed power and isolation rating from the manufacturer. It makes it
easy for someone with electrician-level knowledge of relays to use a
solid state substitute for a mechanical relay.


> ...it might be that solid state relays have gotten cheaper
> than when I worked with them.

I believe they still carry a premium, and if you are building a high
volume product and already have other discrete power components in your
design, building the relay circuit from discretes will be cheaper.

When I said that they used a solid state relay, I didn't mean they used
an actual SSR module. That, we can only speculate on. But we can infer
from the product description, which says that it is intended for running
resistive loads, and the current rating should be derated for inductive
loads, that they are using a TRIAC, rather than a mechanical relay for
the power switching. Thus, they're using a solid state relay, or the
equivalent circuitry.


> If it is a true solid state relay, then the only other concern
> might be if it has issues when working with 5 volts at something
> like 5 milliamps for the LED. That's a lot lower voltage than 120,
> and a lot smaller current than most 120v AC devices.

Yeah, I would never attempt controlling an IR emitter with a device like
this.


> ...that would mean that prices for solid
> state relays working at 120v and 10amps or so have dropped
> considerably since I did anything with them.

Granted this is a surplus supplier, but they have a new 50A "hockey
puck" style SSR selling for $25:
http://www.allelectronics.com/make-a-store/category/500500/Relays/Solid-State/1.html

A used 45A selling for $12. They don't have any at the moment, but the
10A relays probably sell for $10 or less.

However, if you go to Digikey and look at new, name brand stuff, the
prices are up in the $25 to $40 range for a relay meeting these specs.

They could be making this with a carefully sourced SSR (no doubt there
is a Chinese supplier making these for $10), but more likely they're
using discrete components, which probably has a component cost around $5.

 -Tom




More information about the Hardwarehacking mailing list