Advice Using Arduino's to power relays

Lishfish

Full time elf
Joined
Dec 26, 2016
Messages
160
Location
Adelaide
I am hoping someone could help give me advice on weather this would work or not.
Here's what I would like to do.
-Using an Arduino Mega to power two 16 relay boards. How and what parts required? (Obviously an Arduino mega and relay boards :p )
- Running store brought lights as per the picture below. I figure one relay can power half/switch on and off and the other with the other half? (Power wire on one relay and negative on the other)


Using an Arduino and relay board keeps my cost dramatically down :)
Thanks in advance
 

lytnin

Full time elf
Joined
Jul 26, 2010
Messages
117
Location
North Richmond NSW
Hi Lishfish,
You don't need to switch both the positive and the negative.


Switching just one or the other will do the job. (I prefer switching the negatives).
If it's AC voltage then either side will work.


A couple of other things to note:-
- you should just want to switch the low power side only. (ie Not the 240v)
- avoid rapid on/off changes
- dimming would be a problem if not out of the question.


Cheers
Dave
 

Attachments

  • Lishfish relay example.jpg
    Lishfish relay example.jpg
    73.7 KB · Views: 14

Lishfish

Full time elf
Joined
Dec 26, 2016
Messages
160
Location
Adelaide
Hey thanks for your response. Wouldnt that only turn the entire set of lights on and off?
 

David_AVD

Grandpa Elf
Community project designer
Generous elf
Joined
Jun 12, 2010
Messages
4,681
Location
Victoria Point (Brisbane)
What else were you wanting to do?

EDIT: Ah, so the LED strings are 2-wire, 2-channel (polarity swap) types?

If so, hook the LED string between the COM terminal as you originally posted. Then connect the NO terminals of each relay to V+ and the NC terminals of each relay to V-.

Activating one relay will turn one channel on or activating the other relay will turn the other channel on. Turning both relays on will turn the LEDs off (same as both relays off).
 

lytnin

Full time elf
Joined
Jul 26, 2010
Messages
117
Location
North Richmond NSW
David, wouldn't you have to flip both relays at the same time, to reverse both wires polarity at once?

If you only turned on either relay, both wires would be +ve, or -ve depending which one was used.

Wouldn't you then also need a third relay to disconnect power totally if you wanted no lights for a period?
 

lytnin

Full time elf
Joined
Jul 26, 2010
Messages
117
Location
North Richmond NSW
Ok, so disregard my last post.


I see where the logic is now. I had to draw it out to make sense of it.


Code:
String Wire       Relay 1  Relay 2
                  Off/On   Off/On
Wire A           -ve/+ve
Wire B                     -ve/+ve
 

David_AVD

Grandpa Elf
Community project designer
Generous elf
Joined
Jun 12, 2010
Messages
4,681
Location
Victoria Point (Brisbane)
Yep, it's the same method used to operate a DC motor in either direction using relays.

Both relays on or off results in no output.
 

diyer

Full time elf
Joined
Jan 5, 2013
Messages
149
Location
Sunbury
If your relays are DPDT you could do it like this (attached)

You would still need another relay to disconnect (all off)


Sent from my iPad using Tapatalk HD
 

Attachments

  • ImageUploadedByTapatalkHD1485065939.794434.jpg
    ImageUploadedByTapatalkHD1485065939.794434.jpg
    89 KB · Views: 8

elnino

Full time elf
Joined
Aug 1, 2014
Messages
142
The arduino will drive those boards directly. A low signal energies the relay.
 

battle79

Full time elf
Joined
Dec 8, 2012
Messages
465
Location
Chirnside Park, Victoria, AU
Lishfish,


I think you will find what you are looking for here:-
http://www.hansonelectronics.com.au/product/dmx2-18/


Specifically designed for running the 2wire light sets, uses DMX input, so you will need something to output DMX. If your using any pixels then most controllers for pixels also have DMX outputs.


Not trying to temper your DIY passion, just maybe saving you from finding this later and going doh!


Smartalec has been known to dabbles with Arduino code and may have some input on that side.


Regards,
Rowan
 

Lishfish

Full time elf
Joined
Dec 26, 2016
Messages
160
Location
Adelaide
Thanks for all the responses guys.


To clarify, I want to be able to run half on the lights on a sting at a time; There are two lots of colours that flash at a time which alternates with the other 2 that are on the string. (If that makes sense)


I also have been forwarded to hansonelectronics many a time but for my first year trying to keep the cost down (We have a whole big box and half storage cupboard full of store brought lights so spending $100 at the moment seems daunting, plus I enjoy DIYing anyways.


And the only reason I am wanting to go with arduino's as they are cheap as well.


Not trying to sound like a tight person but have a lot going on this year on the side. :)
 

Lishfish

Full time elf
Joined
Dec 26, 2016
Messages
160
Location
Adelaide
David_AVD said:
What else were you wanting to do?

EDIT: Ah, so the LED strings are 2-wire, 2-channel (polarity swap) types?

If so, hook the LED string between the COM terminal as you originally posted. Then connect the NO terminals of each relay to V+ and the NC terminals of each relay to V-.

Activating one relay will turn one channel on or activating the other relay will turn the other channel on. Turning both relays on will turn the LEDs off (same as both relays off).
Could you draw this out? I think I get what you mean but just want to clarify
 

Lishfish

Full time elf
Joined
Dec 26, 2016
Messages
160
Location
Adelaide
Heres what I understand

As the arduino's power the relays directly off of the pins
 
Top