For car enthusiasts and DIY electronics hobbyists, accessing and displaying real-time vehicle data can be a fascinating project. This guide outlines how to create a simple yet effective coolant temperature display for your car using readily available components: an Arduino microcontroller, an OBD2 Bluetooth adapter with ELM327 chip, an I2C LCD screen, and an HC05 Bluetooth module. This project taps into your car’s onboard diagnostics system to provide a digital readout of your engine’s coolant temperature, offering a practical and insightful look under the hood.
Parts You’ll Need for Your OBD2 Arduino Display
To get started, gather the following components. These are widely accessible online and are cost-effective, making this project both educational and budget-friendly.
- ELM327 Bluetooth OBD2 Adapter: This crucial component acts as the interface between your car’s OBD2 port and the Arduino. It translates the complex automotive protocols into a simpler serial data format that the Arduino can understand. Look for a Bluetooth version for wireless connectivity.
- Arduino Uno (or compatible): The brain of the operation. The Arduino microcontroller will process the data received from the ELM327 and display it on the LCD screen. An Arduino Uno is recommended for its ease of use and ample resources for this project.
- HC05 Bluetooth Module: This Bluetooth module enables wireless communication between the Arduino and the ELM327 OBD2 adapter. The HC05 will be configured as the master, initiating a connection with the ELM327 slave device.
- LCD I2C Display: An I2C LCD display simplifies wiring by using only two data pins (SDA and SCL) for communication. This 16×2 LCD will display the coolant temperature readings clearly.
Wiring the Arduino for OBD2 Data Display
The wiring for this project is straightforward, leveraging the I2C interface for the LCD and serial communication for the Bluetooth module.
Arduino Uno Connections:
-
HC05 Bluetooth Module:
- HC05 TX pin to Arduino RX pin (Pin 0)
- HC05 RX pin to Arduino TX pin (Pin 1)
- HC05 VCC to Arduino 5V
- HC05 GND to Arduino GND
-
LCD I2C Display:
- LCD I2C SDA pin to Arduino SDA pin (Pin A4)
- LCD I2C SCL pin to Arduino SCL pin (Pin A5)
- LCD I2C VCC to Arduino 5V
- LCD I2C GND to Arduino GND
Note: When uploading code to the Arduino, it’s advisable to disconnect the HC05 TX and RX pins to prevent interference during the upload process.
Configuring the HC05 Bluetooth Module for ELM327 Connection
The HC05 module needs to be configured to act as a Bluetooth master and automatically connect to the ELM327 OBD2 adapter. This is done using AT commands.
HC05 Bluetooth Setup Steps:
-
Enter AT Command Mode: To enter AT command mode, press and hold the small button on the HC05 module while applying power. Release the button after power is applied. In AT command mode, the HC05 LED typically blinks slowly (e.g., every 2 seconds).
-
Connect via Serial Monitor: Open the Arduino Serial Monitor, set the baud rate to 38400, and select “Both NL & CR” or “Newline”.
-
Issue AT Commands: Type the following AT commands one by one and send them to the HC05 module by pressing Enter after each command.
AT+RESET
(Resets the module)AT+ORGL
(Restores to default settings – optional but recommended for a clean setup)AT+ROLE=1
(Sets the HC05 to Master mode)AT+CMODE=0
(Sets connection mode to connect to a specific address)AT+BIND=<ELM327 Bluetooth Address>
(Binds the HC05 to the Bluetooth address of your ELM327 adapter. Replace<ELM327 Bluetooth Address>
with your ELM327’s Bluetooth address, removing colons. For example, if your ELM327 address is12:34:56:78:9C:72
, the command would beAT+BIND=1234,56,789C72
)AT+INIT
(Initializes Bluetooth)AT+PAIR=<ELM327 Bluetooth Address>,20
(Pairs with the ELM327. The,20
sets a 20-second timeout for pairing. Use the same address as in theAT+BIND
command)AT+LINK=<ELM327 Bluetooth Address>
(Establishes the Bluetooth link. Use the same address as in theAT+BIND
command)
To find your ELM327 Bluetooth address, you may need to use a Bluetooth scanning app on your phone or computer.
Setting Up the I2C LCD Display
The I2C LCD display requires a library to simplify its use with Arduino.
LCD I2C Display Setup:
-
Install the LiquidCrystal_I2C Library: If you haven’t already, install the
LiquidCrystal_I2C
library in your Arduino IDE. You can do this through the Library Manager (Sketch > Include Library > Manage Libraries…) and search for “LiquidCrystal_I2C” by Frank de Brabander. -
Include Libraries in your Arduino Sketch: In your Arduino code, include the necessary libraries:
#include <Wire.h> #include <LiquidCrystal_I2C.h>
-
Initialize the LCD: You need to initialize the
LiquidCrystal_I2C
object with the correct I2C address and LCD dimensions. The I2C address is often0x27
or0x3F
. You may need to try both if you’re unsure.LiquidCrystal_I2C lcd(0x3F, 16, 2); // Initialize the LCD for 16x2 display with address 0x3F
In the
setup()
function of your Arduino code, initialize the LCD:lcd.begin(); lcd.backlight(); // Turn on the backlight (optional) lcd.print("Coolant Temp:"); // Example initial message
With the hardware setup complete and the HC05 and LCD configured, you’re ready to write the Arduino code to read coolant temperature data from the OBD2 port, process it, and display it on the I2C LCD. This project provides a hands-on way to understand automotive diagnostics and embedded systems, bringing vehicle data to your fingertips.