# Design of a TFT-LCD Based Digital Automobile Instrument

Authors: Yunsong Xu; Shen Yin; Jinyong Yu; Hamid Reza Karimi
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

The traditional mechanical instrument lacks the ability to satisfy the market with characters of favorable compatibility, easy upgrading, and fashion. Thus the design of a TFT-LCD (thin film transistor-liquid crystal display) based automobile instrument is carried out. With a 7-inch TFT-LCD and the 32-bit microcontroller MB91F599, the instrument could process various information generated by other electronic control units (ECUs) of a vehicle and display valuable driving parameters on the 7-inch TFT-LCD. The function of aided parking is also provided by the instrument. Basic principles to be obeyed in circuits designing under on-board environment are first pointed out. Then the paper analyzes the signals processed in the automobile
instrument and gives an introduction to the sampling circuits and interfaces related to these signals. Following this is the functional categorizing of the circuit modules, such as video buffer circuit, CAN bus interface circuit, and TFT-LCD drive circuit. Additionally, the external EEPROM stores information of the vehicle for history data query, and the external FLASH enables the display of high quality figures. On the whole, the accomplished automobile instrument meets the requirements of automobile instrument markets with its characters of low cost, favorable compatibility, friendly interfaces, and easy upgrading.


---

## Body

## 1. Introduction

As an essential human-machine interface, the automobile instrument provides the drivers with important information of the vehicle. It is supposed to process various information generated by other ECUs and display important driving parameters in time, only in which way can driving safety be secured. However, the traditional mechanical automobile instrument is incompetent to provide all important information of the vehicle. Besides, the traditional instrument meets great challenge with the development of microelectronic technology, advanced materials, and the transformation of drivers’ aesthetics [1, 2]. Moreover, the parking of the vehicle is also a problem puzzling many new drivers. Given this, traditional instruments should be upgraded in terms of driving safety, cost, and fashion.The digital instrument has functions of vehicle information displaying, chord alarming, rear video aided parking, LED indicating, step-motor based pointing, and data storage. The instrument adopts dedicated microcontroller MB91F599, a 7-inch LCD, and two step-motors to substitute for the traditional instrument. All the information generated by other ECUs can be acquired via not only the sample circuits but also the CAN bus.The design of the automobile instrument focuses on the following aspects which are also its advantages.


### 1.1. Friendly Interfaces

The instrument provides interfaces for different types of signals and the CAN bus. All types of signals (such as square wave signal, switching signal, resistance signal, analog voltage signal, etc.) coming from other ECUs can be acquired either from different types of sampling circuits or from the CAN bus. This makes it suitable for both the outdated application where the information from other ECUs can only be acquired via the sampling circuits and the modern application where the information from other ECUs are transmitted via the CAN bus.


### 1.2. Easy Upgrading and Favorable Compatibility

The CAN bus interface and the 7-inch TFT-LCD make it more convenient to upgrade the instrument without changing the hardware. If the software needs to be upgraded, we need not bother to take the instrument down and program the MCU. Instead, we can upgrade the instrument via the vehicle’s CAN network without taking the instrument down, which makes the upgrading more convenient. Most of the information from other ECUs can be transmitted via the CAN bus; so, we do not have to change the hardware circuits if some of the ECUs’ signals are changed in different applications. Besides, since most of the driving parameters are displayed on the TFT-LCD, and the graphical user interface can be designed with great flexibility by programming, only the software needs to be revised to meet different requirements of what kind of driving parameters to display and so forth. These characters, together with the reserved interfaces, enhance the instrument’s compatibility in different applications.


### 1.3. Fault Diagnosing and Information Sharing

It is a trend to incorporate the instrument into the vehicle information system via the CAN bus. The CAN bus interface gives the instrument access to the vehicle CAN network which enables easier fault diagnosing [3, 4] and information sharing. The fault diagnosing could be realized by accomplishing the fault diagnosing protocol above the low-speed CAN bus.


### 1.4. Low Cost

On the one hand, there are some automobile instruments which adopt 8-bit MCUs or 16-bit MCUs which have limited peripherals, so it is difficult for them to meet some requirements such as rearview video and high real-time data processing performance. And many extra components are needed if the designer wants to accomplish some functions such as video input. On the other hand, there are some advanced automobile instruments which adopt high performance MCUs (such as i.MX 53, MPC5121e, and MPC5123) and run Linux on them. They even use larger TFT-LCDs (such as the 12.3-inch TFT-LCD with a resolution of 1280 × 480 pixels) to display driving parameters. These automobile instruments show higher performances than the instrument in this paper. However, they are more expensive than this automobile. This instrument is able to provide almost all the functions of the advanced automobile instrument with a lower cost.


## 1.1. Friendly Interfaces

The instrument provides interfaces for different types of signals and the CAN bus. All types of signals (such as square wave signal, switching signal, resistance signal, analog voltage signal, etc.) coming from other ECUs can be acquired either from different types of sampling circuits or from the CAN bus. This makes it suitable for both the outdated application where the information from other ECUs can only be acquired via the sampling circuits and the modern application where the information from other ECUs are transmitted via the CAN bus.


## 1.2. Easy Upgrading and Favorable Compatibility

The CAN bus interface and the 7-inch TFT-LCD make it more convenient to upgrade the instrument without changing the hardware. If the software needs to be upgraded, we need not bother to take the instrument down and program the MCU. Instead, we can upgrade the instrument via the vehicle’s CAN network without taking the instrument down, which makes the upgrading more convenient. Most of the information from other ECUs can be transmitted via the CAN bus; so, we do not have to change the hardware circuits if some of the ECUs’ signals are changed in different applications. Besides, since most of the driving parameters are displayed on the TFT-LCD, and the graphical user interface can be designed with great flexibility by programming, only the software needs to be revised to meet different requirements of what kind of driving parameters to display and so forth. These characters, together with the reserved interfaces, enhance the instrument’s compatibility in different applications.


## 1.3. Fault Diagnosing and Information Sharing

It is a trend to incorporate the instrument into the vehicle information system via the CAN bus. The CAN bus interface gives the instrument access to the vehicle CAN network which enables easier fault diagnosing [3, 4] and information sharing. The fault diagnosing could be realized by accomplishing the fault diagnosing protocol above the low-speed CAN bus.


## 1.4. Low Cost

On the one hand, there are some automobile instruments which adopt 8-bit MCUs or 16-bit MCUs which have limited peripherals, so it is difficult for them to meet some requirements such as rearview video and high real-time data processing performance. And many extra components are needed if the designer wants to accomplish some functions such as video input. On the other hand, there are some advanced automobile instruments which adopt high performance MCUs (such as i.MX 53, MPC5121e, and MPC5123) and run Linux on them. They even use larger TFT-LCDs (such as the 12.3-inch TFT-LCD with a resolution of 1280 × 480 pixels) to display driving parameters. These automobile instruments show higher performances than the instrument in this paper. However, they are more expensive than this automobile. This instrument is able to provide almost all the functions of the advanced automobile instrument with a lower cost.


## 2. Architecture of the System

The instrument receives signals from other ECUs via the sampling circuits or the CAN bus interface. It can also receive commands from the driver via the button interface. The signals are then processed by the MCU, after which the MCU may send the vehicle information to the LCD or light the LEDs and so forth, according to the results. Therefore, the automobile instrument can be viewed as a carrier of the information flow. And the design of the system can be viewed from two aspects: the hardware system and the information flow based on it.From the aspect of information flow, the system consists of signal input, signal processing, and signal output, as shown in Figure1.Figure 1
Information flow of the system.From the aspect of hardware system components, the system consists of the MCU MB91F599 and other functional circuits such as sampling circuits and video buffer circuits, as shown in Figure2.Figure 2
Hardware system components.


## 3. System Hardware Design

### 3.1. Design Principles

In order to guarantee the performance of the automobile instrument under specific on-board environment and to save the cost of the design, several basic principles must be considered.


#### 3.1.1. Chip Package

SMD components are the first choice due to space limitations of the instrument cluster. And the actual power of these components must be no more than 30% of the rated power.


#### 3.1.2. Overvoltage Protection

Overvoltage protection circuits should be placed at the interfaces of power supply and important signals (such as the CAN bus interface) in case of voltage overshoots.


#### 3.1.3. Generality

Reserved interfaces should be taken into consideration to shorten the development cycle of subsequent similar instruments and optimize the instrument for general use.


#### 3.1.4. Inventories

Reducing the inventories should be kept in mind when selecting electronic components.


#### 3.1.5. Power Consumption

The power consumption of the instrument should be of low level.


### 3.2. Analysis of Signals Processed on Vehicle

The automobile instrument receives and processes information from other ECUs such as the tachometer, the speedometer, the cooling water temperature gauge, the oil pressure gauge, and the fuel gauge. The signals coming from these ECUs are of different types, according to which different kinds of sampling circuits and interfaces should be designed. Accordingly, a classification of the input signals is first carried out, as shown in Table1.Table 1
Classification of input signals.
Signal type
Description of the signal
Square wave signal
Signal coming from the tachometer. It can be of high resistance too.
Switching signal
It acts as a trigger signal to trigger some events such as waking up the MCU.
Resistance signal
Signal of the fuel and air volume.
Analog voltage signal
Signal of battery voltage and air pressure.
Differential signal
Signal on the CAN bus. Information of the tachometer, speedometer, oil pressure, and so forth are all sent to the instrument cluster via CAN bus.


### 3.3. Microcontroller

The microcontroller is essential to the performance of the instrument cluster. Therefore, the microcontroller that suits the system should have rich peripherals to reduce extra components, thus saving the space of the cluster and enhancing the stability of the system. Meanwhile, the operating frequency should be high and the memory size should be large for the demand of speed and accuracy in real-time processing. Besides, various operation modes are needed to lower down the power consumption.Respecting the above mentioned factors, we finally chose the MB91F599 produced by Fujitsu as the microcontroller. The MB91F599 is particularly well-suited for use in automotive instrument clusters using color displays to generate flexible driver interfaces. It integrates a high performance FR81S CPU core which offers the highest CPU performance level in the industry. Besides, it has a graphics display controller with strong sprite functionality, rendering engine, and external video capture capabilities. These greatly reduce the need for extra components and enhance the stability of the system. The rendering engine can operate in combination with the video capture to enable image manipulation. Overlaid graphics such as needles or parking guidelines can be rendered in conjunction with captured video, which helps to accomplish the aided parking. What is more, multiple built-in regulators and a flexible standby mode enable the MB91F599 to operate with low power consumption.


### 3.4. Sampling of Square Wave Signal

Square wave signal is the signal that comes from the tachometer. The engine speed, the velocity of the vehicle, and the mileage are proportional to the frequency of the square wave signal. However, the square wave is not “standard” because it is often corrupted by interferences. Besides, the peak voltage of the square wave is +12 V while the I/O voltage of the microcontroller isV
DD. The main task for the circuits is to remove the interferences and convert the +12 V voltage to V
DD. As shown in Figure 3, the square wave signal is input from node ②; node ① is connected to one pin of the microcontroller.Figure 3
Sampling circuit of square wave signal.After the preprocessing of the square wave, the microcontroller detects the positive edge of the “standard” square wave and calculates its frequency. The engine speed, the velocity of the vehicle, and the mileage can be calculated based on the frequency.The relationship between the frequency of the square wave and the engine speed can be formulated as:(1)
n
=
f
z
×
60
,
where n is the engine speed, f is the frequency of the square wave, and z is the number of pulses generated by the tachometer in every circle of the wheel.The relationship between the frequency of the square wave and the speed of the vehicle can be formulated as:(2)
v
=
3.6
π
D
f
i
N
×
1
0
-
2
,
where v is the velocity of the vehicle, f is the frequency of the square wave, D is the diameter of the wheel, i is the reduction ratio of the main reducer, and N is the number of pulses generated by the tachometer in every circle of the wheel.


### 3.5. Sampling of Other Signals

This part includes sampling circuits of switching signal, resistance signal, and analog voltage signal.The switching signal acts as a trigger signal to trigger some events such as lighting up the backlight and waking up the MCU. It can be categorized into active high and active low according to the ECUs that generate it. Figure4 offers a complete picture of the sampling circuit of active high signal. The switching signal is input from node ②; node ① is connected to one pin of the microcontroller. Diode D
1 clamps the peak voltage of the switching signal (usually +12 V) to the standard I/O voltage of the microcontroller (V
DD) after resistive subdivision. The sampling circuit of active low signal is similar to Figure 4.Figure 4
Sampling circuit of active high signal.The resistance signal is generated by the fuel gauge and the air volume gauge. As shown in Figure5, the resistance signal R
x is input from node ①; node ② is connected to one pin of the microcontroller. R
1, R
2, R
3, and R
4 have the same value of R and they form a series-parallel network to cut down the power consumption of each resistor to one forth that of a one-resistor solution.Figure 5
Sampling circuit of resistance signal.If the voltage detected at node ② isV, then R
x can be given as:
(3)
R
x
=
R
(
R
5
+
R
6
)
R
6
V
DD
/
V
-
(
R
5
+
R
6
+
R
)
.The analog voltage signal reflects the battery voltage and the air pressure. The corresponding circuit adopts the resistive subdivision so as to adjust the ratio of the resistors for putting voltage of the signal below the microcontroller’s maximum I/O voltage. The value of the resistors should be a little larger to lower down the static power consumption of the resistors. It is unnecessary to go into detail of the circuit.


### 3.6. Video Buffer Circuit

The rearview video contributes a lot to vehicle backing and parking. The signal coming from the rear camera must be regulated before being processed by the microcontroller. The rear camera outputs NTSC video. The MB91F599 integrates a video decoder which supports NTSC/PAL video input, which makes the design of the regulatory circuit simple.Figure6 shows RGB with sync in NTSC format. The RGB varies in a positive direction from the “black level” (0 V) to 700 mV. Meanwhile, a sync waveform of −300 mV is attached to the video signal. Since the output video signal of the camera is AC-coupled, a clamp circuit is needed to clamp the RGB and sync to a reference voltage and leave the others to vary. If not clamped, the bias voltage will vary with video content and the brightness information will be lost [5].Figure 6
RGB with sync in NTSC format.The video buffer circuit consists of a clamping circuit (R
1, Q
1, R
5) and an emitter follower (R
2, R
3, Q
2), as shown in Figure 7. Node ① is connected to the NTSC input pin of the microcontroller; node ② is connected to the clamp level output pin of the microcontroller; node ③ is connected to the camera’s signal output. C
2 is the coupling capacitor; R
4 is the matching resistor to realize the 75 Ω back termination.Figure 7
Video buffer circuit.Here, the sync signal is not present, so the clamp level is controlled by the clamp level output pin of the microcontroller, which is called “keyed clamp” [5]. The graphics display controller of the microcontroller let the clamp level output occur in coincidence with the sync pulse; that is, the clamp level output occurs during the sync tip in Figure 6, thus we get the “sync tip clamp” [5].


### 3.7. Data Storage Units

An EEPROM chip and two nor-FLASH chips are used for data storage. The EEPROM is used to store the mileage data permanently. TheI
2
C serial EEPROM 24LC04B is chosen to accomplish this function. It has a memory capacity of 4 K which is enough for the mileage data storage. Besides, the extended temperature range under which it can work reliably meets the demands of on-board environment.Since the FLASH size of the microcontroller is only 1 MB which is limited for the storage of pictures displayed on the LCD, external FLASH is needed to store different kinds of meaningful pictures such as the background of the dial. Two S29GL256N chips with a memory capacity of 256 Mb are chosen for picture data storage for their high performance and low power consumption. The application circuits of the chips are provided in their datasheets, so it is unnecessary to go into the details of them here.


### 3.8. CAN Bus Interface

Controller Area Network (CAN) is widely deployed in automobile, industry, and aerospace domains. As a major trend of the technological development of in the automation industry, CAN is now reputed as a local area network in automation [6]. Its low cost and ability to integrate with most microcontroller silicon families have made it a standard for automobile applications [7–9].The ECUs of engine control, full active suspension control [10, 11], airbag control, traction control, and so forth are nodes of the controller area network and can be controlled via CAN bus in time. Thus a networked control system (NCS) is formed via CAN bus and some results in [12–15] may be useful in the controller design of the communication system. The communication system can be categorized by the requirements of real-time response of each node. The nodes requiring good performance in real-time response and reliability should be designed into high-speed communication network, while others should be designed into low-speed communication network [16].Full active suspension control, airbag control, traction control, and so forth are incorporated into high-speed communication system since their requirements of real-time response and reliability are critical. Because of less critical requirements, on-board fault diagnosing [17, 18], doors control, windows control, and so forth are incorporated into low-speed communication system. The transmitting rate of the high-speed CAN bus is 500 kbps while that of the low-speed one is 250 kbps. The two kinds of communication systems are connected via a gateway which enables real-time sharing of data. And the data transmitting of the high-speed CAN bus has a higher priority over the low speed CAN bus when a collision occurs.For this design, only the CAN transceiver and its auxiliary circuit are needed since the MB91F599 is integrated with two CAN controllers, which are connected to the high-speed and low-speed CAN bus, respectively. TJA1040 is chosen as the CAN transceiver for its low consumption in standby mode. Besides, it can also be woken up via CAN bus, which is required by some automobile instruments. Detailed circuit is provided in the datasheet of TJA1040, so the repetitious details need not be given here. Note that for high-speed CAN, both ends of the pair of signal wires must be terminated. ISO 11898 requires a cable with a nominal impedance of 120 Ω [19]; therefore, 120 Ω resistors are needed for termination. Here, only the devices on the ends of the cable need 120 Ω termination resistors.


### 3.9. TFT-LCD Interface

The 7-inch TFT-LCD has a resolution of800
×
480 pixels and supports the 24-bit for three RGB colors. The interface of the 60-pin TFT-LCD can be categorized into data interface, control interface, bias voltage interface, and gamma correction interface.The data interface supports the parallel data transmitting of 18-bit (6 bits per channel) for three RGB colors. Thus, a range of2
18 colors can be generated. The control interface consists of a “horizontal synchronization” which indicates the start of every scan line, a “vertical synchronization” which indicates the start of a new field, and a “pixel clock.” This part is controlled by the graphics display controller which is integrated in the MB91F599. We just need to connect the pins of the LCD to those of the microcontroller correspondingly.Bias voltages are used to drive the liquid crystal molecules in an alternating form. The compact LCD bias IC TPS65150 provides all bias voltages required by the 7-inch TFT-LCD. The detailed circuit is also provided in the datasheet of TPS65150.The greatest effect of gamma on the representations of colors is a change in overall brightness. Almost every LCD monitor has an intensity to voltage response curve which is not a linear function. So if the LCD receives a message that a certain pixel should have certain intensity, it will actually display a pixel which has intensity not equal to the certain one. Then the brightness of the picture will be affected. Therefore, gamma correction is needed. Several approaches to gamma correction are discussed in [20–22]. For this specific 7-inch LCD, only the producer knows the relationship between the voltage sent to the LCD and the intensity it produces. The signal can be corrected according to the datasheet of the LCD before it gets to the monitor. According to the datasheet, ten gamma correction voltages are needed. These voltages can be got from a resistive subdivision circuit.


### 3.10. Power for the Whole System

The vehicle electric power system is mainly composed of a generator and a battery [23]. The power voltage of a car is +12 V while that of a bus is +24 V. The power supply of the automobile instrument alternates between the generator and the battery. The generator powers the automobile instrument and charges the battery when working. Note that the battery does not power the instrument when the generator is on. If the generator is not working, the instrument is powered by the battery. Figure 9 shows how the power supply alternates. Node ① is connected to the battery; node ② is connected to the generator; node ③ is connected to other circuits. When the generator is on, Q
1 and Q
2 are turned off, which prevents node ③ from getting power from the battery. Then node ③ gets power from the generator via other routes (not shown in the figure). When the generator is off, Q
1 and Q
2 are turned on, so node ③ gets power from the battery.For this instrument, the LED indicators, the backlight, and the chord alarm need to be supplied with a voltage of +12 V; the CAN transceiver, the EEPROM, and the buttons need to be supplied with a voltage of +5 V; the video buffer circuit, the external FLASH, and the data interface of the LCD need to be supplied with a voltage of +3.3 V. Besides, the microcontroller needs to be supplied with voltages of +5 V and +3.3 V simultaneously. Figure8 offers a detailed block diagram of the power supply for the automobile instrument.Figure 8
Block diagram of the power supply.Figure 9
Circuit for power supply alternating.


## 3.1. Design Principles

In order to guarantee the performance of the automobile instrument under specific on-board environment and to save the cost of the design, several basic principles must be considered.


### 3.1.1. Chip Package

SMD components are the first choice due to space limitations of the instrument cluster. And the actual power of these components must be no more than 30% of the rated power.


### 3.1.2. Overvoltage Protection

Overvoltage protection circuits should be placed at the interfaces of power supply and important signals (such as the CAN bus interface) in case of voltage overshoots.


### 3.1.3. Generality

Reserved interfaces should be taken into consideration to shorten the development cycle of subsequent similar instruments and optimize the instrument for general use.


### 3.1.4. Inventories

Reducing the inventories should be kept in mind when selecting electronic components.


### 3.1.5. Power Consumption

The power consumption of the instrument should be of low level.


## 3.1.1. Chip Package

SMD components are the first choice due to space limitations of the instrument cluster. And the actual power of these components must be no more than 30% of the rated power.


## 3.1.2. Overvoltage Protection

Overvoltage protection circuits should be placed at the interfaces of power supply and important signals (such as the CAN bus interface) in case of voltage overshoots.


## 3.1.3. Generality

Reserved interfaces should be taken into consideration to shorten the development cycle of subsequent similar instruments and optimize the instrument for general use.


## 3.1.4. Inventories

Reducing the inventories should be kept in mind when selecting electronic components.


## 3.1.5. Power Consumption

The power consumption of the instrument should be of low level.


## 3.2. Analysis of Signals Processed on Vehicle

The automobile instrument receives and processes information from other ECUs such as the tachometer, the speedometer, the cooling water temperature gauge, the oil pressure gauge, and the fuel gauge. The signals coming from these ECUs are of different types, according to which different kinds of sampling circuits and interfaces should be designed. Accordingly, a classification of the input signals is first carried out, as shown in Table1.Table 1
Classification of input signals.
Signal type
Description of the signal
Square wave signal
Signal coming from the tachometer. It can be of high resistance too.
Switching signal
It acts as a trigger signal to trigger some events such as waking up the MCU.
Resistance signal
Signal of the fuel and air volume.
Analog voltage signal
Signal of battery voltage and air pressure.
Differential signal
Signal on the CAN bus. Information of the tachometer, speedometer, oil pressure, and so forth are all sent to the instrument cluster via CAN bus.


## 3.3. Microcontroller

The microcontroller is essential to the performance of the instrument cluster. Therefore, the microcontroller that suits the system should have rich peripherals to reduce extra components, thus saving the space of the cluster and enhancing the stability of the system. Meanwhile, the operating frequency should be high and the memory size should be large for the demand of speed and accuracy in real-time processing. Besides, various operation modes are needed to lower down the power consumption.Respecting the above mentioned factors, we finally chose the MB91F599 produced by Fujitsu as the microcontroller. The MB91F599 is particularly well-suited for use in automotive instrument clusters using color displays to generate flexible driver interfaces. It integrates a high performance FR81S CPU core which offers the highest CPU performance level in the industry. Besides, it has a graphics display controller with strong sprite functionality, rendering engine, and external video capture capabilities. These greatly reduce the need for extra components and enhance the stability of the system. The rendering engine can operate in combination with the video capture to enable image manipulation. Overlaid graphics such as needles or parking guidelines can be rendered in conjunction with captured video, which helps to accomplish the aided parking. What is more, multiple built-in regulators and a flexible standby mode enable the MB91F599 to operate with low power consumption.


## 3.4. Sampling of Square Wave Signal

Square wave signal is the signal that comes from the tachometer. The engine speed, the velocity of the vehicle, and the mileage are proportional to the frequency of the square wave signal. However, the square wave is not “standard” because it is often corrupted by interferences. Besides, the peak voltage of the square wave is +12 V while the I/O voltage of the microcontroller isV
DD. The main task for the circuits is to remove the interferences and convert the +12 V voltage to V
DD. As shown in Figure 3, the square wave signal is input from node ②; node ① is connected to one pin of the microcontroller.Figure 3
Sampling circuit of square wave signal.After the preprocessing of the square wave, the microcontroller detects the positive edge of the “standard” square wave and calculates its frequency. The engine speed, the velocity of the vehicle, and the mileage can be calculated based on the frequency.The relationship between the frequency of the square wave and the engine speed can be formulated as:(1)
n
=
f
z
×
60
,
where n is the engine speed, f is the frequency of the square wave, and z is the number of pulses generated by the tachometer in every circle of the wheel.The relationship between the frequency of the square wave and the speed of the vehicle can be formulated as:(2)
v
=
3.6
π
D
f
i
N
×
1
0
-
2
,
where v is the velocity of the vehicle, f is the frequency of the square wave, D is the diameter of the wheel, i is the reduction ratio of the main reducer, and N is the number of pulses generated by the tachometer in every circle of the wheel.


## 3.5. Sampling of Other Signals

This part includes sampling circuits of switching signal, resistance signal, and analog voltage signal.The switching signal acts as a trigger signal to trigger some events such as lighting up the backlight and waking up the MCU. It can be categorized into active high and active low according to the ECUs that generate it. Figure4 offers a complete picture of the sampling circuit of active high signal. The switching signal is input from node ②; node ① is connected to one pin of the microcontroller. Diode D
1 clamps the peak voltage of the switching signal (usually +12 V) to the standard I/O voltage of the microcontroller (V
DD) after resistive subdivision. The sampling circuit of active low signal is similar to Figure 4.Figure 4
Sampling circuit of active high signal.The resistance signal is generated by the fuel gauge and the air volume gauge. As shown in Figure5, the resistance signal R
x is input from node ①; node ② is connected to one pin of the microcontroller. R
1, R
2, R
3, and R
4 have the same value of R and they form a series-parallel network to cut down the power consumption of each resistor to one forth that of a one-resistor solution.Figure 5
Sampling circuit of resistance signal.If the voltage detected at node ② isV, then R
x can be given as:
(3)
R
x
=
R
(
R
5
+
R
6
)
R
6
V
DD
/
V
-
(
R
5
+
R
6
+
R
)
.The analog voltage signal reflects the battery voltage and the air pressure. The corresponding circuit adopts the resistive subdivision so as to adjust the ratio of the resistors for putting voltage of the signal below the microcontroller’s maximum I/O voltage. The value of the resistors should be a little larger to lower down the static power consumption of the resistors. It is unnecessary to go into detail of the circuit.


## 3.6. Video Buffer Circuit

The rearview video contributes a lot to vehicle backing and parking. The signal coming from the rear camera must be regulated before being processed by the microcontroller. The rear camera outputs NTSC video. The MB91F599 integrates a video decoder which supports NTSC/PAL video input, which makes the design of the regulatory circuit simple.Figure6 shows RGB with sync in NTSC format. The RGB varies in a positive direction from the “black level” (0 V) to 700 mV. Meanwhile, a sync waveform of −300 mV is attached to the video signal. Since the output video signal of the camera is AC-coupled, a clamp circuit is needed to clamp the RGB and sync to a reference voltage and leave the others to vary. If not clamped, the bias voltage will vary with video content and the brightness information will be lost [5].Figure 6
RGB with sync in NTSC format.The video buffer circuit consists of a clamping circuit (R
1, Q
1, R
5) and an emitter follower (R
2, R
3, Q
2), as shown in Figure 7. Node ① is connected to the NTSC input pin of the microcontroller; node ② is connected to the clamp level output pin of the microcontroller; node ③ is connected to the camera’s signal output. C
2 is the coupling capacitor; R
4 is the matching resistor to realize the 75 Ω back termination.Figure 7
Video buffer circuit.Here, the sync signal is not present, so the clamp level is controlled by the clamp level output pin of the microcontroller, which is called “keyed clamp” [5]. The graphics display controller of the microcontroller let the clamp level output occur in coincidence with the sync pulse; that is, the clamp level output occurs during the sync tip in Figure 6, thus we get the “sync tip clamp” [5].


## 3.7. Data Storage Units

An EEPROM chip and two nor-FLASH chips are used for data storage. The EEPROM is used to store the mileage data permanently. TheI
2
C serial EEPROM 24LC04B is chosen to accomplish this function. It has a memory capacity of 4 K which is enough for the mileage data storage. Besides, the extended temperature range under which it can work reliably meets the demands of on-board environment.Since the FLASH size of the microcontroller is only 1 MB which is limited for the storage of pictures displayed on the LCD, external FLASH is needed to store different kinds of meaningful pictures such as the background of the dial. Two S29GL256N chips with a memory capacity of 256 Mb are chosen for picture data storage for their high performance and low power consumption. The application circuits of the chips are provided in their datasheets, so it is unnecessary to go into the details of them here.


## 3.8. CAN Bus Interface

Controller Area Network (CAN) is widely deployed in automobile, industry, and aerospace domains. As a major trend of the technological development of in the automation industry, CAN is now reputed as a local area network in automation [6]. Its low cost and ability to integrate with most microcontroller silicon families have made it a standard for automobile applications [7–9].The ECUs of engine control, full active suspension control [10, 11], airbag control, traction control, and so forth are nodes of the controller area network and can be controlled via CAN bus in time. Thus a networked control system (NCS) is formed via CAN bus and some results in [12–15] may be useful in the controller design of the communication system. The communication system can be categorized by the requirements of real-time response of each node. The nodes requiring good performance in real-time response and reliability should be designed into high-speed communication network, while others should be designed into low-speed communication network [16].Full active suspension control, airbag control, traction control, and so forth are incorporated into high-speed communication system since their requirements of real-time response and reliability are critical. Because of less critical requirements, on-board fault diagnosing [17, 18], doors control, windows control, and so forth are incorporated into low-speed communication system. The transmitting rate of the high-speed CAN bus is 500 kbps while that of the low-speed one is 250 kbps. The two kinds of communication systems are connected via a gateway which enables real-time sharing of data. And the data transmitting of the high-speed CAN bus has a higher priority over the low speed CAN bus when a collision occurs.For this design, only the CAN transceiver and its auxiliary circuit are needed since the MB91F599 is integrated with two CAN controllers, which are connected to the high-speed and low-speed CAN bus, respectively. TJA1040 is chosen as the CAN transceiver for its low consumption in standby mode. Besides, it can also be woken up via CAN bus, which is required by some automobile instruments. Detailed circuit is provided in the datasheet of TJA1040, so the repetitious details need not be given here. Note that for high-speed CAN, both ends of the pair of signal wires must be terminated. ISO 11898 requires a cable with a nominal impedance of 120 Ω [19]; therefore, 120 Ω resistors are needed for termination. Here, only the devices on the ends of the cable need 120 Ω termination resistors.


## 3.9. TFT-LCD Interface

The 7-inch TFT-LCD has a resolution of800
×
480 pixels and supports the 24-bit for three RGB colors. The interface of the 60-pin TFT-LCD can be categorized into data interface, control interface, bias voltage interface, and gamma correction interface.The data interface supports the parallel data transmitting of 18-bit (6 bits per channel) for three RGB colors. Thus, a range of2
18 colors can be generated. The control interface consists of a “horizontal synchronization” which indicates the start of every scan line, a “vertical synchronization” which indicates the start of a new field, and a “pixel clock.” This part is controlled by the graphics display controller which is integrated in the MB91F599. We just need to connect the pins of the LCD to those of the microcontroller correspondingly.Bias voltages are used to drive the liquid crystal molecules in an alternating form. The compact LCD bias IC TPS65150 provides all bias voltages required by the 7-inch TFT-LCD. The detailed circuit is also provided in the datasheet of TPS65150.The greatest effect of gamma on the representations of colors is a change in overall brightness. Almost every LCD monitor has an intensity to voltage response curve which is not a linear function. So if the LCD receives a message that a certain pixel should have certain intensity, it will actually display a pixel which has intensity not equal to the certain one. Then the brightness of the picture will be affected. Therefore, gamma correction is needed. Several approaches to gamma correction are discussed in [20–22]. For this specific 7-inch LCD, only the producer knows the relationship between the voltage sent to the LCD and the intensity it produces. The signal can be corrected according to the datasheet of the LCD before it gets to the monitor. According to the datasheet, ten gamma correction voltages are needed. These voltages can be got from a resistive subdivision circuit.


## 3.10. Power for the Whole System

The vehicle electric power system is mainly composed of a generator and a battery [23]. The power voltage of a car is +12 V while that of a bus is +24 V. The power supply of the automobile instrument alternates between the generator and the battery. The generator powers the automobile instrument and charges the battery when working. Note that the battery does not power the instrument when the generator is on. If the generator is not working, the instrument is powered by the battery. Figure 9 shows how the power supply alternates. Node ① is connected to the battery; node ② is connected to the generator; node ③ is connected to other circuits. When the generator is on, Q
1 and Q
2 are turned off, which prevents node ③ from getting power from the battery. Then node ③ gets power from the generator via other routes (not shown in the figure). When the generator is off, Q
1 and Q
2 are turned on, so node ③ gets power from the battery.For this instrument, the LED indicators, the backlight, and the chord alarm need to be supplied with a voltage of +12 V; the CAN transceiver, the EEPROM, and the buttons need to be supplied with a voltage of +5 V; the video buffer circuit, the external FLASH, and the data interface of the LCD need to be supplied with a voltage of +3.3 V. Besides, the microcontroller needs to be supplied with voltages of +5 V and +3.3 V simultaneously. Figure8 offers a detailed block diagram of the power supply for the automobile instrument.Figure 8
Block diagram of the power supply.Figure 9
Circuit for power supply alternating.


## 4. Software of the System

The main task for the program is to calculate the driving parameters of the vehicle and display them on the TFT-LCD. The calculation is triggered by the input signals via the sampling circuits or the CAN bus. The main program flow chart of the system is shown in Figure10.Figure 10
Main program flow chart.


## 5. Conclusion

The design scheme of a TFT-LCD based automobile instrument is carried out form aspects of both the hardware and the main program flow chart. The MB91F599 simplifies the peripheral circuits with its rich on-chip resources and shows high performance in real-time data processing. The automobile instrument is capable of displaying the velocity of the vehicle, the engine speed, the cooling water temperature, the oil pressure, the fuel volume, the air pressure, and other information on the TFT-LCD, which contributes a lot to driving safety and satisfies drivers’ aesthetics. Besides, the rearview video makes the parking and backing easier and safer for the driver. Moreover, the CAN bus interface and TFT-LCD make it easier for the upgrading of the instrument without changing the hardware, thus saving the cost.



---

*Source: 549790-2014-03-05.xml*