Light Painting With The Raspi

The art of taking long exposure photographs with blinking RGB LEDs has improved greatly over the years, mostly due to the extremely easy to use Arduino and hundreds of tutorials on the web. If there’s one problem with light painting with a ‘duino, it’s that large, full color images take up a ton of storage space, much more than the flash memory on an Arduino can provide. Wanting fancier and more colorful light painted images, [Phil] over at Adafruit used a Raspberry Pi to make some very awesome light painted images.

Like any Adafruit tutorial that uses LEDs, the build begins with a digital RGB LED strip wired to the GPIO pins on the Raspi. After loading up the Adafruit educational Raspi Linux distro for hardware SPI support, the only thing left to do was writing a Python script to display images in the air.

[Phil] says vertical, hand-held LED bars are old hat, so he took a hula hoop and a few bits of PVC pipe, attached the LED strip, and put it on his bike. The results are really impressive – we’re loving the flames in the title pic – and considering the Raspi is a full-fledged computer, light paintings larger than what [Phil] made are very possible.

3 thoughts on “Light Painting With The Raspi

    1. Depends on the length of the strip and the speed of the bus. You’ll have to do some math: each RGB LED requires 24 bits of data (though only 21 are used for color), plus a minimum of 8 extra zero bits at the end of the strip for a ‘latch’. 1 meter = 32 LEDs. 32 * 24 + 8 = 776 bits.

      The SPI bus support in that particular Linux distribution runs at 500 KHz by default. The strips can work up to 2 MHz (and the bus speed can be tweaked), but slower speeds cope better with longer distances and interference, so 500K was OK and YMMV. 500,000 bps / 776 bits = ~644 updates/second for 1 meter (32 LEDs). Allowing a little processing overhead, let’s say about 600 updates/sec for that combination of length & bus speed.

  1. Interesting. I’ve made a similar but different light painting
    rig, using an Arduino, homebrew led bar and luminous
    paint. That gives me the long exposure effect without
    having to take a photograph. To get round the size
    of Arduino memory, I rasterise on a Mac and send
    the picture data line by line down to the ‘duino.

Leave a Reply to Michael KarlinerCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.