The role of microcontrollers and local interconnect networks in body control modules[Copy link]
The proliferation of microcontrollers and vehicle networking is continuing today and in the future as applications continue to expand. The microcontroller is the "brain" of the various electronic control modules within the vehicle, and the network is the "system interconnect." The Local Interconnect Network (LIN) is the industry's first open multiplexed Class A protocol standard for in-vehicle use. It defines a low-cost serial communication system that supports distributed body control electronics within the vehicle. LIN complements the existing line of automotive multiplexed networks led by CAN. Industry analysts note that it is estimated that each vehicle will have an average of 20 LIN nodes by 2010. Body control applications represent an important area in the vehicle, and LIN is conducive to supporting the simplicity of low-cost sub-networks without the need for additional bandwidth or complexity. General-purpose microcontrollers, such as Microchip's Flash PIC? microcontrollers, with their unique combination of program memory and peripherals, are ideal for applications that require 8-bit or 16-bit microcontrollers for body control that support both CAN and LIN standards. Microchip's broad and diverse product offering provides embedded control designers with a variety of options at different prices and performance levels to meet the requirements of their current design projects. Advancing body control electronics is fundamental to the ability of automakers to produce more pleasant, more reliable and safer, and more intelligent vehicles. Body control electronics can improve the safety factor of vehicles by simplifying vehicle operation and freeing drivers from distracting secondary behaviors. Each such electronic control module must address the issues of advanced performance and vehicle network connectivity with a competitive price point. The integration of advanced peripherals provided by microcontroller suppliers such as Microchip Technology can give system designers a market competitive advantage, and they can create their own RISC-based PIC? architecture. LIN is a communication concept for vehicle network sub-buses. The specification involves the definition of protocol and physical layers, as well as interface definitions for development tools and application software. LIN enables cost-effective communication networks for applications such as in-vehicle switches, smart sensors and actuators, which do not require the bandwidth and versatility of CAN. The communication protocol is based on the SCI (UART) data format, a single master/slave concept, a single-wire 12V bus and node clock synchronization without the need for a stable time base. The LIN Alliance developed this standard around the serial low-cost communication concept and development environment, which enables automakers and their suppliers to create methods to implement and handle complex hierarchical multiplexing systems in a very cost-effective way. Typical body control applications of LIN Body control electronics can improve the comfort and safety of vehicle drivers. Typical applications of the LIN bus are assembly units such as doors, steering wheels, seats, motors and sensors in climate control, lighting, rain sensors, smart wipers, smart generators, switch panels or radio frequency (RF) receivers. LIN nodes can easily connect to the automotive network and easily access all types of diagnostics and services. In addition, the commonly used analog coding of signals can be replaced by digital signals, resulting in an optimized wiring harness. Roof: Rain sensor, light sensor, light control, sunroof, etc. Doors: Mirrors, central control ECU, mirror switches, window lift, seat control switches, door locks, etc. Climate: Small motors, control panel Steering wheel: Navigation control, wipers, light adjustment, etc. Options: Climate control, radio, telephone, etc. Seats: Seat position motors, occupancy sensor, control panel Engine: Sensors, small motors In a centralized body control system, actuators and sensors are hardwired through an electronic control unit (ECU) with CAN connectivity. The ECU exchanges signals with other master ECUs via CAN links. If high computational performance is required for local actuators and sensors, hardwiring is the right choice. In systems where local performance is low, a distributed system based on intelligent actuators and sensors may be the right choice. This configuration was chosen to achieve a scalable system architecture using commonly available components. This architecture is cost-effective, as the additional cost of local intelligence and networking can be offset by savings in production and development costs due to the smaller variety of electronic components. The key approaches to this architecture are the sub-bus LIN standard, low-cost electromechanical and assembly, and semiconductor integration. There are two key factors in the low-end application of LIN: (a) each node must be low-cost compared to CAN; and (b) the performance, bandwidth, and versatility of CAN are not required. The main cost savings of LIN over CAN are driven by the following factors: (1) single-wire transmission; (2) low-cost hardware or on-chip software implementation; and (3) no crystals or piezoelectric ceramics are required in the slave nodes. These advantages include lower bandwidth and a restrictive single-master node bus access method. The main characteristics of the LIN and CAN protocols are shown below.
LIN CAN Media Access Control Single Master Multi-Master Typical Bus Speed 2.4 to 19.6 kbd 62.5 to 500 kbd Multicast Message Routing 6-bit Identifier 11/29-bit Identifier Node Encoding NRZ 8N1 (USART) Bit Stuffing NRZ Data Bits per Frame 2, 4, 8 Bytes Required Transmission Time for 0 to 8 Bytes 3.5 ms at 20 kbd 0.8 ms at 125 kbd 4 Data Bits Error Detection 8-bit Checksum 15-bit CRC Physical Layer Single Wire, Vbat Twisted Pair, 5V Clock Generation Master: Crystal, Slave: RC/Piezo Crystal Cost Associated Per Node 0.5 1
LIN Protocol LIN is a single-wire serial communication protocol based on the universal SCI (UART) byte-word interface. LIN can also be implemented with software equivalent code or pure state machines. The medium access in the LIN network is controlled by the master node, so there is no need for slave node arbitration or conflict management, thus ensuring that the signal transmission (see Figure 2) has no worst-case delay time. The main features of LIN include: -- Low-cost single-wire implementation -- Enhanced ISO 9141 based on VBAT -- Speeds up to 20Kbps (due to EMC restrictions) -- Single master node and multiple slave node concept -- No arbitration required -- Low-cost silicon implementation based on common UART/SCI interface hardware -- Slave nodes synchronize themselves, no crystals or piezoelectric ceramics are required -- Significantly reduces the cost of the hardware platform -- Guaranteed signal transmission delay time -- Predictable system
A special feature of LIN is the synchronization mechanism, which allows clock recovery by the slave nodes without the need for crystals or piezoelectric ceramics. The specifications of the line drivers and receivers follow a certain enhancement of the ISO 9141 single-wire standard. The maximum transmission speed is 20 kbps, which is due to electromagnetic compatibility (EMC) and clock synchronization requirements. Apart from the naming of the master node, the nodes in the LIN network do not use any information related to the system configuration. Nodes can be added to the LIN network without changing the hardware or software of the other slave nodes. The typical size of a LIN network is 12 nodes (although this is not limited), which is due to the small number of 64 identifiers and the relatively low transmission speed. Clock synchronization, the simplicity of UART communication and the single-wire medium are the main factors for the cost-effectiveness of LIN. Communication concept A LIN network consists of a master node and one or more slave nodes. All nodes include a slave node communication task divided into sending and receiving tasks, while the master node includes an additional master node sending task. Communication in an active LIN network is always started by the master node task. The master node sends a message header consisting of a synchronization break, a synchronization byte and a message identifier. Exactly one slave task is activated when it receives and filters the identifier and then starts to transmit a message response. The response consists of two, four or eight data bytes and a checksum byte. The header and the response part form a message frame. The message identifier indicates the content of the message, not the destination. This communication concept enables various methods of data exchange: from the master (using its slave task) to one or more slaves, from one slave to the master and/or other slaves. It is possible to send signals directly from the slave to the slave without routing through the master, or to broadcast the message from the master to all nodes in the network. The order of the message frames is controlled by the master. The number, order and frequency of messages in the master timing frame are determined together with the baud rate, the system response time and the time behavior. The system must be designed carefully, because if the master misses a message from a slave, this message will arrive at the master first in the next timing due to the master-slave concept. The LIN protocol provides a dedicated synchronization mode at the start of each message frame, which enables the slave to synchronize its local time base with the master's time base without the need for crystals or piezoelectric ceramics. LIN physical layer LIN bus is a single-wire bus powered by a termination resistor terminal matching resistor of a positive battery node Vbat. The line transceiver of this bus is an enhanced tool of ISO 9141 standard. The bus can adopt two complementary logic levels: a dominant value with an electrical voltage close to ground representing a logic '0', and a recessive value with an electrical voltage connected to the battery supply voltage representing a logic '1'. The bus is terminated with a 1Ω pull-up resistor of a master node and a 30Ω resistor on the slave node. The typical value of the slave node terminal matching capacitance is 220pF. The capacitance of the master node is relatively high in order to make the entire line capacitance independent of the number of slave nodes. The main electrical parameters of the LIN physical layer are listed below:
Parameter Typical Communication speed 9.6kbd, 19.2kdb Voltage level 13.5V Signal slew rate 2V/μs Termination matching resistor Master node: 1kΩ Slave node: 30kΩ Termination matching capacitor Master node: 220pF Slave node: 2.2nF Line capacitance 100?150pF/m The specification of the LIN physical layer places high performance requirements on the transceiver. The transceiver switching should not interfere with other electronic components. Special attention must be paid to the EMC requirements of the automobile manufacturer. The conducted emissions of the transceiver can be minimized by using waveform shaping or edge rounding. LIN bus system example: door and mirror module The increase in the number of electronic functions in the car door is a good example of the use of the LIN bus. When maintenance is carried out, functions can be added or reduced without affecting the original system design and the hardware and software of the remaining slave nodes. When functions or options need to be added during the development process and at the end of the vehicle's LIN assembly, pre-assembled and pre-tested modules can be integrated. The door LIN function cluster includes: · Window lift with/without anti-trap control · Motor PWM control, window position monitoring · Door lock actuator control, including motor control (lock) and door switch control · Switch panel control · Switch lighting Mirror functions can be integrated on more LIN slave nodes, depending on the flexibility of the optional function plan provided by the OEM to the user. These mirror functions include mirror up/down, entry/exit motor control, heating, puddle lights, turn indicators, dimming (electroplated mirrors) and electric folding.
Summary The continuous advancement of body control functions, as well as microcontrollers and LIN protocols are key factors in reducing system costs. Several factors have promoted the expansion of LIN as a "universal sub-bus network standard", including: · The introduction of LIN comes at a time when electronic control modules in the car are experiencing dramatic growth. Many of today's automotive innovations are achieved through the use of advanced electronic concepts. The user's pursuit of more comfort and safety in vehicles has fueled the development of this market. Regulatory norms have promoted the development of this trend. At the same time, automakers need cost-effective implementation methods from their suppliers. LIN is a cost-effective bus concept for in-vehicle sub-networks. It helps to optimize system costs and increase system efficiency. The LIN concept continues to find many supporters throughout the automotive industry worldwide. Even though the LIN Alliance was initiated by a group of OEMs, tool manufacturers and semiconductor manufacturers, this cost-effective open serial bus standard for communication has shown simultaneous availability in ensuring a unified tool concept and appropriate software interfaces. As one of the driving factors for implementing hierarchical vehicle networks, the LIN standard covers specifications such as transmission protocols, transmission media, interfaces between development tools and software programming interfaces. LIN guarantees the interoperability of network nodes from a hardware and software perspective and predictable EMC behavior. The LIN bus meets the performance and cost requirements of body control applications. It supports standardization and reuse of actuator and sensor designs. Body control applications benefit from the continued progress of flash-based microcontrollers with a wide range of memory, peripherals and packaging combinations, as well as the global support of LIN as a low-end multiplexed solution standard. PIC microcontrollers are universal building blocks that help develop effective solutions to complex body control application challenges and accelerate the time to market for automotive electronic control module developers.