Disclaimer: Rear facing LED displays are not legal in the United States and thus this project is intended as a proof of concept only. 

Warning: Video contains explicit language

I had the honor of an invite to a hack-a-thon event put together by Boing Boing and Ford.  The theme of the hack-a-thon was applications using real time driving data. This Instructable is about my hack-a-thon project.

I was curious to hear what Ford would be bringing to the table. It turns out Detroit based Ford has a research lab in Palo Alto who have created an open source real time data platform called OpenXC. At the moment, OpenXC supports Android and Python.

In my view, OpenXC represents a significant milestone in Maker history as Ford is the first car manufacturer to make real time vehicle data available to consumers. At the moment, just Ford 2010 and newer vehicles are supported but Ford has made the platform open so there is nothing stopping other car manufacturers from supporting the platform. Let’s hope more jump in!

Modern vehicles have a dedicated network called a CAN bus. The CAN bus is one of the primary components of OBD-II, a vehicle diagnostic standard mandatory for all cars sold in the United States since 1996.  You'll always find the ODB-II port by the driver's knees. Your mechanic will use a handheld ODB scanner to read vehicle diagnostic codes or clear the check engine light. Using the ODB-II port with a piece of hardware OpenXC calls the “Vehicle Interface”, one can listen to the CAN bus and capture desired data into an Android app.

If you’re like me and don’t own a Ford, the good news is you can still create a cool app using a simulator containing real driving data. Ford has written an Android app called the “Enabler” which allows you to load trace files filled with driving data. Running as a service on your Android device, the Enabler streams driving data to your app. Whether this data is coming from a trace file or real time via Ford’s “Vehicle Interface” device over USB or Bluetooth, your app doesn’t know.  Based on the ChipKit32 board, the “Vehicle Interface” hardware is open source as well.  You’ll find the parts and instructions to build your own Vehicle Interface on the OpenXC site at a cost of around $110.  At the time of this writing, there is also a pre-made Vehicle Interface you can buy from a company called Cross Chasm.  Note that each car model requires a unique firmware. To obtain the firmware specific to your Ford model, you’ll need to first register at developer.ford.com and then will find the firmware downloads.

Note that you can buy inexpensive ODB-II Bluetooth dongles and use them with smart phone apps today like Torque which begs the question, why OpenXC? The reasoning is that OpenXC provides access to more sensors than are exposed through standard ODB-II. Ford has a detailed explanation on the data set differences between OpenXC and ODB-II for those interested. In addition at least from my research, I wasn't able to find any libraries available to developers for developing custom applications using the inexpensive ODB-II Bluetooth dongles.

The OpenXC documentation is quite good, you’ll find all the supported data signals on the OpenXC site. As you’ll see, the OpenXC data set is pretty broad so it’s really up to your imagination on what you can create.

My idea was to utilize the driving data for a smart brake light proof of concept. Smart meaning a rear display that can do more than just turn on and off when braking. For example, if the driver hard brakes, let’s show an urgent symbol letting the driver behind you know to slow down quickly. If someone was kind enough to let you merge in, we can speak a voice command to display a thank you message.

I also added a multi-color bar graph relative to the gas accelerator position which serves no useful purpose but looks pretty cool.

One very handy piece of data is trip fuel consumed which tells you precisely how much gas was used per trip. I used this in combination with the ignition data to automatically speak, using Android text to speech, the cost of the trip when the ignition is turned off.

You might notice in the video there are a few times where the Android app wrote back to the car. I set the cabin temperature based on the user’s preference stored in the Android app and also forced the hybrid vehicle to switch from gas to electric and vice versa. The write signals are not part of the standard OpenXC platform and were just available at the hack-a-thon using a modified Ford vehicle. It was pretty cool to be able to control the car from my Android phone. We’ll see if Ford adds support for this in the future. The obvious challenge is safety.

I had an idea to enhance the car with audio effects triggered by car events. Turning on high beams triggers a laser sound. Shifting up plays a power up sound and shifting down a power down effect. A water drop signifies each 1/10 gallon of gas consumed. When piped into your car’s audio via a line in or stereo jack from your phone, the experience is compelling.

Step 1: Materials


Optional if interfacing with a real car

Disclosure: I am the creator of the PIXEL LED display and receive a portion of revenue from its sales.

Step 2: Using the OpenXC Android Library

The OpenXC  Android library documentation and example code is quite good so there’s no reason to repeat here. Here’s the gist on how it works:

You first setup some Listeners for the specific data you’d like to expose in your app. In the example below, I’m capturing vehicle speed and brake status. The OpenXC documentation will tell you how often each data type is polled. For example, speed data comes in at 4 Hz or 4 data points a second while brake data comes only when there is a change meaning when the driver steps on or steps off the brakes.

try {
    mVehicleManager.addListener(VehicleSpeed.class, mSpeedListener);
   } catch (VehicleServiceException e) {
   } catch (UnrecognizedMeasurementTypeException e) {

try {
    mVehicleManager.addListener(BrakePedalStatus.class, mBrakeListener);
   } catch (VehicleServiceException e) {
   } catch (UnrecognizedMeasurementTypeException e) {

Then add your specific logic in the listeners.

VehicleSpeed.Listener mSpeedListener = new VehicleSpeed.Listener() {
     public void receive(Measurement measurement) {
      final VehicleSpeed _speed = (VehicleSpeed) measurement;
         MainActivity.this.runOnUiThread(new Runnable() {
             public void run() {
                    speed = _speed.getValue().doubleValue() * 0.621371; //we need to convert km/h to mp/h
                    if (speed > 75) {

                                   //do something


BrakePedalStatus.Listener mBrakeListener = new BrakePedalStatus.Listener() {
     public void receive(Measurement measurement) {
      final BrakePedalStatus _brakeStatus = (BrakePedalStatus) measurement;
         MainActivity.this.runOnUiThread(new Runnable() {
             public void run() {
               boolean brake = _brakeStatus.getValue().booleanValue();
               if (brake == true ) {

                              //do something

In the case of the speed which is sampled continuously 4 times a second, just remember the code will keep going there 4 times a second when the speed is over 75. So you’ll just need to depending on what you're trying to do, you'll just need to set some flags or setup a timer as your action will repeat 4 times a second otherwise.

Step 3: Integrating With the PIXEL LED Display

For this project, I leveraged the PIXEL Guts LED display which combined with the IOIO board has built in Android support making the integration with OpenXC quite easy. The Android phone is talking Bluetooth to the OpenXC Vehicle Interface and Bluetooth to the PIXEL LED display. I wasn’t sure how well this would work with parallel Bluetooth connections going, both streaming a fair amount of data. But in fact the setup worked just fine.

You can find more information on using and developing for the PIXEL LED Display.

Make your own PIXEL LED Display

If you happen to own a PIXEL display and don’t have the OpenXC Vehicle Interface, here’s how to set things up using the OpenXC Enabler simulator allowing you to see the display with real driving data but without hooking up to an actual car.

1. Install the PIXEL Smart Brake Light Prototype app.

2. Install an app called the Ford OpenXC Enabler. This app runs as a service on your Android device and will simulate real driving data to the PIXEL smart brake light app.

3. Install a file manager in Android like the OI File Manager so the Enabler is able to browse for files on the SD card.

4. Copy this file to your SD card. Here are also some other simulated driving data files to try.

Finally, run the
OpenXC Enabler
app on the device and go to
Settings -> Data Sources -> Trace File Playback
, check the
Playback trace file
option and browse for the trace file you copied over.

5. Open the Enabler app, you’ll see a screen with increasing numbers which means the simulated data is working.

6. Bluetooth pair as normal to PIXEL and open the PIXEL Smart Brake Light app. PIXEL should now be displaying various simulated data events: brake light, rapid deceleration (exclamation point), and colored bars which correspond to the gas pedal accelerator. You’ll also hear various sound effects played on the Android device which are triggered by specific car events: high beams on, changing gears, doors open, and ignition on and off.

Step 4: Mounting the Rear Display

Nothing magic here, just used some duct tape to attach the LED display to the rear window. The PIXEL LED display is powered with a 5V, high capacity phone power back. In my case, I used this one along with a DC jack to USB cable.

Step 5: Android App Source Code

Here's the Android app source code on Github ==> code here .

The app has the following features:

  • Bars on PIXEL LED display proportional to the gas pedal position
  • Brake Light Image
  • Sci Fi sound effects for certain car events (high beams, gear shifts, ignition on and off...)
  • A few ECO features like trip cost and cost of a rapid acceleration
  • Rapid Deceleration Brake Image (using the vehicle speed data)
  • Thank you animation (for someone who lets you merge in) with voice recognition
  • Tongue animation (for the guy who didn't let you merge in) with voice recognition
<p>this kind rear led stick launched 2 years ago. Few people know this. it is the mass produced round rear led sticker. www.geekleds.com/car-led-light</p>
<p>this kind rear led stick launched 2 years ago. Few people know this. it is the mass produced round rear led sticker. www.geekleds.com/car-led-light</p>
How about an indicator on the dash to notify the real dummy that he's driving down the road with his foot on the brake! :P
Woow! Simply awesome! I was browsing through ford's hackathon page and landed here. Truly inspiring. Lemme see what I can do. :)
The bird is the greatest part about this
This reminds me of this mod for a '98 Eclipse<br /> <div class="media_embed"> <iframe allowfullscreen="" frameborder="0" height="360" src="//www.youtube.com/embed/K6sZg3iL5EY" width="480"></iframe></div>
Or this one, but with fancier graphics... <br> <br>http://www.youtube.com/watch?v=qKn45Uw2gdw
that's cool!
Brief view of a variable brake light at :48
I am in the auto industry and there was an Israeli company with a patent that monitored the &quot;reverse acceleration&quot; of the gas pedal, thus monitoring how quickly a person took his/her foot off the gas. They used this data to predict that the next likely event was for the driver to hit the brakes! This prediction was used to flash the brake lights several milliseconds earlier than the brake lights would normally come on. At 55Mph, this translated to like 10 feet for every 100 milliseconds.. Every foot counts in a panic breaking situation.... <br> <br>I don't think this ever came to market....
wow, something like that would be really great, thanks for sharing that.
Example of where the patent system screwed up
That sounds quite brilliant!
i would put this on my motor cycle
Awesome, love it, i've been designing a similar system using arduino with obd2 and wifi for android or iphone commands, however i'm lazy and will prolly never finish it, Great project may use a few ideas in mine
I thought it said &quot;Taxi&quot; Too! Cool Concept. I've Wished for something like that
Hah, right up until the moment where the computer said &quot;you just said thanks&quot;, I was wondering why a guy in a car would want to try to hail a cab xD <br> <br>I thought it was a wavy hand and the text &quot;Taxi&quot; <br> <br>Nice hack though overall.
As far as I know, this would be perfectly legal in the UK. <br> <br>I would like to see proportional brake lights fitted as standard on cars. The image in my head is a graphic-equaliser affair: the brake lights are actually bars up the rear corners of the car, or across the top of the back window (starting in the centre). Dab the brakes, and the bottom light comes on, press firmly for normal stopping and about half light up. Stomp on the brakes in an emergency, and the whole bar lights up. <br> <br>Maybe, if the driver &quot;holds&quot; the stomp (or flicks a switch), the bars would start blinking in an emergency sequence, like the lights across the top of an emergency vehicle, so that cars further back are alerted to slow down earlier for a possible accident, avoiding something like this: <br> <br>http://www.bbc.co.uk/news/uk-england-kent-23970047 <br>
In the UK it could possibly only be legal with certain colours, only red and amber can be seen from behind the vehicle whilst driving and also white but only when reversing. There are also restrictions when it comes to flashing lights, so a dynamic display may also fall foul. LED banners that display messages are fine, as long as a traffic officer doesn't think they're a potential distraction to other drivers nor are they offensive. There is of course some ambiguity though, normally something is legal in the UK unless it is deemed illegal (through case law, common law or an act of parliament.) For lighting it is generally viewed as illegal unless an exemption is contained within the regs. If you have a spare hour, the RVLR 1989 makes for a riveting read.
As long as the flashing lights are not blue or green, you're fine. Some farm vehicles loom like red &amp; amber Christmas trees. <br> <br>I'm surprised that rear-facing LEDs are illegal anywhere, to be honest. LED tail lights are becoming the norm in the UK &amp; Europe.
Ah, when I said restrictions with flashing lights, it isn't that flashing lights in themselves would be the problem, merely that they have to flash within certain speed restrictions. In terms of colour, I stand by the RVLR Section 11, subsection 2 regarding colours. Red, Amber and White when reversing. There are other exemptions but none would work in regards to an LED lighting matrix. Even yellow LED's that aren't part of the indicators are not allowed to the rear, unless as a beacon for very specific vehicles and uses. <br> <br>Unfortunately, when it comes to modifying cars, lighting is an area, within the UK, with very little leeway. I've change all my lights to LED's, much faster on-off and much brighter.
Ok I totally need to DIY a flux capacitor and program it to 88 miles an hour

About This Instructable




Bio: Al is a wearable tech entrepreneur and creator of a line of smart phone controlled LED handbags http://catclutch.com With 22 years of experience ... More »
More by alinke:Kitty Kraft - Hovercraft Kindle Art Make a Massive 4096 LED Display for Retro Pixel Art 
Add instructable to: