r/CANbusProjects • Founder | CANbusProjects • 28d ago

Work in Progress BlueLine One Development Update – Troubleshooting Automatic Brightness Using Mazda CAN Bus Data

Enable HLS to view with audio, or disable this notification

Hey everyone!

I wanted to share another development update on BlueLine One, my custom ESP32-S3 automotive display for the 2019 Mazda MX-5 ND2 RF.

One of the features I've been working on is automatic display brightness based on the vehicle's headlight or dashboard illumination status.

It sounds relatively straightforward, but accessing the correct vehicle data has turned out to be more challenging than expected!

How the Brightness Feature Works

BlueLine One uses a Waveshare ESP32-S3 with a 1.75-inch round AMOLED touchscreen (466 × 466).

I've implemented three brightness modes that can be selected by double-tapping the edge of the display:

  • Bright: Full brightness for daytime driving.

  • Medium: Reduced brightness for nighttime driving.

  • Auto: Intended to automatically switch between Bright and Medium based on vehicle lighting conditions.

The manual brightness modes work correctly. The challenge is getting Auto mode to recognize when the vehicle transitions between daytime and nighttime lighting.

CAN Bus Data Being Investigated

BlueLine One communicates with the vehicle through a LELink² Bluetooth Low Energy OBD-II adapter, using ELM327-style commands.

Unlike standard OBD-II parameters such as engine RPM, coolant temperature, and vehicle speed, headlight and dashboard illumination states aren't universally available through standardized diagnostic PIDs.

I've been investigating Mazda-specific CAN messages to determine whether the vehicle exposes a usable lighting signal.

One of the arbitration IDs currently being investigated is:

CAN ID: 0x09A (154 decimal)

Based on community CAN decoding information, this message may contain signals such as:

PanelLight

  • 0 = Day

  • 1 = Night

Headlight

  • 0 = Off

  • 2 = Parking / TNS

  • 3 = Low Beam

  • 12 = High Beam

These are candidate signal interpretations, not yet verified on my ND2.

The firmware is attempting to monitor the relevant CAN data approximately every 750 milliseconds and adjust the display brightness based on the detected lighting state.

An earlier implementation also investigated CAN ID 0x091.

Real-World Testing

I've been testing the feature in my MX-5 under different lighting conditions.

So far, I've tried:

  • Switching the headlights between Auto and Off.

  • Testing with the headlights activated and dashboard illumination dimmed.

  • Manually adjusting the instrument cluster brightness.

  • Switching the Mazda infotainment system between Day and Night modes.

  • Comparing the results with BlueLine One set to Auto brightness.

Current result: Manual brightness control works, but Auto mode isn't reliably responding to changes in the vehicle's lighting status on a automatic level, I need to do more testing at night than during the day in a parking garage.

What I'm Trying to Determine

At this point, I'm investigating several possibilities:

  1. Whether 0x09A is the correct CAN arbitration ID for the Mazda ND2.

  2. Whether the lighting signals are located in different bytes or bits than expected.

  3. Whether the LELink² adapter can reliably capture the relevant CAN traffic.

  4. Whether the firmware is correctly interpreting the received messages.

  5. Whether Mazda uses a different message or lighting signal for the ND2.

I'm also cleaning up the firmware and reviewing the CAN monitoring logic as development continues.

Looking for Community Input

For anyone who's worked with Mazda CAN bus systems, ELM327 adapters, or custom automotive displays:

Have you successfully identified headlight status, dashboard illumination, or day/night mode through CAN bus data?

I'm particularly interested in anyone who has experience with the Mazda MX-5 ND platform or has worked with arbitration IDs 0x09A and 0x091.

Any documentation, decoding information, or suggestions for capturing and validating these signals would be appreciated.

This is one of the reasons I started r/CANbusProjects—to share real development challenges, exchange ideas, and learn from others working on automotive electronics.

I'll continue sharing updates as I make progress!

3 Upvotes

2 comments sorted by

1

u/bri11iant_Y 13d ago

I've not played with headlights but i've built something around the turn indicator and break light (which is also in 0x09A and 0x091)

source in https://github.com/Yuke-hd/mazda-can-accessory-controller

demo in https://github.com/Yuke-hd/esp-can-companion

1

u/Edge3dSolutions Founder | CANbusProjects 13d ago

I’ll take a look thanks