Design and Implementation of Automobile Steering Wheel Button Controller Based on LIN Bus

When people buy a family car, the requirements for comfort are constantly improving, and comfort performance has become an important indicator of the factors of car purchase. The traditional car steering wheel only has the function of controlling the steering and the horn. With the development of the car body electronics, the steering wheel is gradually integrating many buttons for controlling other functions, such as buttons for controlling the radio, buttons for controlling DVD or CD playback, Mobile phone Bluetooth hands-free, automatic cruise control, etc., even the user-configurable function buttons, namely learning buttons.

This article refers to the address: http://

The design style of the steering wheel buttons reflects the different personality of each model, so the button control design of the steering wheel is receiving more and more attention from the car manufacturers. Considering that the steering wheel button controller of the car is limited by many factors such as installation space, multiple commands and design cost, and LIN (Local Interconnect Network) bus has the advantages of high reliability and saving wire harness in the field of low-speed electronic body applications, we choose Phase One. Carl Semiconductor's MC9S08SC4 is the main controller, and a car steering wheel button controller based on LIN bus is designed.

Key controller design difficulties

The design of the car steering wheel button controller has the following three difficulties.

1 installation space limit

Since the button controller is mounted near the steering wheel panel, it is necessary to minimize the area of ​​the printed board during design to facilitate the insertion into a small space below the steering wheel and to avoid installation with other modules (such as ABS). The location conflicts.

2 harness quantity limit

The steering wheel button controller provides the driver with control comfort and driving pleasure, and needs to process multiple control commands issued by each button in time, and send these commands to the corresponding control module to complete such as CD/DVD playback. Speed ​​cruise control or hands-free function for mobile phones. If the button controller is connected to the controlled module by using the wire harness method, the cost of the wire harness, the wiring complexity and the weight of the whole vehicle are bound to increase. Therefore, it is a cost-effective ideal to realize communication with each controlled module by means of the automobile bus. select.

3 cost limit

In principle, the button controller simply converts the button operations into corresponding commands and transmits them to the functional modules in the least reliable manner. Minimizing the number of peripheral components and using the on-chip resources provided by the microcontroller to implement system functions is the key to design.

Button controller hardware system design

The button controller system is mainly composed of input signal conditioning circuit, main control single chip microcomputer, LIN bus transceiver and key backlight output drive circuit. The system block diagram is shown in Figure 1. The input signal conditioning circuit mainly performs latching and debounce processing on the button signal, and the processed analog signal is sent to the AD unit of the single chip microcomputer for digital conversion, and the digital signal is sent to the single chip interrupt interface. The main control MCU mainly completes the check of the button signal, the control of the LED backlight and the LIN communication. The LIN bus transceiver cooperates with the LIN controller to complete bus communication with each control module. The following focuses on the selection of the main control microcontroller and LIN bus transceiver.

Figure 1 Button controller system block diagram

Control and LIN communication. The LIN bus transceiver cooperates with the LIN controller to complete bus communication with each control module. The following focuses on the selection of the main control microcontroller and LIN bus transceiver.

1 main control microcontroller

The design of the button controller has many limitations such as installation space, number of wire harnesses, cost, etc. The selection of key components must take these factors into consideration and strive for optimal cost performance. Freescale Semiconductor's 8-bit high-performance microcontroller M C9S08S C4 based on the enhanced HC S08 core is available in a 16-TSSOP package with a form factor of only 6.40mm × 5.00mm. The design of the steering wheel keyboard controller will significantly reduce the PCB area. On the other hand, the M C9S08S C4 has a clock generator inside, which can achieve the maximum error of ±2% in the full temperature and full voltage range after calibration, which is enough for the LIN communication application with the highest clock accuracy. Therefore, the internal digital clock can be directly used to provide the LIN communication and the clock signal required by the entire system, eliminating the clock oscillator external to the chip, thereby saving the board area and system cost.

The M C9S08S C4 integrates a LIN controller. The various control functions that the car's steering wheel buttons are responsible for can save the wire harness cost, reduce the weight, and facilitate the function upgrade and cutting. As a low-cost, high-reliability automotive bus system, LIN bus has been widely used in body electronics systems. Although the LIN controller can be implemented using a common serial port controller UART, the serial port controller SCI module inside the M C9S08S C4 not only implements the UART function, but also integrates some hardware features related to LIN communication ( For example, the generation and detection of a very special Break field in LIN communication). This hardware-integrated LIN communication function can help users reduce the complexity of LIN communication software design and speed up product development cycle and time to market compared to using a common UART controller.

In the car steering wheel button control system, some data before the system is powered down (for example, the last volume information or the speed information of the cruise control) needs to be restored after the next power-on. If the traditional method is to add an EEPROM to save the corresponding data, it will bring double pressure to increase the board area and cost. If the F lash on the chip can simulate the operation of the EEPROM to achieve data storage, then it will be the most ideal solution. The MC9S08SC4 internal FLASH controller comes with a high-pressure pump to support the voltage required for FLASH programming and erasing. It also supports higher reprogramming and erasing operations, and can also dynamically save parameters to the FLASH, so the M C9S08S C4 internal FLASH memory It is possible to simulate the operation of the EEPROM to realize the storage of data, and the EEPROM chip is omitted.

2 LIN bus transceiver

The LIN bus transceiver is the interface between the LIN controller and the LIN physical bus. The selection should be based on the LIN protocol version, static power consumption, and cost. The LIN transceiver selected for this design is the TJ A1021 from NXP Semiconductors. TJ A1021 supports the latest LI N2.1 protocol, data transmission rate from 1 to 20k bps, input level compatible with 3.3V and 5V devices, with very low electromagnetic emission and high immunity to electromagnetic interference, only the supply current in sleep mode 10μA or so, local or remote wake-up can be realized, and the LIN bus automatically protects the battery and ground from short circuit. The TJ A1021 application circuit is shown in Figure 2. It has four operating modes: normal operating mode, sleep mode, standby mode, and startup mode. When VBAT is powered up and the control signal NSLP is low, TJ A1021 enters the startup mode. After normal startup, if NSLP is set high for more than 2μs, TJ A1021 enters normal operation mode. At this time, if NSLP is set low for more than 2μs, TJ A1021 enters sleep mode. In sleep mode, if the RXD signal changes from floating state to low level, it means that the wake-up signal is detected (the TXD signal output state is weakly pulled down to local wake-up, strong pull-down is remote wake-up), and the TJA1021 will automatically enter standby mode. V15 is a Zener diode that is used to suppress transient overvoltages in automotive power supplies to protect the transceiver from normal operation.


Button controller software system design

In the LIN bus system consisting of the steering wheel button controller, the radio function module, the car DVD or CD function module, the automatic cruise control module, etc., the steering wheel button controller is the master node, and the rest are slave nodes. The main program of the button controller software continuously scans the button matrix in a cyclic manner. When a button state changes, the LIN send function is called, and the corresponding command is output through the LIN bus. The main program software includes three parts: protocol layer software, interface layer software and application layer software. The protocol layer software is responsible for the implementation of the underlying communication protocol and the generation of bus signals. The interface layer software provides the application program interface, and the application layer software is responsible for the control of specific functions.

1 protocol layer software

The protocol layer is the core of the entire system LIN protocol implementation. It is responsible for the control and use of the physical link. It receives calls from interface layer functions and mainly performs multi-byte data transmission. In this design, the multi-byte send function is voi d_s en d_data(u8 *temp, u8 num), the data array to be sent is passed through the pointer temp, num is the number of data bytes to be sent, and the flow chart of the sending program is as shown in the figure. 3(a).

2 interface layer software

The interface layer is a bridge between the protocol layer and the application layer. It is responsible for converting the application layer commands into the protocol layer data format, and then sending the data to the bus through the protocol layer. In this design, the interface layer multi-byte send function is Voi d_u8_d at a_wr(dat a_h andleuuu, u8*ptr), the program flow is shown in Figure 3(b).

Figure 3 multi-byte transmission flow chart

3 application layer software


The application layer software is mainly divided into three basic modules: the bus communication module void _ LIN _s end (void), the keyboard state detection module voi dk e y_s can (vo id) and the keyboard processing module voi dprocess_ (void). When the program starts running, the LIN bus is initialized first, and after initialization, it is transferred to the keyboard state scan function key_scan(). This function monitors the keyboard status flag and, if the status changes, calls LI N_s end() to send the corresponding command to the bus.

Test test

According to the above scheme, a simple button controller is designed, three buttons are configured to simulate the function of the steering wheel button, and communication test and preliminary anti-interference test are carried out. The printed circuit board (PCB) is shown in Fig. 4. . The test method is as follows:

Figure 4 button controller PCB diagram
Connect the LIN line and the ground line of the button controller to the LI line and ground wire of the self-made LIN bus test bench, and the power supply voltage is DC 12V. When any button is pressed, the controller acts as the master node to actively send the "#F0" command to the LI N bus. If the LIN bus test station receives the command word, it starts the buzzer alarm and the LED flashes. The actual test shows that the button controller LIN communication function is normal. Due to the harsh electromagnetic environment of the car, the anti-interference ability of the LIN communication system is particularly important. The button controller was tested on the B Z-5 automobile EDM interference test bench. The LIN communication function was normal in the test and the design goal was achieved.

Yixing Futao Metal Structural Unit Co. Ltd. is com manded of Jiangsu Futao Group.
It is located in the beach of scenic and rich Taihu Yixing with good transport service.
The company is well equipped with advanced manufacturing facilities.
We own a large-sized numerical control hydraulic pressure folding machine with once folding length 16,000mm and the thickness 2-25mm.
We also equipped with a series of numerical control conveyor systems of flattening, cutting, folding and auto-welding, we could manufacture all kinds of steel poles and steel towers.
Our main products: high & medium mast lighting, road lighting, power poles, sight lamps, courtyard lamps, lawn lamps, traffic signal poles, monitor poles, microwave communication poles, etc. Our manufacturing process has been ISO9001 certified and we were honored with the title of the AAA grade certificate of goodwill.
Presently 95% of our products are far exported to Europe, America, Middle East, and Southeast Asia, and have enjoyed great reputation from our customers.
So we know the demand of different countries and different customers.
We are greatly honored to invite you to visit our factory and cheerfully look forward to cooperating with you.

Poles For Electric

Poles For Electric, Power Transmission Pole, 35Kv Electric Steel Pole

YIXING FUTAO METAL STRUCTURAL UNIT CO.,LTD( YIXING HONGSHENGYUAN ELECTRIC POWER FACILITIES CO.,LTD.) , http://www.chinasteelpole.com