Overview

The Landy Gauge is a compact round instrument display designed for Land Rover vehicles. It features a 360×360 pixel circular screen with touch input, physical navigation buttons, and an expansion board for vehicle signal inputs and outputs.

The gauge provides eight display screens that cycle in order:

  1. Clock
  2. Boost (turbo boost pressure)
  3. EGT (exhaust gas temperature)
  4. Cooling (fan status, coolant level, coolant temperature)
  5. Tire Pressure (BLE TPMS)
  6. Tilt (vehicle roll angle / inclinometer)
  7. Incline (vehicle pitch angle)
  8. Compass (magnetic heading)

Gauges that require the expansion board (Boost, EGT, Compass, Cooling) are automatically skipped if the expansion board is not detected.


Display Modes

The gauge supports two display modes:

  • Day Mode — White/bright accents on a dark background. Used when vehicle lights are off (or before dusk).
  • Night Mode — Green accents on a dark background with reduced backlight brightness.

This colour scheme is selected to reflect the existing landrover Defender gauges. The day and night colours and the accents can be changed in the code.

With expansion board: Night mode activates automatically when the sidelights AND headlights (dip or full beam) are both on. This prevents night mode triggering from a momentary headlight flash or parking lights alone.

Without expansion board: Night mode is determined automatically by the time of day using a civil twilight calculation (sun 6° below the horizon). The calculation uses the representative latitude of the selected timezone and the current date from the RTC, so it adjusts throughout the year — earlier dusk in winter, later in summer. For accurate results, ensure the correct timezone is selected and the clock has been synced via NTP.


Touch Screen

The circular screen is divided into touch zones:

  • Tap left half — Switch to the previous gauge
  • Tap right half — Switch to the next gauge
  • Double-tap centre — Jump directly to the Clock gauge from any screen
  • Long press centre — Gauge-specific action (see individual gauge sections below)

Note: Single taps on the centre zone only trigger the double-tap-to-clock detection. All gauge-specific actions require a long press.

Note: On the Cooling gauge, the long-press zones are different — see the Cooling section for details.

Physical Buttons

Three physical buttons are available on the Waveshare board:

  • Next button (GPIO43) — Switch to the next gauge
  • Previous button (GPIO44) — Switch to the previous gauge
  • Boot button (GPIO0) — Also functions as a next gauge button
  • Next + Previous held together — Emulates a select action (including double-tap-to-clock and long-press actions). A 150 ms tolerance window means you don’t need to press both buttons at the exact same instant.

Power Management

Ignition Detection

The gauge monitors the vehicle ignition state through the expansion board:

  • Ignition ON — Normal operation. All gauges and sensors are active.
  • Ignition OFF — The gauge enters standby mode: the display turns off, WiFi and Bluetooth scanning stop, and the CPU reduces to 80 MHz to conserve power.

Temporary Wake

When the ignition is off, any of the following will temporarily wake the display for 5 minutes:

  • Touching the screen
  • Holding both physical buttons (Next + Previous) simultaneously

After 5 minutes of ignition-off operation, the gauge returns to standby. Any interaction during the temporary wake resets the 5-minute timer.

If the ignition comes on during a temporary wake, the gauge stays active permanently.

Inactivity Timeout

After 10 minutes of inactivity (no touch or button input) with the ignition on, the gauge automatically returns to the Clock screen.


Gauge Screens

1. Clock

Displays an analogue clock face with hour and minute. Time is maintained by an onboard RTC (real-time clock).

Centre tap action: None (double-tap from any gauge jumps to the Clock screen).

Long press action: Force an NTP time sync via your iPhone hotspot. The gauge connects to your phone’s personal hotspot, synchronises the time via the internet, updates the RTC, then disconnects WiFi. This bypasses the 24-hour cooldown, so you can force a sync at any time regardless of when the last sync occurred.

Note: An automatic NTP sync also runs once per day using the home WiFi network when it is in range. A 24-hour cooldown prevents unnecessary syncs on short drives. The automatic sync uses the home network; only the manual long-press sync uses the iPhone hotspot.


2. Boost (Turbo Boost Pressure)

Displays turbo boost pressure on an analogue dial gauge. The sensor is a 2-bar MAP (Manifold Absolute Pressure) sensor connected to the ADS1115 ADC on the expansion board.

The MAP sensor has a 0.5V offset at zero pressure (0 kPa absolute) and outputs 0–5V over its 0–300 kPa range. The zero-boost reference has been calibrated to the measured atmospheric voltage at the ADC (0.7735V after the resistor divider), so the gauge reads 0 Bar at rest with no boost.

  • Range: 0–2.0 Bar (also displayable in PSI: 0–29 PSI)
  • Warning zone: Above 1.5 Bar — the needle and tick marks turn red/orange
  • Vacuum is not shown — negative pressure reads as zero

Long press action: Toggle display units between Bar and PSI. The preference is saved and persists across reboots.


3. EGT (Exhaust Gas Temperature)

Displays exhaust gas temperature from an MCP9600 thermocouple converter on the expansion board.

  • Range: 0–900°C (or 0–1650°F)
  • Warning (yellow): Above 680°C / 1256°F
  • Danger (red): Above 750°C / 1382°F

Audio alerts play when entering each zone:

  • Warning (680°C): Plays egtwar.mp3 once
  • Danger (750°C): Plays egtdang.mp3 once

When the EGT reaches the warning or danger threshold, the gauge will automatically switch to the EGT screen if you are viewing another gauge.

Long press action: Toggle display units between °C and °F. The preference is saved and persists across reboots.


4. Cooling

Displays the cooling system status in three sectors:

  • Top-left — Fan Low: Shows a rotating fan icon when the low-speed cooling fan is active (detected via expansion board input IN3).
  • Top-right — Fan High: Shows a rotating fan icon when the high-speed cooling fan is active (detected via expansion board input IN4).
  • Bottom — Coolant Level & Temperature: Shows a radiator icon with a water level indicator. Coolant level is monitored via a float switch (expansion board input IN5). Coolant temperature is read from an NTC sender via the ADS1115 ADC.

Coolant Temperature Display:

  • Hidden below 60°C
  • Normal colour above 60°C
  • Yellow warning at 110°C
  • Red danger at 115°C — plays an overheat audio alert

The coolant level sensor uses an intelligent filter that considers vehicle tilt and G-forces (from the onboard IMU) to avoid false alarms caused by fluid sloshing during braking, acceleration, or cornering. A low-coolant alarm is only confirmed after 3 seconds of consistent low readings while the vehicle is settled.

Automatic alarm switch: The gauge automatically switches to the Cooling screen if fan low activates, coolant level drops, or coolant overtemperature is detected.

Cooling Gauge Touch Zones

The Cooling gauge has three long-press zones (different from other gauges):

Screen AreaLong Press Action
Top-left (over the Fan Low icon)Toggle manual fan low override ON/OFF
Top-right (over the Fan High icon)Toggle manual fan high override ON/OFF
Bottom halfToggle wading mode ON/OFF

A confirmation beep sounds when each long press is accepted.

Manual Fan Override

Press and hold over the fan low or fan high icon to manually activate or deactivate that fan relay:

  • Fan Low — Controls expansion board output GPA1
  • Fan High — Controls expansion board output GPA2

Audio confirmation plays when toggling (fanLowOn.mp3 / flooff.mp3, fhion.mp3 / fhioff.mp3).

Manual fan overrides automatically turn off after 5 minutes to prevent draining the vehicle battery. The off audio plays when the timeout expires.

Important: Manual fan override is blocked while wading mode is active. Fans cannot be manually toggled until wading mode is turned off.

Wading Mode

Long-press the bottom half of the Cooling screen to toggle wading mode:

  • WADING ON: Activates the wading output relay (expansion board output GPA0 / OUT1). Both fan icons turn red. Fan rotation animation stops. A “WADING” label appears on screen. Plays wadeOn.mp3.
  • WADING OFF: Deactivates the relay. Fan icons return to normal colours. Plays wadeOff.mp3.

When wading mode is activated:

  • Any active manual fan overrides are automatically turned off
  • You cannot navigate away from the Cooling gauge while wading mode is active — this prevents accidentally forgetting that wading mode is engaged
  • Manual fan toggling is disabled

Safety: Wading mode persists even if the gauge is reinitialised. It must be explicitly turned off by another long press.


5. Tire Pressure (BLE TPMS)

Displays tire pressure, temperature, and sensor battery level for all four tires. Data is received wirelessly via Bluetooth Low Energy (BLE) from TPMS sensors mounted on each wheel.

The display shows a roof-view outline of the vehicle with pressure readings at each corner:

  • Front Left — top-left
  • Front Right — top-right
  • Rear Left — bottom-left
  • Rear Right — bottom-right

Each wheel position shows pressure, temperature, and battery percentage when data is available. Battery percentage is colour-coded:

  • Red — below 2%
  • Yellow — 2–5%
  • Normal (white/green) — above 5%

Long press action: Cycle through display unit combinations:

  • BAR / °C
  • PSI / °C
  • BAR / °F
  • PSI / °F

The preference is saved and persists across reboots.

Automatic alarm switch: The gauge automatically switches to the Tire Pressure screen if:

  • Any tire drops below 15 PSI (1.03 Bar)
  • A rapid pressure drop of 5 PSI or more within 60 seconds is detected on any tire

Battery alarm on ignition: When the ignition is turned on, the gauge waits 15 seconds for BLE sensor data to arrive, then checks all TPMS sensor batteries. If any battery is below 2% (red zone), the gauge plays an audio warning and automatically switches to the Tire Pressure screen. This check only runs once per ignition cycle and will not retrigger within 1 hour.

Note: BLE scanning runs continuously in the background. When viewing the Tire Pressure gauge, a faster scan rate is used for quicker updates.


6. Tilt (Inclinometer)

Displays the vehicle’s roll angle using the onboard IMU (Inertial Measurement Unit). A rear-view image of the vehicle tilts to show the current inclination.

  • Normal (white/green): 0–29°
  • Yellow warning zone: 30°+ — triggers a warning audio alert
  • Red danger zone: 35°+ — triggers a danger audio alert with more frequent beeps

Long press action: Zero the tilt gauge at the current angle. This sets the current physical orientation as the 0° reference point. Useful for calibrating on uneven ground. The offset is saved and persists across reboots.

Automatic alarm switch: The gauge automatically switches to the Tilt screen when roll exceeds 30°.

Note: After the alarm condition clears, the gauge automatically returns to your previous screen after 30 seconds.


7. Incline (Pitch Angle)

Displays the vehicle’s pitch angle (nose up/down) using the onboard IMU. A side-view image of the vehicle rotates to match the current pitch, with arc scales at the top and bottom of the display showing the inclination.

  • Range: ±45°
  • No warning zones — this gauge is informational only

The arc scales feature graduated tick marks with small triangular pointers that track the current angle. The tick mark positions and labels change to match the selected display mode.

Long press action: Cycle through three display unit modes:

ModeScale LabelsExample Ticks
Degrees15, 30, 45Degrees of inclination
1:X Gradient1:3, 1:2, 1:1Rise-to-run ratio
% Slope25%, 50%, 75%, 100%Percentage grade

The selected mode is saved and persists across reboots.

Zeroing: Not available via long press — zero calibration is performed on the Tilt gauge and applies the same IMU offset.

Note: A low-pass damping filter smooths the display for a steadier readout while driving on uneven terrain.


8. Compass

Displays a compass rose with the current magnetic heading from a LIS3MDL magnetometer on the expansion board. The compass card rotates to show cardinal (N, E, S, W) and intercardinal directions with a fixed heading indicator at top.

Long press action: Toggle compass calibration mode:

  1. First long press — Enters calibration mode. A “CALIBRATING” overlay appears. Slowly rotate the vehicle (or the gauge unit) through a full 360° in all orientations to allow the magnetometer to sample the full magnetic field.
  2. Second long press — Exits calibration mode. The hard-iron offsets and soft-iron scale factors are calculated, applied, and saved to permanent storage.

The calibration data persists across reboots.


Automatic Alarm Switching

The gauge monitors several alarm conditions in the background and will automatically switch to the relevant screen when triggered. Alarms are checked in priority order:

PriorityAlarm ConditionTarget Screen
1 (Highest)Tilt ≥ 30°Tilt
2EGT over-temperatureEGT
3Cooling alarm (fan active, coolant low, or overtemp)Cooling
4TPMS rapid pressure drop (≥5 PSI in 60s)Tire Pressure
5 (Lowest)TPMS low pressure (any tire < 15 PSI)Tire Pressure

After an alarm switch:

  • A 5-second lockout prevents the alarm from fighting with manual navigation
  • If the alarm condition clears, the gauge returns to your previous screen after 30 seconds
  • Manually navigating away from the alarm screen cancels the auto-return

Audio Alerts

The gauge plays audio alerts through the onboard speaker for various events. Audio files are stored on the SD card:

EventAudio File
Tilt warning (30°+)warnroll.mp3
Tilt danger (35°+)dangroll.mp3
EGT warning (680°C+)egtwar.mp3
EGT danger (750°C+)egtdang.mp3
Coolant overtemperatureoverheat.mp3
Coolant level lowcoollow.mp3
Tire pressure warningtirewar.mp3
TPMS battery lowtirebat.mp3
Wading mode ONwadeOn.mp3
Wading mode OFFwadeOff.mp3
Fan Low manual ONfanLowOn.mp3
Fan Low manual OFFflooff.mp3
Fan High manual ONfhion.mp3
Fan High manual OFFfhioff.mp3
Button/action confirmationShort beep (internal)

Custom Vehicle Images

The Tilt, Incline, Tire Pressure, and Clock gauges display custom images. By default, these are the compiled-in Land Rover 110 images and logo, but you can replace them with your own by placing .bin files on the SD card.

Expected Files

Place any or all of the following files in the root of the SD card:

FileGaugeModeDefault Size
rear.binTiltDay204×235
reardark.binTiltNight204×235
side.binInclineDay292×117
sidedark.binInclineNight292×117
roof.binTire PressureDay150×315
roofdark.binTire PressureNight150×315
logo.binClockDay113×40
logodark.binClockNight113×40

Each file is optional — if a file is missing, the compiled-in default is used for that slot. You can replace just one image (e.g. only rear.bin) without needing to provide all eight.

Image Format

Images must be in LVGL binary format (.bin): a 4-byte LVGL header followed by raw RGB565 + alpha pixel data (3 bytes per pixel). Maximum image dimensions are 400×400.

Note: Filenames must follow 8.3 format (≤8 characters + .bin) since the SD card uses FAT without long filename support.

Generating .bin Files

Use the included conversion script:

python3 convert_image.py --bin

This converts the source PNGs in the images/ folder to both C arrays and .bin files. The .bin files are written to the sdcard/ directory — copy them to the root of your SD card.

To generate only .bin files (skip C array output):

python3 convert_image.py --bin-only

To create custom images, replace the PNGs in the images/ folder with your own vehicle artwork (RGBA format, transparent background), then re-run the conversion script.

Loading Behaviour

  • Custom images are loaded once at boot (after SD card mount)
  • Images are loaded into PSRAM and remain in memory until power off
  • Invalid or corrupt files are silently skipped with a warning in the serial log
  • Removing the SD card after boot does not affect loaded images

Settings Persistence

The following settings are saved to non-volatile storage (NVS) and persist across power cycles:

  • Boost gauge units (Bar / PSI)
  • Tire pressure display mode (Bar/PSI, °C/°F)
  • EGT units (°C / °F)
  • Tilt zero-offset angle
  • Incline display mode (degrees / 1:X / % slope)
  • Incline zero-offset angle (shared with Tilt)
  • Compass calibration data (hard-iron offsets and soft-iron scales)
  • TPMS sensor associations (BLE MAC addresses for each wheel position)
  • NTP last-sync timestamp (24-hour cooldown)

Settings are saved automatically when changed and restored at boot.


Expansion Board Connections

Digital Inputs (active high)

InputSignalDescription
IO0ReservedReserved for future expansion
IO1IgnitionIgnition on signal
IO2SidelightsSidelights / parking lights on signal
IO3Fan LowLow-speed cooling fan active
IO4Fan HighHigh-speed cooling fan active
IO5Coolant LowCoolant level float switch
IO6Low BeamDipped headlights on signal
IO7Full BeamFull beam headlights on signal

Digital Outputs

OutputPinFunction
OUT1 / GPA0MCP23017 GPA0Wading mode relay
Fan LowMCP23017 GPA1Manual fan low speed relay
Fan HighMCP23017 GPA2Manual fan high speed relay

Analogue Inputs (ADS1115 ADC)

ChannelSignalDescription
AIN0MAP Sensor2-bar MAP sensor (0.5V offset, 0–5V output, via R26/R28 resistor divider)
AIN1Coolant TempNTC temperature sender (Land Rover type, 50–120°C range)

Magnetometer

  • LIS3MDL 3-axis magnetometer for compass heading

Thermocouple

  • MCP9600 thermocouple-to-digital converter for EGT

Quick Reference

ActionHow To
Next gaugeTap right side of screen, or press Next button
Previous gaugeTap left side of screen, or press Prev button
Jump to ClockDouble-tap centre of screen, or double-tap Next+Prev combo
Gauge actionLong-press centre of screen, or hold Next+Prev combo for 1 second
Toggle fan low (Cooling gauge)Long-press top-left of screen (over fan low icon)
Toggle fan high (Cooling gauge)Long-press top-right of screen (over fan high icon)
Toggle wading (Cooling gauge)Long-press bottom half of screen
Force NTP sync (Clock gauge)Long-press centre of clock (uses iPhone hotspot)
Toggle boost unitsLong-press centre of boost gauge
Toggle EGT unitsLong-press centre of EGT gauge
Toggle TPMS unitsLong-press centre of tire pressure gauge
Zero tilt gaugeLong-press centre of tilt gauge
Cycle incline unitsLong-press centre of incline gauge
Calibrate compassLong-press centre of compass gauge (long-press again to finish)
Emulate Select actionHold Next + Previous buttons together
Wake from standbyTouch screen or hold both physical buttons (5-minute temporary wake)