1
\$\begingroup\$

Perhaps the most fundamental question of the day, but here goes.

Assuming that I wish to switch (ON/OFF) 3 AC loads, using EM-relay, can a SPST EM-relay (or appropriate rating) be used where only the "live" AC-wire undergoes make/break under microcontroller control, but "neutral" isn't switched ? Or, is it that for AC, we must use a DPST EM-replay only and both "live" and "neutral" must be switched ?

Here is a highly simplified schematic of what I am trying to achieve using the SPST EM-relays. There is a single AC source (230VAC, 50Hz - India), and the 3 AC loads are actually a bunch of 'Christmas Rice-lights', i.e. each AC-load is actually 4-5 rice-light set. Idea is to switch them under microcontroller logic. Nothing novel, perhaps done a zillion times, but first time that I am trying!

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ I would consider adding another SPST relay on the neutral such that the lights are isolated when the MCU is off, in order to prevent accidents caused by a miswired outlet. \$\endgroup\$ Oct 26, 2013 at 19:29

4 Answers 4

2
\$\begingroup\$

What does a light switch do? Answer, it just switches the live.

\$\endgroup\$
2
\$\begingroup\$

What you are suggesting will work electrically. This is how lighting is normally switched on and off where I live. Having said that, you should follow all local electrical codes and regulations where you live, and make sure that the low voltage circuitry in the microcontroller is well isolated from the high voltage power circuitry.

\$\endgroup\$
2
\$\begingroup\$

This is exactly the right way to switch AC with relays

, but do keep in mind the current rating of you io pins . The relay coil can use a fair amount of current. Also, it is what we call an "inductive load", which means that when you turn the relay off, the current wants to "keep going" for few milliseconds and that can create a "kickback" which can result in several dozen volts being applied to your MCU, which it will not appreciate.

To solve the kickback issue, usually one connects a good diode(schottky is the preferred type) backwards across the relay. It will shunt out any bad kickback before it can hurt your circuit.

To solve the current issue, usually one uses a transistor. There are lots of examples for driving relays from MCU pins.

Note that the "kickback" effect has absolutely nothing to do with the AC on the other side of the relay and arises solely from the propereties of coils of wire with hundreds of turns and electromagnets which relays use to switch the contacts.

Make sure you use good quality parts, and build or get some kind of enclosure so that nobody can touch the live electricity, and never work on the device unless you can plainly see with your own eyes that it is 100% unplugged(really unplugged, not just switched off)

\$\endgroup\$
2
\$\begingroup\$

You can drive relays the way you want, though in many cases the microcontroller can't put out enough current to drive the relays that you want. In that case, you'd need a transistor to drive the relay. In either case, you need a diode across the relay coil to absorb the back-emf when the current is switched off.

Another option is to use a solid-state relay (SSR). They can be driven directly from the output of a microcontroller (warning: some require a resistor to limit current), and they're very easy to use. They can be a bit pricey.

\$\endgroup\$
1
  • \$\begingroup\$ a disadvantage of solid-state relays is that they fail in the "ON" position, from what I've read \$\endgroup\$
    – endolith
    Nov 2, 2015 at 4:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.