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.
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.
The customer had designed a MATLAB model for the application and partnered with us for manual software code development using Embedded C.
This Smart Headlamp project was aimed to resolve the following problem statement.
- While climbing a hill or when there is a lot of load on the vehicle, the headlamp generally tends to tilt and is not able to focus in the right direction.
Our Automotive team was tasked to design software algorithms that will enable headlamps to adjust automatically based on the load of the vehicle.
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.
- 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.
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.
- CANoe– For CAN Testing.
- BUSMASTER– Testing.
- Motor– Servomotor for precise movement based on angular/linear position.