Design of Automotive Cluster Meter Using Nuvoton Microcontrollers
1. Introduction:
In the article “Automotive Cluster Meter Development Using Nuvoton’s Microcontrollers – Introduction“, we’ve discussed the component selection criteria for designing instrument clusters and how Nuvoton’s microcontrollers can be used in the development of instrument clusters. This article describes the guidelines for designing a digital instrument cluster with Nuvoton’s M0A23 and N9H30 series of controllers. It also provides an overview of power supply design, external components and safety requirements to use in instrument cluster applications.
Instrument clusters need to provide driver with all the critical information required for a safe and comfortable drive like vehicle status and direction, indicate gear status, provide feedbacks such as turn left, right, oil temperature etc., and sound alarms.
This article is segregated 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 in the LCD using Nuvoton’s N9H30. Below is the basic block diagram of instrument cluster with all the input and output peripherals.
Following are the modules of the instrument cluster that will be discussed in this article
- M0A23 Section
o M0A23 circuit design guide
o Protection circuits
o Power supply design
o Interface modules - N9H30 Section
Note: The schematics shown in this document are provided for reference purposes only.
If you use any part of these schematics as a basis for hardware design, do so at their own risk; TECHDesign does not assume any liability for such a hardware design.
2. M0A23 Section
This section talks about the protection circuits, DC-DC converter section, and the design guidelines of M0A23 and also the interface modules to M0A23.
2.1 M0A23 circuit design guide
As a designer, the first step in designing the electronics product is to list down the inputs and outputs of the system along with the current requirements of each section. M0A23 series controllers provide the below options 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 |
As per the block diagram shown in Figure 1, below are our requirements to design an instrument cluster.
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 | ADC0_CH12 | Speed Sensor |
8 | USCI1_CLK | Memory CLK |
9 | USCI1_DAT0 | Memory DATA |
10 | NC | NC |
11 | NC | NC |
12 | ADC0_CH11 | Oil Temp |
13 | ADC0_CH10 | IGN Sensing |
14 | ADC0_CH9 | BAT Monitoring |
15 | ADC0_CH8 | Ambient Light |
16 | ADC0_CH7 | Oil Pressure |
17 | PD.4 | Switch Input 01 |
18 | PD.5 | Switch Input 02 |
19 | NC | NC |
20 | NC | NC |
21 | ADC0_CH6 | IGN Monitoring |
22 | NC | NC |
23 | NC | NC |
24 | UART0_RXD | N9H30 RXD |
25 | UART0_TXD | N9H30 TXD |
26 | ICE_CLK | SWD |
27 | ICE_DAT | SWD |
28 | VSS | Ground |
Nuvoton offers 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 microcontroller 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
The high-speed external (HXT) clock can be supplied with a 4 to 24 MHz crystal oscillator. For instrument cluster application, the external components have to be placed as close as possible to the XT1_IN and XT1_Out pins. Refer to the selected crystal resonator manufacturer for details on the resonator characteristics (frequency, package, accuracy) and in order to minimize output distortion and startup stabilization time.
For C3 and C4, it is recommended to use high-quality external ceramic capacitors in 10 pF ~ 20 pF range, designed for high-frequency applications. The crystal manufacturer typically specifies a load capacitance which is the series combination of C3 and C4.
Operating modes
For instrument cluster application the M0A23 can be operated in normal mode and idle mode. The table below shows the difference between two modes and how the CPU operates during each mode.
Power Mode | Normal Mode | Idle Mode |
---|---|---|
Definition | CPU is in active state | CPU is in sleep state |
Entry Condition | Chip is in normal mode after system reset released | CPU executes WFI instruction. |
Wake-up Sources | N/A | All interrupts |
Available Clocks | All | All except CPU clock |
After Wake-up | N/A | CPU back to normal mode |
2.2 Protection circuits
Protection circuits for automotive applications must safeguard the electronic control unit (ECU) without failure during harsh condition. The circuit designer must ensure reliable circuit operation in this severe transient environment. The 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. The figure below shows an automotive environment on how the power is delivered to the instrument cluster.
Below are the protections required for any automotive ECU’s:
Reverse Polarity:
When battery terminals are disconnected, the car battery connection can be reversed by mistake, which will create a negative voltage across the input of the instrument cluster. 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:
During cold weather conditions the starter draws a high current to turn on the engine which results in reduced battery voltage. During this condition, expectations of the system is 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:
Load dump is the surge in voltage generated when the battery is disconnected while the alternator is still connected to other electronic loads. This can occur when the battery is accidentally disconnected while the vehicle is running.
Guidelines for protection circuit design:
Protection circuit can be designed using any automotive AEC Q100 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 protect, 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 –65 V.
2.3 Power supply design
For this instrument cluster application based on our architecture, we need 5V, 3.3V, 1.8V and 1.2V 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. Based on the I/O of the system we need to calculate the no load current, full load current and sleep mode current to effectively design the product. 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 end devices in all worst-case conditions.
As shown in above block diagram schematic, power supply can be designed for converting the battery input voltage to 5V supply and subsequently for 3.3V, 1.8V and 1.2V supply which can be derived from the 5V supplying using the low dropout regulators.
Based on the application requirements, we need to appropriately size 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. Then based on the power, topology should be selected on whether to use switched regulators or the Linear regulators.
Below are the general guidelines during PCB design for switched/Linear regulator IC:
- While designing the PCB for the regulator sections all the components associated to the IC should be placed as close as possible.
- Switching regulator IC ground impedance should be very low to avoid unstable out during EMI/EMC testing.
- Switching regulator IC land pattern should be wide as much as possible for proper power dissipation.
- Heat dissipation pads to be designed based on thermal calculations.
- Regulators should not be placed on edge of PCB to avoid ESD spikes.
2.4 Interface modules
This section briefs on what are the interfaces of the instrument cluster connected to the M0A23 microcontroller and design guidelines.
2.4.1 Speed sensor signal conditioning module
The purpose of this module is to sense the speed signal from vehicle and give it to the microcontroller for displaying the information in the TFT LCD. Speed sensor in most of the vehicles is of Hall sensor type which has a rectangular wave output. The input voltage to the sensor is given from ignition or the battery power supply, the sensor module which is inline with the circuit start sinking the current and thereby giving the rectangular wave output when the wheel starts rotating.
As shown in above schematic, the sensor is connected to the ignition input and resistor R84 limits the current to the sensor and the voltage divider are sized appropriately at two stages so that the voltage to the microcontroller is not over the limit. Also a diode is used to clamp the voltage to 5V.
The challenge in this section is the collector output taken from the sensor should withstand high and low frequency noises and capacitors should be sized accordingly.
2.4.2 Oil temperature sensor signal conditioning module
In most of the vehicles, we have an oil temperature switch, which is of a resistive type. Whenever the switch is closed due to high oil temperature the instrument cluster should notify a warning to the driver.
As shown in above schematic, whenever the oil switch is closed resistors R88 and R89 acts as a voltage divider and the resultant voltage is given to the microcontroller ADC pin which compares the data and sets the warning in the instrument cluster.
2.4.3 Battery monitoring, ignition monitoring & ignition sensing module
The purpose of this module is to monitor the battery and ignition voltage levels to initialize the memory and whenever there is a drop in voltage than the threshold value, we can configure the microcontroller to save the current process; or whenever the voltage is above threshold, we can wakeup the microcontroller from sleep mode. The ignition sensing input is directly connected to the microcontroller interrupt pin.
This is achieved with simple voltage divider circuit is used to stepdown the ignition and battery voltage from 12V to 5V and send the voltage to the ADC pin of the microcontroller where the ADC compares the voltage with the lower limit threshold value.
2.4.4 Fuel Sensor module
Fuel sensor module indicates the customer level of fuel in the tank and helps in determining when to refill the tank. Mostly float type fuel sensors are used. When the float is moved due to change in fuel levels, the wiper moves across the resistor. And causing change is voltage which is then processed at the controller section and displayed to the driver. Below schematic is an example of fuel sensor interface circuit with M0A23.
2.4.5 Oil Pressure Sensor module
Oil pressure sensor module is to alert the driver whenever the oil pressure in the vehicle drops below the threshold limit. An engine running with low oil pressure can quickly damage the engine. Based on the active low input from the vehicle side, the microcontroller detects the change in state of the oil pressure switch and turns on the alert signal.
2.4.6 Ambient Light Sensor module
Ambient light sensor module automatically adjusts the backlighting of the instrument cluster in the vehicle according to varying lighting conditions. It is used to improve the user experience and also reduce the power dissipation in the LEDs.
2.4.7 CAN communication module
All the critical information from the instrument cluster are shared to the other ECUs via CAN communication module. Ideally the high speed CAN transceiver should be used in automotive applications. It needs to support the differential bus signal representation described in the international standard for in-vehicle high speed CAN applications (ISO11898). This CAN transceiver can be connected directly to our M0A23 series controller and accessed. Below schematic shows the typical application circuit of the CAN transceiver section.
2.4.8 UART Module
All the data collected in the M0A23 is sent to N9H30 to be displayed on the LCD. This is done via UART communication. In order to achieve the communication, the UART0 channel of the M0A23 is directly interfaced with UART0 of the N9H30 for the data transfer.
3. N9H30 design guidelines
For this instrument cluster design, we are going to use N9H30 microprocessor specifically for GUIs as the N9H30 embeds an outstanding CPU core ARM926EJ-S, and meet the hardware, software, and architectural requirements of a typical instrument cluster. The N9H30 series integrates a DRAM interface that runs up to 150MHz, supporting DDR and DDR2 type SDRAM. This, in turn, reduces the overall BOM cost of needing an additional external SDRAM. N9H30 provides MCP (Multi-chip package) to ensure higher performance and to minimize the system design efforts.
Determining the graphical requirements of instrument cluster is also essential in defining the right architecture and component selection. For example, below are the fundamental criteria to be considered during display interface design.
a. Calculating the required frame buffer size and location.
b. Checking the compatibility of framebuffer memory bandwidth requirements vs. the TFT LCD because refreshing the LCD display can require a large amount of bus bandwidth.
N9H30 supports resolution up to 1024 X 768 and SDRAM with a programmable refresh rate. The refresh and power-on control module generates the refresh request signal and SDRAM power-on sequence. The SDRAM controller also supports software reset, SDRAM self-refresh, and auto power-down function.
Operating Requirements
Parameter | System | Specification | |||
---|---|---|---|---|---|
Min | Typ | Max | Unit | ||
Core Operation Voltage | VCORE_VDD | 1.1399999999999999 | 1.2 | 1.26 | V |
I/O Operation Voltage | VIO_VDD | 2.97 | 3.3 | 3.63 | V |
DDR I/O Operation Voltage | VDDR_VDD | 1.7 | 1.8 | 1.9 | V |
Pin Mapping
Pin No. | Pin Configured as | Signal | Function |
---|---|---|---|
54 | PA0 | LCD_DATA0 | LCD Interface |
53 | PA1 | LCD_DATA1 | |
52 | PA2 | LCD_DATA2 | |
51 | PA3 | LCD_DATA3 | |
50 | PA4 | LCD_DATA4 | |
49 | PA5 | LCD_DATA5 | |
48 | PA6 | LCD_DATA6 | |
47 | PA7 | LCD_DATA7 | |
46 | PA8 | LCD_DATA8 | |
45 | PA9 | LCD_DATA9 | |
43 | PA10 | LCD_DATA10 | |
42 | PA11 | LCD_DATA11 | |
41 | PA12 | LCD_DATA12 | |
40 | PA13 | LCD_DATA13 | |
39 | PA14 | LCD_DATA14 | |
38 | PA15 | LCD_DATA15 | |
37 | PD8 | LCD_DATA16 | |
36 | PD9 | LCD_DATA17 | |
35 | PD10 | LCD_DATA18 | |
34 | PD11 | LCD_DATA19 | |
33 | PD12 | LCD_DATA20 | |
32 | PD13 | LCD_DATA21 | |
31 | PD14 | LCD_DATA22 | |
30 | PD15 | LCD_DATA23 | |
107 | PB2 | LCD_PWM | |
4 | PG0 | LCD_I2C_SDA | |
3 | PG1 | LCD_I2C_SCL | |
121 | PG4 | LCD_RST | |
122 | PG5 | TOUCH_INT | |
29 | PG6 | LCD_CLK | |
28 | PG7 | LCD_HSYNC | |
27 | PG8 | LCD_VSYNC | |
26 | PG9 | LCD_DEN | |
167 | PH3 | LCD_BLEN | |
162 | PD7 | LCD_CS | |
182 | PE0 | UART0_RXD | M0A23 Interface |
181 | PE1 | UART0_TXD | M0A23 Interface |
69 | RTC_XI | RTC_XI | External Oscillator |
70 | RTC_XO | RTC_XO | External Oscillator |
184 | 12M_XI | 12M_XI | External Oscillator |
185 | 12M_XO | 12M_XO | External Oscillator |
111 | PB6 | SPIO_SSO | SPI Flash Interface |
112 | PB7 | SPIO_CLK | |
113 | PB8 | SPIO_DO (Data0) | |
114 | PB9 | SPIO_DI (Data0) | |
115 | PB10 | SPIO_DATA2 | |
116 | PB11 | SPIO_DATA3 | |
123 | PC0 | NAND_D0 | NAND Flash Interface |
124 | PC1 | NAND_D1 | |
125 | PC2 | NAND_D2 | |
126 | PC3 | NAND_D3 | |
127 | PC4 | NAND_D4 | |
128 | PC5 | NAND_D5 | |
129 | PC6 | NAND_D6 | |
130 | PC7 | NAND_D7 | |
131 | PC8 | NAND_CS0 | |
132 | PC9 | NAND_ALE | |
133 | PC10 | NAND_CLE | |
134 | PC11 | NAND_nWE | |
135 | PC12 | NAND_nRE | |
136 | PC13 | NAND_RDY0 | |
137 | PC14 | NAND_nWP |
Guidelines for N9H30 circuit design
Decoupling Capacitor:
The general guideline on the decoupling capacitance requirements is to use a 0.1uF capacitor between each VDD/VSS pair and a stabilizing 10μF capacitor. Improved stability on the power supplies may be achieved by placing a pair of capacitors at each pin pair, but the best results are achieved by placing the capacitor as close as possible to its microcontroller pin. Designers need to be sure to consider the capacitor ESR characteristics while selecting the capacitor part number.
Oscillator:
The high-speed external (HXT) clock can be supplied with a 4 to 24 MHz crystal oscillator and for low speed it is 32.768KHz. For instrument cluster application, the external components have to be placed as close as possible. Below are the recommended values for external low speed and high-speed crystal.
Crystal | ESR (mohm) | Cx, Cy |
---|---|---|
12 MHz - External High-speed Crystal | < 50 | 14 pf |
32.768 KHz – External Low speed crystal | <50 | 20pF |
Memory and storage Management:
In order to interface with higher resolution displays, an external Quad-SPI Flash memory with up to 128 Mbytes addressable memory-mapped can be used to store graphic primitives.
4. Conclusion
This article serves as a starting point for developing an instrument cluster using Nuvoton’s M0A23 and N9H30 series microcontrollers. Modern day instrument clusters require many more inputs and data processing, which can be designed using Nuvoton’s offerings based on the application requirements.
List of references
1. https://www.nuvoton.com/products/gui-solution/gui-platform/numaker-emwin-n9h30/