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

Tom Metro tmetro+hhacking at gmail.com
Fri Nov 9 22:03:49 EST 2012


Nuno Sucena Almeida wrote:
> ...I feel that the opto-coupler solution would be simpler...

Would you believe You-Do-It Electronics stocks zero reed relays? They
have a whole shelf of relays, but no reed type, never mind TTL
compatible reed relays.

Heck, even Radio Shack stocks one:
http://www.radioshack.com/product/index.jsp?productId=2062478

though the coil resistance is half, and thus the current requirements
are twice what the NTE part was.


With a $10 Y-D-I coupon burning a hole in my pocket (they are the only
store I know of that gives coupons for money off with no minimum
purchase), I ended up picking one of the 4 optocouplers they happened to
have on hand.

Of the ones NTE distributes:
http://www.nteinc.com/Web_pgs/phototransistor.php?a=8

I would have gone with a Darlington, like to 3083, or the low LED drive
current (1 mA) 3096, as either would minimize LED drive current, but
neither were stocked. The Darlington they did have, 3044, shows a
collector dark current (leakage?) of 1 mA, which seems rather high,
given that all the others are 100 nA or less.

I ended up going with the 3042, which has a max 50 nA dark current. The
20% minimum current transfer ratio seems troubling. That would mean with
10 mA going through the LED, I could see as little as 2 mA going through
the output transistor. That could be a problem, particularly if I drive
the LED with only 2 mA. I'm assuming that current ratio applies over the
liner operating range, and not when the transistor is saturated, but it
doesn't look like there is enough info in the data sheet to tell where
the transistor saturates.

The optocoupler does bring the base out to a pin, so you can add some
bias, presumably at the expense of increased dark current. I could also
drive a second transistor in a Darlington arrangement. But either of
those options just mean more fabrication and fiddling.

 -Tom



More information about the Hardwarehacking mailing list