VEHICLE COMMUNICATION
Our first challenge for us was to gain communication with a vehicle. Initially we attempted to understand the CAN bus by just listening to the data being passed within the car through the OBD2 port. This approach led to us learning that all vehicle manufacturers use their own decoding language within their car, with little to no documentation on them. Even If we were able to decode any data, it would only be for a single manufacturer, which was impractical for our goals. We realized that we needed to do a little more research on the CAN bus and OBD2 protocol.
CAN BUS? OBD2?
The CAN bus is a two-wire communication system used in vehicles to enable electronic components, such as sensors, actuators, and engine control units, to communicate with one another. This system utilizes the On-Board Diagnostic (OBD2) protocol to define the communication format between the car and our product. OBD2 is a multi-brand standard, allowing us to easily interface with any vehicle manufactured after 1998 that is equipped with an internal combustion engine.
An OBD2 port from a 2014 Nissan Leaf used in our research.
THE OBD2 STANDARD
With a little more research, we learned that all cars must adhere to the OBD2 communication standard which was accessible by query-response messaging. This approach involved us using a microcontroller to send a request to the car with a specific parameter identification associated with a specific statistic, like RPM or speed for example. With much more documentation on this standard, we were able to decode the data we collected from the car.
The Response to an OBD2 Query
Engine RPM Decoded for the First Time
APP DEVELOPMENT
Now that we were communicating with the car, we were able to work on the bulk of our project, which included the microcontroller and smartphone programs. This involved translating input, decoding data, requesting permissions, and transmitting and receiving data through Bluetooth and a cloud-based server.