An Open HW/SW API for Your Car

Today’s post is a bit of a diversion, but I think it will be of interest to almost everyone interested in hobby robotics.  Rather than about robotic vehicles, it’s about a new system in development that will let us develop our own apps based on data from the full-sized car you drive around in.  About 5 years ago in my day job, I argued the future of in-vehicle electronics would include an automaker supported read-only interface to the data bus, available to third party developers to build upon.  Many auto company engineers I worked with stated this would never happen and never be supported.  Well, for some car companies, #define  NEVER  5

Introduction

“Many companies are already offering tools to hook into the driver’s interface, but for the most part they have limited availability for hobbyists and developers. What if the system was designed from the ground up to be open source and to give insight into the vehicle itself?”  This sounds like a Maker’s daydream, but it’s about to be reality, at least for Ford owners.  Ford Motor Company and Bug Labs have teamed up to produce the OpenXC Platform, now in limited beta testing.

This will provide read-only access via USB to many vehicle parameters in real-time, allowing developers, including hobbyists, to write applications running on whatever hardware they choose to interface.  The system is currently in limited beta testing.  According to press reports, beta testers include the University of Michigan, MIT, Stanford, Weather Underground, and India’s HCL Technologies.

Background

All modern cars use a data bus, the CAN bus, for exchanging information between the various electronic controller modules and other devices found on today’s cars.  One device on the bus provides a port for accessing the bus.  It is often found somewhere near the driver under the dashboard.  This On Board Diagnostics II (OBD-II) port is required by law, as it is used to check for proper operation of air pollution control equipment.    However, once it was required, automakers began using it as a general diagnostics port.  There are standard codes for much of the data, however automakers are not required to support most of these codes, and also typically add proprietary codes. The codes and their availability also vary by model and model year.

the OpenXC Platform

Based on my reading of the project’s website,  the project provides a read-only interface (called the CAN translator module) that takes data from the OBD-II port, translates it into non-proprietary codes, and makes it available over a USB port.  Apparently the hardware in the reference implementation uses a ChipKit board, which uses a PIC microcontroller but can run Arduino code, along with a network shield.   They state that the initial testers have access to the C code, but I’m wondering if it will be released to hobbyists, as it may give insights into Ford’s proprietary codes (they imply as much, stating that automakers might just supply compiled code).  You can plug whatever you want into the USB port, but they are developing a reference implementation built around an Android tablet computer.

While there are over 100 data elements available from the OBD-II, they are starting with support for just a subset, which can be found on the project’s Signal Translation Specification page.  They include:

  • steering wheel angle
  • engine_speed (RPM)
  • vehicle speed
  • accelerator pedal position
  • brake pedal status
  • odometer
  • fuel level
  • fuel consumed since restart
  • windshield wiper status
  • latitude and longitude (presumably only for GPS-equipped vehicles)

As I mentioned above, codes vary by make, model, and year.  Currently, the system is said to support Ford 2011/2012 Focus, 2012 Mustang, 2012 Fiesta, and 2011 Figo.  While limited to Fords at present, they hope that this becomes a broader de facto standard.

I think this is a taste of exciting things to come, and I’d love to get my hands on a developer kit.

Picture from http://openxcplatform.com/developers/vehicle-interface/assembly.html,  used under Creative Commons Attribution 3.0 License.