Arduino OBD2 ELM327 I2C-LCD HC05 Bluetooth

20,161

25

14

Intro: Arduino OBD2 ELM327 I2C-LCD HC05 Bluetooth

Intro

This is a project of mine that I wanted to share with anyone that is interested in same thing that I was. I just wanted a simple output of the Coolant Temperature data that the ECU already has in its memory. That's easier said than done. Since the car industry has decided to use a different variety of protocols internally. The OBD2 standard is not really a standard you would typically think of. The only thing that is considered standard in my mind is the Connector. But as far as the signals that's all up in the air. That is why you need a middle man. That middle man is the ELM327 chip. The Chip translates all the 10 different protocols to a single protocol. Now a days they come in a cheap package. Ebay $5.00 dollars with Bluetooth or a USB adapter but Bluetooth is cheaper.

Other parts you will need is an Arduino Microcontroller, a Bluetooth adapter and a Display for the output.

Here are the parts needed

  • ELM327 Bluetooth OBD2 Adapter $5.00
  • Arduino Uno $5.00
  • HC05 Bluetooth Module $5.00
  • LCD I2C Display $5.00

Arduino Uno

Connections

  • Connect HC05 TX RX to Rx TX pins of Arduino
  • Connect LCD I2C to SCL SDA Pins of Arduino (Pins A4 A5 are mirrored to SCL SDA Pins)

HC05 Bluetooth Setup

Connections

HC05 will be the Master. ELM327 will be the Slave.

  • Connect HC05 to 5v power and ground and to TX/RX pins of Arduino

Programming

  • Hold Button before power up to force HC05 into AT command mode.

(Should blink on off every 2 seconds)

  • Open Serial Monitor or Hyper terminal to COM Port

My ELM327 Address is 12:3.4:56:78:9c:72 ( You need to find yours)

My HC05 Address is 00:14:03:05:97:07 ( AT+ADDE? = +ADDR: 14:3:59707 ) no zeros ( Not really needed )

AT Commands to set up HC05 to connect permanantly to ELM327

  • AT+RESET
  • AT+ORGL (Set to original)
  • AT+ROLE=1 (Set to Master)
  • AT+CMODE=0 (Set connect to a specific address)
  • AT+BIND=1234,56,789c72
  • AT+INIT (Need to connect)
  • AT+PAIR=1234,56,789c72,20 (,20 means 20 second timeout)
  • AT+LINK=1234,56,789c72

Note:

When programming Arduino remove HC05 connection from TX RX Pins of Arduino

LCD I2C Display

  • Connect LCD I2C to SCL SDA Pins of Arduino (Pins A4 A5 are mirrored to SCL SDA Pins)
  • Copy Following libraries to the User's profile Arduino Library
  • #include <liquidcrystal_I2C.h>
  • #include <Wire.h>

Note: The Wire.h Library is in the Program Files folder but need to be copied to the Library folder of the user's profile. It must be in the same library directory as the LiquidCrystal_I2C.h library

C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src\Wire.h

C:\Users\alien\Documents\Arduino\libraries\Wire\Wire.h

C:\Users\alien\Documents\Arduino\libraries\LiquidCrystal_I2C

Need following code for I2C display. The hardware ID is hardcoded in theI2C chip. In this case it's 0x3F

  • LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
  • lcd.begin(16, 2);

Step 1: Upload the Program to the Arduino

Step 2: Connect the LCD Display and Bluetooth HC05 to the Arduino

Step 3: Connect the ELM327 to the OBD2 Connector of Your Car

Step 4: Turn the Ignition on or Start Your Car to Display the Coolant Temperature

Share

    Recommendations

    • Furniture Contest 2018

      Furniture Contest 2018
    • Fix It! Contest

      Fix It! Contest
    • Metalworking Contest

      Metalworking Contest

    14 Discussions

    0
    None
    mahdypawe

    Question 5 months ago on Step 4

    Hi was a very interesting project, I want to know how can I display some parameters on the LCD?

    For example, RPM and Vehicle Speed displays.

    Meanwhile, I could display it with a PID code alone, and I could not do it in a few parameters. Thank you for explaining it.

    I used Google Translator for translation. Sorry, if it's spelling mistaken.

    Thank you and waiting for your opinion.

    1 more answer
    0
    None
    AhmedL31mahdypawe

    Answer 3 months ago

    can you tell me how could you have PID codes ? because the problem is in getting those codes but displaying it's so easy :) and i guess PID are different between car and another so if you know how to determine them, then please tell me

    0
    None
    stevedee78

    Question 7 months ago

    Where can I find information if I want to add the RPM or speed, for example?

    1 more answer
    0
    None
    Matt Belle

    Question 7 months ago

    Do you know how to lift the car windows when I press the close door button on my remote

    0
    None
    stevedee78

    Question 7 months ago

    Parse the received string, retrieve only the hex value for temperature Example: 32 is the 11 and 12th character
    // 0105[41 05 32 Correct value reading back 10 degrees. (11,13 or even 11,14 works)

    Can you explain that to me?

    0
    None
    AhmetB29

    9 months ago

    Hi,

    How can i found my elm327 adapter's mac adress?

    0
    None
    MTecho

    9 months ago

    Something isn't right, doesn't work

    0
    None
    boualis

    1 year ago

    when I tape "AT+INIT,I got no response,and the LED of my HC-05 start blinking twice each 2 seconds.

    1 reply
    0
    None
    mmaleficarumboualis

    Reply 9 months ago

    Did you figure out why that is happening ? I'm running with the same issue. When I type AT+INIT the module is changing between connecting and inquiring mode but AT+PAID and AT+LINK does nothing. Thanks

    0
    None
    mmaleficarum

    9 months ago

    Why are you posting an incomplete "tutorial"?

    0
    None
    mmaleficarum

    10 months ago

    I cant see the OBDII code, this is just the bluetooth handling ? Which library are you using ?

    0
    None
    LukaszS5

    1 year ago

    in your code is many errors and not work ,the first is serial bound ,hc 05 running on 38400 baud rate

    Cool project. You should enter this in the First Time Authors contest that is currently running,