Utilizing bulk purchase WS2812b LEDs, an Arduino, and a power supply, I intend to build 5x5 Matrix lights for stage/theater use. They will eventually be DMX or Artnet controllable.
The projector type lamp is more widely accepted, that's one of the first things I've noticed after prototyping this.
Components
120×
WS2812B
RGB Addressable LEDs
2×
Arduino Uno Rev3 clone
uC
2×
10w 5vdc PSU
Power Supply
600×
0.10" Male Headers
seriously, 6 pins per pixel
6×
Protoboard
I'm cutting chunks from larger boards
So this project stalled when my Dell notebook crashed.
However, I have the software still, thanks to Hackaday! I also have a newer HP notebook that runs like a champ.
I also still have the hardware, and at some point will continue development in the DMX controller direction. We're currently waiting on a USB interface to arrive from god-knows-where... at which point a board becomes available for bench testing.
I don't want to control 75 channels with that board... But I will as proof that it works once I've hacked out the remainder of the code. I already have a small daughterboard with a RS-485 transceiver IC on the fixture.
Other projects, and my day job's development cycle are keeping this one slowed. That, and waiting on parts again.
Sorry for the crap quality pictures and video, I have a crap smartphone.
Hopefully this time, the video works...
WOO! that's awesome, huh?
So, the gist of it is a 5x5 display... and it's DMX controllable. I explain ad-nauseum my plans for that in the video.
TODO:
DMX input software and testing
Procedures development (lots to do here)
5ch / 75ch mode... I'll elaborate on this now:
As a DMX fixture, it will accept RS485 serial data consisting of 512 pieces of information (channels), or DMX512. This is one of the most commonly used protocols for stage and theater lighting and effects. A single channel or piece of information in this data chain goes from 00 to FF. This can be a value for the red lamp, green lamp, or blue lamp. this can also be a trigger for software or other effects, such as overall intensity, pan/tilt in moving fixtures, etc. What this then means is we have to figure out what each channel in our DMX512 data chain will control within this fixture. The initial plan is simple:
5 channels
Channel 1
0 to 255 - procedure picker. 0 = off 1-10 = procedure 1 11-20 = procedure 2 ...and so on
Channel 2
0 to 255 - red color
Channel 3
0 to 255 - blue color
Channel 4
0 to 255 - green color
Channel 5
0 to 255 - rate / procedure option
75 channels
Channel 1
pixel 0 red color
Channel 2
pixel 0 green color
Channel 3
pixel 0 blue color
Channel 4
pixel 1 red color
Channel 5
pixel 1 green color ...and so on
So with 25 pixels, one channel for each color of each pixel, that makes 75 channels. Even on a 3/4 universe board like the Chauvet Obey70, this is doable. It would be a royal pain to program on a board like that, and that brings me to the long-term TODO on external control:
Artnet.
That's all for tonight, happy making!
-Floz
PS: almost forgot the code. This is as-uploaded to the 'duino last night.
#include <Adafruit_NeoPixel.h>#include <avr/power.h>#define PIN 6// Parameter 1 = number of pixels in strip// Parameter 2 = Arduino pin number (most are valid)// Parameter 3 = pixel type flags, add together as needed:// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(25, PIN, NEO_GRB + NEO_KHZ800);
// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across// pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input// and minimize distance between Arduino and first pixel. Avoid connecting// on a live circuit...if you must, connect GND first.voidsetup(){
// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket#if defined (__AVR_ATtiny85__)if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif// End of trinket special code
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}
voidloop(){
//// TODO: DMX Slave // take RS485 differential "DMX" input// and convert it into:// ch 1 = procedure chooser// ch 2, 3, 4 = color picker// and ch 4 = rate// maybe ch 5 "option" (theater chase spacing?)// // Some example procedures showing how to display to the pixels:
colorFlood(strip.Color(0,0,0),1500);// Off between each demo//spinning_star(strip.Color(255,255,255),500); //grab a pixel make it white, spin the pixels around it// colorFlood(strip.Color(0,0,0),1500);// Off between each demo//// spinning_chase(strip.Color(96,0,255),100); //3x3 matrix outer perimeter Z configuration chase
colorFlood(strip.Color(0,0,0),100);// Off / blackout
colorWipe(strip.Color(255, 0, 0), 500); // Red
colorWipe(strip.Color(0,0,0),500);// Off / wipe
colorWipe(strip.Color(0, 255, 0), 500); // Green
colorWipe(strip.Color(0,0,0),500);// Off
colorWipe(strip.Color(0, 0, 255), 500); // Blue
colorWipe(strip.Color(0,0,0),500);// Off
colorWipe(strip.Color(...
So I need to make a trip to Ye Olde Vendor Of Silicon. This is more for me to glance at when I'm there than anything else, but maybe it will help someone else make one less shopping trip.
1 spool wire (not red/black... I have plenty of that, I need something else for data)
1 bag 0.10" headers (a big bag, I use these little guys for all kinds of stuff)
2 sheets protoboard (large ones, I can cut them to size)
1 tube (qty 5?) MAX485 or equivalent transceiver ICs
2 male XLR connectors
2 project enclosures
10 ohm 1/4w resistor (a handful?)
Yes, I could just hang the PSU and 'duino on the back of the project-ply that I'm using... But that would look bad, and leave those parts woefully underprotected. So, I want a couple of project enclosures. I have run out of protoboard at the moment, and I'm 4 pixels short of completing one large-scale 5x5 matrix.
I can probably scavenge another MAX485 from one of the par-can lights that has failed in the last year. While I may do that, as well as scavenging the XLR connectors from it, I still need a few things, like support components for the MAX485, and maybe a couple of small sheets of protoboard to build the MAX485 and neopixel connections into a DIY shield.
In other news, there is an unmarked IC inside these PAR cans. It's a 20 pin IC with 10C1C printed on the underside.
10C1C Datasheet? Is the closest match I can find in a datasheet.... which would mean this is a 10 input logic array? I dunno, I'll keep digging and start experimenting. If I let the blue smoke out of this one, there are other failing/failed par-can lights in the inventory that I can rob these from.
Now I need to buckle down, finish building the pixel modules, and get ready to do some miniature carpentry. Lacking any luck in finding an enclosure I like already made or ready to modify, I'm going to build my own out of thin "project wood" ply.
So far in developing the software, I have the Adafruit library working and have been modifying the 'strandtest' example to get a feel for it. Since this will primarily be a DMX controllable fixture, I want to develop it as a procedure chooser/options chooser.
What's commonly found in DMX stage lights is pre-programmed procedures on ROM in the fixture. Since Matrices require specialized software and interfaces, and many smaller stage/theater setups simply use a console style board (eg, Chauvet Obey series), I'm choosing to go this same well-traveled route.
Here's my TODO: straight from the .ino
voidloop(){
//// TODO: DMX Slave// take RS485 differential "DMX" input// and convert it into:// ch 1 = procedure chooser// ch 2, 3, 4 = color picker// and ch 4 = rate// maybe ch 5 "option" (theater chase spacing?)//// Some example procedures showing how to display to the pixels:
Since almost every procedure in the sketch can take some parameters, we need to do the following in loop()
Read DMX input on ch1, determine what procedure we need to run.
Read DMX input on ch2, 3, 4, 5, etc. and math-magic these values into the appropriate values for the procedure we're going to call.
Pass values to the procedure we've chosen.
....since I'm potentially really only using a few cycles to do the needed math operations, I hope it all works out.
However, my Arduino clones arrived yesterday. This means after work last night, I was up until 0200 geeking out on stuff with reckless abandon, and today is my day off. I hear the call of a box full of 9g servos. It says "build a robot".
Frustrated that my Arduino clones have still not arrived, yet everything else has... I contacted GearBest customer support. They informed me that NL Post does not offer tracking information.
Guess I'll have to wait. However, my neopixels have arrived, and there is no sense in letting these LITTLE guys sit and collect dust.
They really are tiny, that's a US $0.25 coin, a NeoPixel (WS2812b) and one on a chunk of protoboard with pins. The breakapart board I ordered from Mr Zhang was 120 of these little tiny things that snapped apart cleanly. However, upon arrival, I immediately noticed that they have three solder pads for in and out each, and more importantly, those pads are roughly 0.10" apart.
Jackpot! Or, more work....
That's a NeoPixel with 0.10" male headers on either side, thru-holed to protoboard...
...and the reverse. I intentionally formed solder bridges to give myself an easier pad to solder the 5v, GND, and Serial Data lines onto.
Yup, I'm doing this 100+ times... once I go buy more male headers. I must remember on the next order to inquire if Mr Zhang would be kind enough to add pins for me.
Buy some neopixels. You can buy strings, loose pixels, a pop-apart board of pixels... there are tons of options. I really like the WS2812B, they are resilient for thermal, handling rough, and in general being a doof when building something with them. Plus, they're 3 wires in, 3 wires out.
Pick up a power supply. One single WS2812B draws about 60mA at full bright white. Multiply this by the number of pixels you want to use, and you have your estimated peak current draw. I feel better erring on the side of caution. With 25 pixels drawing 60mA, we're drawing about 1500mA or 1.5A... I am using a 6A 5v supply for my matrices. They run cool for HOURS and don't drop green/blue near the end.
Your favorite uC. I like Arduino. I'm a sucker for easy. The Arduino Uno R3 is used in these matrices, technically it's a clone. They're awesome little boards. The truth is, anything with GPIO that can handle the bitbanging for these little strings of lights would work. An rPi would probably be better suited to large displays.
Lots of soldering. I ordered little pop-apart boards of neopixels. Laser-cut into circles with nearly 0.10 spacing pads on the back. Add pins, add protoboard, and now I have little "quickchange" modules if something gets broken. They're seriously tiny, so consider something as a substrate to mount the pixels to.
Software, software, software. This is part ofwhy I used Arduino. See #3, I'm a sucker for easy. The Adafruit neopixel library is awesome, and based on their strand-test program, I've developed some nifty patterns for this thing.
DMX Shield. Since I've already said I like easy, we're going to use the MAX485 (or a compatible transceiver) and build a small protoboard shield. There are pre-built versions available as well.
Tinker and tune. I've found that It's a good idea to leave my USB cable attached to the Arduino. Obviously, this will not work if it's also connected to RS485, but whatever. If I'm uploading new code to the fixture, I won't have it hooked into the DMX512 sender. Fine-tune and develop what you wantit to do, upload, and enjoy
One last tip... If you daisy-chain in an S configuration like I have, you may find "drawing" to this thing tricky. Ensuring you've picked the right pixel by its number can cause headaches (or it did for me)... so, I fired up my favorite spreadsheet application and made a little number grid: