Replace the factory car center console lights with a hackerspace state indicator

Picture

I'm the proud owner of a Citroën C1. For a while I've been wanting to replace the orange lights that are installed in my car's center console. At 30C3 I've been given a short RGB LED strip consisting of 8 individually addressable LEDs (WS2812). (Thanks Matt!)
Inspired by videos on YouTube where others replaced their center console lights, I decided to create a hackerspace status indicator in my car.

Requirements

Step 1: Prepare the Raspberry Pi

Connect a small USB WiFi adapter to your Raspberry Pi and configure wpa_gui to automatically connect to your smartphone when tethering is enabled.

Save the following code to a file named spacestate.py

Note: unless your favorite hackerspace is also ACKspace, you have to replace the URL with the one from your favorite hackerspace. It must point to the SpaceAPI JSON object of your hackerspace. You can find the current list at http://spaceapi.net/directory.json

Make sure that spacestate.py is automatically started when the Raspberry Pi is booting, because we will be running the Raspberry Pi headless in the glove box. I followed the instructions on this blog article to run the python script on boot.

Step 2: Prepare the Arduino Uno

Follow the instructions on [2] to download and install the Adafruit NeoPixel library.

Upload the following code to control the RGB LED strip from the Arduino Uno:

Adding a ~470 ohm resistor between your microcontroller's data pin and the data input on the NeoPixels can help prevent spikes on the data line that can damage your first pixel. Please add one between your micro and NeoPixels!
We also recommend adding a large capacitor (1000 µF, 6.3V or higher) across the + and – terminals. This prevents the initial onrush of current from damaging the pixels.

Can NeoPixels be powered directly from the Arduino’s 5V pin?

Sometimes. The Arduino can continuously supply only about 500 milliamps to the 5V pin. Each NeoPixel can draw up to 60 milliamps at full brightness. So yes, you can skip the separate DC supply and power directly off the Arduino as long as just a few pixels are used, or more if the colors and overall brightness are low. When in doubt, give the pixels a separate power supply.

Solder header pins to the other side of the three wires so they will stay plugged in to the Arduino.

Step 4: Installation

Open the center console with tools and patience.

Remove the original two small orange light bulbs. Store them somewhere safe in case you want to sell your car in it's original state.

Pull the three wires from the center console to the glove box.

Attach the RGB LED strip to the white plastic case with the LEDs pointed towards the white plastic case, otherwise you'll see each individual LED through the translucent center console. I used wide clear tape to attach the RGB LED strip.

Pull a micro USB cable from the glove box through the hole below the 12V cigarette lighter socket under the center console.