## Lighting the LEGO Salt Lake Temple

2015 was a busy year.  The project that I had the most fun with was a bit off the beaten path compared to what I normally do.  This started off as a fun project for a friend.  It started off with, “I have this LEGO project I need to put LEDs in, can you help me?”  Sure…

Nine months, two different PCBs, and 300 LEDs later we have:

LEGO Salt Lake City temple on display at the Harold B. Lee Library at BYU.

Here’s a link to the original structure for comparison.  This originally started off as a simple fun project with a friend.  The LEGO temple was something he designed built himself over the course of nine (9) years.  He knew he wanted to light the towers, but wasn’t sure how to do it.  I love LEGOs so I was more than happy to start.

## How many LEDs?

Concentrator PCB with single LED string in brick.

As we chatted about the design it became clear that it would be more than stringing a few LEDs together.  As we did the math, we realized it would be stringing a few hundred LEDs together.  I didn’t want to manually solder a resistor onto every LED and then a set of wires to a central terminal somewhere.  If thinking about the manual labor involved in that wasn’t enough, try thinking about the failure rate of your solder joints when stringing things together that way.  It’s not a happy thought.  So, now I had to find a way to make the assembly less labor intensive and more robust.

After brainstorming back-and-forth, we decided that we would have a concentrator PCB in each tower.  Strings of four (4) LEDs in series are wired to the board, where there is a current limiter to make sure that the LEDs are putting out uniform lighting.  Each PCB will handle up to 24 strings of LEDs.  From there we only had to run one set of wires to the power source.  We tested the basic circuit with some parts laying around the office and an old 12 VDC power supply that was yearning for a new purpose to life.  This assembly of LEGO bricks with LEDs in them attached to the PCB is lovingly referred to as the dreadlocks.

## How to Control it all

Prototype lighting controller for SLC temple.

We also realized that we might need to control the intensity of the lighting in different areas.  This would be important if we wanted to balance the grounds lighting on the exterior with the lighting of the spires.  In the above picture you can’t even see that there is grounds lighting because we used the same LEDs, at the same intensity, as we did in the towers.  I decided on using a Texas Instruments MSP430F5529 as the controller for the lighting zones.  It has built-in USB, PWM timers, and I’ve used it before.  I took one of the MSP430F5529 LaunchPads that I had around the office along with a prototyping PCB, some transistors, and FET so the PWM outputs to drive the strings of LEDs at 12 VDC.

Wait you say, didn’t you just go off about soldering wires to wires and you weren’t going to do it?  Yes, for 300 LEDs.  For one controller that was made up of parts laying around my office, that’s different.  This worked for writing the code and getting the lights going.

## Putting it all Together

It looked good on the bench and looked good when we put it together.  Then I started playing with the LED intensity.  As we changed the LEDs from on 100% of the time to 5% of the time, we noticed that the lights started to slowly pulse in intensity.  It was cool looking, but not the look we wanted for the temple.  After playing around with it for a few minutes, I figured out it was a beat frequency between the PWM control and the switching DC power supply we were using.  I did a bit of math and realized that the DC power supply I was using could not source enough current for the LEDs.  Our eyes didn’t notice it when the LEDs were at 100%.  At a lower duty cycle, our eyes picked it up.  A quick search online netted us a laptop power supply that would work nicely for our needs.

## You Want to do What With This?

While I was working on the lighting, the notoriety of the original structure was growing.  There was some discussion of displaying the temple.  As I thought about it, I had visions of a wire giving out on the controller from vibration or shock when in transit and one of the towers going dark .  I did not want this to happen so I explained my concerns and we decided to make a PCB for the lighting controller so that we could have a controller that wouldn’t keep us up at night.  This became even more important when a second temple was commissioned.  For the interested reader, here is a time-lapse video of its assembly.  (I show up at 1:45 to help install the lighting.)  As a rule, it looks bad when your products stop working in front of the customer.  As it was, we had a cold solder joint that showed itself only when it was installed in the second temple.  We may put connectors between the concentrator boards and LED strings to allow replacement without a soldering iron.

## The Final Work

I really enjoyed this project because it brought together LEGOs, electronics, and fun with friends.  If you would like some more detailed views of the project, the Harold B. Lee Library put together a nice video where you can see close-ups with the lighting on.  We’ve got a follow-op project that has it’s own challenges we’re working on now.  It will be fun to tell you what we did to make this one work.  Until then, have fun!