156Views29Replies

Author Options:

Using relays to control lighting? Answered

I have one Banner QS18VN6LV Retro-Reflective light interruption sensor, and one Banner QS18VN6D sensor with NPN Relay outputs. How could use the set to say, power on lighting when one is interrupted and power them off when another is interrupted? What I want to do is use them in my home theater, to power on the room lighting, projector and audio equipment and lower the screen when the one at the top of the steps is interrupted, and power off the room lighting, and turn on my ambient LED lighting when the one at the bottom is interrupted. The only problem this may have, is that the retro one is always sensing something till interrupted, and the non-retro one is only sensing something when interrupted.

30 Replies

user
steveastrouk (author)2013-02-13

This is a job for either some simple logic, or a couple of relays. Probably I'd use little relays.

What current do you need to switch for the lights ?

Select as Best AnswerUndo Best Answer

user
macwhiz (author)steveastrouk2013-02-13

The main lights are fluorescents, needing to switch less than 15 amps at 120 volts, the led's are around .5 amps at 120 volts, the projector is simply sending an ir signal, essentially pressing a button on a remote, and the same thing for the audio system. I'd use a hacked universal remote for those.

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)macwhiz2013-02-13

Relays: definitely simplest and most robust method. You also need some kind of latching, so that when the top step is crossed, everything STAYS happening, until someone crosses BACK to turn it all off ?

Select as Best AnswerUndo Best Answer

user
macwhiz (author)steveastrouk2013-02-13

The sensors actually function as solid state relays, that are on the negative lead of the power. I'd attach some more powerful relays. What I need is some sort of latching for the lighting. Basically I want the lights switched on when the first one is crossed, and turned off when the second one is crossed. A servo could be used to simply switch on the lighting when crossed and switch off when crossed. But I would also need the reverse so the lights turn on when going up the stairs. I also need the system to hit a power button for a sound system and a projector. The sound system relay being the top one only and the projector being both, as the projector requires a dual button press to power off, but the double press wont affect it at the start

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)macwhiz2013-02-13

Maybe I'd use an Arduino, inputs from the photo units, and then you can do what you like with the outputs and a relay card shield.

You could do it with relays, but the momentary action thing would be tricky.

The SIMPLEST method would use a small Millennium III PLC, a rugged unit with the interfaces you need. By the time you've messed around buying Arduinos etc, the PLC option would be running.

Steve

Select as Best AnswerUndo Best Answer

user
macwhiz (author)steveastrouk2013-02-13

For the projector and sound system I could use a DPST NO relay so interruption presses the power button when interrupted. But I still need a latching system for the lighting...

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)macwhiz2013-02-13

Don't mess around finding "DPST" relays, DPCO are MUCH more common, its not like you're switching a lot of current.

Select as Best AnswerUndo Best Answer

user
macwhiz (author)steveastrouk2013-02-13

I found a schematic that uses two SPST relays and makes a latching relay system, So I'm going to design 2 of those

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)macwhiz2013-02-14

Try this. Its very important not to forget the diodes.

Steve

Select as Best AnswerUndo Best Answer

user
macwhiz (author)steveastrouk2013-02-14

Should there be a link in your comment? or are you saying this for mine? and where would the diodes go?

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)macwhiz2013-02-14

Yes, but I can't post images from here for some weird reason. I'll have to do it from home later.

Select as Best AnswerUndo Best Answer

user
iceng (author)steveastrouk2013-02-14

Aha, fitting away time in the office :)

Select as Best AnswerUndo Best Answer

user
macwhiz (author)macwhiz2013-02-14
user
steveastrouk (author)macwhiz2013-02-14

And that's supposed to toggle on and off when you "press the button" ?

Select as Best AnswerUndo Best Answer

user
macwhiz (author)2013-02-14

Theres a bathroom in my basement which is where my theater is haha

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)macwhiz2013-02-14

Just checking you've thought about it. And there's a Kitchen too, so you will never pass the sensors during a show ???

Select as Best AnswerUndo Best Answer

user
macwhiz (author)macwhiz2013-02-14

I was also thinking of having a "disable" switch for when we're playing things like air hockey or foosball or cleaning, that leaves the room lighting on.

Select as Best AnswerUndo Best Answer

user
macwhiz (author)macwhiz2013-02-14

This is how the bypass switch would work

Select as Best AnswerUndo Best Answer

user
macwhiz (author)macwhiz2013-02-14

No kitchen, but a fridge, microwave and snacks

Select as Best AnswerUndo Best Answer

user
macwhiz (author)2013-02-14

I can use one opto to cut power and one to act as the switch

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)macwhiz2013-02-14

Use a DPDT relay and you only need one relay. You HAVE to put a diode across the coil, or you will damage the opto units.

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)macwhiz2013-02-14

Cathode to +12/ one end of the coil, anode to the other end of the coil, assuming you tie the relays to +12, basically BACKWARDS to the direction of flowing current in the coil.

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)macwhiz2013-02-14

That's where the diode should be. It would be good practice to fit one to all the relays, and keep the wires short.

What happens when someone goes to the bathroom, mid-show in your home theatre, all the lights are to go on, the projector powered off and the amps shut down ?

Select as Best AnswerUndo Best Answer

user
macwhiz (author)2013-02-14

Yes, it keeps supplying the coils with 12V after the switch is released

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)macwhiz2013-02-14

Sorry, my mistake. I took a wrong turn in the diagram.

I thought you wanted one opto to turn it on, and one to turn it off ?

I still think you'd be better with this
http://www.ebay.co.uk/itm/CROUZET-LOGIC-MODULE-CONTROL-M3-MILLENIUM-3-CONTROLLERS-CB20R-24V-DC-12E-8A-PLC-/350713980953?refid=store

Select as Best AnswerUndo Best Answer

user
macwhiz (author)steveastrouk2013-02-14

The button turns it on, loss of power turns it off

Select as Best AnswerUndo Best Answer

user
macwhiz (author)2013-02-13

The sensors actually output a relay signal, they're NPN so they sink the source, but they switch between NO and NC so they can both be used as the same sensor, to sense interrupts

Select as Best AnswerUndo Best Answer

user
macwhiz (author)2013-02-13

Also, for the system, id like to have it power off the audio system and projector also. The projector requires a double button press, so possibly both sensors could trigger that remote so it shuts down upon leaving.

Select as Best AnswerUndo Best Answer