The LED wall

What better way to start this blog with a description of what started this very website: a way to send text messages (not necessarily SMS) to a laser projector. That quickly sidetracked into sending messages to the LED wall. There was much that went into this project, and it got quite complicated. I plan to document everything online, but in several steps. Here’s part #1: the LED wall itself.

Hi.
The LED wall says Hi.

The origin

It started when I was asked by an amateur theatrical ensemble to be their lighting designer/operator/technician/guy. The director wanted to illuminate the backside of the stage with indirect, RGB coloured light. Alas, the proposed rental fixtures were not available! I saw my opportunity for a great DIY project and proposed a custom built solution. The group agreed, and so began my journey.

First step: make a plan. I researched the interwebs and made sketches and concepts. I settled for SK6812 strips in the RGBWW (warm white) version, 8 strips total. They are a variant of the WS2812 chips, using only a data line for control. Most other strip types use a data and clock line for more accurate timing. They’re the only individually addressable RGBW strips I could find, so I had to settle with the less accurate timing. I was insistent on the extra white channel for possible future architectural uses though. I also wanted individually addressable strips for… reasons. For this particular application, simple analog unicolour RGB strips would have sufficed (and have been a lot cheaper!). But I had wild plans for my future gear. So, individually addressable it is.


Look what the postman brought!

Power and control

I was also insistent on wired network control. This proved challenging, as most cheap control devices either don’t have a network port, or are wifi only. I wasn’t very keen on using wifi from the FOH in a filled theatre (a very generous word for the concrete cube we’re playing in!). Wifi has a tendency to drop out at the worst possible moment. A first inspection of the venue showed that there were ethernet ports at both the FOH position and on stage. So, ethernet definately appeared like the best option, if a compatible controller could be found. I settled for Arduino Nanos plus an ENC28J60 ethernet expansion board. It was supposed to be the cheapest option, while still be sufficient for my purposes.

An assembled control unit: an Arduino Nano placed on an ENC28J60 ethernet board. The assembly is placed on a prototype breadboard with a screw terminal for the wires going to the LED strips. The unit can be powered by the 5V wire from the strip, or through the USB port. In the latter case, the power line from the strip shouldn’t be attached, which is why it is taped off.

Next issue: power! These strips are hungry. A single pixel uses up to 50 mA of current at five volts. That’s 0.25 W per pixel. There are 60 pixels per meter, so 240 pixels in a full strip. That’s 60 W per strip, or 12 amps! These need a beefy power supply. I went with eight of the cheapest (I know) supplies on eBay. They deliver 20 A each, which is plenty, and then some. 

Now here’s something I learned: in my country, there’s a limit on what you can import from abroad. If you place an order totalling over €22 (incl. shipping), customs will withhold the items until you pay import tax. For the LED strips, this issue was fortunately settled by DHL’s automated systems and a simple Paypal payment. No such luck with the power supplies… Two of them arrived on time (they were sent in separate packages). The rest wouldn’t show up until months after the gig, even after a prompt payment. Thanks, customs! All other components were cheap enough to be below the €22 limit. Fortunately, my dad saved the day with some computer PSUs from old computers they were throwing away at his work. 

Getting sidetracked

Even with the theatrical event fast approaching, I made time for a fun side project. The corporate overlords at my job held their annual get-together and they promised us a never-seen-before party. The theme was glowing things. Challenge accepted! I sewed a meter of LED strip onto a scarf and attached an Arduino to it. The contraption could be powered by a simple USB battery pack through the Arduino (60 LEDs is pushing the power handling capabilities, but the Arduino held). A rotating pot was used for program selection. I made some simple effects (or stole some example code, like you wish), like fixed random colour, rainbow, theatre chase, VU meter, strobe, … A great way to establish my image as “that weird kid” at my relatively new workplace! No ragrets, though.


A coworker wearing the contraption.

The hardware is getting in shape

On to more serious business. The LED strips were attached to 2 m long aluminium square tubes. The width of the tubes was chosen to be equal to the pixel pitch (1.5 cm) to allow a square pixel raster later on. The strips were cut in half. There are now 16 LED bars of 120 pixels each, but only eight controllers. So, a connection needs to be made between each pair of bars. This was done by painstackingly soldering too-stiff cables onto the strips directly. Only later did I discover the existence of solderless clip-on connectors… 

These things

Control woes

On to the next issue. Unsurprisingly, the Nano/ENC28J60 combination didn’t work. There were several issues. First, the Nano can only update the LED strip while it is not communicating with the ethernet chip: the precise timing required to control the strips can’t allow interrupts from the SPI communication. The next idea was to use a buffer pixel array and write the data to it when the LED strip wasn’t updating. But the Arduino ethernet library uses more than half of the available RAM, which didn’t leave enough space for the pixel buffer! Updating the strip in chunks isn’t possible either, because you need to send all data at once. 

With the deadline approaching fast, I went for plan B: Raspberry Pi! I went to a brick and mortar stone and got four of the things. I experimented with running Processing on them (did you know there’s a way to remotely upload Processing sketches to the Pis? Neat!). The Nanos can communicate serially with the Pi, but streaming a full frame of data wasn’t straightforward: the Nano serial buffer is only 64 bytes, while a full frame is 240 pixels x 1 byte / colour x 4 colours = 960 bytes… A single frame would need 15 sequential serial messages. There would also need to be some extra information, like which pixels are being updated in a particular message. It became messy and entirely disfunctional, quickly. At this moment, the deadline was in two days. I had to come up with something, fast! The strips were already being installed on stage, and they not only need to be working, they also need to be working reliably. Proper individual pixel control was to be postponed to a later moment.


Some assembled LED strips running demo programs from the Arduinos. They’re bright!

So, I resorted to sending a very simple, 7 byte command to the Arduinos from the Raspberry Pis. I could select a static colour with a specified RGBW value, or recall some built-in effects like the rainbow pattern, VU meter effect and theater chase. Who said the LED scarf was a waste of time and effort?

At the heart of it all was my laptop running a custom Processing sketch that sent OSC messages to the Raspis on stage. Everything was hard-coded, from the IPs, the configurations and the colours to the scenes and settings. Good coding practices can come after the deadline… Looking back, it was crazy that I managed to pull this off next to a full-time day job and a master’s degree at university.

I have described a cleaned-up version of this control scheme in this blog post.

All LED strips are installed and are rocking out on stage!

Making it all work…

Once installed on stage, making code adjustments was hard. Every change needs to be sent to all Arduinos and Raspis manually, which were not always easy to reach.


Getting there!

To top it all off, the in-house ethernet ports didn’t work! That is to say, they worked fine, but the patch panel was hidden away somewhere in the building. I could not patch the FOH outlet to the stage outlet. I also did not have a long enough ethernet cable to make the run to the stage. So I resorted to… placing a wifi router on stage. But, of all things that could go wrong, the wifi signal performed flawlessly and didn’t drop out a single time! Big relief there.

The end result is well worth it…

Here’s a nice little cue:


Guess the sexuality of the personage that makes his appearance here

The theatre gig went super well (apart from all the actors being slain by a mysterious influenza…) and I’m really proud of my work. A bad solder connection thought it would be funny to disrupt everything, but was quickly thwarted.

After the theatrical gig, I used the strips among other things as backdrops for the DJ:

The DJ didn't know what hit him

The lack of individual pixel control (apart from what was preprogrammed on the Arduinos) was really bugging me, so I went on the lookout for a new way to control them. You can read more about that stuff here.

2 Comments

  1. Pingback: The LED wall, part 2: individual pixel control - CMB's blog

  2. Pingback: LED strip control setup using Arduinos and Raspberry Pis - CMB's blog

Leave Comment

Your email address will not be published. Required fields are marked *