You may know that the whole spring and summer has been a bit quiet over here at Interactive Matter. And again for a reason. I was asked by a friend to build the electronics for a massive LED installation for the ‘Hsinchu Biomedical Science Park Exhibition Center’.
The result was very impressive: An 10 meter long installation, consisting of 30 moving triangles with controllable RGB LEDs in them, acting as a moving display.
A XMOS controller driving 60 stepper motors, with about 100 meters of HL1606 digitally controlled LED strips composing a moving LED matrix of 30×102 pixels. The concept and design was done by Taiwanese partners. Interactive Matter only provided the electronics and programming.
Driving the HL1606 LED strips
As every big project it all started as a very small and manageable looking proof of concept:
The basic idea was simple: The XMOS XC-2 kit has 4 processing cores, three of them having two 12 pin connectors. So each core can support 16 HL1606 LED strips (some control pins and 8 data pins per connector, with two connectors per core). Due to the parallel architecture of the XMOS controllers it was very easy to create some scalable implementation for the HL1606 driver). Implementing the driver was also quite a breeze since adafruit hosts the datasheet there are some good Arduino tutorials for this. The big problem was that the HL1606 only supports 2 grayscale levels, while it was only practical to use just 1 bit control (on or off). So this called for some kind of software controlled PWM. The lenght of the strip and the communication speed controls the update rate of the LED strip. And especially the communication speed varies widely with electric noise, cable length, power supply quality and so on. The solution to this was to implement some pulse density modulation. By this the grey scale modulation the color depth automatically adapts to the image refresh rate on the LEDs. The faster the update of the LED strip in comparison to the update of the RGB data displayed on the LED strip, the higher the perceived color depth. Nice (and necessary).
Driving the stepper motors
For the stepper motors I used the simple pololu A4983 stepper motor driver carrier chained with some Microchip MCP23S08 to adapt the Pololu drivers to SPI. So I could drive up to 32 motors from a single XMOS connector. A simple and effective plan. But at the beginning of the construction phase I completely underestimated how much work it is to solder 60 motor drivers.
But finally it was done, only to learn that there was a mistake in the MCP23S08 footprint. But no design is a good design without fix wires:
The only think keeping me sane during the build period was the fun that Interactive Matter was the workbench for some Taiwanese company.
Finally the XMOS and the motor drivers were shipped to Taiwan, where the arrived safe and sound. But the result of the unpacking gave the impression of the scale of this project.
And the scale of the project got even more visisble once the stepper motors and drivers where installed onto the base board.
And gosh where we happy when we saw the first light on the installation.
So the next step was to pack everything and reassemble it at the customer site.
And testing it. The first results were at best described as – uhmm – mixed.
Everything that worked nice in the ‘clean room environment’ had a good amount of trouble in the real world. There were a bunch of high voltage or high current cables in the ceiling. Giving the digital communication a hard time. But finally after some debugging and fixing everything was ready for the big show.
The final installation
Even Ma Ying-jeou, the president, attended.
And after some more debugging and fixing we were able to see some very nice results of the installation:
Some final thoughts
There were two facts in this project which really puzzled me. First of all the whole project coordination was done via video conferencing. I was never to Taiwan (yet) and have never seen the final result. It worked very well considering the hassle of communication and time difference. It was great to do a project with the partners from Taiwan. Even though I only did the electronics and programming.
Second the digital communication in the installation could have been better. If you are working with medium distances and/or motors be sure to use some more robust protocol like RS485 or LVDS (more on that topic soon).
I would massively like to thank the people at XMOS and XCore, the XMOS community. This project could have never happened without their help. And it was the first project for me to discover the power of the parallel processors from XMOS. Marvelous stuff. They scale well and are easy to program. One of my new favorite piece of hardware. I would really like to thank XMOS for their open source initiative. It helped this project a lot!
Even though XMOS have a very encouraging open source initiative and even released the base software for this project as open source there is only a HL1606 driver sketch availaible at github. In the mean time Interactive Matter maintains the XMOS Led Tile Appplication, which is the heart of this project. So the HL1606 driver will eventually end up there, so please be patient. The motor driver will never be released as open source. It is just not good enough. But you can expect some activities in that area soon on Interactive Matter.
In the end it was a quite big and fun project. It was great to work with the partners from Taiwan and the people from XMOS. And the result is quite impressive. I hope you will see more of this from Interactive Matter in the near future.