A complete digital dashboard replacement for 1984-1996 Chevrolet Corvette (C4) featuring real-time sensor monitoring, fuel consumption tracking, and multiple display styles.
Hi! I'm Yahor, an automotive electronics enthusiast who built a complete digital dashboard replacement for C4 Corvettes using Arduino, ESP32, and Raspberry Pi.
- 5 retro-themed dashboard styles (Synthwave, Citroën BX, Subaru XT, Nissan 300ZX, C4 Classic)
- Real-time ALDL ECU integration for accurate fuel consumption
- Triple display setup with hardware-accelerated graphics
- Open-source project free for personal use
Your coffee helps me continue developing new features, adding more vehicle compatibility, and maintaining this free project for the automotive community!
☕ Every coffee = More dashboard styles & features
📧 Contact: chupin.ye@gmail.com
Your support helps keep this project free and growing
Or QR code:
Thank You!
You can switch between styles by pressing simultaneously AVG MPG and TRIP ODO buttons
Watch the video of Dashboard work
arduino_code.cpp- Main Arduino firmware for sensor reading and data processingarduino_combined_dashboard.py- Raspberry Pi dashboard application with all display stylesREADME.md- This comprehensive setup and usage guide
coolant_temp_symbol.png- Coolant temperature gauge iconoil_symbol.png- Oil pressure gauge icongas_pump_symbol.png- Fuel level gauge iconbattery_symbol.png- Battery voltage gauge icon
ALDL_INTEGRATION_FINAL_SUCCESS.md- ALDL fuel consumption integration detailsC4_DASHBOARD_COMPLETE_SETUP.md- Complete hardware setup guideFUEL_DISPLAY_IMPROVEMENT.md- Fuel display architecture improvementsALDL_PERFORMANCE_FIX.md- Performance optimization detailsdebug_timing_analysis.py- Performance analysis tool (development use)
C4-Corvette-Dashboard/
├── arduino_code.cpp # Arduino firmware
├── arduino_combined_dashboard.py # Main dashboard application
├── README.md # Setup guide
├── coolant_temp_symbol.png # Required icon
├── oil_symbol.png # Required icon
├── gas_pump_symbol.png # Required icon
├── battery_symbol.png # Required icon
├── docs/ # Documentation (optional)
│ ├── ALDL_INTEGRATION_FINAL_SUCCESS.md
│ ├── C4_DASHBOARD_COMPLETE_SETUP.md
│ ├── FUEL_DISPLAY_IMPROVEMENT.md
│ └── ALDL_PERFORMANCE_FIX.md
└── tools/ # Development tools (optional)
└── debug_timing_analysis.py
- Essential:
arduino_code.cpp,arduino_combined_dashboard.py, symbol images - Recommended:
README.mdfor setup instructions - Optional: Documentation files for advanced configuration and troubleshooting
This project replaces the original C4 Corvette dashboard with a modern digital system featuring:
- Triple Display Setup: Speedometer, Tachometer, and DSI gauges
- 5 Display Styles: Synthwave, Citroën BX, Subaru XT, Nissan 300ZX, and C4 Classic
- Real-time ALDL Integration: Dedicated ESP32 board for ECU fuel consumption data
- Comprehensive Sensor Monitoring: Speed, RPM, fuel, oil, coolant, battery
- Advanced Fuel Calculations: Real-time MPG and GPH from ECU data with accurate display across all styles
- Hardware Acceleration: 20Hz refresh rate with optimized performance
- Robust Error Handling: Comprehensive safety checks and graceful degradation
Complete system wiring diagram showing Arduino Mega, ESP32 ALDL board, Raspberry Pi, and all sensor connections
- Primary dashboard control and sensor reading
- 20Hz main loop for smooth gauge updates
- Switch monitoring and user interface
- Communication hub for all components
- Real-time ALDL ECU data capture from 1988 Corvette L98 TPI
- Non-blocking fuel consumption calculation
- Serial communication with main Arduino
- Isolated processing - zero impact on dashboard performance
- Triple display management (1920x1080 + 800x480 + 800x480)
- Advanced graphics rendering with hardware acceleration
- Style switching and user interface
- Data logging and persistent storage
The system uses a dedicated ESP32 board for ALDL (Assembly Line Diagnostic Link) integration:
- GPIO19: ALDL ECU data input (160 baud, 6.24ms bit timing)
- GPIO17: Serial TX to Arduino (9600 baud)
- Real-time ECU fuel consumption calculation in lb/hr
- Proven timing method from ALDL_reading_final.cpp
- Automatic fuel counter rollover handling
ECU → ESP32 (ALDL capture) → Arduino (Serial) → Raspberry Pi → Dashboard
- ECU fuel counter and fuel constant from ALDL stream
- Real-time lb/hr calculation using injector flow rates
- Conversion to GPH for dashboard display (lb/hr ÷ 6.0)
- Instant MPG calculation using Speed ÷ Fuel Flow
📋 See the complete wiring diagram above for visual reference
ESP32 GPIO17 → Arduino Pin 19 (Serial1 RX)
ESP32 GPIO19 → ALDL wire from ECU (Pin E on diagnostic connector)
ESP32 GND → Arduino GND (common ground essential!)
ESP32 USB → 5V Power supply
- Analog Inputs: Fuel (A15), Oil (A1), Coolant (A2), Oil Temp (A3), Battery (A4), Brightness (A9), Tach (A7), Speed (A8)
- Digital Inputs: Various switches (Pins 4-16) with internal pull-ups
- Serial Communication: ESP32 (Pin 19), Raspberry Pi (USB)
This project replaces the traditional analog gauges with a modern digital dashboard system using Arduino Mega and Raspberry Pi. It provides real-time monitoring of all essential vehicle parameters with enhanced features like instant/average MPG calculation, fuel consumption tracking, and customizable display themes.
- Real-time sensor monitoring: Speed, RPM, fuel level, oil pressure, coolant temperature, oil temperature, battery voltage
- Advanced fuel tracking: Instant MPG, Average MPG, GPH consumption with accurate display across all styles
- ALDL integration: Real-time ECU data for precise fuel consumption calculations
- Multiple display styles: Synthwave, Citroën BX, Subaru XT, Nissan 300ZX, Corvette C4 themes
- Triple display setup: Left speedometer, center DSI gauges, right tachometer
- Hardware acceleration: Optimized for smooth 20Hz refresh rate with robust error handling
- Ground loop compensation: Software correction for electrical interference
- Raspberry Pi 4 (recommended for performance)
- Arduino Mega 2560 (main sensor interface and dashboard control)
- ESP32 Development Board (dedicated ALDL ECU data processing)
- Triple Display Setup:
- Left: HDMI-1 (1024x768) - Speedometer
- Center: DSI-1 (800x480) - Official Pi touchscreen with gauges
- Right: HDMI-2 (1024x768) - Tachometer
- Fuel Level: Pin A15 (470Ω pull-up + 100µF filter)
- Oil Pressure: Pin A1 (1kΩ pull-up)
- Coolant Temperature: Pin A2 (1kΩ pull-up)
- Oil Temperature: Pin A3 (1kΩ pull-up)
- Battery Voltage: Pin A4 (voltage divider)
- Brightness Dimmer: Pin A5 (voltage divider)
- Tachometer: Pin A7 (LM2907N output)
- Speedometer: Pin A8 (LM2907N output)
- ESP32 Communication: Pin 19 (9600 baud serial from ESP32 ALDL board)
- ESP32 Development Board (any ESP32 with GPIO17 and GPIO19)
- ALDL ECU Connection: GPIO19 (direct connection to ECU diagnostic port)
- Arduino Communication: GPIO17 (serial TX to Arduino Pin 19)
- Power: USB 5V (separate from Arduino)
- Ground: Common ground with Arduino (essential for serial communication)
- Average MPG Switch: Pin 15
- Instant MPG Switch: Pin 5
- Average Fuel Reset: Pin 4
- Trip Odometer Switch: Pin 16
- Fuel Range Switch: Pin 8
- Trip Odometer Reset: Pin 7
- Volts Switch: Pin 10
- Coolant Temp Switch: Pin 11
- Oil Pressure Switch: Pin 12
- Oil Temp Switch: Pin 13
- Metric Switch: Pin 14
- Install Raspberry Pi OS Lite (for optimal performance)
sudo apt update
sudo apt install python3-pygame python3-serial python3-pip
sudo apt install xserver-xorg-core xinit x11-xserver-utils xrandr- Configure GPU Memory in
/boot/firmware/config.txt:
gpu_mem=128
dtoverlay=vc4-kms-v3d
hdmi_force_hotplug=1
hdmi_drive=2
disable_overscan=1
- Setup Display Configuration:
DISPLAY=:0 xrandr --output HDMI-1 --mode 1024x768 --pos 0x0 --rotate normal
DISPLAY=:0 xrandr --output HDMI-2 --mode 1024x768 --pos 1024x0 --rotate normal
DISPLAY=:0 xrandr --output DSI-1 --mode 800x480 --pos 2048x0 --rotate normal- Install Dashboard Files:
- Copy
arduino_combined_dashboard.pyto/home/pi/ - Copy symbol images (
*.png) to/home/pi/ - Set up systemd service for auto-start
- Copy
-
Install ESP32 Board Support:
- Open Arduino IDE
- Go to File → Preferences
- Add to Additional Board Manager URLs:
https://dl.espressif.com/dl/package_esp32_index.json - Go to Tools → Board → Boards Manager
- Search for "ESP32" and install "ESP32 by Espressif Systems"
-
Upload ESP32 Code:
- Select Board: "ESP32 Dev Module" (or your specific ESP32 board)
- Select correct COM port for ESP32
- Upload
ESP32_ALDL_Dedicated.ino
-
Verify ESP32 Operation:
- Open Serial Monitor at 115200 baud
- Should see:
"ESP32 ALDL Board Starting..." - With ALDL connected:
"ALDL Fuel: X.XXX lb/hr"
-
ESP32 Wiring:
ESP32 GPIO17 → Arduino Pin 19 ESP32 GPIO19 → ALDL wire from ECU ESP32 GND → Arduino GND
- Install Arduino IDE
- Upload
arduino_code.cppto Arduino Mega - Verify serial connection at 115200 baud
- Connect ALDL wire from ECU Pin E (19) to Arduino Pin 19
Important: This system includes software ground loop compensation specifically calibrated for electrical interference patterns. This may not be needed for all vehicles.
To disable ground loop compensation:
const bool ENABLE_FUEL_GROUND_LOOP_COMPENSATION = false;To enable (default):
const bool ENABLE_FUEL_GROUND_LOOP_COMPENSATION = true;The fuel sensor calibration is specific to the circuit design and may need adjustment for different vehicles:
Current calibration (470Ω pull-up + 100µF filter):
- Full tank: ~0V
- Empty tank: ~0.78V
- Current example: 0.18V = 45% fuel
To recalibrate for your vehicle:
- Measure actual voltages at different fuel levels
- Update the voltage thresholds in
fuelLevelPercent()function - Adjust ground loop compensation values if needed
All sensors use lookup tables based on C4 Corvette specifications. For other vehicles, you may need to adjust these values:
C4 Corvette specifications:
- 185Ω @ 210°F (hot)
- 3400Ω @ 68°F (room temperature)
- 7500Ω @ 39°F (cold)
To calibrate for your vehicle:
- Measure sensor resistance at known temperatures
- Update the resistance tables in
coolantTemperatureFahrenheit()andoilTemperatureFahrenheit() - Adjust calibration factors if readings don't match original cluster
Example calibration adjustment:
// Temperature calibration factor based on original cluster comparison
sensorResistance = sensorResistance * 1.47; // Adjust this multiplierC4 Corvette specifications:
- 1Ω @ 0 PSI (no pressure)
- 43Ω @ 30 PSI (normal idle)
- 86Ω @ 60 PSI (driving)
- 120Ω @ 80 PSI (maximum)
Non-linear calibration applied:
if (pressure < 10) {
pressure = pressure * 4.0; // Higher correction for low pressure
} else if (pressure < 30) {
pressure = pressure * 2.5; // Moderate correction
} else {
pressure = pressure * 1.5; // Minimal correction for high pressure
}To calibrate for your vehicle:
- Compare readings with original cluster or known good gauge
- Adjust the resistance table values in
oilPressurePSI() - Modify the non-linear correction factors as needed
Circuit-specific calibration (depends on your pull-up resistor and circuit design):
Current setup (470Ω pull-up + 100µF filter):
- Full tank: ~0V (0Ω resistance)
- Current example: 0.18V = 45% fuel (26Ω resistance)
- Empty tank: ~0.78V (90Ω resistance)
To calibrate for different circuit or vehicle:
- Measure actual voltages at known fuel levels
- Update voltage thresholds in
fuelLevelPercent()function:
if (voltage <= 0.05) {
fuel_percent = 100.0; // Full tank threshold
} else if (voltage >= 0.78) {
fuel_percent = 0.0; // Empty tank threshold
}Voltage divider calibration (R1=14.7kΩ, R2=5.5kΩ):
return voltage * 3.79; // Calibration factorTo calibrate:
- Compare Arduino reading with multimeter measurement
- Adjust the multiplier (3.79) to match actual battery voltage
Voltage range mapping (6V-14.5V input to 20-100% brightness):
float brightness = ((actualVoltage - 6.0) / (14.5 - 6.0)) * 80.0 + 20.0;To calibrate:
- Measure actual dimmer voltage range in your vehicle
- Adjust the voltage range (6.0V to 14.5V) and brightness range (20% to 100%)
The dashboard implements adaptive smoothing to eliminate sensor noise while maintaining responsiveness:
Each sensor uses a weighted moving average with configurable parameters:
smoothed_value = (old_value * (1 - smoothing_factor)) + (new_value * smoothing_factor)const float FUEL_SMOOTHING = 0.05; // 5% new, 95% old (heavy smoothing)
const float FUEL_DEADBAND = 0.5; // Ignore changes < 0.5%Adaptive behavior:
- Engine running: Even heavier smoothing (0.03) to reduce electrical noise
- RC filter: Hardware 100µF capacitor provides additional noise reduction
const float RPM_FAST_SMOOTHING = 0.8; // Fast response for large changes (>100 RPM)
const float RPM_SLOW_SMOOTHING = 0.4; // Moderate response for medium changes
const float RPM_DEADBAND = 30; // Ignore changes < 30 RPMAdaptive behavior:
- Large changes: Fast response for acceleration/deceleration
- Small changes: Moderate smoothing to eliminate idle oscillation
const float SPEED_FAST_SMOOTHING = 0.95; // Ultra-fast for large changes (>5 MPH)
const float SPEED_SLOW_SMOOTHING = 0.9; // Very fast for medium changes
const float SPEED_DEADBAND = 0.5; // Ignore changes < 0.5 MPHSpecial features:
- Zero speed detection: Immediate drop to 0 when stopped
- Acceleration compensation: Monitors acceleration patterns (currently disabled)
const float TEMP_SMOOTHING = 0.15; // 15% new, 85% old
const float TEMP_DEADBAND = 2.0; // Ignore changes < 2°FHandles special cases:
- "LO" temperature: Immediate display for disconnected sensors
- Gradual changes: Smooth response to prevent erratic readings
const float OIL_PRESSURE_SMOOTHING = 0.3; // 30% new, 70% old
const float VOLTAGE_SMOOTHING = 0.2; // 20% new, 80% oldPrevents unnecessary updates when sensor values fluctuate within normal noise levels:
if (abs(new_value - current_value) > DEADBAND_THRESHOLD) {
// Apply smoothing and update display
current_value = apply_smoothing(new_value);
} else {
// Keep current value (no change)
}To adjust smoothing for your vehicle:
- Increase smoothing (more stable, slower response):
const float SENSOR_SMOOTHING = 0.1; // 10% new, 90% old- Decrease smoothing (faster response, more noise):
const float SENSOR_SMOOTHING = 0.5; // 50% new, 50% old- Adjust deadband (sensitivity to changes):
const float SENSOR_DEADBAND = 1.0; // Smaller = more sensitive- ✅ Eliminates sensor noise without losing responsiveness
- ✅ Adaptive behavior based on change magnitude
- ✅ Prevents display flicker from minor fluctuations
- ✅ Maintains accuracy for significant changes
- ✅ Configurable parameters for different vehicle characteristics
The dashboard supports 5 different visual themes:
- Synthwave (Default) - Retro neon aesthetic
- Citroën BX - Futuristic green theme
- Subaru XT - Amber/orange theme
- Nissan 300ZX - Turquoise theme
- Corvette C4 - Classic red theme
Style switching: Hold both trip reset and average fuel reset buttons for 1 second.
- ✅ GPH Display Fix: Resolved critical fuel consumption display bug across all styles
- ✅ Enhanced Error Handling: Added comprehensive safety checks for sensor data
- ✅ Improved Stability: Fixed RPM None value crashes and visual display issues
- ✅ Consistent Fuel Display: All styles now accurately show GPH values (e.g., "0.8 GPH" when idling)
Fuel level shows incorrect readings:
- Check voltage at Arduino pin A15 with multimeter
- Verify ground connections between fuel sender and Arduino
- Confirm 470Ω pull-up resistor value
- Test with known resistor values (26Ω, 68Ω, 100Ω)
Ground loop interference:
- Ensure all sensor grounds connect to Arduino GND
- Avoid using chassis ground for precision measurements
- Adjust ground loop compensation values if needed
- Consider using shielded cables for long sensor runs
Display issues:
- Check display configuration with
DISPLAY=:0 xrandr - Verify X11 server is running:
ps aux | grep X - Restart display setup script if screens are mirrored
- Ensure GPU memory is set to 128MB
Arduino communication:
- Verify serial connection:
ls /dev/ttyACM* - Check baud rate (115200)
- Monitor serial output for sensor data
- Test individual sensor readings
For best performance:
- Use Raspberry Pi OS Lite (not desktop version)
- Disable unnecessary services (bluetooth, wifi-powersave)
- Enable hardware acceleration (kmsdrm driver)
- Use quality SD card (Class 10 or better)
- Ensure adequate power supply (3A+ for Pi 4)
- Dashboard refresh rate: 20Hz
- Serial communication: 115200 baud
- Boot time: <15 seconds (optimized)
- Switch response: <1 second
- Memory usage: ~100MB RAM
- ALDL integration: Real-time ECU data when available
- RPM fallback: Accurate estimation based on engine load
- MPG calculation: Speed ÷ Fuel Flow Rate (GPH)
- Range estimation: Current fuel × Average MPG
- Operating voltage: 12V automotive
- Current consumption: <500mA total
- Sensor pull-up resistors: 470Ω (fuel), 1kΩ (others)
- ADC resolution: 10-bit (1024 levels)
- Voltage dividers: 3.79:1 (battery), 3.676:1 (dimmer)
This project is open source and welcomes contributions:
- Fork the repository
- Create feature branch:
git checkout -b feature/new-feature - Commit changes:
git commit -am 'Add new feature' - Push to branch:
git push origin feature/new-feature - Create Pull Request
- Additional display themes
- Enhanced ALDL protocol support
- Data logging functionality
- Mobile app integration
- Additional vehicle compatibility
This project is licensed under a Personal Use License.
- ✅ FREE for personal use - Install, modify, and use in your own vehicle
- ✅ FREE to share - Distribute modifications for non-commercial purposes
- ✅ FREE to contribute - Submit improvements to the project
- ❌ Commercial use requires permission - Contact author for licensing
For commercial use inquiries: chupin.ye@gmail.com
See the LICENSE file for complete terms and conditions.
- C4 Corvette community for technical specifications
- Original dashboard design inspiration from various automotive manufacturers
- Contributors to the Arduino and Raspberry Pi ecosystems
- ALDL protocol documentation and reverse engineering efforts
For technical support and questions:
- GitHub Issues: Report bugs and feature requests
- Forum Discussion: Share experiences and modifications
- Documentation: Refer to included markdown files for detailed setup guides





