The Lin Concept
The Lin Concept
FEATURES
LIN is a single-wire serial communications protocol based on the common SCI (UART) byte-word
interface. UART interfaces are available as low cost silicon module on almost all micro-controller and can
also be implemented as equivalent in software or pure state machine for ASICs. The medium access in a
LIN network is controlled by a master node so that no arbitration or collision management in the slave
nodes is required, thus giving a guarantee of the worst-case latency times for signal transmission.
A particular feature of LIN is the synchronization mechanism that allows the clock recovery by slave nodes
without quartz or ceramics resonator. The specification of the line driver and receiver is following the ISO
9141 single-wire standard with some enhancements. The maximum transmission speed is 20 kbit/s,
resulting from the requirements by electromagnetic compatibility (EMC) and clock synchronization.
A node in LIN networks does not make use of any information about the system configuration, except for
the denomination of the master node. Nodes can be added to the LIN network without requiring hardware
or software changes in other slave nodes. The size of a LIN network is typically under 12 nodes (though
not restricted to this), resulting from the small number of 64 identifiers and the relatively low transmission
speed. The clock synchronization, the simplicity of UART communication, and the single-wire medium are
the major factors for the cost efficiency of LIN.
COMMUNICATION CONCEPT
A LIN network comprises one master node and one or more slave nodes. All nodes include a slave
communication task that is split in a transmit and a receive task, while the master node includes an
additional master transmit task. The communication in an active LIN network is always initiated by the
master task as illustrated in the figure below: the master sends out a message header which comprises
the synchronization break, the synchronization byte, and the message identifier.
Exactly one slave task is activated upon reception and filtering of the identifier and starts the transmission
of the message response. The response comprises one to eight data bytes and one checksum byte. The
header and the response part form one message frame.
The identifier of a message denotes the content of a message but not the destination. This communication
concept enables the exchange of data in various ways: from the master node (using its slave task) to one
or more slave nodes, and from one slave node to the master node and/or other slave nodes. It is possible
to communicate signals directly from slave to slave without the need for routing through the master node,
or broadcasting messages from the master to all nodes in a network. The sequence of message frames is
controlled by the master and may form cycles including branches.
TECHNICAL OVERVIEW
LIN (Local Interconnect Network) is a low cost serial communication system intended to be used for
distributed electronic systems in vehicles, which complements the existing portfolio of automotive multiplex
networks (see figure below).
LIN is a holistic communication concept for local interconnect networks in vehicles. The specification
covers in addition to the definition of the protocol and the physical layer also the definition of interfaces for
development tools and application software.
LIN enables a cost-effective communication for smart sensors and actuators where the bandwidth and
versatility of CAN is not required. The communication is based on the SCI (UART) data format, a single-
master/multiple-slave concept, a single-wire 12V bus, and a clock synchronization for nodes without
stabilized time base.
The LIN consortium has been developed to standardize a concept of a serial low cost communication
concept in conjunction with a development environment, that enables the car manufacturers and their
suppliers to create, implement, and handle complex hierarchical multiplex systems in a very cost
competitive way.
The LIN standard reduces the manifold of existing low-end SCI based multiplex solutions and cuts the cost
of development, production, service, and logistics in vehicle electronics.
THE KEY FEATURES OF LIN ARE:
• Low cost single-wire implementation
• Enhanced ISO 9141, VBAT-based speed up to 20Kbit/s
• Acceptable speed for many applications (limited for EMI-reasons)
• Single Master / Multiple Slave concept
• No arbitration necessary
• Low cost silicon implementation based on common UART/SCI interface hardware
• Almost any microcontroller has necessary hardware on chip
• Self synchronization in the slave nodes without crystal or ceramics resonator
• Significant cost reduction of hardware platform
• Off-the-shelf slaves
• Flexibility because of configuraton features
• Guaranteed latency times for signal transmission
• Predictable systems possible
LIN SPECIFICATION
The LIN Standard encompasses the specification of the transmission protocol, the transmission medium,
the interface between development tools, and the interfaces for software programming. LIN guarantees the
interoperability of network nodes from the viewpoint of hardware and software, and a predictable EMC
behavior.
Local Interconnect significa en este caso, que todas las unidades de control están localizadas
en una zona limitada (p. ej. en el techo). También se le da el nombre de «subsistema local».
El intercambio de datos entre los diferentes sistemas de LIN-Bus en un vehículo se realiza
respectivamente por medio de una unidad de control a través del CAN-Bus de datos.
En el caso del LIN-Bus se trata de un bus monoalámbrico. El cable tiene el color básico violeta
y un color de identificación. La sección del conductor es de 0,35 mm. No requiere
apantallado.
El sistema permite el intercambio de datos entre una unidad de control LIN maestra y hasta 16
unidades de control LIN esclavas.
Elementos del vehiculo que se pueden controlar a traves del LIN-Bus.
Funciones asignadas:
Transmisión de datos
La velocidad de transmisión es de 1 - 20 kbit/s y viene determinada en el software de las
unidades de control LIN. Equivale como máximo a una quinta parte de la velocidad de
transmisión de los datos en el CAN Confort.
Señal
• Nivel recesivo
Si a través del LIN-Bus no se transmite ningún mensaje o se transmite un bit recesivo,
el cable del bus tiene aplicada una tensión equivalente prácticamente a la de batería.
• Nivel dominante
Para transmitir un bit dominante sobre el LIN-Bus, un transceptor en la unidad de
control que efectúa la transmisión conecta el cable del bus de datos a masa.
Seguridad de transmisión
Con la determinación de las tolerancias para la transmisión y recepción en la gama de los
niveles recesivo y dominante se tiene dada una transmisión estable.
Para poder recibir señales válidas a pesar de existir interferencias parásitas se han configurado
más extensas las gamas de tensiones admisibles por el lado de la recepción.
Mensajes
Mensaje con respuesta de esclava
La unidad de control LIN maestra exhorta en el encabezamiento a una unidad de control LIN
esclava a que transmita información, p. ej. sobre condiciones de conmutadores o valores
de medición.
La unidad de control LIN esclava transmite la respuesta correspondiente.
• Pausa de sincronización
• Limitación de la sincronización
• Campo de sincronización
• Campo del identificador
• La pausa de sincronización («synch break») tiene una longitud mínima de 13 tiempos
por bit. Se transmite con nivel dominante.
Resulta necesaria la longitud de 13 bit para indicar de forma inequívoca el comienzo de
un mensaje a todas las unidades de control LIN esclavas.
En las demás partes del mensaje se transiten como máximo 9 bits dominantes
consecutivos.
• El campo del identificador tiene una longitud de 8 tiempos por bit. En los primeros 6 bits
está contenida la identificación del mensaje y el número de campos de datos (ver
página 14)
que componen la respuesta.
El número de campos de datos en la respuesta puede ser de entre 0 y 8.
Los dos últimos bits reciben la suma de verificación de los 6 primeros bits, para la
detección de errores de transmisión. La suma de verificación se necesita para evitar
que se produzcan asignaciones a mensajes equivocados al haber errores de
transmisión del identificador.
En un mensaje con solicitud de datos por parte de la UCE LIN maestra, ésta última es la que
agrega la respuesta.
En función de lo especificado en el identificador, las unidades de control LIN esclavas procesan
los datos y los utilizan para la ejecución de funciones.
• Encendido ON/OFF
• Diagnosis activa/inactiva
• Luz de población ON/OFF
Para reducir la cantidad de versiones de la unidad de control LIN maestra, ésta transmite sobre
el LIN-Bus los encabezamientos destinados a las unidades de control de un vehículo con
equipamiento completo.
Por la ausencia de unidades de control para equipamientos opcionales aparecen en la imagen
del osciloscopio encabezamientos sin respuestas. Esto no influye sobre el funcionamiento del
sistema.
Proteccion antirrobo
La transmisión de datos en el sistema de bus LIN únicamente se lleva a cabo si la unidad de
control LIN maestra transmite un encabezamiento con un identificador correspondiente.
Las posibles manipulaciones en un cable LIN situado fuera de la lámina exterior del vehículo se
imposibilitan a base de que la unidad de control LIN maestra efectúe una verificación
completa de todos los mensajes.
La unidad de control LIN esclava sólo puede responder. De esta forma, por ejemplo, no es
posible desbloquear las puertas a través del LIN-Bus.
Estos nexos permiten incorporar unidades de control LIN esclavas en la zona exterior del
vehículo (p. ej. la unidad de control para el abrepuerta del garaje, situada en el paragolpes
delantero).
Diagnosis
La diagnosis de los sistemas de LIN-Bus se realizan a través del código de dirección
correspondiente a la unidad de control LIN maestra.
La transmisión de los datos de diagnosis por parte de las unidades de control LIN esclavas
hacia la UCE LIN maestra se efectúa a través del LIN-Bus.
Unidad de
• Interrupción de
control LIN
sin señal/ cable o cortocircuito
esclava, p. ej.
sin • Alimentación de
regulador
comunicación tensión defectuosa
de turbina de
para la unidad de
aire
control LIN esclava
• Versión incorrecta
LIN esclava o LIN
maestra
• Unidad de control
LIN esclava
averiada
Error en la suma de
verificación.
Transmisión incompleta de
los mensajes.
• Interferencias
electromagnéticas
Unidad de en el cable LIN
control LIN • Alteraciones de
esclava, p. ej. Señal no capacidad
regulador plausible • resistencia en el
de la turbina cable LIN (p. ej. por
de aire humedad/suciedad
en la carcasa de
conexión)
• Problema de
software (versiones
incorrectas
de las piezas)
• de tracción,
• de confort.
• de infotenimiento (información y entretenimiento),
• de cuadro
• y de diagnosis.
Todas las lineas de LIN-Bus en altea, quedan comunicadas al CAN-Bus con las respectivas
unidades maestras. La diagnosis de los sistemas LIN-Bus se realiza a través de la unidad de
control maestra. La transmisión de los datos de diagnosis por parte de las unidades esclavas
hacia la maestra se realiza a través del LIN-Bus.
Unidad maestra
La unidad de control que van conectada al CAN-Bus es la que realiza las funciones de maestra
en el LIN-Bus.
Byte array indicators is now supported, thus messages are now larger than 8 bits in one time are
sent. The checksum calculation has been extended with the possibility taking indentifier into the
calculation.
LIN Frames
The communication between the units is done via sending LIN frames. The master sends a header
(the first part of a frame) whereupon a response follows (Second part of the frame); the header is
seen in the image below.
The headers are generated by the master only. However the response can be generated by both the
master and the slave. The slave can only respond if the master addresses the slave's header ID. The
header exists of three parts: the synch break, a synchronization byte and an identifier. The break
must warn the participant about a new frame is sent on the bus. This frame has 13 dominant bits (at
LIN is this logical "0") including start bit followed by a break delimiter. The break delimiter must be in
any case 1 bit time high after the synch break follows a synchronization byte, which must
synchronize the slaves. The contents of this byte are $55 (alternating 01 pattern) including start - and
stop bit. The last part of the header is 8 bits identifiers Bit 0 till 5 are the ID bits, bit 6 is and 7 are the
parity bits. These 6 ID bits result in a range of 0 up to 63 message ID's.
The function of the two parity bits is ensuring that the identifier exist never entirely from 0-en or 1-en.
Also each node can now check if the identifier is correctly received. In the original specification (rev.
1.1) bit 5 and 6 were used to indicate the length of the message. Now this happens by means of a
configuration file, where all messages are specified. The parity bits in the identifier are calculated as
follows:
After the identifier a response will be transmitted, which size is up to 8 bytes followed by a checksum
How many bytes a response contains is specified in a configuration file. In this way every user on
network knows the length of messages send over the network. The first byte that is sent is the LSB
and the last is MSB. The last byte of response is the checksum. To calculate the checksum all the
bytes must be added. To get the checksum the calculated sum has to be inverted. There is also an
"enhanced "checksum. The indentifier is also taken along in calculation.
Example:
The following databytes will be sent; 0x4A, 0x55, 0x93 0xE5. The bytes are added up to carry arise.
If this is the case the sum is increased by one and the carry will be cleared. After the last date byte is
processed the outcome is inverted. The checksum is 0xE6. Members can calculate the checksum to
make sure all the bytes are correctly received. In case of an enhanced checksum the identifier also
will be taken along in calculation (in this example this would result in 0x4A).
If the master does not react within 150 ms after the break, then the node will retry the wake up
sequence three times. After the third time the node must wait for 1.5 sec. and it tries one more time.
What hereafter happens is not stated in the specification. Usually the decision is made to put the
mode in sleep.
Manufacturer Datasheet
Motorola
MC33399
Melexis
TH8082_006
Philips
TJA1020
On Semiconductor
NCV7361A
Both controllers have an 8 bits databus. The major difference is that the Motorola comes with an
ESCI (Enhanced Serial Communications interface) and the NEC has an ordinary UART interface.
The advantage of an ESCI are that specific LIN options directly can be addressed. THE ESCI can for
example generate and detect a break, properties which ordinary UART does not support.
INFINEON
Toshiba
Hitachi
configuration is shown
The inhibit pin is connected by means of a transistor on the microcontroller. The pin has been laid to
ground. This only endures in that the LIN transceiver by means of a dominant indicator on the LIN
bus sleep can come. As the transceiver sleep must be obtained there a dominant vigil up indicator on
the LIN bus will appear, afterwards the inhibit pin will become high. This edge generates an interrupt
in the microcontroller whereupon the software makes transceiver high. The remaining components
around the transceiver serve for protection and reduce noise in signals
Hardware “slave” design:
With regard to hardware the hardware of the master differs from slave on the following points:
The inhibit pin is switched to the power supply by means of a transistor.
The slave configuration has no terminated with a resistor.
The wake up pin of the slave is wired to the connector.
Topology:
- Sync Break:
- Synch Field:
- ID-Field:
• Message Identifier: Incorporates Information about the sender, thereceiver(s), the purpose, and the Data field
length.
• Length 6 Bit.
• 3 classes of 2/4/8 Data Bytes. The length coding is in the
• 2 MSB of the ID-Field. A total of 64 Message Identifiers ispossible.
• 2 linked Parity Bits protect this highly sensitive ID-Field.
• Message Frame Header
- Data Field:
• 1-8 bytes in length, as determined during system configuration of the message frame ID’s.
• may consist of one or more ‘signals’ appended together.
- Checksum Field:
Physical Layer:
Network configuration:
• Standard LIN Description File
- describes complete LIN network and also contains all information necessary to monitor the network.
Dynamic configuration:
- LINspector:
a highly flexible tool for testing and verifying communication for compliance with the LIN standard.
MOSFET
Historia
Fue ideado teóricamente por el alemán Julius von Edgar Lilienfeld en 1930, aunque
debido a problemas de carácter tecnológico y el desconocimiento acerca de cómo se
comportan los electrones sobre la superficie del semiconductor no se pudieron fabricar
hasta décadas más tarde. En concreto, para que este tipo de dispositivos pueda funcionar
correctamente, la intercara entre el sustrato dopado y el aislante debe ser perfectamente
lisa y lo más libre de defectos posible. Esto es algo que sólo se pudo conseguir más
tarde, con el desarrollo de la tecnología del silicio.
Funcionamiento
Estado de corte
Conducción lineal
Al polarizarse la puerta con una tensión negativa (pMOS) o positiva (nMOS), se crea
una región de deplexión en la región que separa la fuente y el drenador. Si esta tensión
crece lo suficiente, aparecerán portadores minoritarios (electrones en pMOS, huecos en
nMOS) en la región de deplexión que darán lugar a un canal de conducción. El
transistor pasa entonces a estado de conducción, de modo que una diferencia de
potencial entre fuente y drenador dará lugar a una corriente. El transistor se comporta
como una resistencia controlada por la tensión de puerta.
Saturación
Cuando la tensión entre drenador y fuente supera cierto límite, el canal de conducción
bajo la puerta sufre un estrangulamiento en las cercanías del drenador y desaparece. La
corriente entre fuente y drenador no se interrumpe, ya que es debido al campo eléctrico
entre ambos, pero se hace independiente de la diferencia de potencial entre ambos
terminales.
Modelos matemáticos
Aplicaciones
La forma más habitual de emplear transistores MOSFET es en circuitos de tipo CMOS,
consistentes en el uso de transistores pMOS y nMOS complementarios.
Ventajas
La principal aplicación de los MOSFET está en los circuitos integrados, p-mos, n-mos y
c-mos, debido a varias ventajas sobre los transistores bipolares:
En el MOSFET de canal N la parte "N" está conectado a la fuente (source) y al drenaje (drain)
En el MOSFET de canal P la parte "P" está conectado a la fuente (source) y al drenaje (drain)
En los transistores bipolares la corriente que circula por el colector es controlada por la corriente que circula por la
base. Sin embargo en el caso de los transistores FET, la corriente de salida es controlada por una tensión de entrada
(un campo eléctrico). En este caso no existe corriente de entrada.
Los transistores MOSFET se pueden dañar con facilidad y hay que manipularlos con cuidado. Debido a que la capa de
óxido es muy delgada, se puede destruir con facilidad si hay alta tensión o hay electricidad estática.
Funcionamiento:
Consiste en un oscilador astable formado por las dos compuertas izquierdas en
el diagrama y cuya frecuencia de oscilación viene determinada por los valores
de R1 y C1 (en este caso una frecuencia cercana a 140 Hertz para evitar el
clásico y para mí, molesto parpadeo).
Si el colega quiere bajar la frecuencia (para "destello" por ejemplo) puede
hacerlo mediante la fórmula de los osciladores astables:
f =1 /( 0,7 * R1 *C1) [Hz]
Donde R1 [ohms] y C1 [Farads]; y con valores R1=100K y C1= 4,7uF, se
obtiene el efecto destello a frecuencia cercana al Hertz.
Nota: C1 conviene que no sea mayor a 10uF por las "elevadas corrientes de
fugas" que se presentan, comparables a la corriente inicial de carga de este
capacitor en muchos casos. (El capacitor se comportaría como un cortocircuito
y nunca se cargaría!).
Modo de Uso:
Consiste en conectar correctamente los terminales D, G y S del transistor
MOS-FET en los correspondientes terminales del probador y verificar lo
siguiente (de acuerdo al diagrama):