Tag Archives: led

12243189646_5e8e73eb4a_b

Fadecandy Controller available from Adafruit

12243189646_5e8e73eb4a_b

The Fadecandy controller (initially announced here) is a new USB interface board for making more expressive art installations using the widely available WS2811 “NeoPixel” LED strips. It controls up to 8 strips of 64 LEDs, and it includes a unique dithering algorithm to help you quickly get the best quality color from each of your LEDs.

I’m happy to announce that the Fadecandy controller board is now being manufactured and sold by Adafruit! You can get your own from the Adafruit store.

What can you do with it? Here’s an LED triangle running a Processing sketch based on chaotic gravitational attraction:

Or make something a bit larger! The Ardent Mobile Cloud Platform is a Burning Man project using a Raspberry Pi and five Fadecandy controller boards:

fc-action-shot

Fadecandy: Easier, tastier, and more creative LED art

fc-action-shot

I’ve been working on a project lately that I’m really eager to share with the world: A kit of hardware and software parts to make LED art projects easier to build and better-looking, so sculptors and makers and multimedia artists can concentrate on building beautiful things instead of reinventing the wheel. I call it Fadecandy.

fadecandy-header

Fadecandy isn’t a one-size-fits-all solution. It’s an easy way to get started and an advanced tool for professionals. It’s a collection of simple parts that work well together:

  • Firmware that uses unique dithering and color correction algorithms to raise the bar for quality while getting out of the way of your creativity.
  • Open source hardware for connecting cheap and popular WS2811 based LEDs to a laptop, desktop, or Raspberry Pi over USB.
  • The Fadecandy server software, which communicates with one Fadecandy board or dozens. It runs on Windows, Linux, and Mac OS, and on embedded platforms like Raspberry Pi.
  • The Open Pixel Control protocol, a simple way of getting pixel data from your creative tools into the Fadecandy server.
  • Libraries and examples for popular languages. We have Python and Processing already, with Javascript and Max coming soon.
  • And of course, the LEDs themselves! Fadecandy works with popular WS2811/WS2812 LEDs available from Adafruit, SparkFun, and AliExpress. Each controller board supports up to 512 LEDs, arranged as 8 strips of 64 each.

fadecandy-diagramFadecandy is designed to enable art that is subtle, interactive, and playful, exploring the interplay between light, form, and shadow. If you’re tired of seeing project after project with frenetic blinky rainbow fades, you’ll appreciate how easy it is to create expressive lighting with Fadecandy.

Fadecandy is battle-tested. The firmware was originally developed to run the Ardent Mobile Cloud Platform, a Burning Man project which used 2500 LEDs to project ever-changing rolling cloud patterns onto the interior of a translucent plastic sculpture. It used five Fadecandy boards, a single Raspberry Pi, and the effects were written in a mixture of C and Python. The lighting on this project blew people away, and it made me realize just how much potential there is for creative lighting, but it takes significant technical drudgery to get beyond frenetic-rainbow-fade into territory where the lighting can really add to an art piece instead of distracting from it.

Example

Fadecandy is designed to be really easy to build good-looking effects with. Here’s a really simple example of what you can do with only a few lines of Processing code:

OPC opc;
PImage dot;
void setup()
{
  size(640, 360);
  dot = loadImage("dot.png");
  // Connect to the local instance of fcserver
  opc = new OPC(this, "127.0.0.1", 7890);
  // Map an 8x8 grid of LEDs to the center of the window
  float spacing = height / 16.0;
  opc.ledGrid8x8(0, width/2, height/2, spacing, 0);
  // Put two more 8x8 grids to the left and to the right of that one.
  opc.ledGrid8x8(64, width/2 - spacing * 8, height/2, spacing, 0);
  opc.ledGrid8x8(128, width/2 + spacing * 8, height/2, spacing, 0);
}
void draw()
{
  background(0);
  // Change the dot size as a function of time, to make it "throb"
  float dotSize = height * 0.6 * (1.0 + 0.2 * sin(millis() * 0.01));
  // Draw it centered at the mouse location
  image(dot, mouseX - dotSize/2, mouseY - dotSize/2, dotSize, dotSize);
}

You can help!

Fadecandy is still in its infancy. I’ve been building it as fast as I can, but what it really needs now is community. This is you!

Ways you can help:

Where is this going? I’m currently polishing the software, making examples, and writing documentation. I have a small number of prototype boards at the moment, but my plan is to do a larger manufacturing run soon and retail the boards online. Maybe this will be a Kickstarter, or maybe they’ll show up in popular hobbyist electronics shops. Time will tell, and I need everyone’s help.

3076987432_c2c94a1d3b_b

Lego Sky

Over the weekend, I had a chance to finish up a project that I started (and immediately became distracted from) several weeks ago.

In our house, Paul and I have a game room. This is where the video games live, as well as other assorted geekery. We have Magic cards, D&D books, some manga.. it’s super nerdy 🙂

Best of all, Paul has a Lego city on display. We had been looking for an interesting way to add light to the city, so when I saw some RGB LED light strips for sale at Ikea, I knew I had to mod them. In their stock configuration, these light strips can do boring fully-saturated colors, and you switch between them with a boring push-button switch.

After ripping apart the Ikea light and rummaging through my junk drawers, I came up with this:

Touchpad DIODER in action

The Altoids tin has the modified driver circuit: It’s the original circuit board with the microcontroller removed, then a homemade Arduino clone to control it. The orange box is an old Cirque PS/2 touchpad, removed from its original case and covered in fabric.

The Arduino sketch (firmware) is a little C++ program that reads the touchpad and uses it to control Hue and Lightness in the HSL color space. The result is a pretty intuitive and unobtrusive control which makes it easy to both pick a color and desaturate it toward white or dim it toward black. You can easily get some really nice sunset and sky colors.

I measured the power consumption of the completed light at between 1 and 6 watts. With Bay Area electric rates, this means you’d pay about 7 cents a month to leave it plugged in with the lights fully off, twice that to constantly backlight your Lego city in a dim orange glow, and a maximum of 50 cents a month to run the light at full brightness continuously.





For many more pictures of the final installation and the build process, check out my Ikea DIODER set on Flickr.

OLYMPUS DIGITAL CAMERA

R/C helicopter lights, Revision A.5

Atmel is going to personally revoke my electrical engineering license if they ever find out what’s in that yellow heat-shrink blob, but I now have a shiny new 5 gram version of my helicopter light kit =D

This version has all the same remote-control dimming and strobe capabilities of the heavier Revision A. The only practical drawback is that it isn’t quite as bright.

OLYMPUS DIGITAL CAMERA

Hardware sketch: R/C helicopter light kit

As great as it is to finish a professional-looking hardware project with optimum component choices and full design documentation, I love the feeling of sketching in hardware (or as I’ve called it in the past, improvisational electrical engineering). Despite all the faults and rough edges in today’s development tools, we do live in a world now where it’s easy turn an idea into a working prototype with very little time and money.

Flying in the dark

Yesterday’s hardware sketch was a light system for my helicopter, an E-Flite Blade CX2. I wanted:

  • A way to fly at night. Real navigation lights would be nice, but for starters I just want the whole helicopter body to glow.
  • A way to take off and land safely. I’ve flown with only a body light before, and it’s really hard to land when you don’t know quite where the ground is.
  • A bright strobe, for extra visibility and attention.
  • A way to control the lights remotely, using the extra servo channel on the Blade CX2’s radio.

My finished prototype takes the form of a small circuit board that attaches under the canopy with velcro. That board holds the light control electronics, plus a bright white searchlight. It connects to the radio (for power and control) and to the internally-mounted body lights. The body lights are just bare LEDs attached to the inside of the tail and canopy with velcro. One white LED in the tail, one red and one yellow LED in the canopy.

Both sets of lights have full brightness control using a single knob on the BCX2’s transmitter. At the knob’s minimum setting, all lights are off. As you turn it up, first the body lights fade on. Next, the searchlight fades on. Just before hitting the maximum setting, all the lights are on at full brightness. If you turn the knob farther, to its maximum, the searchlight goes into strobe mode.

There are some rough edges, but it works remarkably well for such a simple design. The total weight is about 15 grams. It’s heavier than I’d like, but it doesn’t effect flight performance much. I’d still like some orientation lights mounted on the skids or the sides of the control PCB, but the body light is pretty easy to fly by. The searchlight is incredibly visible at maximum brightness. Even from an altitude of 50 feet or so, the light casts a bright spot on the ground.

Technical details

Skip this section unless you’re a huge dork 😉

The light controller uses an Atmel ATtiny85 microcontroller (kind of overkill) and a pair of NPN Darlington transistors to drive the LEDs. The microcontroller’s firmware is quite simple. An assembly-language loop times the pulses coming in from the radio, then the firmware decides on a corresponding lighting mode and sets up the AVR’s hardware PWM peripheral accordingly.

This hardware sketch was built with whatever parts I had handy. The LEDs are low-tech by today’s standards, the microcontroller was kind of overkill, and MOSFETs would have been better than the Darlington transistors. If I were building a second revision of this, I’d make a few improvements:

  • All surface-mount parts and a PCB, to decrease size and weight.
  • Use a single 1-watt Luxeon LED instead of an array of cheapo white LEDs.
  • To drive the Luxeon LED, I’ll probably want a simple buck converter.
  • Logarithmic LED brightness control, rather than linear.
  • Side-emitting navigation lights, mounted directly on the main PCB.
  • Optimize the firmware for low-power operation when the lights are off. Right now it costs about 8mA to run the AVR in its pulse-detecting loop at 8 MHz.
  • Start mass-producing and selling these 😉 It’s much better than any commercial light kit I’ve seen for the Blade CX2, and the parts are quite cheap.