Arduino Bluetooth OBD2: DIY Coolant Temperature Display

Connecting your car to the digital world is easier than you think. This guide provides a step-by-step tutorial on building a custom coolant temperature display using an Arduino, a Bluetooth module, and an OBD2 adapter. This project leverages the existing data from your car’s ECU to provide a simple, real-time readout of your engine’s coolant temperature.

The OBD2 standard, while seemingly universal, presents challenges due to the variety of internal protocols used by car manufacturers. This project utilizes an ELM327 chip, acting as a translator between these diverse protocols and a single, understandable output. This chip, readily available in affordable Bluetooth or USB adapters, forms the core of our communication bridge.

Components Required

Building this Arduino Bluetooth Obd2 project requires a few readily available components:

  • ELM327 Bluetooth OBD2 Adapter: This adapter connects to your car’s OBD2 port and transmits data wirelessly. (~$5.00)
  • Arduino Uno: This microcontroller serves as the brain of the project, processing data and controlling the display. (~$5.00)
  • HC-05 Bluetooth Module: This module allows the Arduino to communicate with the ELM327 adapter. (~$5.00)
  • I2C LCD Display: This display shows the coolant temperature reading. (~$5.00)

Arduino Uno Setup

Connections:

  • Connect the HC-05 TX pin to the Arduino RX pin.
  • Connect the HC-05 RX pin to the Arduino TX pin.
  • Connect the LCD I2C SDA pin to the Arduino SDA pin (A4).
  • Connect the LCD I2C SCL pin to the Arduino SCL pin (A5).

HC-05 Bluetooth Configuration

The HC-05 module acts as the master, initiating the connection to the ELM327 (slave).

Connections:

  • Connect the HC-05 to 5V power, ground, and the Arduino’s TX/RX pins.

Programming:

  1. AT Command Mode: Before powering on the HC-05, press and hold its button. The LED should blink slowly (every 2 seconds), indicating AT command mode.

  2. Connect to HC-05: Use a serial monitor (like the one in the Arduino IDE) or a terminal program to connect to the HC-05’s serial port.

  3. Obtain Bluetooth Addresses: Determine the Bluetooth addresses of both the ELM327 and the HC-05. You can typically find this information in the device documentation or through a Bluetooth scanner application. The address format is similar to “12:34:56:78:9A:BC”.

  4. Configure HC-05: Use the following AT commands to configure the HC-05 for a permanent connection to the ELM327. Replace placeholders with your ELM327’s address:

    AT+RESET
    AT+ORGL 
    AT+ROLE=1        (Set as Master)
    AT+CMODE=0       (Connect to specific address)
    AT+BIND=12,34,56789ABC (Replace with ELM327 address, adjusted format)
    AT+INIT
    AT+PAIR=12,34,56789ABC,20 (Replace with ELM327 address, adjusted format, 20-second timeout)
    AT+LINK=12,34,56789ABC (Replace with ELM327 address, adjusted format)

    Important: Disconnect the HC-05 from the Arduino’s TX/RX pins while uploading the Arduino sketch. Reconnect after the upload is complete.

LCD I2C Display Setup

Connections:

  • Connect the LCD I2C to the Arduino’s SCL (A5) and SDA (A4) pins.

Code:

Include the necessary libraries in your Arduino sketch:

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

Note: Ensure the Wire.h library is in your Arduino libraries folder.

Initialize the LCD with the correct I2C address (commonly 0x27 or 0x3F). You may need to use a I2C scanner sketch to determine the address of your specific display.

LiquidCrystal_I2C lcd(0x27, 16, 2); // Adjust address if needed
lcd.init();
lcd.backlight();

This setup lays the foundation for reading and displaying data from your car’s OBD2 port using an Arduino and Bluetooth. The next step involves writing the Arduino code to request and process the coolant temperature data from the ELM327. Future enhancements could include adding more gauges or logging data to an SD card.

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 *