1. New to Christmas lighting? Get started with the AusChristmasLighting 101 Manual:
    auschristmaslighting.com/wiki/AusChristmasLighting-101

WS2811 Strobes with Arduino

Discussion in 'Strobes - LED or Others' started by justinj, Oct 21, 2013.

  1. justinj

    justinj Apprentice Elf

    Joined:
    Aug 14, 2011
    Messages:
    88
    Likes Received:
    0
    Location:
    Pakenham, Victoria
    It took me a little longer to get around to posting this all but here we go, V1 of the Arduino Strobe code!
    This should work on any 5v Arduino (Arduino Due will most likely not work). I have personally tested it on an Arduino Dueminolove/Uno and Mega 2560.
    If you've never used an Arduino before, if you follow this guide you should be up and running in no time.
    1. First we need to program the Arduino. If you don't already have it get the Arduino IDE from here http://arduino.googlecode.com/files/arduino-1.0.5-windows.zip and extract it to a folder somewhere convenient for you.
    2. Connect your Arduino via USB and if Windows prompts you for drivers (Instead of getting them automatically for you) point them to the folder you extracted in step 1 and then the drivers subfolder.
    3. After drivers have installed download the V1 zip attached to this post and extract it to [Folder you extracted to in step 1]\libraries.
    4. Open up arduino.exe from the main folder in step 1.
    5. Go to File > Examples > WS2811_Strobes > Standalone
    6. If you like you can edit the values in the top section.
    7. Go to Tools > Board and select the Arduino you have, then go to Tools > Serial port and select the serial port it has been assigned.
    8. Go to File > Upload and it will upload the sketch to your Arduino.
    9. Unplug the Arduino from your PC
    10. Wire your Arduino and Strobes as per the below diagram. To trigger the strobes you need to trigger the relay you've connected to RELAY_PIN from your controller. Triggering the relay will short the RELAY_PIN and the strobes will remain flashing so long as that pin remains shorted to GND.
    [smfattach]1[/smfattach]
    Note: You can just put a wire between GND and RELAY_PIN for testing.
    Apparently Banggood doesn't have stock of the Arduino Mega. This should also work and is the cheapest option I could find: http://www.ebay.com.au/itm/Uno-R3-Arduino-Compatible-USB-Cable-AU-Stock-Fast-Postage-/171107481619?pt=LH_DefaultDomain_15&hash=item27d6ccf813
    Hope this helps a few of you and if you have suggestions let me know.
    Edit: V1.1 supports MEGA MULTIBALL erm I mean MultiStrings (Up to 9 separate strings and relay inputs) as requested. Follow the tutorial but obviously you'll have a lot more pins occupied on the Arduino. You'll also need to choose File > Examples > WS2811 Strobes > Multistring
     
    Last edited by a moderator: May 27, 2017
  2. Benschristmaslights

    Benschristmaslights Dedicated Elf Global Moderator Generous Elf

    Joined:
    May 2, 2010
    Messages:
    2,125
    Likes Received:
    7
    Location:
    Elderslie
    Find Me On:
    nice work justin
     
  3. dougd

    dougd Full Time Elf

    Joined:
    Jan 24, 2012
    Messages:
    135
    Likes Received:
    0
    Location:
    Cleveland, Tennessee
    This looks real good. I will try this today.


    Quick question, since
    I don't have my strobes yet, I can test with regular 2811's I assume. Just the red channel will lite?


    Thanks Justin!
     
  4. dougd

    dougd Full Time Elf

    Joined:
    Jan 24, 2012
    Messages:
    135
    Likes Received:
    0
    Location:
    Cleveland, Tennessee
    Instructions were perfect. Hooked up a set of 2811's to the Arduino and they strobed like crazy.


    Cant wait now to get the 2811 strobes from Ray.


    This is going to work out perfectly, just going to fire this from my LOR controller like I always have fired strobes, add in a relay and all set to go.


    Great job Justin.
     
  5. kane

    kane Dedicated Elf

    Joined:
    Dec 23, 2010
    Messages:
    1,021
    Likes Received:
    0
    Location:
    Trigg (Northern suburbs of Perth)
    Find Me On:
    Thanks Justin. Just need to wait for the arduino to arrive!
     
  6. kane

    kane Dedicated Elf

    Joined:
    Dec 23, 2010
    Messages:
    1,021
    Likes Received:
    0
    Location:
    Trigg (Northern suburbs of Perth)
    Find Me On:
    Out of interest, how difficult would it be to enable multiple inputs so that, for example, you could setup a couple different strobe configurations (eg fast strobe and a slow strobe) and have these controlled from different channels?

    I suppose another option could be to enable DMX input (with perhaps different DMX channels corresponding to different configurations that you pre-configure), but having a look around, that'd require some additional electronics to receive DMX signals.
     
  7. smartalec

    smartalec Im a SmartAlec what can i say! Community Project Designer

    Joined:
    May 4, 2010
    Messages:
    1,196
    Likes Received:
    12
    Location:
    S.A.
    Find Me On:
    kane
    it should only be a matter of adding the dmx code to justin's code an getting them working nicely..
    simple in theroy
     
  8. smartalec

    smartalec Im a SmartAlec what can i say! Community Project Designer

    Joined:
    May 4, 2010
    Messages:
    1,196
    Likes Received:
    12
    Location:
    S.A.
    Find Me On:
    [​IMG]

    if the experts want to check over this..
    im using a simple atmega328 IC and a FT232 USB Serial Module.

    im pretty sure with DMX code added to your code, an it will be a fully dmx strobe string

    im still waiting on hardware to check this out on the breadboard first.. buy theroy says it will work
     
  9. OP
    OP
    justinj

    justinj Apprentice Elf

    Joined:
    Aug 14, 2011
    Messages:
    88
    Likes Received:
    0
    Location:
    Pakenham, Victoria
    Question 1 could be done. I can look at adding that to the multistring code.
    Question 2 could also be done (Anything's possible with Arduino) and the easiest way would be to get a RS485 > TTL converter like this and then there'd have to be code to listen on the TTL lines for the relevant DMX signalling. As I am behind in my Xmas display and don't have 1 of those modules that won't be done by me this year, but feel free to play around with the Arduino and post back here if you get it working :)
    I was also planning on adding USB support but again because I'm a bit behind I may have to postpone that this year and just add #1 in for different speeds etc.
     
  10. kane

    kane Dedicated Elf

    Joined:
    Dec 23, 2010
    Messages:
    1,021
    Likes Received:
    0
    Location:
    Trigg (Northern suburbs of Perth)
    Find Me On:
    #1 would be great, and #2 could be an option to play with next year.

    Or perhaps even better - I ordered an ethernet shield with my arduino, perhaps we could bypass DMX and go straight to receiving e1.31 ?
     
  11. OP
    OP
    justinj

    justinj Apprentice Elf

    Joined:
    Aug 14, 2011
    Messages:
    88
    Likes Received:
    0
    Location:
    Pakenham, Victoria
    It's all possible, but I have to have said shields and time :) No idea what's involved with it recieving e1.31 but I'd have a look at it!
     
  12. smartalec

    smartalec Im a SmartAlec what can i say! Community Project Designer

    Joined:
    May 4, 2010
    Messages:
    1,196
    Likes Received:
    12
    Location:
    S.A.
    Find Me On:
    Im hoping to have dmx trigger an speed control by the end of the night
    great work justin on the work done so far
     
  13. OP
    OP
    justinj

    justinj Apprentice Elf

    Joined:
    Aug 14, 2011
    Messages:
    88
    Likes Received:
    0
    Location:
    Pakenham, Victoria
    Sounds great!
    Most of the work was done by the person/people who created the FAST SPI_LED2 library. My original code before I found that was the buggy one!
     
  14. smartalec

    smartalec Im a SmartAlec what can i say! Community Project Designer

    Joined:
    May 4, 2010
    Messages:
    1,196
    Likes Received:
    12
    Location:
    S.A.
    Find Me On:
    just after midnight an i got it strobing by dmx.
    tomorrow i will add the speed on another dmx channel.
    im thinking just a handfull of parts <$10 an this could be redesigned into a plug-in-play system
     
  15. smartalec

    smartalec Im a SmartAlec what can i say! Community Project Designer

    Joined:
    May 4, 2010
    Messages:
    1,196
    Likes Received:
    12
    Location:
    S.A.
    Find Me On:

Share This Page