How to build an Adaptive Front Lighting Solution in 3 steps

Adaptive front lighting systems (AFS) are a type of automotive lighting technology that helps drivers see better in low-light conditions. AFS uses sensors to detect the presence of other vehicles, pedestrians, and obstacles on the road ahead. It then adjusts the angle and intensity of the headlights to provide optimal lighting for the driver.

Adaptive headlights equals safety

STMicroelectronics' approach to cars is simple: It's always about being better, safer, and more accessible.

The same goes for adaptive headlights which pivot horizontally or vertically to follow the movements of the vehicle. If a car takes a right curve, the headlights also turn to the right to better light the road ahead. The lighting system takes its cues from the steering wheel inertial system and the vehicle's speed.

For instance, when driving rural or suburban areas, which can be poorly lit, our system provides extra illumination for better visibility.

The Insurance Institute for Highway Safety (IIHS) states that adaptive lighting systems can seriously reduce “crash damage and injuries”, with drivers detecting low-reflectance objects “a third of a second earlier, or about 15 feet (4.6 m) sooner at 30 mph (50 km/h).”

Adaptive headlights were first available in commercial vehicles in 2004. Yet, a study by the IIHS in 2016 showed that most headlights systems available at the time needed improvements. Some car manufacturers still don't offer adaptive lighting at all, and those that do sometimes restrict this feature to a few models.

Adapting front lighting systems are not more popular, despite their clear safety benefits, because they are a complex engineering problem to solve. Beyond developing the right algorithms that determine how to pivot the lights in time, teams must also design the complex actuating and sensing mechanisms.

Our Adaptive Front Lighting solution is a series of boards, kits, and software designed to assist developers and engineers as they build their vehicle's front lighting system.

STMicroelectronics' solution

Our solution is thus unique because it offers a straightforward path to the final design. Let's, therefore, look at how companies, from the small startup to the first-tier manufacturer planning to qualify a system for multiple generations of vehicles, can benefit from our approach.

Step 1: Focus on building a comprehensive platform, not losing time sourcing for components

At the heart of our platform, we find the AEK-MCU-C4MLIT1, a development board that embarks the SPC58EC Chorus automotive MCU. An adaptive headlight system can easily run on an Microcontroller Unit (MCU) with a lot less computational throughput.

32-bit SPC58EC MCU Specifications:

  • 2 general purpose Cores e200z420 @ 180 MHz
  • Hardware Security Module (HSM) with dedicated e200z0 core and Evita-Medium certified software
  • 4 MB of Flash
  • Advanced peripherals such as CAN FD and Ethernet
  • AEC-Q100 qualified, ASIL-B

For instance, our application only uses one core and a little less than 1 MB of Flash. However, since our solution is highly modular, we wanted developers to benefit from a lot of headroom and experiment immediately without worrying about optimizations or running into performance issues.

As we will see during the second step, switching to a low-power version of the SPC5 is extremely easy.

The AEK-MCU-C4MLIT1 serves as a base for the AEK-LED-21DISM1, which is a high-brightness LED driver board that uses an SPI interface to communicate with the host MCU.

To move the headlights, we provide the AEK-MOT-SM81M1, an evaluation board that houses our programmable L99SM81V stepper motor driver, and to manage the load of the cooling fan we have the EV-VN7050AS, which integrates our a single-channel high-side driver that uses our VIPower M0-7 technology.

Finally, there’s the AEK-CON-AFLVIP2 that helps connect everything by avoiding a wire by wire connection for a more practical approach that focuses on pins, and the AEK-CON-5SLOTS1 that will ensure manufacturers can test their design with their proprietary connectors and protocols.

ST bundled these boards together in the AEKD-AFL001 kit. The AEKD-AFLPANEL1 is even more convenient as it mounts them on a plexiglass panel while the AEKD-AFLLIGHT1 simulates a vehicle’s headlights.

Traditionally, makers have to source their materials from multiple vendors, but we provide the entire platform, which will significantly facilitate demonstrations, prototyping, development, and component qualification. The bundles work with our AutoDevKit adaptive front lighting software that takes advantage of all these development boards.

Finally, to go one step further, we provide STSW-AUTODEVKIT, an Eclipse plugin for our SPC5-STUDIO that will allow developers to use our AutoDevKit library and call various APIs to help them write code even faster. Together with the APIs, the plugin provides the source code for the Adaptive Front Lighting application.

Step 2: Concentrate on Putting the Hardware Together, Not Setting Up Pins or Interfaces

Our adaptive front lighting solution is modular. For instance, the default configuration uses two ST stepper motor drivers, one for the X-axis and one for the Y-axis. However, teams can add two more to create two instances of the same component, and the software would automatically adjust to the new configuration.

All the boards in the AEKD-AFL001 kit

Similarly, engineers could choose a microcontroller board with an SPC582B Chorus family with 1 MB of flash memory and only one core, instead of the current SPC58EC to showcase a more energy-conscious and cost optimized system. This level of modularity is possible, thanks to our special drivers.

They offer a level of abstraction that enables components to be independent from one another, meaning that when people substitute an SPC5 for another one, for example, the system can automatically configure the pins and interfaces, thus vastly simplifying the job of developers.

The inherent modularity also explains why our solution is not a reference design nor an optimized PCB design. Teams won't merely drop the kit into a final design. Vehicles specifications vary so much from one maker to another, or even from one model to another, and each region deals with so many regulations, that a set design would be meaningless.

Instead, we are offering a highly flexible development platform that makers can quickly adapt to their needs, which is far more useful. Our kit is a demonstration platform. As such, the headlights move at angles that are much wider than necessary, among other things.

The strength of ST's adaptive headlight system is that the drivers available can significantly shorten the prototyping stage by enabling engineers to focus on the hardware and not its configuration.

Step 3: Work on Features, Not Spaghetti Code

The adaptive front lighting system also benefits from AutoDevKit. When engineers look at the library, the API is straightforward. For instance, turning the lights ON or OFF requires developers to call a function in their main() program.

However, behind the scenes, we implemented a must-have safety feature that monitors the communication between the MCU and the LED driver. A watchdog checks that the two components are in constant communication. In the event of a failure, the car enters into a “Limp mode” that turns on the “Check Engine” light, often switches the vehicle into a single gear, and slows down operations to enable the driver to slowly park on the side of the road or drive to the nearest garage.

Using our APIs removes a lot of the complexity to enable teams to prototype a lot faster without worrying about these critical features.

The demonstration application software includes an automatic mode that moves lights according to a preset configuration and a manual mode that links the movement of the headlights to a steering wheel by mean of a potentiometer.


To make a functional demo companies can use our APIs. However, once engineers are back in the lab, they can use the APIs as a teaching tool by looking at the source code. Hence, beyond the hardware, the drivers, and the AutoDevKit library, companies that use our Advanced Front Lighting solution also get a teaching tool that will shorten development times and help them meet the regulatory requirements of their market.

Once teams are familiar with our Adaptive Front Lighting solution, they will even be able to port it to other applications, such as the rotating lights at the top of emergency vehicles or lights in off-road vehicles and farming tractors.