close-circle
Close
0%
0%

The Curilights Controller

This device controls strings of Curilights, colorful animated strings of LEDs. It's easy to use and aware of its environment.

Similar projects worth following
close
The Curilights Controller makes it easy to control a string of Curilights, dynamic animated color LEDs. Color patterns are stored on an SD card, and a simple UI lets you control things with an iPod-like twist 'n click graphic UI. The controller is aware of ambient lighting and movement within the room.

After designing the Curilights, I wanted a way to easily control them without a computer attached. I came up with this controller, based on the mbed platform. The controller:

  • Stores light patterns on an SD Card.
  • Connects to a computer via USB for uploading patterns and animations.
  • Has a menu driven UI with an LCD display for choosing color, brightness, patterns, and options.
  • Optionally turns the lights off when the room is dark and no motion is detected.
  • Turns the lights on if the room is dark and motion is sensed (night light mode).

The LCD user interface is based on a simple knob input. Turn the knob to change choices and push to make a selection. Using the knob is (like the iPod) immediately intuitive.

Controller Design

One of the benefits to using a MCU like the LPC 1768 is its ability to drive a full color raster display. This makes for a much cleaner and more intuitive user interface. For this system, a 1.5" Epson color LCD display is used for displaying menus and graphics. The primary interaction with the controller is a knob attached to a rotary encoder. Knobs make ideal controls, because it's easy to quickly turn past unwanted selections, yet easy to get fine control for desired ones. The knob also features a push-click momentary switch useful for confirming selections.

An SD Card is included for storing a catalog of patterns. This provides a straightforward way to update or add to the collection of patterns in cases where the controller is permanently mounted away from easy computer access. The USB port on the mbed module is also used for a couple purposes. First, the serial input connection is routed directly to the serial input on the string of lights, allowing the light string to be controlled directly by an attached PC. Second, new patterns may be downloaded via USB to the disk drive on the mbed. When the mbed is reset, any patterns downloaded on it's internal USB drive are moved over to the SD card for access by the controller.

Finally, two sensors on the controller monitor the lighting environment so the controller responds appropriately. A photocell connected to one of the mbed's analog inputs measures the ambient room light, so if the room is dark, the lights are shut off. A PIR (Pyroelectric InfraRed) motion sensor, however, “wakes up" the lights if motion is detected, making the system useful a night light.

Hardware

Figure 4 - a) System Board, b) With Display Attached

The heart of the system, of course, is the mbed development board, based on the NXP LPC 1768 MCU. The rich set of on-board peripherals, timers, interfaces and memory all find use in this project.

The LCD display is an Epson LCD originally manufactured for Nokia 6100 series phones. Because of the tremendous volumes phones are manufactured in, these displays are now relatively inexpensive. This display comes mounted on a breakout board from SparkFun electronics. The breakout board simplifies the physical assembly and provides some additional circuitry for powering the display's backlight.

The display communicates with the MCU via an SPI interface using mbed pins 11 and 13, pin 14 is used to drive the display's CS (Chip Select) line (note the display is a “write only" device). The SparkFun breakout board has some additional peripherals including an RGB LED and two pushbutton switches. These are interfaced to the mbed, via GPIO lines. Although the current system doesn't use these, they may become useful as the software design evolves, so it made sense to wire them up.

Read more »

  • 1 × mbed mbed Development board
  • 1 × PIR - Zilog ZEPIR0AAS01SBCG Optoelectronics / Misc. Optoelectronic Components
  • 1 × Rotary Encoder Knobs are the best controllers.
  • 1 × TXB0104 Level Shifter Relaly handy part for hooking up 3.3v and 5v parts together
  • 1 × SD Card Socket Removable SD Card ised used to store patterns and animations

View all 9 components

View all 6 project logs

  • 1
    Step 1

    Just some quick build notes:  The PCB layout was designed specifically to fit the Sparkfun WIG-08601 case.  I choose the knob (Sparkfun, COM-10001) because it's tall enough to extend past the top of the case from the PCB.

    The remaining issue was coming up with the cut-outs.  There's an opening on the bottom of the case, so USB and Power are there.  This works well with wall mounting, since power and your computer are likely below the level of the controller.

    For the front facing items (LCD display, knob, reset button (on mbed), photocell) I had to cut openings in the case.

    I did not have good tools for this.  I had one brute-force tool, a Dremel. The Dremel cuts through the plastic easily, but it leaves a jagged, melty mess behind, making it very difficult to do precision work.  Sort of like trying to do fine cabinetry with a chainsaw.

    So I hacked out openings large enough for the various front-facing elements, then printed out a nice faceplate on heavy photo paper to cover up the mess.  The faceplate was designed in Adobe Illustrator.  I made a scan of the Sparkfun case, and used that as a template for designing the faceplate.  This works surprisingly well.

  • 2
    Step 2

    The finished controller mounts on the wall to control a string of about 60 Curilights in our kitchen dining area.  It mounts easily with foam mounting tape; the unit is light enough that other mounting hardware wasn't necessary.

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates