Design of Automotive LED Headlamps Using Nuvoton Microcontrollers
1. Introduction:
Imagine driving a car at night, the first point of contact where your eye goes with the opposite car is the headlamp. Many accidents occur due to vehicle non-visibility all over the world. So automakers nowadays need to focus on both the aesthetic design and performance to capture the market. At the same time they also need to ensure the safety regulations are met. Automotive headlamps have evolved from bulb to halogen to now LED headlamps, for better power distribution due to increased demand.
When designing headlamp, multiple factors are to be considered like beam pattern, brightness level, vehicle architecture and local regulations for headlamps along with strict thermal requirements and EMC regulations.
Following are the functions in modern day headlamps:
- High Beam
- Low Beam
- Daytime Running Light (DRL)
- Turn Indicator
- Position lamp
High Beam: High beams are high intensity and light a greater distance. High beams are ideal for dark roads.
Low Beam: Low beams are lower intensity and reach a shorter distance in front of your car. Low beam is for city driving where there are streetlights.
DRL: DRL remain on whenever the engine is running. DRL are fairly dim and don’t illuminate the road ahead. The purpose of DRL is to increase the visibility of your car, so that other drivers can see you on the road during daytime.
Turn Indicator: Turn Indicators are to show an intended change of direction, whether turning left or right or moving out into traffic.
Position Lamp: Front position lamp is used to indicate the presence of the vehicle when viewed from the front.
This article describes the guidelines for designing a headlamp with Nuvoton’s M0A23 and external interfaces. It is devided into two sections one based on the Nuvoton’s M0A23 with all the inputs processing sections and the other on how the data is communicated to the LED matrix controller for turning ON and OFF the LED’s. Below is the basic block diagram of LED Headlamp with all the input and output peripherals.
Following are the modules of the headlamp that will be discussed in this article:
- M0A23 Section
- LED Matrix Controller Section
Note: The schematics shown in this document are provided for reference purposes only.
2. M0A23 Section
This section talks about the protection circuits, boost and buck converter section, and the design guidelines of M0A23 and also the interface modules to M0A23.
2.1 M0A23 circuit design guide
M0A23 series microcontrollers provide the options below to interface with the external devices.
Part Number | Flash (KB) | SRAM (KB) | ISP ROM (KB) | I/O | Timer | PWM | PDMA | Connectivity | DAC | LXT | ACMP | ADC (12-Bit) | Package | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
USCI | UART | LIN | CAN | |||||||||||||
M0A23OC1AC | 32 | 4 | 2 | 18 | 4 | 6 | 5 | 2 | 2 | 2 | 1 | 1 | 1 | 2 | 17-ch | SSOP20 |
M0A23EC1AC | 32 | 4 | 2 | 26 | 4 | 6 | 5 | 2 | 2 | 2 | 1 | 1 | 1 | 2 | 17-ch | TSSOP28 |
For this headlamp application, all the inputs to the system are transferred via the body control module through CAN interface, and we don’t need many I/O’s. So for this application we have used M0A23OC1AC as an example. But based on this application, M0A23EC1AC also can be used.
As per the block diagram shown in Figure 1, below are our requirements to design a headlamp:
Pin No. | Pin Configured as | Function |
---|---|---|
1 | VDD | Power supply |
2 | XT1_IN | External Oscillator |
3 | XT1_OUT | External Oscillator |
4 | nRESET | SWD |
5 | CAN0_TXD | CAN Communication |
6 | CAN0_RXD | CAN Communication |
7 | NC | NC |
8 | UART0_RXD | LED Matrix Manager Interface |
9 | UART0_TXD | LED Matrix Manager Interface |
10 | NC | NC |
11 | USCI1_CLK | Memory Interface |
12 | USCI0_DAT0 | Memory Interface |
13 | NC | NC |
14 | NC | NC |
15 | NC | NC |
16 | NC | NC |
17 | NC | NC |
18 | ICE_CLK | SWD |
19 | ICE_DAT | SWD |
20 | VSS | Ground |
Nuvoton offer NuTool – Pin Configure Tool which contains all Nuvoton NuMicro® Family chip series with all part numbers and helps configure GPIO multi-function pins correctly for the users.
Guidelines for M0A23 circuit design
The circuit below in Figure 2 shows the power supply connections to the M0A23 MCU and the serial wired debugger for programming the microcontroller. As per recommendation the VDD pin should be connected to +5V and decoupling capacitance of 0.1uF needs to be placed as close as possible to the pin.
Oscillator design
For this headlamp application, 4 to 24 MHz crystal oscillator can be used with M0A23 series of microcontroller. Placement of capacitors is critical in achieving the higher accuracy, so both the capacitors have to be placed as close as possible to XT1_IN and XT1_Out pins. Resonator characteristics like frequency, package, and accuracy are important order to minimize output distortion and startup stabilization time. Use high-quality external ceramic capacitors in 10 pF ~ 20 pF range, designed for high-frequency applications. Refer to the crystal manufacturer datasheet and select the right component for your application. Crystal manufacturer also specifies a load capacitance which is the series combination of C1 and C2.
2.2 Protection circuits
Vehicle electronics system require protection transients on the automobile power supply range from the severe, high energy, transients generated by the alternator/regulator system to the low-level noise generated by the ignition system and various accessories. Protection circuits for automotive applications must safeguard the electronic control unit (ECU) without failure during these harsh conditions. The figure below shows an automotive environment on how the power is delivered to the lighting system.
Below are the protections required for any automotive ECUs:
Reverse Polarity:
Car battery connection can be reversed by mistake during troubleshooting or during assembly. This will create a negative voltage across the input of the headlamp. Most of the ICs are not rated for withstanding the negative voltage.
A reverse protection diode or MOSFET is typically used to protect circuits against this condition.
Cold Crank:
Battery voltage will be reduced during cold weather conditions since this the starter draws a high current to turn on the engine. During this condition, the system is expected to provide continuous, stable output regulation for a short duration. To achieve this DC-DC, converter with a wide VIN range can be used to address low input voltage condition.
Load Dump:
When the battery is disconnected, the alternator is still connected to other electronic loads surge in voltage generated which is called as load dump. This can occur when the battery is accidentally disconnected and the vehicle is running.
Guidelines for protection circuit design:
Protection circuit can be designed using any automotive AEC Q100/101/200 qualified components. For example, an ideal diode controller which can operate in conjunction with an external N-channel MOSFET as an ideal diode rectifier can be used reverse polarity protection. And for the transient protection, TVS diodes can be used. The input range of 3.2 V to 65V is well suited for severe cold crank requirements in automotive systems. The device should withstand and protect the loads from negative supply voltages down to –65V.
2.3 Power Supply design
For this headlamp application based on our architecture, we need multiple buck regulator and boost regulator power supply. The block diagram below shows the strategy to convert the 12V battery power supply into the required voltage levels as per application requirements.
One of the important and first steps in any circuit design is to derive the power budget calculations. Optimal design of the power section is very critical in product design; at the same time, the power source should be able to provide required current to the headlamp in all worst-case conditions.
Based on the headlamp photometry requirements, we need to select numbers of LEDs and their current consumption and appropriate size meet the converters and achieve the current consumption targets. While considering current consumption, derating of components plays a vital role. Each and every component has to be considered for derating analysis and then only the current requirements should be derived.
Thermal Management of the regulator IC and LEDs is very important to achieve good performance for the headlamps. Below are the general guidelines during PCB design for switched regulator IC:
- While designing the PCB for the regulator sections, all the auxiliary components should be placed as per the guidelines from the switching regulator datasheet.
- Ground impedance of the Switching regulator IC should be very low to avoid unstable out during EMI EMC testing.
- For proper power dissipation of the switching regulator IC, the land pattern should be wide as much as possible.
- Thermal calculations or simulations to be done for heat dissipation pads.
- To avoid ESD spikes, regulators should not be placed on edge of PCB.
2.3.1 CAN Communication Module
High speed CAN transceiver which supports differential bus signal representation described in the international standard for in-vehicle high speed CAN applications (ISO11898) should be used for automotive applications. For headlamp application, all the switch inputs are communicated from BCM to the headlamp via CAN communication module.
For this headlamp application, the data from BCM are sent to M0A23 via the CAN transceiver which can be connected directly to our M0A23 series microcontroller and accessed.
The schematic below shows the typical application circuit of the CAN transceiver section:
2.3.2 UART Module
LEDs are controlled using the LED Matrix controller which can communicate via UART communication to M0A23. In-order to achieve this UART0 channel of the M0A23 is directly interfaced with LED matrix Manager, which in turn can be daisy chained and via UART we can control multiple LED matrix controller.
3. Conclusion
This article serves as a starting point for developing a headlamp using Nuvoton’s M0A23 microcontroller.
In a similar way, all the lighting applications, like rear lamp, fog lamp, and ambient lighting can be designed using Nuvoton series microcontrollers.
Related articles:
More on Nuvoton microcontroller M0A23:
Automotive Cluster Meter Development Using Nuvoton’s Microcontrollers – Introduction
More on application using Nuvoton microcontrollers M0A23 and N9H30:
Design of Automotive Cluster Meter Using Nuvoton Microcontrollers
For Nuvoton microcontroller offerings, please visit https://www.techdesign.com/market/categories/microcontrollers or contact us at TECHDesign.