RS232-controlled 12V Relay circuit

Thread Starter

bil_hendrix

Joined Apr 4, 2007
4
Hi forum,

I'm new (to aac in particular, and ee in general), so have mercy.

I need to be able to remotely (as in, from another city, not from across the room) toggle power to one of the internal 12V lines (i.e., molex power cables) supplied by the PSU in my PC. USB control of the line would be preferred, but I'd be happy with RS-232 for starters (and I have no parallel port on the PC).

Googling turned up these similar projects:

http://schmail.com/dslmon/

http://www.windmeadow.com/node/4

Attached is the circuit I worked out, based upon the 2 schematics above.

Parts list:
Reed Relay SPST 12VDC 0.5A @ 125VAC (Radio Shack #275-233)
Rectifier Diode 1N4004 (Radio Shack #276-1103)
NPN Switching Transistor 2N2222 (Radio Shack #276-1617)
4.7k-Ohm Resistor (Radio Shack #271-1330)

I'm controlling the DTR pin with a C prog. When I set it high, I get +10V out of the pin, otherwise (pin set low), -11V. What should I see going into the relay? My concern is that I don't have enough juice going to the coil to trigger the switch, but I'm not even sure I have my relay wired properly.

And if there is a better way to do this, I'm all ears! Unless it is some OTS gizmo that sets me back serious coin. This _should_ be a simple gadget, so I prefer the DIY way.

tia,

bill
 

Attachments

thingmaker3

Joined May 16, 2005
5,083
Mercy? You want MERCY? Mercy if for pathetic LOOSERS! I will RIP OUT YOURrjtop &^ cs1 t+o 0p98............

Sorry. My evil twin, Skippy, got out of his straight jacket somehow. We don't talk about Skippy. :cool:

Welcome to A.A.C.

You've got about 2 milliamp of base current on your switching transistor. With that base current, the current gain of the 2N2222 runs about 50 or so depending on manufacturer. Is 100mA enough to energise your coil? If not, try a base resistor a couple orders of magnitude smaller. Keep the base current no more than 160mA.

A good idea would be to limit the emitter-base voltage to around 5V. You can do this with a voltage divider. http://www.allaboutcircuits.com/vol_1/chpt_6/1.html is a good tutorial on voltage dividers, if such is needed.
 

Thread Starter

bil_hendrix

Joined Apr 4, 2007
4
thinkmaker3,
Is energizing the coil what is meant by the "Nominal current" of the relay? If so, then all I need is 11mA, based upon what's printed on the back of the package. I also derived that value from Nominal Coil Voltage (12 VDC) / Coil resistance (1050 Ω).

Tube Tech,
nice link! couldn't find any circuits better than the two I borrowed, though. but i did score some good ideas for later...

nomurphy,
Thanks for the diagram. Could you explain why I need a FET instead of an NPN?

In any case, I did get the circuit working, after disassembling and reassembling it. I have not (yet) changed my circuit. Write it off to PEBCAC (Problem Exists Between Circuit And Chair). However, I still want to be sure that I don't fry anything in my PC...

I also realized a basic flaw in my circuit: I want to have the circuit that is being controlled to be normally connected (that is, power is getting to my molex-connected device, by default, and is only interrupted when I set high the DTR pin). I guess I need a Form B (normally closed) relay. I've found two 12 VDC reed relays that seem fit the bill:

from mouser:
datasheet: http://www.mouser.com/catalog/629/1426.pdf
p/n: 655-JWD-171-14 (w/o suppression diode)
p/n: 655-JWD-171-19 (w/suppression diode)
Coil Res. 1200 Ω

from digikey:
datasheet: http://dkc3.digikey.com/PDF/T071/P1730.pdf
p/n: Z617-ND
Coil Res. 450 Ω

Should I go for the mouser once, since its coil res. is closer to my original spec?

One other question: I read that reed relay input power should have less than 5% ripple. Do I need to be concerned about this, using my PC PSU 12 VDC?
make: Ablecom
model:pWS-0053
http://www.supermicro.com/manuals/matrices/PowerSupplyMatrix.pdf

Thanks all for you help.

bill
 

thingmaker3

Joined May 16, 2005
5,083
If it were me, I'd go with the 655-JWD-171-19. Closer to spec, cheaper than the DigiKey part, and two less solder junctions.

Your ATX power supply will have far less than 5% ripple - closer to half a percent.
 

Thread Starter

bil_hendrix

Joined Apr 4, 2007
4
Thanks, thingmaker3.

Before I get it, let me ask this: I found this 12VDC SPDT micro relay at Radioshack:

Model: 275-241
Coil Voltage: 12VDC
Coil Resistance: 320 Ω
Nominal Current: 37.5mA
Contact Rating: 1A @ 125VAC/24VDC

http://www.radioshack.com/product/index.jsp?productId=2062481&cp

I found a wiring diagram from the back of the package at this guy's website:
http://www.yorkspace.com/2006/02/36

I'd rather use it, if I could, since I could pop over and have it same-day. But I know less about micro relays than I do about reed relays (i.e., googling "micro relay" didn't turn up jack). Would using a micro relay require any other changes to my circuit? The diff in nominal current (37.5mA vs 11mA) is negligible in my case, isn't it? Would I wire the N.O. lead to ground, or just leave it (assuming the N.C. lead is wired to the molex connector)?

Thanks for your input!

bill
 

thingmaker3

Joined May 16, 2005
5,083
The RadioSchmuck relay should work for you. (I am heavily biased against RadioSchmuck, but I have the luxury of multiple parts sources.)

Leave the unused relay contact with no connection. If you connect it to ground, you'll short out your power supply.
 

Thread Starter

bil_hendrix

Joined Apr 4, 2007
4
thingmaker3,

Ok, I got the micro relay (yes, at RadioShack: the 7-11 of parts sources :D ). I swapped it in for the reed relay, and yep, works like a champ. Plus, I get the satisfying (to me, probably annoying to others) audible "click" when the circuit is being opened/closed, w00t! One thing about it, the leads on it are teeny. Can I pop it in some sort of chip holder, and solder that instead? I didn't see any at RS that looked compatible.

Also, I added a blinking LED to tell me when DTR is high (i.e, when I'm trying to 'reboot' the device connected to the molex-circuit), and another LED to tell me when the molex-circuit is closed. Can you take a gander at my updated schematic, and tell me if I effed anything up?

When you look at it, note that I don't have a clue how to correctly draw a relay in a circuit, so I just tried to make the connections to it 'literal', as they pertain how I've actually wired it up. In other words, I don't quite get this relay diagram:

http://www.kpsec.freeuk.com/images/diopro.gif

muchas thanks!

-bill
 

Attachments

Top