The Local Interconnect Network (LIN) bus protocol defines a network for connecting simple controls such as switches, displays, sensors and actuators in automotive applications at a lower cost than can be achieved using CAN (Control Area Network), MOST, or ByteFlight. Although it was originally designed for use in vehicles, the LIN bus is an open protocol that can be used equally effectively in industrial or household applications. It provides a robust, limited-size network that is well suited to connecting simple controls over short distances where speed is not a critical factor.
The LIN bus standard includes specifications for the transmission protocol, the transmission medium and the interface between development tools, and has the following attributes:
* Single master/multiple slave.
* Low cost silicon implementation, based on common USART/SCI interface hardware.
* Easy to implement.
* Self-synchronisation without quartz or ceramic resonators in the slave nodes.
* Guarantee of latency times for signal transmission.
* Low-cost, single-wire implementation.
* Speed up to 20 Kbps.
The master transmits to the slaves and the slaves transmit only when queried by the master. The only time the slave initiates a transmission is when it needs to issue a wake-up signal. The slave nodes identify their message by the identifier bits, which means that several nodes can receive the same message. A standard data frame of the LIN bus is shown in Figure 1.
The standard data frame initiates the communication process with a synchronisation break, which is followed by a synchronisation delimiter of 1 to 4 bit times. After the delimiter is sent, the synchronisation field is transmitted, which allows the slave nodes to adjust their baud rate to the transmitted signal.
Once the synchronisation field is transmitted, the identifier field is issued, which includes the identifier bits and two parity bits. The parity bits identify which slave the data is relevant to and tells what to do with the data. After the identifier field is sent, either the addressed slave node responds to the message or the master keeps transmitting data. A certain sequence of identifier bits can be used to receive data from slave nodes while other identifier bits can indicate what type of data follows. The data frame ends with a checksum, which is calculated over all data bytes (not including the identifier byte and synchronisation field).
Another frame issued by the LIN bus master is the Sleep Frame, which puts the bus and its nodes into a low-power mode. The Sleep Frame is similar to a data frame except that the identifier field contains the value 0x80. The system designer has the option to transmit data following the identifier field or not. The bus sleep mode ends when a wake-up signal is received. The master or any slave node can send the wake-up signal.
When the master or a slave needs to send a wake-up signal it transmits the value 0x80 followed by a wake-up delimiter of 4 to 64 bit times. After this the master sends a data frame. If the master fails to transmit the Synchronisation Break after 128 bit times, a new wake-up signal is sent. This procedure is not repeated more than three times.
The LIN bus in a white goods application
In a typical clothes-dryer application, the user selects temperature, drying time, and cool-down period from a control panel on the dryer. At that point the electronics in the dryer takes over. Sensors that control the temperature, degree of dryness, the spinning cycle and other parameters are wired directly to the control panel. This approach is expensive, because every wire has to be routed to the control panel. But if all sensors, motors, and display units are connected on a single bus, then only one wire has to be routed through the washing machine, greatly reducing service costs as well as original manufacturing costs. Figure 2 shows an example network for a dryer.
For example, in a dryer incorporating a LIN bus, after the user selects a programme for the drying cycle the main processor (which functions as the master) takes control. Before the drying process starts, the master polls the door node sensor to see if the latch is closed. If the latch is open, a message can be displayed on the control panel or a sound can be generated. If the latch is closed, the master sends a command to the heating element to start heating and a command to the motor to start spinning. Using a single identifier accomplishes both tasks. The motor and the heating element pick up this identifier and start heating and spinning.
Once the dryer starts its cycle, the temperature sensor is polled every second to see if the target temperature has been reached. If it has, the master instructs the heating element to turn off. The temperature will continue to be monitored to ensure that it does not drop below a minimum value.
During the drying cycle, the master continuously checks to see if the door latch is closed. If the latch is opened during the drying cycle, the master sends a command to the bus to shut off the heater and the motor.
The master unit has a timer dedicated to the programmed drying cycle. After the drying process is finished, the master starts the cooling process, when the heating element is turned off but the dryer continues to spin. After the cooling cycle is finished, the master sends a message to the control panel display that the cycle is over. The display unit will then either show a text message or use a buzzer to generate a sound.
Upgrading and debugging via a LIN bus
LIN bus debugging nodes can be accessed using a PC. For example, the master can be programmed to enter debugging/upgrade mode when two keys are pressed for longer than two seconds. In this mode it can activate debug nodes or download new firmware onto nodes.
The LIN bus allows the dryer to be programmed for different features such as automatic load control. Rather than having a different module for each feature (which means that a number of modules need to be stocked and maintained), the same basic control module can be used for all features. The feature can be enabled during the production process by sending a configuration command through the LIN bus to the nodes, where they are stored in an EEPROM. Each time a node powers up it would load its configuration from the EEPROM. Another option is that each time the dryer is turned on the master sends a configuration through the LIN bus to the nodes, which would eliminate the need for an EEPROM.
Using the LIN bus saves money by eliminating the need for multiple program modules and multiple wires. Testing and debugging can be performed via the LIN bus, and features and be enabled or disabled. Thus, significant savings can be accomplished both for the manufacturer and the consumer.
For more information contact Avnet Kopp, 011 809 6100, Memec SA, 021 674 4103, Tempe Technologies, 011 452 0530.
Email: | [email protected] |
www: | |
Articles: | More information and articles about Tempe Technologies |
© Technews Publishing (Pty) Ltd | All Rights Reserved