Jackson Smith

The Moving City

The Moving City was an art piece developed by Milwaukee Artist in Residence Sarah Davitt. I was hired as a subcontractor to work on the electrical portions of the project.

One of the key elements of the design concept was an RGB LED light array that could display moving patterns across the whole vehicle. I was unable to find any off-the-shelf controllers capable of implementing this functionality, so I decided to implement a custom controller that could generate light patterns and distribute power to the lighting array.

Before I joined the project, Sarah had already purchased several hundred RGB LED "pods" and a 24V Lithium-Iron-Phosphate battery. Each pod contained a small PWM controller and was designed to run from a fixed-voltage 24V supply. Trying to run the LEDs at a fixed 24V would require including a complex buck-boost converter, so I instead decided to solve the problem of power limiting in software.

Overnight testing showed that running the LEDs pods at voltage as high as 30V was possible so long as the current through the LEDs was limited to what could be achieved with a 24V supply. I ran some experiments to measure the voltage-current curve for the LEDs. This had to be done separately for the red, green and blue channels. I then wrote an algorithm to back-calculate the current that would flow the LEDs if a fixed 24V supply was used, and scaled the LED duty cycle based on the current supply voltage. This system allowed the LEDs to have consistent brightness and color across the full swing of the battery voltage without having to include power conversion circuitry.

The actual control of the LEDs was done with a Raspberry Pi Pico. I was able to leverage the RP2040's fantastic PIO peripheral to control 8 strands at once. I wrote firmware that buffered the required control signals in memory and then transferred these to the PIO peripheral using DMA. The use a simple protocol where the bits that control the PWM strength of each channel are encoded by sending pulses of various widths (I had to determine the correct widths by parsing a Chinese-language datasheet!). I then modified one of the example PIO programs to generate the correct pulse widths for the LED pods that I had.

Another clever bit of engineering was the latching power switch circuitry. I could reasonably expect the finished product to be left in storage for months at a time, and even a minor current drain would cause the battery to become over-discharged and suffer damage. Testing proved that simply commanding the LEDs to power down was insufficient, and that I would need to implement proper power switching circuitry. For simplicity, I decided to use a relay rather then a MOSFET switch. I configured the relay in such a way that it would latch itself on when the power button was pressed. I wired the circuit in such a way that the latch could be broken by pressing a button located on the PCB, or through firmware control. In the final design, voltage is only present at the common terminal of the relay, and at a few transistors that make up the latch mechanism. This makes it so that quiescent current draw is virtually eliminated.

Short video showing the "Color Waves" pattern. One of several pattern programmed into the controller. This video was taken at a concert night in Milwaukee's Washington Park'

Information about the finalized project