Mains Relay activated by 12V PC PSU Rail - Page 1
Forum section: electronics / beginners

author: Salad
author_rank: Newbie
timestamp: April 08, 2015, 11:42:10 am
content: Been dreaming up a small project to make life easier for myself, but it involves mains power so I thought it'd be best to check with people more experienced than I am first. Mains packs a hell of a bite after all.Input would be greatly appreciated!I use a large 90's stereo & speakers on my PC. This stereo is only used for audio from PC via a RCA connectors. I don't ever use the radio, CD, or any of those other functions on it. There's really no reason for it to be on when the PC isn't on. But because I'm lazy I just leave the thing on 24/7. I'd like to hook it up via a relay so that it automatically turns off when the PC turns off, and turns on when the PC is on. I'm in New Zealand where we have 230V mains, and the appliance says it uses 435W on the back.What I'm thinking:Use a plastic enclosed box for my circuitry, with a C14 connector as my mains input, and a female NZ plugpoint as the output for the appliance to plug into.Use the 12V PSU rail from my PC to activate/deactivate the relay. Some sort of connector fitted to a PCI bracket on the PC end, and another safe connector on my devices end.I'll use a standard relay rather than a solid-state one, so that heat isn't an issue. Latching noise isn't an issue because the stereo makes a latching noise when turned on anyway, doesn't bother me.The relay will be a DPST type. One side for each of the hot sides.Ground can be always connected, wired straight from the input to the output of my device.I'll need a relay capable of handling 230V, but will go with one rated for 300+V for the sake of safety.I'll need a relay capable of handling 2A, but will go with one rated for 5A+ again for safety.When connecting and testing the device I'll most probably use a couple of 12V DC batteries to ensure all the connections function as expected, before putting this on the mains.My questions are:Are mains voltages quoted in RMS or peak to peak values?Is it safe to have the mains ground wire always connected on both ends, not going through the relay?Is there anything else wrong with this plan?

author: Simon
author_rank: Unknown
timestamp: April 08, 2015, 11:47:26 am
content: The voltages are RMSYes just pass the earth wire through, no need to switch it.How much does the stereo really use versus the power of the relay. I've not delved much into solid state relays but I don't think your using more than 20W, you can piss the neighbours off through solid stone walls with 5W unless your a music nut with some silly system I doubt you need the ratings you think. I think those on the label are for fuse specs etc.

author: Salad
author_rank: Newbie
timestamp: April 08, 2015, 12:01:54 pm
content: Thanks for your input Simon.Any idea what would the peak to peak voltage be? Google doesn't come up with anything useful. I'm guessing I'd have to get a relay rated for the peak voltage rather than the RMS voltage? Plus a bit extra to accommodate surges and such.Just measured the amp with it turned on but no sound coming out, uses 28.4W according to the watt-meter. Will have to test it at max volume tomorrow as it's midnight and the neighbors would kill me. Will post again with those figures tomorrow.

author: madires
author_rank: Super Contributor
timestamp: April 08, 2015, 12:07:56 pm
content: Some ideas:2. Add a fuse, maybe something automotive, to prevent any larger hazard in case of a short circuit.3/4. Don't forget the free-wheeling/flyback diode.7. Choosing a relay for a higher current also extends the live span.8. A lab PSU with constant current mode would be better. A 12V lead battery can provide a significant short circuit current.

author: Salad
author_rank: Newbie
timestamp: April 08, 2015, 12:16:28 pm
content: Quote from: madires on April 08, 2015, 12:07:56 pmGlad you brought that up. The tutorials I found on this said that you have to use a diode, but neglected any mention of where to put it in the circuit or how to actually use it. Any tips there?Quote from: madires on April 08, 2015, 12:07:56 pmBench supply is unfortunately a bit beyond the budget at this stage. Will probably do something with some 9V batteries then and a voltage divider instead then.

author: Grapsus
author_rank: Regular Contributor
timestamp: April 08, 2015, 12:18:59 pm
content: Hi Salad,That's a good idea you have, I also use a Marantz audio amplifier with my PC and I'm too lazy to turn it off each time. It uses a linear power supply so it consumes some power even if no sound comes out. That's why I might do something similar to your project in order to save some power.Maybe there is a possibility to avoid playing with mains completely ? Does your amp have a stand-by mode ? Does it have a remote control ? If so, it might be simpler to make a circuit that sends the IR command for stand-by when the PC shuts off.If you really have to handle the mains power supply, it might be interesting to buy a cheap programmable timer for consumer devices, they already have in and out mains sockets and some have a relay, all you have to do is to rewire the control signal.Finally beware that beefy amps often have output relays which they switch on only when the output transistors are in a stable state. This avoids unpleasant and harsh sounds coming from the speakers when the amp is turned on or off. If you brutally cut the mains from the amp, you may disrupt the proper function of those output switches and hear ugly stuff when your computer shuts down. It may be worth making a test before building your circuit.

author: Jeroen3
author_rank: Super Contributor
timestamp: April 08, 2015, 12:24:07 pm
content: You know you can buy switched outlet boxes that disconnect the remaining outputs when the master output uses little to no power?They're called standby killers.

author: madires
author_rank: Super Contributor
timestamp: April 08, 2015, 12:28:37 pm
content: Quote from: Salad on April 08, 2015, 12:16:28 pmConnect it as close as possible to the relay's coil. Anode goes to Gnd and the cathode to +12V. The diode takes care about the negative feedback voltage from the coil when the magnetic field collapses. Something like a 1N4148 or 1N400x would be sufficient.Quote from: Salad on April 08, 2015, 12:16:28 pmA 9V block with a series resistor to limit the current is fine.

author: madires
author_rank: Super Contributor
timestamp: April 08, 2015, 12:32:42 pm
content: Quote from: Jeroen3 on April 08, 2015, 12:24:07 pm.. or master/slave power strips. This would be too easy

author: Salad
author_rank: Newbie
timestamp: April 08, 2015, 12:39:12 pm
content: Quote from: madires on April 08, 2015, 12:32:42 pmThat's no fun! But seriously can't find anything like that in NZ for a reasonable price, not that I know of anyway. Range of products available here just plain sucks. Only real option besides that is stuff with free shipping from China. I'm not sure I'm ready to trust eBay or Banggood with my mains.Quote from: Grapsus on April 08, 2015, 12:18:59 pmThat's a really good idea! It does have a standby mode which only draws 2W which is completely acceptable to me.No remote unfortunately. But it seems to use a momentary switch to toggle standby mode. Maybe I could hook onto there with a couple of wires to a BJT, and toggle it on and off with a MCU? Is it usually that simple? Haven't tried anything like that with existing appliances before.

author: SeanB
author_rank: Super Contributor
timestamp: April 08, 2015, 05:13:04 pm
content: A good relay is to go down to the electrical suppliers and buy a plug in DIN rail mount relay, with typically a pair of contacts that are rated for mains use and which will handle 10A in most cases. Then select a relay with a 12V coil, and use it in the box. It has both screw terminals and proper mains ratings, and is cheap, rugged and easy to wire in. The relay can be either a plug in type in an 8 or 11 pin form, with a DIN mount socket to match, or a plug in type with matching base.Otherwise a solid state relay will work.http://za.rs-online.com/web/p/solid-state-relays/0352519/Industrial relay is exampled belowhttp://za.rs-online.com/web/p/non-latching-relays/6840081/