Go-Parts
Cart 0
Your cart is empty
Add an item to see it appear here.
Wrenchy
Go-Parts Garage
Expert guides for diagnosing, troubleshooting, and replacing auto parts Expert guides for diagnosing and replacing auto parts
Browse All Articles →
🎬 Helpful Videos 🛍️ Shop This Part

2019-2024 Mazda Auto Headlight & Wiper Sensor Failure (Mazda3, CX-30, CX-50, CX-90, MX-30)

Diagnose and replace the automatic headlight and rain sensor in your Mazda, and understand the common failures related to the windshield gel pad and a critical 2023 production date change.

6 minutes to read 2024-2024 Mazda CX-90 2020-2023 Mazda CX-30 2023-2023 Mazda CX-50 2019-2023 Mazda Mazda3 2022-2023 Mazda MX-30
Difficulty
1/5
Est. Time
0.25 hrs
DIY Doable?
✅ Yes
Shop Labor
$60 - $120
Used OEM Price
$40 - $90
⚠️ Drivable, but... — Yes, but you must operate the headlights and wipers manually. The automatic functions will be disabled, which can be a safety risk in changing weather or light conditions.
Key Takeaways
  • This part is a combined Rain and Light sensor; failure often affects both auto headlights and auto wipers.
  • The most common cause of failure is not the sensor itself, but the adhesive gel pad between the sensor and the windshield, especially after a windshield replacement.
  • For 2023-2024 models, verify your vehicle's build date. This sensor fits vehicles built on or before March 30, 2023.
  • Replacement is a very easy DIY job that takes minutes and requires no special tools or calibration.
The Automatic Headlight Sensor in these Mazda models is a multi-function unit that also includes the rain sensor for the automatic wipers. Mounted to the interior of the windshield behind the rearview mirror, this component uses an optical sensor to measure ambient light levels. When it gets dark, it signals the Body Control Module (BCM) to turn on the headlights, taillights, and instrument panel lighting. Simultaneously, it uses an infrared sensor to detect moisture on the windshield, activating the wipers and adjusting their speed based on the intensity of the rain. This single, integrated part is essential for the proper operation of two key automated convenience and safety systems.

What the Automatic Headlight & Rain Sensor Does

The plastic casing behind the rearview mirror on a Mazda CX-30, housing the integrated rain and light sensor.
The integrated Rain/Light sensor is mounted against the inside of the front windshield, housed in a plastic casing directly behind the rearview mirror.

On the 2019-2023 Mazda3, 2020-2023 Mazda CX-30, 2023 Mazda CX-50, 2024 Mazda CX-90, and 2022-2023 Mazda MX-30, the automatic headlight function is managed by an integrated Rain/Light sensor. This unit is mounted against the inside of the front windshield, typically housed in a plastic casing behind the rearview mirror. It performs two main jobs:

  • Light Sensing: It constantly measures the amount of outside light. When you drive into a tunnel, under an overpass, or as dusk falls, the sensor detects the change and tells the car's computer to switch on the headlights. It also dims the infotainment screen and instrument cluster for comfortable night viewing.
  • Rain Sensing: The same unit projects infrared light onto the windshield at an angle. When raindrops fall on the glass, they change how the light reflects back to the sensor. Based on the amount of disruption, the sensor commands the wipers to activate and adjusts their speed automatically.

Common Symptoms of a Failing Sensor

A Mazda instrument cluster displaying an Auto Headlight System Malfunction warning message.
A failing sensor will often trigger an 'Auto Headlight System Malfunction' warning on the dash, or cause the headlights to remain on during bright daylight.

Because this is a combined sensor, a failure can affect both the headlights and the wipers. Look for these common signs:

  • Headlights Always On: The most frequent symptom is the headlights remaining on in the 'Auto' setting, even in bright sunshine. This also causes the dashboard and Mazda Connect screen to be permanently dimmed, making them difficult to see during the day.
  • "Auto Headlight System Malfunction" Warning: A warning message may appear on your instrument cluster.
  • Automatic Wipers Don't Work: The wipers will not activate automatically when it rains, although they will still work manually.
  • 🎬 Watch: Troubleshooting guide for automatic wipers that won't activate.
  • Erratic Wipers: Sometimes called "ghost wiping," the wipers may activate randomly on a dry day.
  • Headlights Don't Turn On: Less commonly, the headlights may fail to turn on automatically in dark conditions, requiring you to turn them on manually.

Pro Tip: Before assuming the sensor is bad, check the Auto Headlight sensitivity settings in your Mazda Connect infotainment system. You can adjust when the lights turn on, which might resolve issues where they seem too sensitive or not sensitive enough.

🎬 Watch: How to adjust your Mazda's auto headlight sensitivity settings.

Known Issues and Diagnosis

Side-by-side comparison of a perfectly clear, newly installed rain sensor gel pad and a degraded gel pad with visible air bubbles.
The most common failure point isn't the electronic sensor itself, but the clear gel pad that bonds it to the windshield. Air bubbles or degradation disrupt the optical connection.

The Windshield Gel Pad Problem

The most common cause of sensor failure isn't the electronics, but the small, clear adhesive gel pad that bonds the sensor to the windshield glass. This pad ensures a perfect optical connection. If air bubbles form, or if the pad degrades from age or heat, it can interfere with the sensor's light readings. This is a very common problem after a windshield replacement if the technician reuses the old pad or installs the new one improperly.

🎬 See how a simple gel pad fix can save you money.

Distinguishing Sensor Failure from Other Headlight Issues

Some newer models, particularly the Mazda CX-90, may display a generic "Headlight System Malfunction" warning. While this can be caused by the rain/light sensor, it is more frequently related to a software issue or a problem with the adaptive front-lighting system (AFS) motors inside the headlamp assemblies themselves. If your adaptive headlights (the ones that turn with the steering wheel) stop moving when the error is present, the problem is likely in the headlight assemblies, not the windshield sensor.

Is It a Recall?

There are no active recalls for the automatic headlight and rain sensor on these vehicles. While many recalls exist for other components on these models, none specifically address this part.

Buying a Used Automatic Headlight Sensor: What to Look For

An OEM Mazda rain and light sensor module showing the part number label.
When buying a used replacement sensor, always verify the part number (such as BDGF-66-5G0) matches your vehicle's original unit.

A used OEM sensor is an excellent, cost-effective alternative to an expensive new part, especially since the failure is often related to the disposable gel pad. Here’s what to check:

  • Verify the Part Number: The most critical step is to match the part number. The primary part number is BDGF-66-5G0, with later revisions ending in D, E, F, or G. These are generally interchangeable.
  • Check the Production Date: For 2023 and 2024 models, verify your vehicle's build date. Part number BDGF-66-5G0G and its predecessors fit vehicles built on or before March 30, 2023. Vehicles built after this date use a different sensor.
  • Inspect the Lens: Look for any scratches, hazing, or cracks on the sensor's clear lens. Damage here can disrupt its readings.
  • Check the Connector Pins: Ensure the electrical pins in the connector are straight, clean, and free of any corrosion.
  • Plan on a New Gel Pad: Do not reuse the gel pad from the used sensor or your old part. This is a one-time-use adhesive. A new pad is required for proper operation and can be purchased separately.

Cost Comparison

Part TypeEstimated Cost
New OEM$140 - $210
New Aftermarket$70 - $130
Used OEM$40 - $90
Shop Labor$60 - $120

Step-by-Step Replacement Guide (Difficulty: 1/5)

A mechanic using a plastic trim tool to carefully pry open the sensor casing behind a rearview mirror.
Replacing the sensor is a straightforward process that begins with carefully unclipping the plastic housing behind the rearview mirror.

Replacing the rain/light sensor is a simple DIY task that usually takes less than 15 minutes and requires no special tools.

  1. Locate the Sensor: Find the plastic housing behind the rearview mirror.
  2. Remove the Cover: The cover is typically two pieces clipped together. Gently pry them apart using your fingers or a plastic trim removal tool.
  3. Disconnect the Sensor: Press the tab on the electrical connector and pull it away from the sensor.
  4. Unclip the Sensor: There are usually small tabs holding the sensor to its metal bracket on the windshield. Carefully release these tabs and remove the sensor.
  5. Prepare for Installation: Clean the windshield area thoroughly with glass cleaner. If you are reusing your old sensor but it had a gel pad issue, carefully remove all residue of the old gel pad from both the sensor and the glass.
  6. Install New Gel Pad: Apply a new, bubble-free adhesive gel pad to the sensor.
  7. Install the New Sensor: Press the sensor firmly onto its bracket until it clicks into place. Reconnect the electrical harness and snap the plastic covers back on.

Warning: The sensor itself is delicate. Do not touch the lens or the gel pad with your bare fingers, as oils can interfere with its operation.

Frequently Asked Questions (FAQ)

Do I need to recalibrate the car after replacing the sensor?

No, for a simple sensor replacement, no calibration or programming is typically required. The system should function correctly immediately after installation.

Why did my auto headlights stop working after a windshield replacement?

This is almost always due to an issue with the gel pad that bonds the sensor to the new glass. The installer may have reused the old pad, used the wrong one, or allowed air bubbles to get trapped. Contact the glass shop that performed the work, as they should correct it.

Can I just turn off the automatic headlights?

On these modern Mazda models, the headlight switch is spring-loaded and defaults to the 'Auto' position when you start driving. You cannot permanently disable the feature, so fixing a faulty sensor is the only way to regain normal operation and a bright daytime dashboard display.

Can I just clean the sensor to fix it?

If the outside of your windshield is dirty, cleaning it can certainly help. However, if the issue is an internal failure or a problem with the gel pad between the sensor and the glass, cleaning the exterior will not solve the problem.

Auto wipers doesn't work Mazda CX5 CX3 6 3
Auto wipers doesn't work Mazda CX5 CX3 6 3
RAIN SENSOR WARNING! The Hidden Fix Dealers Won’t Tell You 🚨
RAIN SENSOR WARNING! The Hidden Fix Dealers Won’t Tell You 🚨
How To Adjust The Sensitivity Of Auto Headlights
How To Adjust The Sensitivity Of Auto Headlights

Technical Specifications

OEM Part Numbers: BDGF-66-5G0 BDGF-66-5G0D BDGF-66-5G0E BDGF-66-5G0F BDGF-66-5G0G

Integrated rain, light, and humidity sensor. Mounts to windshield.

Wrenchy
Article researched & written by
Go-Parts' AI research assistant. Every article is backed by live web research, verified OEM data, and real technician knowledge — so you get accurate, up-to-date information you can trust.
Meet Wrenchy → Updated May 25, 2026

The information in this article is provided for general reference and educational purposes only. Vehicle specifications, procedures, and part compatibility can vary by production date, trim level, and region. Always consult your vehicle's factory service manual and verify part numbers before purchasing or performing repairs. Safety-critical components such as airbags, seat belts, and braking systems should be installed by a qualified professional.

Year Coverage
This article covers the Automatic Headlight Sensor for:
  • Mazda CX-30: 201920202021202220232024
  • Mazda CX-50: 2023
  • Mazda CX-90: 2024
  • Mazda Mazda3: 20192020202120222023
  • Mazda MX-30: 20222023
In this article
🎬 Helpful Videos
Jump to ▴

Email This Guide

We'll send you a link to this article so you can read it later or share it.

Added to cart · Part