Main Content

Project Introduction
This is a digital dashboard display project intended to be used with a MegaSquirt2-Extra or MegaSquirt3 ECU (engine control unit). It’s 5-inch high-brightness LCD panel and LED strip makes viewing vital car/engine information quick and easy.

The firmware currently only has the option of displaying three different screens. One demo screen, and two screen showing some live information from the Megasquirt. The screens are flipped by touching the LCD screen (it’s a capacitive touch panel).

It’s not a simple project but the result is well worth the effort! The parts are relativity cheap to buy and you end up with a completely customizable digital dashboard display that rivals $1000+ commercial units.

As this display is CANbus based, it could also be programmed to work with data from many other aftermarket ECUs from manufacturers like Haltech, Link, EMS, FuelTech, ECUMaster, Motec, Syvecs, Emtron, etc, etc. It could also be programmed to support later model factory cars via a OBDII CANbus interface.

In my case, I have a 1990 Toyota Celica GT4 (aka Alltrac) that is used as a weekend club / race car. It has been running a MegaSquirt3 + MS3X ECU for about 6 years now. Previously I have used Android tablets/phones and RaspberryPi Linux devices to view ECU information, but these devices have proven to be slow to boot, unreliable and generally not fit for use in a harsh automotive environment no matter how much they are modified.

Disclaimer
I am employed by Crystalfontz, and have been for well over 10 years now.

This project however was developed for my own use. I needed a better digital dash display for my Celica, and the new Crystalfontz high brightness accelerated display was absolutely perfect for this use.

Why the ESP32?
The ESP32 system-on-chip is great for this project for a few reasons:

Speed, dual-core running at 240Mhz
Plenty of Flash memory (4MB)
Built-in CANbus interface
It’s fast SPI interface for LCD I/O
Ease of use via the Arduino framework
Cheap & easy to obtain
So far the Wifi/BLE capabilities of the ESP32 are not used in this project.

Why the Crystalfontz Accelerated LCD?
The particular Crystalfontz LCD panel (CFAF800480E0-050SC-A1-1) is perfect for this because:

It’s 5-inch size, and 800x480 resolution is a good middle-ground for a dash display.
It has a high-brightness backlight, so can be easily seen in sunlight.
It’s Bridgetek EVE2 graphics accelerator chip makes software development quicker, and reduces the processing power required by the main microcontroller (the ESP32) to render graphics.
Crystalfontz also sells an easy-to-use breakout board to use with this display (the CFA10098).
The graphics acceleration is provided by a FTDI/Bridgetek EVE2 FT813 chip on the LCD panel.

Most of the embedded graphics firmware I have personally written in the past has required rendering of graphics in a micro-controller/micro-processor display buffer, which is then pushed out to the LCD panel one whole screen at a time. This requires quite a powerful processor, a lot of graphics rendering code, and careful timing.

The EVE2 graphics accelerator does a lot of this for us. We (using the ESP32) give a list of graphic objects to display (text, lines, circles, bitmaps, etc) to the EVE2, which it then renders on the LCD for us. It’s relativity easy to use, yet surprisingly powerful.

It also handles the capacitive touch screen interface for us (not used in this project much so far).

Why CANbus?
CANbus is very flexible, simple, fast and robust. While this project could have supported the Megasquirt serial interface (and may do in the future), using the CANbus interface just makes more sense here. There is less programming needed for obtaining data from the MegaSquirt when using CANbus. The MegaSquirt ECU is set up to blindly send the data out over the CANbus; we just suck it up and display it.

It would also be quite simple to support other aftermarket ECUs that can be configured to send data over CANbus.

Circuit Explanation
The project has 5 main operational parts:

Crystalfontz EVE2 accelerated LCD panel
ESP32 system-on-chip
MCP2551 CANbus transceiver
WS2812b LED panel
5V Power supply
The NodeMCU-32s is the brains of the project. It has a ESP32 system-on-chip (micro-processor, ram, flash memory, etc) that runs the firmware we upload to it via the USB connector.

We use the ESP32 to obtain Megasquirt information from the CANbus, decode it, then create a display-list (graphics objects) which we send to the EVE2 accelerated LCD panel via the SPI interface. The ESP32 also sends color/brightness data to the WS2812b LEDs via a PWM (pulse-width modulated) interface.

The ESP32 contains a CANbus interface, but extra interfacing is required between it and the actual CANbus wires that go off to the MegaSquirt. The MCP2551 CANbus transceiver chip/module does this for us.

The two resistors (1K ohm and 2K ohm) are used as a voltage-divider. This is needed as the MCP2551 outputs a 5V signal, but the ESP32 can only handle 3.3V. The voltage divider reduces that 5V to approx 3.3V so we don’t damage the input pin on the ESP32.

5 volt supply is required for most of the circuitry in this project, so we need a voltage regulator to take the normal 9V to 16V present in a car (car batteries are 12V, but when a car is running its normally around 14V), down to 5V. It needs to supply up to 2 amps (the LCD backlight and WS2812b can use a decent amount of power).

The CFA10098 breakout board needs a 3.3 volt supply. The NodeMCU-32s has its own 3.3V regulator on-board, so we also use this to supply the CFA10098.

The Project Build
This is not the quickest or simplest project around, actually it’s somewhat the opposite. You’ll need a decent amount of electronics experience to build the display, and some C programming experience to customise the display.

Every build will be slightly different depending on exactly which components are used, and how they are laid out. The wiring for the most part should stay the same though. Improvements can definitely be made to my first build, on which this guide is based. I’ll update this guide with any improvements I do make in the future.

Note: I built this project and had it working before I started documenting and taking photos for this Instructable, hence why there are no photos of a blank unsoldered strip-board, the NodeMCU-32s unmounted, etc.

Future improvements
Support easier configuration by loading MegaSquirt INI file, and using a screen-layout configuration file (XML perhaps?)
Add analogue inputs for LCD backlight dimming, high-beam indicator, turning signals, fuel level sensor, etc
Cache EVE2 display list updates and push them out with a single SPI block writne for speed / efficiency
Add incoming data timeout checking
Add more graphics dial, gauge, etc types and options
Add more LED display options
Add a background image bitmap
Use the speaker output of the EVE2 / CFA10098 for warning signals
Add microSD card interface and support data logging (with access via wifi?)
Change from using Arduino subsystem to ESP-IF

Link to article