WS2811 Strobes with Arduino

justinj

Apprentice elf
Joined
Aug 14, 2011
Messages
88
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:

dougd

Full time elf
Joined
Jan 24, 2012
Messages
135
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!
 

dougd

Full time elf
Joined
Jan 24, 2012
Messages
135
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.
 

kane

Dedicated elf
Joined
Dec 23, 2010
Messages
1,033
Location
Trigg (Northern suburbs of Perth)
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.
 

SmartAlecLights

Im a SmartAlec what can i say!
Community project designer
Joined
May 4, 2010
Messages
1,533
Location
Murray Bridge, S.A.
kane
it should only be a matter of adding the dmx code to justin's code an getting them working nicely..
simple in theroy
 

SmartAlecLights

Im a SmartAlec what can i say!
Community project designer
Joined
May 4, 2010
Messages
1,533
Location
Murray Bridge, S.A.
pixel_strobe_circuit.png


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
 

justinj

Apprentice elf
Joined
Aug 14, 2011
Messages
88
Location
Pakenham, Victoria
Kane said:
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.
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.
 

kane

Dedicated elf
Joined
Dec 23, 2010
Messages
1,033
Location
Trigg (Northern suburbs of Perth)
#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 ?
 

justinj

Apprentice elf
Joined
Aug 14, 2011
Messages
88
Location
Pakenham, Victoria
Kane said:
#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 ?
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!
 

justinj

Apprentice elf
Joined
Aug 14, 2011
Messages
88
Location
Pakenham, Victoria
smartalec said:
Im hoping to have dmx trigger an speed control by the end of the night
great work justin on the work done so far
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!
 

SmartAlecLights

Im a SmartAlec what can i say!
Community project designer
Joined
May 4, 2010
Messages
1,533
Location
Murray Bridge, S.A.
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
 

SmartAlecLights

Im a SmartAlec what can i say!
Community project designer
Joined
May 4, 2010
Messages
1,533
Location
Murray Bridge, S.A.
Top