Page 1 of 140 1231151101 ... LastLast
Results 1 to 10 of 1400

Thread: Home Brew Lighting System - Arduino Mega - SainSmart 16 Channel Relay Board

  1. #1
    Join Date
    Nov 2012
    Posts
    278
    Post Thanks / Like

    Default Home Brew Lighting System - Arduino Mega - SainSmart 16 Channel Relay Board

    Just thought I'd share my project that I recently completed.

    YouTube play list for the project videos

    The Arduino Code

    Building one of those systems to control Christmas lights and sync them with music. The project uses an Arduino Mega 2560, a SainSmart 16-Channel 12V Relay Module and the Vixen software package. The arduino is pumped data from the Vixen software running on a PC via a serial connection. This data tells the Arduino which lights to turn on and off via the relay module. The relay module does this by turning power on and off to 16 separate 120V AC wall outlets.

    As I suspected at the beginning of the project the relays don't function well with PWM to do dimming so for next year I'll be replacing them dimmer circuits. The system does work nicely though. This is something you can easily build in a few full time days. It took me a week of working a few hours every night.

    I set up the system with two modes (links are to example videos): random and Vixen driven.

  2. Thanks biffm, Wolfram thanked for this post
    Likes Khristmas, biffm liked this post
  3. #2
    Join Date
    Nov 2012
    Posts
    278
    Post Thanks / Like

    Default Re: Home Brew Lighting System - Arduino Mega - SainSmart 16 Channel Relay Board

    I'd also be interested to know if anyone knows if it is possible to replace the mechanical relays on the SainSmart board with equivalent solid state relays (non-zero crossing) and if so what would the part number be for the SSR?

  4. #3
    Join Date
    Feb 2009
    Location
    Plymouth, MN
    Posts
    8,929
    Post Thanks / Like

    Default Re: Home Brew Lighting System - Arduino Mega - SainSmart 16 Channel Relay Board

    Quote Originally Posted by zparticle View Post
    I'd also be interested to know if anyone knows if it is possible to replace the mechanical relays on the SainSmart board with equivalent solid state relays (non-zero crossing) and if so what would the part number be for the SSR?
    What is the trigger voltage for the relays you're using, and are you switching + or ground?

    http://digwdf.com/store/
    The store were you can find blinky-flashy gizmos that you never knew existed!

  5. #4
    Join Date
    Nov 2012
    Posts
    278
    Post Thanks / Like

    Default Re: Home Brew Lighting System - Arduino Mega - SainSmart 16 Channel Relay Board

    Quote Originally Posted by dirknerkle View Post
    What is the trigger voltage for the relays you're using, and are you switching + or ground?
    The relays on that board are:

    SRD-12VDC-SL-C RELAY T73-12V SONGLE 12V Power Relay

    So they need 12V to trigger the switch. I'm switching +120V.

    Here is link with info on the relay

  6. #5
    Join Date
    Feb 2009
    Location
    Plymouth, MN
    Posts
    8,929
    Post Thanks / Like

    Default Re: Home Brew Lighting System - Arduino Mega - SainSmart 16 Channel Relay Board

    Quote Originally Posted by zparticle View Post
    The relays on that board are:

    SRD-12VDC-SL-C RELAY T73-12V SONGLE 12V Power Relay

    So they need 12V to trigger the switch. I'm switching +120V.

    Here is link with info on the relay
    It sounds like you're sending +12vdc to the relay. As such, it's not only the wrong voltage (too high), but wrong polarity for most DIYC SSR designs. However, there are some solid state relays that can accept +12v as the control signal; some of them are probably zero-cross SSRs which means on/off only and no dimming, but there may also be some that are random-cross SSRs which you need for proper dimming, and some of them may accept a +12v control signal.

    For example, I have some Crydom 40amp SSRs that work with a control trigger between 3.5-24vdc. They are zero cross only and I use them to power up my main power lines to the displays: when the PC boots up, the 5vdc line from a spare hard disk drive connector turns on the Crydom which then lets power through to the displays. At the end of the night when the PC shuts down, it cuts power to the Crydom and of course, the power to the displays, too.

    You could check Mouser's online catalog and I'll bet you'll find something. But I'll tell you this at the get-go: they're not cheap.

    http://digwdf.com/store/
    The store were you can find blinky-flashy gizmos that you never knew existed!

  7. #6
    Join Date
    Nov 2012
    Posts
    278
    Post Thanks / Like

    Default Re: Home Brew Lighting System - Arduino Mega - SainSmart 16 Channel Relay Board

    Thanks, I'll have a look on Mouser. The other option I was thinking of was to just build out my own dimmer circuits and replace the relay board completely.

  8. #7
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    2,502
    Post Thanks / Like

    Default Re: Home Brew Lighting System - Arduino Mega - SainSmart 16 Channel Relay Board

    If you are contemplating a DIY version then you can look in the wiki regarding SSR like Fig 1 of http://computerchristmas.com/christm...ching_unit_SSR

    To expand the arduino ports you could go the '595 route and hang another 8 SSR circuits on each '595. I don't know the limit of how many '595 can be handled by the arduino and still do dimming.
    This site has numerous similar projects that you can explore and integrate with your arduino. You may need to develop your own firmware to customize it for your particular hardware setup.

  9. #8
    Join Date
    Nov 2012
    Posts
    278
    Post Thanks / Like

    Default Re: Home Brew Lighting System - Arduino Mega - SainSmart 16 Channel Relay Board

    thanks.

  10. #9
    Join Date
    May 2012
    Posts
    4
    Post Thanks / Like

    Default Re: Home Brew Lighting System - Arduino Mega - SainSmart 16 Channel Relay Board

    Great work Zparticle, I've followed all your videos and its cool to see you work through each stage, describe the problems you ran into etc.
    I'm going to create a similar setup, I've got 2x 4 SSRs (Yugibot I think is written on the boards). I don't think I'll get it running before this Christmas but I've been sitting on it for a year already so no hurry I've got a friend making up the relay/power/arduino box, he has mad skills in doing this sort of thing so is working on that this weekend. I get the easy job of getting Vixen running and the code on the Arduino.

    Question for you: Are you using the Generic Serial plugin in Vixen? I've tried previously with another tutorial from Tokyospace I think it was which used the Open DMX, which just would not work for me.

    My box is going to have extension cords coming out of the relays (rather than the 4x4 plug boxes you used) which will hopefully allow me to use it in other things like a light tree (pole with lights coming down from the centre). I'm also thinking of using a photo resistor to control when the lights come on, so if I am not there, once it gets dark it starts up (hopefully). I like your idea of a vixen bypass which lets the lights run randomly, I may also try a 3rd step which is prebuild sequences (for example imagine lights in a circle and they could chase each other or something like that). Similar to random mode but not random and not a vixen sequence and a 4th bypass which is on all the time, not flashing.

    Great work, thanks to your post (I originally saw it on ardiuno.cc) I've found an easy to follow plan and the inspiration I needed to get back into getting mine working (and convincing my friend to build the box for me

  11. #10
    Join Date
    Nov 2012
    Posts
    278
    Post Thanks / Like

    Default Re: Home Brew Lighting System - Arduino Mega - SainSmart 16 Channel Relay Board

    Cool, I'm glad you liked the videos and I hope they help you. I'm using the generic serial plugin to output the data from vixen. Also I should mention that I had no luck with the Vixen version that is the obvious link on the Vixen site I had to use the 2.5.0.8 version which can be found here http://www.vixenlights.com/releases/ .

    I have a number of ideas for more features, like you do. But for this year I'm leaving it be, don't want to break it now that it works.

Page 1 of 140 1231151101 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •