×

Happy to Help!

This website doesn't store cookies. Enjoy the experience, without worrying about your data!

Great, thanks!

Motor Controller Software, HAL and UDS Protocol Stack Integration for an Autonomous Headlamp

About the Customer:


Our customer is a leading manufacturer of Headlamp systems for Automotive. They have partnered with us as their Product Engineering Services provider, for prototype development of one of their ambitious Smart Automotive Headlamp product.

This Automotive Headlamp design facilitated the change in position of the Car Headlamps, with the help of sensors and motor control systems, based on the load and the elevation of the road.

Business Challenge:


Our customer is a pioneer in making Electric Headlamps for Automobiles.

However, for this next generation product development they realized the need for an experienced Product Engineering partner. The required skill sets comprised Embedded C, Device Driver development and comprehensive automotive domain knowledge.

Our Automotive team was tasked to design software algorithms that will enable headlamps to adjust automatically & focus in the right direction, based on the different states of the vehicle.

Embitel Solution:


After several rounds of discussion with the customer, the project scope was defined. Based on the discussion and our understanding of the project, we decided to develop our design based on NXP 32 bit microcontroller platform.

Getting the accurate pulse width modulation signal required algorithms to read the sensor data very precisely. Readings like the tilting angle and position from the sensors such as accelerometer and gyroscope also had to be analyzed.

Apart from the application layer (headlamp adjustment algorithms), low level device drivers and Hardware abstraction layer, were also designed. Their role was to facilitate communication between the servomotor and the application software.

We delivered a re-programmable unit which could be calibrated as per the production program.

Following is the software architecture diagram:

The final solution comprised:

Application software Development for autonomous electronic headlamp system:

  • Angular Velocity Algorithm for Pitch Calculation.
  • Level Controller- the motor drive algorithm that would drive the servomotor with pulse width modulation, PWM signals.
  • Parameter Configurations.
  • Self-Diagnostics to help the system find issues and report them.

Low level Device Drivers development:

  • Micro controller Unit.
  • Timer.
  • CAN drivers.
  • Pulse Width Modulation drivers.
  • Serial Peripheral Interface drivers.
  • Analog to Digital Converter.
  • Watch dog driver.
  • Non Volatile Memory (ROM).

Hardware Abstraction Layer:

  • CAN Interface.
  • Pulse Width Modulation HAL.
  • Serial Peripheral Interface HAL.
  • Analog to Digital Converter HAL.

Service and Diagnostics Layer:

  • Math utility (Filtering, Average etc.).
  • Safety features (CPU Overload, Stack over flow).
  • Scheduler (Non preemptive timer based).
  • UDS based Diagnostics Layer (ISO14229) & ISOTP (ISO15765).
  • Fault Code Memory (FCM).

Apart from the application software and device drivers, the deliverables also included:

  • Low-level documents.
  • High-level documents.
  • Test Plans and Reports.
  • Our Ready-to-deploy UDS based bootloader software for ECU reprogramming purposes.

Impact


We were able to provide the complete set of deliverables within the stipulated time. We integrated our ready to-deploy Bootloader software and UDS stack with the production grade prototype. This helped us reduce the development time and cost.

Our experience in working with motor control systems also came in handy while developing the leveler algorithms for the project.

Tools and Technologies Used


S32 IDE from NXP – For embedded C programming.

PE Debugger- For code debugging.

SCANoe–– For CAN Testing

BUSMASTER–Testing.

Motor– Servomotor for precise movement based on angular/linear position.