Display Giulia and Stelvio JTDm additional data and monitor DPF regenerations using ESP32, LCD touchscreen display and Bluetooth OBD2 adapter.
I'm using ELECROW ESP32 display-3.5 Inch HMI Display 320x480 SPI TFT LCD Touch Screen (ILI9488, SKU DIS05035H) and ScanTool OBDlink LX 427201; I'm not providing links in this README as I am not affiliated to any of the companies I'm mentioning here.
Main screen:
- Absolute boost pressure (Bar)
- Current gear
- Coolant temperature (°C)
- Intake air temperature after the intercooler (°C)
- DPF clogging (%)
- DPF temperature (°C)
- DPF regeneration process (%)
- Distance from the latest DPF regeneration (Km)
Secondary screen:
- Total DPF regenerations
- Battery voltage (V)
- Battery IBS (%)
- Engine oil degradation (%)
- Tires temperatures (°C) - validation in progress
- Gearbox oil temperature (°C)
On first boot a touch screen calibration display wizard will start and calibration data will be persisted. On the devices screen, after scanning, you can pick an adapter to connect to.
Screen | 2.8'' | 3.5'' |
---|---|---|
Connection | ||
Main | ||
Main (while regenerating DPF) | ||
Secondary |
To switch between the 2 data screens use the button on the bottom/center. To reset the device use the button on the bottom/left; soft reset will just reboot while hard reset will remove calibaration and default device settings.
Giulia TFT automatically handles reboot or deepsleeps when the Bluetooth connection is not working properly or the engine has been switched off.
You can compile it using Visual Studio Code with PlatformIO plugin; the project provides builds for:
env:denky32
will build the ESP32 firmware with custom partition table (OTA ready)env:emulator_35_64bits
andenv:emulator_28_64bits
will build the emulator image so you can develop the UI without flashing it to the physical device
Emulator must be properly setup as described in the Run LittlevGL via PlatformIO README as it depends on the OS.
Relevant build_flags
:
GT_SPLASH_MESSAGE
: default is "Giulia TFT" but maybe you own a Stelvio 😄LV_FONT_*
andGT_FONT_*
: fonts for 3.5'' and 2.8'' displays are provided; check emulators flags if you need to build for 2.8 TFTGT_DEMO
: this build won't try to connect to any devices and some random demo values will be displayedGT_VERBOSE_LOG
: enable verbose serial loggingSPI_FREQUENCY
: display refresh frequency; the TFT I'm using for this project is serial and it' pretty slow but good enoughELM_DEBUG
: enable VERY verbose ELM protocol logs
In consts.h I do #define GT_ROTATION 3
because the TFT display is meant to be used in portrait mode and this rotation setting gives good visibility in landscape mode as I keep the device under AC controls using a smartphone holder; if you're driving a right-hand drive model you might wanna change this to 1
.
This software is licensed under GPLv3; it's based on these libraries/resources:
Fonts:
- 7segments font licensed SIL OPEN FONT LICENSE Version 1.1
- DPF icon licensed CC0 1.0 Universal Public Domain Dedication
- Coolant and vent icons from Car dashboard outline by LAFS collections licensed Creative Commons CC BY 3.0
Libraries:
- TFT_eSPI licensed MIT
- ELMDuino licensed MIT
- LVGL licensed MIT
- TFT_eWidget licensed 0BSD
- log4arduino licensed MIT
- XTronical_XT_DAC_Audio licensed GPLv3
- lv_drivers emulator only - licensed MIT
This a project-for-fun; feel free to fork, build, experiment but having a full time job I won't be able to give any support to this. Also I'm not a C/C++ developer and you might get it from the code quality 😄