Skip to content

ESP32 based vehicle gauge to measure Battery Voltage and Engine Temperature using a GC9A01 TFT Display.

License

Notifications You must be signed in to change notification settings

minindupasan/esp32-gauge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32 Vehicle Gauge with GC9A01 TFT Display using LVGL

This project uses an ESP32 microcontroller to create a vehicle gauge and displaying the information on a GC9A01 TFT display using the LVGL library.

Components Required

  • ESP32 Development Board
  • GC9A01 TFT Display
  • Voltage Divider (for measuring battery voltage)
  • Temperature Sensor (e.g., LM35, DS18B20, etc.)
  • Connecting Wires
  • Power Supply

Wiring Diagram

Wiring Diagram

Connecting the GC9A01 TFT Display to ESP32

  • VCC -> 3.3V (ESP32)
  • GND -> GND (ESP32)
  • CS -> GPIO 22 (ESP32)
  • SDI(MOSI)/DC -> GPIO 16 (ESP32)
  • SCK -> GPIO 18 (ESP32)
  • RESET -> GPIO 4 (ESP32)
  • SDO(MISO) -> Not Connected
  • BL -> Not Connected

Connecting the Voltage Divider and Temperature Sensor to ESP32

  • Voltage Divider:

    • Connect the positive end to the battery.
    • Connect the divided voltage output to GPIO 34 (ESP32).
    • Connect the ground end to GND (ESP32).
  • Temperature Sensor (e.g., LM35):

    • VCC -> 3.3V (ESP32)
    • GND -> GND (ESP32)
    • Output -> GPIO 35 (ESP32)

Software Setup

1. Install PlatformIO

  1. Download and install PlatformIO as an extension in Visual Studio Code or other compatible IDEs.

2. Install Required Libraries

Install the following libraries using PlatformIO:

  • lvgl
  • TFT_eSPI

3. Configure the GC9A01 TFT Display

Edit the include/User_Setup.h file. Copy the content of the provided User_Setup.h into your setup file.

4. Code

Edit the main.cpp file as you prefer.

About

ESP32 based vehicle gauge to measure Battery Voltage and Engine Temperature using a GC9A01 TFT Display.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published