Home
Login / Signup
 di 

DIY OBD-II Car Computer Interface with LCD and Microcontroller

teaser2.JPG

You’re expecting a product video? Well, you are right. In this video, we are gonna show you how you can hookup your Nerdkit microcontroller kit to the on board computer of your car and read the data from it.
Since 1996, all cars have an on board computer that is hooked up to a bunch of sensors in the car. The primary purpose of these sensors is to provide diagnostic information about like car, like for example, for your emission or trouble shooting the engine light. We can also connect the computer to get interesting real time data such as speed and rpm. We have three wires that go into the Nerdkit and plug right into the port. The three wires are the battery, ground and the data line. Those three wires go up to the bread broad which holds a microcontroller and a small circuit that helps the interface with the car’s computer.
All cars are required to have an OBD II connector, but that doesn’t mean they all follow the same standards. In fact, most major car manufacturers follow different standards for communicating with this bus. So, before undertaking this project, make sure you know what standard your car follows. The car we are reading data from is a 1977 Chevy Cavalier which means it’s using the VPW standards mostly found on GM cars. Most uses high low voltages to represent 1s and 0s. However, the Variable Pulse Width protocol uses slightly different method. It varies the duration of the high and low periods to indicate 1s and 0s and it uses the voltage transition to indicate that the next bit has started. The continues within the car computer and retrieving the data about the velocity, rpm, percentage throttle and the internal coolant temperature. This circuit uses two Optocouplers to allow the microcontroller to communicate the high or low voltage levels used by the car. This way the two halves of the circuits are connected optically but not electrically. Inside these Optocouplers is the LED and the photo transistor. Current flowing through the LED produces light that turns on the photo transistor and this is how the photo transistor information is passed back and forth. We actually use two Optocouplers, one for transmitting to the car and one for receiving information from the car.
The code implements the VPW standards. It uses two timer interrupts and pin change interrupts. One of the timer interrupts is used for receiving and one for sending. And the pin change is used to figure out when a transition has happened. When we are trying to read the data from the car, we use the pin change interrupt to watch the voltage changes. When a transition has occurred, we check the timer and decide whether the car was sending a high bit or low bit. When we trying to send the information to the car, we use the other timer to decide when we want change the pin voltage depending on whether we want to send a 0 or a1. In the main loop, we keep sending the codes to read the values we want and display the values to the LCD.
For more information about our kits or more videos like this, visit www.nerdkits.com. Now let’s go for a drive.

Who's online

There are currently 0 users and 23 guests online.

Recent comments