Modern intelligent building monitoring systems widely use field bus technology. There are more than 40 kinds of fieldbuses at present, but there are mainly two types that are suitable for smart buildings and are popularized in China: CAN (Control Area Network) bus and Lon works bus. The CAN bus technology has great potential for application because of its high reliability, simple structure, long transmission distance and low cost.
The control area network CAN is the most mature and most promising microprocessor local area network in field bus technology. The protocol adopts the bus topology. By studying the CAN2.0B protocol specification, a communication protocol that complies with the intelligent building monitoring system is developed and the software of the communication node is designed.
1. Smart Building Network Topology Based on CAN Bus
The intelligent building monitoring system of CAN bus consists of three parts: upper computer, CAN communication node and various field intelligent devices. The number of communication nodes can be increased or decreased according to the size of the building. The CAN bus as a communication network connects each node into a distributed intelligent monitoring system.
(1) Host computer: It consists of computer and monitoring software. The management and control of the entire intelligent building monitoring system is the center of the entire system.
(2) CAN communication node: Each communication node has the same function, and it mainly completes sending the real-time data collected by the field device to the CAN bus, and receives the control information sent from the CAN bus. CAN communication node hardware consists of a microprocessor, CAN controller SJAl000, CAN transceiver PCA82C250.
(3) On-site smart equipment: It consists of a microprocessor and on-site functional devices. Complete detection, alarm, control, display and other functions. Intelligent building monitoring system field equipment consists of lighting, air conditioning, elevators, security monitoring, fire monitoring, water supply and drainage, and power distribution.
2. Hardware basis of CAN bus communication protocol
The CAN bus protocol describes the rules for the transfer of information between devices. Its definition of layers is consistent with the OSI of the open system interconnection model. CAN is divided into three layers: application layer, data link layer, and physical layer. Transparency, where each layer communicates only with the same layer on another device, actual communication occurs between two adjacent layers on each device, and each device is connected only through the physical layer communication medium.
The CAN bus specification defines the bottom two layers of the model: the physical layer and the data link layer. CAN bus drivers and communication media implement the main functions of the physical layer. The CAN bus controller implements the data link layer transmission tasks specified in the bus protocol. Commonly used CAN bus drivers are PHILIPS PCA82C250, bus controller is SJAl000, communication medium is twisted pair or coaxial cable.
2.1 How the PCA82C250 Bus Driver Works The PCA82C250 is the interface between the CAN bus controller and the physical conductors. The driver can provide differential transmit and receive functions to the bus. The driving part of PCA82C250 is made up of one PNP pole tube and one NPN triode tube. The two transistors turn on or off according to the TXD signal. When TXD = 0, the two transistors are in the on-state and the bus shows a dominant level. When TXD=1, the two transistors are in the off state, and the bus shows a recessive level. At this time, the driver has little effect on the bus. Therefore, if there are other nodes sending dominant levels, the bus's level state is dominant, and only if all the drivers send a recessive level, the bus's level state is recessive. The line and function of the physical layer of the CAN bus are realized.
2.2 Line-based and functional multi-node arbitration process The communication node accesses the bus and detects the signal on the bus. Only when the bus is idle can it be sent. When there are multiple nodes on the bus transmitting at the same time, the packet with the highest priority must be sent first through the "lossless bit-by-bit arbitration" method. Each message sent on the CAN bus has a unique 11-bit or 29-bit ID. The state of the CAN bus depends on the binary number 'O' instead of '1', so the smaller the ID number, the higher priority the message has. Therefore, a message that is a full '0' identifier has the highest priority on the bus.
2.3 Function description of CAN controller SJAl000 The communication protocol of CAN is finished by CAN controller, CAN controller is made up of the part that realizes CAN bus agreement and the circuit that realizes and interfaces with microprocessor.
SJAl000 is a high-performance CAN bus controller introduced by PHILIPS, which is not only compatible with the basic CAN mode of the PCA82C200 (BasieCAN), but also enhances the CAN mode (Peli CAN). This mode supports the CAN2.0B protocol. SJAl000 implements these functions by a combination of logic circuits on a programmable chip, and provides an interface with the module controller and the microcontroller. Through its programming, the CPU can set its working mode and control its working state. Data reception and transmission with CAN driver PCA82C250.
The control area network CAN is the most mature and most promising microprocessor local area network in field bus technology. The protocol adopts the bus topology. By studying the CAN2.0B protocol specification, a communication protocol that complies with the intelligent building monitoring system is developed and the software of the communication node is designed.
1. Smart Building Network Topology Based on CAN Bus
The intelligent building monitoring system of CAN bus consists of three parts: upper computer, CAN communication node and various field intelligent devices. The number of communication nodes can be increased or decreased according to the size of the building. The CAN bus as a communication network connects each node into a distributed intelligent monitoring system.
(1) Host computer: It consists of computer and monitoring software. The management and control of the entire intelligent building monitoring system is the center of the entire system.
(2) CAN communication node: Each communication node has the same function, and it mainly completes sending the real-time data collected by the field device to the CAN bus, and receives the control information sent from the CAN bus. CAN communication node hardware consists of a microprocessor, CAN controller SJAl000, CAN transceiver PCA82C250.
(3) On-site smart equipment: It consists of a microprocessor and on-site functional devices. Complete detection, alarm, control, display and other functions. Intelligent building monitoring system field equipment consists of lighting, air conditioning, elevators, security monitoring, fire monitoring, water supply and drainage, and power distribution.
2. Hardware basis of CAN bus communication protocol
The CAN bus protocol describes the rules for the transfer of information between devices. Its definition of layers is consistent with the OSI of the open system interconnection model. CAN is divided into three layers: application layer, data link layer, and physical layer. Transparency, where each layer communicates only with the same layer on another device, actual communication occurs between two adjacent layers on each device, and each device is connected only through the physical layer communication medium.
The CAN bus specification defines the bottom two layers of the model: the physical layer and the data link layer. CAN bus drivers and communication media implement the main functions of the physical layer. The CAN bus controller implements the data link layer transmission tasks specified in the bus protocol. Commonly used CAN bus drivers are PHILIPS PCA82C250, bus controller is SJAl000, communication medium is twisted pair or coaxial cable.
2.1 How the PCA82C250 Bus Driver Works The PCA82C250 is the interface between the CAN bus controller and the physical conductors. The driver can provide differential transmit and receive functions to the bus. The driving part of PCA82C250 is made up of one PNP pole tube and one NPN triode tube. The two transistors turn on or off according to the TXD signal. When TXD = 0, the two transistors are in the on-state and the bus shows a dominant level. When TXD=1, the two transistors are in the off state, and the bus shows a recessive level. At this time, the driver has little effect on the bus. Therefore, if there are other nodes sending dominant levels, the bus's level state is dominant, and only if all the drivers send a recessive level, the bus's level state is recessive. The line and function of the physical layer of the CAN bus are realized.
2.2 Line-based and functional multi-node arbitration process The communication node accesses the bus and detects the signal on the bus. Only when the bus is idle can it be sent. When there are multiple nodes on the bus transmitting at the same time, the packet with the highest priority must be sent first through the "lossless bit-by-bit arbitration" method. Each message sent on the CAN bus has a unique 11-bit or 29-bit ID. The state of the CAN bus depends on the binary number 'O' instead of '1', so the smaller the ID number, the higher priority the message has. Therefore, a message that is a full '0' identifier has the highest priority on the bus.
2.3 Function description of CAN controller SJAl000 The communication protocol of CAN is finished by CAN controller, CAN controller is made up of the part that realizes CAN bus agreement and the circuit that realizes and interfaces with microprocessor.
SJAl000 is a high-performance CAN bus controller introduced by PHILIPS, which is not only compatible with the basic CAN mode of the PCA82C200 (BasieCAN), but also enhances the CAN mode (Peli CAN). This mode supports the CAN2.0B protocol. SJAl000 implements these functions by a combination of logic circuits on a programmable chip, and provides an interface with the module controller and the microcontroller. Through its programming, the CPU can set its working mode and control its working state. Data reception and transmission with CAN driver PCA82C250.
Plastic Spray Mist Pump,Pump Spray Bottle,Clear Plastic Spray Mist Pump,Fine Mist Spray Bottle
Taixing Rongxing Glass Co., Ltd , https://www.rongxglass.com