Build a Simple Arduino OBD2 Coolant Temperature Display with HC-05 Bluetooth

Are you fascinated by your car’s inner workings and crave real-time data beyond the dashboard gauges? Like many automotive enthusiasts, I wanted a straightforward way to monitor my engine’s coolant temperature, directly from the car’s computer (ECU). Accessing this data, however, isn’t as simple as plugging in a sensor. The automotive industry employs a variety of communication protocols within vehicles, and the OBD2 standard, while providing a universal connector, doesn’t standardize the data signals themselves. This is where clever solutions come into play.

To bridge this gap, we utilize a handy device: the ELM327 chip. This chip acts as a translator, capable of interpreting the ten different OBD2 protocols and converting them into a unified language we can work with. These chips are readily available and incredibly affordable, often found on eBay for around $5 with Bluetooth or USB connectivity – Bluetooth being the more economical option for wireless projects.

This project details how to create a basic OBD2 coolant temperature display using an Arduino microcontroller, an HC-05 Bluetooth module for wireless communication, and an LCD screen for a clear readout. It’s a fantastic way to delve into DIY car diagnostics and gain a deeper understanding of your vehicle’s data.

Parts You’ll Need for Your Arduino OBD2 Project

To get started, gather these components:

  • ELM327 Bluetooth OBD2 Adapter: This is your interface to the car’s OBD2 port. Expect to spend around $5 on eBay.
  • Arduino Uno (or similar): The microcontroller brain of the project. An Arduino Uno is a great starting point and costs about $5.
  • HC-05 Bluetooth Module: Enables wireless communication between the ELM327 adapter and your Arduino. Around $5.
  • LCD I2C Display: Provides a clear and easy-to-read display for the coolant temperature. These are also around $5.

These budget-friendly components make this project accessible for anyone interested in automotive electronics and Arduino tinkering.

Arduino Uno Connections

Wiring up your Arduino is straightforward:

  • HC-05 Bluetooth Module: Connect the HC-05’s TX pin to the Arduino’s RX pin, and the HC-05’s RX pin to the Arduino’s TX pin. Remember to connect the HC-05 to 5V power and ground from the Arduino.
  • LCD I2C Display: Connect the LCD I2C module’s SCL pin to the Arduino’s SCL pin (A5 on Uno) and the SDA pin to the Arduino’s SDA pin (A4 on Uno). The I2C display also needs 5V power and ground.

This simple wiring setup forms the foundation of your OBD2 data display.

HC-05 Bluetooth Module Configuration for OBD2

The HC-05 module needs to be configured to act as a Bluetooth master and automatically connect to the ELM327 Bluetooth OBD2 adapter (which will act as the slave). This involves using AT commands.

HC-05 Connections for AT Command Mode:

  • Connect the HC-05 to 5V power and ground.
  • Connect the HC-05 TX and RX pins to your Arduino’s RX and TX pins respectively (for sending AT commands via serial monitor).
  • Crucially, to enter AT command mode: Press and hold the small button on the HC-05 module before applying power. Release the button after power is applied. The HC-05 LED should blink slowly (approximately every 2 seconds) indicating AT command mode.

Programming the HC-05 with AT Commands:

  1. Open Serial Monitor: In the Arduino IDE, open the Serial Monitor and ensure it is set to “No line ending” and 38400 baud rate (or the baud rate appropriate for your HC-05 – check its datasheet if unsure, though 38400 is common for AT command mode).
  2. Enter AT Commands: Type the following AT commands one by one into the Serial Monitor and press “Send” after each. You should receive an “OK” response after each successful command.

Here are the AT commands to configure your HC-05 to persistently connect to your ELM327 adapter:

  • AT+RESET (Resets the HC-05 module)
  • AT+ORGL (Restores factory default settings – good practice to start clean)
  • AT+ROLE=1 (Sets the HC-05 to Master mode, enabling it to initiate connections)
  • AT+CMODE=0 (Sets connection mode to connect to a specific address – we want to connect only to the ELM327)
  • AT+BIND=1234,56,789c72 (Binds the HC-05 to the Bluetooth address of your ELM327 adapter. Replace 1234,56,789c72 with the actual Bluetooth address of your ELM327 adapter. You can usually find this address by scanning for Bluetooth devices with your phone or computer when the ELM327 is plugged into your car’s OBD2 port.)
  • AT+INIT (Initializes the Bluetooth module)
  • AT+PAIR=1234,56,789c72,20 (Pairs with the ELM327. Again, use your ELM327’s address. ,20 sets a 20-second timeout for pairing)
  • AT+LINK=1234,56,789c72 (Establishes the Bluetooth link to the ELM327)

Finding Your ELM327 Bluetooth Address:

You can usually find your ELM327’s Bluetooth address by using a smartphone or computer to scan for Bluetooth devices when the ELM327 adapter is plugged into your car’s OBD2 port and powered on (ignition usually needs to be at least in the “accessory” position). The address will be listed as part of the ELM327’s Bluetooth device name.

Important Note:

Disconnect the HC-05 module from the Arduino’s TX and RX pins while uploading new code to the Arduino. This prevents interference during the upload process.

LCD I2C Display Setup for Arduino

The LCD I2C display provides the visual output for your coolant temperature readings.

LCD I2C Connections:

  • As mentioned earlier, connect the LCD I2C module’s SCL pin to Arduino’s SCL (A5) and SDA to SDA (A4). Connect 5V and Ground.

Required Libraries:

You’ll need to include the following libraries in your Arduino sketch to control the LCD I2C display:

  • #include <Wire.h> (This library is usually included with the Arduino IDE, but ensure it’s present)
  • #include <LiquidCrystal_I2C.h> (You will likely need to install this library through the Arduino Library Manager: Sketch > Include Library > Manage Libraries… and search for “LiquidCrystal_I2C” by Francisco Malpartida).

Library Location Note:

While Wire.h is often found in the program files directory of the Arduino IDE, for proper library management, it’s best practice to ensure it’s also accessible within your user profile’s Arduino library directory, alongside LiquidCrystal_I2C.h.

Example LCD Initialization Code:

Include this code snippet in your Arduino sketch to initialize the LCD I2C display. The I2C address (0x3F in this example) might vary depending on your specific LCD I2C module. Check your module’s documentation or try scanning the I2C bus if you’re unsure (I2C scanner examples are readily available online).

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x3F, 16, 2); // Set the LCD I2C address, number of columns and rows

void setup() {
  lcd.init();                      // Initialize the LCD
  lcd.backlight();                 // Turn on backlight
  lcd.print("Coolant Temp:");     // Display initial text
}

void loop() {
  // ... (Your code to read OBD2 data and display it on the LCD will go here) ...
}

This code initializes the LCD, turns on the backlight, and displays a starting message. You would then expand the loop() function to include the code that communicates with the ELM327 via Bluetooth, sends OBD2 requests for coolant temperature, processes the data, and displays it on the LCD.

By combining these hardware components and software steps, you can create your own Arduino-based OBD2 coolant temperature display, gaining valuable insights into your vehicle’s engine performance and enjoying a rewarding DIY electronics project. This project serves as a starting point, and you can further expand it to monitor other OBD2 parameters, adding more sensors or functionalities to create a comprehensive custom car dashboard.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *