Elevator call boards are used outside the elevator doors of each floor for passengers and elevator maintenance personnel to use. The elevator call board transmits the demand information of passengers and maintenance personnel to the elevator main board through the CAN bus, and the elevator main board receives the information and performs corresponding operations. At the same time, the elevator main board transmits the real-time operation information of the elevator to the elevator call board through the CAN bus, and displays it through the call board LED for passengers to refer to.
AVR microcontrollers have the characteristics of high reliability, strong functions, high speed, low power consumption and low price. This system uses the high-end ATmega series AVR microcontroller ATmegal6. It has an advanced RI-SC structure, 16 kB of system programmable Flash, 512 B of EEPROM, and 1 kB of on-chip SRAM. At the same time, the chip has a programmable watchdog timer with an independent on-chip oscillator. By changing the fuse bit, the oscillation period of the on-chip crystal oscillator can be set, which can save the design of the peripheral watchdog circuit and crystal oscillator circuit.
1 Hardware structure of elevator call board system
The hardware circuit of the elevator call board is mainly composed of passenger button module, indicator light control module, LED module, CAN communication circuit and power supply module, as shown in Figure 1.
1.1 CAN communication module
1.1.1 Technical characteristics of
CAN CAN is a multi-master bus. The communication medium can be twisted pair, coaxial cable or optical fiber. It has three layers of protocols such as physical layer, data link layer and application layer. Its communication rate can reach 1 Mb/s. The physical layer and data link layer 2 functions of the CAN protocol are integrated in the CAN bus dedicated interface chip in the form of firmware to complete the framing of communication data, including bit filling, data block encoding, cyclic redundancy check, priority discrimination and other tasks. It has the following characteristics:
1) It abolishes the traditional station address coding and replaces it with coding the communication data block, and can work in multi-master mode;
2) It adopts non-destructive arbitration technology. When two nodes transmit data to the network at the same time, the node with low priority actively stops sending data, while the node with high priority can continue to transmit data without being affected, effectively avoiding bus conflicts;
3) It adopts a short frame structure, and the number of valid bytes in each frame is 8, the data transmission time is short, the probability of interference is low, and the retransmission time is short;
4) Each frame of data has CRC check and other error detection measures, which ensures the high reliability of data transmission and is suitable for use in high-interference environments;
5) In the case of serious errors, the node has the function of automatically shutting down the bus and cutting off its connection with the bus so that other operations on the bus are not affected;
6) It can transmit and receive data in point-to-point, one-to-many and broadcast centralized modes.
Based on the above characteristics, in this design, the priority of the elevator main board node is set to the highest, and the priority of other elevator call boards is second. The elevator main board can receive data from any elevator call board, while the elevator call board can only receive data from the elevator main board. The elevator motherboard can send broadcast information (such as floor operation information) or point-to-point information (such as indicator light control information for a certain floor).
1.1.2 Hardware Implementation of CAN
The CAN controller uses MicroChip's MCP2510, which uses the SPI interface to communicate with the MCU. Only 4 buses are needed to communicate with the MCU, but in order to have better real-time performance, interrupts are generally used to communicate with the MCU, so an interrupt signal bus is also required to notify the MCU to receive data sent from the CAN bus. The CAN interface device uses TJ-Al050, which is the interface device between the CAN controller and the physical bus. [page]
In the CAN module circuit, as shown in Figure 2, SS, MOSI, MISO, SCK, and INT of ATmegal6 are connected to SI, SO, and SCK of MCP2510 respectively. In order to further improve the anti-interference ability of the CAN bus node, TXCAN and RXCAN of MCP2510 are connected to TXD and RXD of TJAl050 respectively through optical coupler 6N137.
1.1.3 CAN message format
The message transmitted in the bus consists of 7 parts per frame. The CAN protocol supports two message formats, the only difference between which is the length of the identifier (ID), the standard format is 11 bits, and the extended format is 29 bits. This design uses a standard data frame, which consists of 7 bit fields, including the frame start, arbitration field, control field, data field, CRC field, response field and frame end, as shown in Figure 3. The
length of the data field is 0 to 8 bytes. The arbitration field consists of an identifier and RTR. In the standard format, the identifier is 11 bits. In the formulation of this communication protocol, the first 4 bits of the flag bit are used as the type code of the communication, and the last 7 bits are used as the ID number of the CAN node. The data field is used to store the specific content information of the communication, such as the floor where the elevator is located, the direction of movement, etc.
1.2 LED display module
This module consists of 3 8x8 LED display screens and a drive circuit with a single-chip microcomputer as the core. The LED display screen is composed of an LED dot matrix display P2158. It is a display device that uses light-emitting diodes as pixels and arranges them in the order of rows and columns. It works in a row-by-row (or column-by-column) scanning mode and is driven by a narrow pulse with a large peak value. It continuously selects each row of the display screen from top to bottom, and sends a pulse signal representing graphic or text information to each column. By repeating the above operation, various graphics or text information can be displayed. The driving circuit with AVR high-speed microcontroller as the core is shown in Figure 4. The
LED display function uses a row-by-row scanning method to display the corresponding information on three 8×8 dot matrix LED display screens. The control signal is sent by the MCU and is divided into two paths after passing through the buffer 74F244. One path passes through the shift register 74S164, and then drives the rows of the LED dot matrix after serial to parallel conversion; the other path passes through the latch 68595, and then drives the columns of the LED dot matrix after serial to parallel conversion. The LED dot matrix display adopts row-by-row scanning, and the modulus mode of each row display is from right to left, and the byte is output in positive order. Among them, the input data of the latch is provided by the font library in the software. The LED display is displayed once every 20 ms, so the display frequency is 50 Hz, which is consistent with the flicker characteristics of the human eye.
2 Software Design of Elevator External Call Board
The software design process of the elevator external call board is shown in Figure 5. The elevator external call board receives the data frame of the elevator main board through the CAN bus, and temporarily stores the data frame in the buffer area. After analysis and processing, it is saved in a certain way. Then, according to the way the data frame is to be displayed, the corresponding data is taken out from the data storage device and stored in a display buffer area for display, and displayed in a line-by-line scanning mode. If there is a call signal input on the elevator external call board, the corresponding indicator light is on. At the same time, the elevator external call board sends a data frame to the elevator main board through the CAN bus. The data frame content contains the call information. The communication method establishes a handshake response mechanism.
3 Conclusion
This system uses AVR microcontrollers and uses CAN bus communication. The communication is safe and reliable, and the real-time performance is good. It is mainly used for external call display in the elevator system, and can also be used in the elevator car for displaying floor information. Connecting it to the elevator simulation system, this system can respond quickly, is safe and reliable during long-term operation, and is simple and convenient to add and delete nodes.
Previous article:Lighting and CO2 control system for watermelon greenhouse production based on AVR
Next article:Windsurfing Control System Based on AVR Microcontroller
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- RAW_UDP network speed test of Zhengdian Atom (Jperf tool)
- Smart car
- STM32F103C8T6 low power consumption issue
- How to use msp430 to output 2-way PWM waveform?
- Lamborghini launches the "sea supercar", equipped with two V12 engines, priced at more than 23.7 million
- TI C64X+ General Library Function User Manual
- How does the schematic diagram work?
- [National Technology M4 core hot-selling N32G45XVL evaluation] The first unboxing and data learning
- MYZR-RK3288 Linux Test Manual
- Internal referral for multiple positions (campus recruitment and social recruitment)