Application of the hottest can bus in temperature

2022-07-25
  • Detail

Application of CAN bus in temperature and humidity automatic control system of intelligent building

intelligent building is a high-tech building that adds three automation systems of building, office and communication on the basis of traditional buildings. Building automation system (BAS) is an important control, measurement and operation system of intelligent building The exposed moving parts of the instrument shall be cleaned regularly with gasoline. It adopts sensor technology, computer technology and modern communication technology to realize the comprehensive automatic management of air conditioning, power, elevator, water supply and drainage, fire prevention, anti-theft and video monitoring equipment in the building, and has various management functions such as safety protection and operation monitoring. Provide users with a comfortable and safe internal environment. Therefore, the temperature and humidity in each place and room of the intelligent building must be controlled within a specific range all the year round to realize intelligent temperature and humidity control

the temperature and humidity automatic control system introduced in this paper is based on CAN bus and adopts intel80c196kc16 bit single chip microcomputer as the intelligent node controller. The system communication is reliable and fast, and the hardware circuit design and software programming are simple. It can better meet the intelligent requirements of the intelligent building for the environment and achieve the purpose of energy saving

2 overall scheme design and working principle of the system

the system is composed of upper management computer, can indication error interface adapter card and multiple intelligent nodes. The number of nodes can be increased or decreased according to the scale of the building. Can bus is used as the communication network to connect the nodes into a distributed intelligent control system. The overall structure of the system is shown in Figure 1. The network topology adopts the bus mode, the upper management computer adopts the P Ⅲ 500pc, takes the 80C196 single chip microcomputer as the node controller, the transmission medium adopts the twisted pair, the communication bit rate is set to 20KB/s, and the distance between any two nodes of the CAN bus can reach 3.3km, which can fully meet the internal communication requirements of the intelligent building. The upper computer is connected to the CAN bus through the can interface adapter card for information exchange, and is responsible for monitoring and managing the whole system. The node controller receives various operation control commands and setting parameters from the upper computer through the CAN bus; Collect the temperature and humidity values of each analog input channel in real time, and collect the switch status signals of fresh air processing equipment, including air supply and return fans, filters, coolers, heaters, humidifiers and other equipment. When the temperature and humidity deviate from the set value, execute the temperature and humidity algorithm, output the corresponding control quantity to the actuator (electric control valve), adjust the water flow in the coil, and keep the temperature and humidity of the air supply within the required control range; If it is found that the temperature or humidity exceeds the set upper and lower limits, an audible and visual alarm will be sent immediately, and the corresponding limit value will be output to the actuator to make the temperature and humidity return to the set range as soon as possible

2.1 node hardware circuit design

the node hardware circuit takes intel16 bit single chip microcomputer 80C196KC as the core, selects SJA1000 as the CAN controller, and uses the can control interface chip pca8250. 82C250 can provide differential transmission and reception functions to the bus, improve the node driving ability of the system bus, increase the communication distance and reduce interference. The node hardware circuit is shown in Figure 2. In Figure 2, the 80C196KC high-speed output HSO with up to 6 channels is used to generate PWM output, which enables the system to have 9 channels of analog output and 8 channels of analog input. In order to reduce the number of components and save the space of the circuit board, the programmable device psd302 is selected for system expansion and I/O reorganization. It integrates most of the peripheral interface functions required by the single chip microcomputer, such as EPROM (64KB), SRAM (2KB) and programmable logic device (PLD), and provides 8-channel switch input and 8-channel switch output. P1 port of 80C196KC is mainly used for alarm indication when temperature and humidity exceed the limit, but p1.3, P1.4 and P1.5 are used as PWN square wave output terminals together. In addition to performing some special functions, the P2 port also provides a chip selection signal for the watchdog circuit X25045. The clock chip ds12887a is programmed in the program to provide timed interrupts per second. It puts forward an interrupt request to 80C196KC through hsi.0. After the set interval time is reached, it will execute incremental PID control calculation and fuzzy control algorithm. X25045 realizes the function of hardware watchdog. It also provides 512beeprom to save important system control parameters. Whenever the system is powered off or on, the important system parameters are read to the specific RAM area through the serial clock output so to restore the normal operation of the program

3 system software design

the software design of the system mainly includes the communication processing software of the upper computer and the data acquisition and processing software of the field measurement and control node

3.1 the upper computer software

is written in visual and Basic6.0 object-oriented 32-bit visual high-level language based on Windows95 platform. It has system parameter (such as baud rate, output control, message identification and shielding, etc.) setting, monitoring status setting, data sending and receiving, local status query, node status query, upper and lower limit alarm, interrupt receiving data management and other functional modules. The program functional modules are shown in Figure 3. The upper computer first initializes the CAN bus adapter card and itself, and then sends commands to notify specific nodes to send data to the CAN bus. After the conversion through the CAN bus adapter card, the upper computer carries out corresponding processing according to the actual situation. The upper computer sends commands to each node in a timed round robin manner, and receives data in an interrupt manner

3.2 intelligent node software design

intelligent node software consists of initialization, sending data and interrupt processing. It mainly completes two tasks: one is the sampling and control algorithm of temperature and humidity sensors; the other is to transmit the temperature, temperature and can node status of the node to the host computer when the host computer requests data. The sampling and control algorithm of temperature and humidity sensors is completed in the timer interrupt service program, and the data information transmission is completed in the main program. The program flow charts are shown in Figures 4 and 5 respectively

4 system energy saving measures

metal paint effect spray free materials can provide air conditioners, refrigeration and heating equipment for pp+ talc powder

intelligent buildings. Due to the large number and dispersion of equipment, its energy consumption accounts for about 50% of the whole building, which is intelligent

Copyright © 2011 JIN SHI