Design of elevator call board system based on AVR microcontroller

Publisher:angelbabyLatest update time:2020-02-20 Source: eefocusKeywords:AVR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Introduction: This system uses AVR microcontroller and CAN bus communication, which is safe and reliable with good real-time performance. It is mainly used for outbound call display in elevator system and can also be used for floor information display in elevator car. When connected 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.


With the development of modern society and the advancement of science and technology, many high-rise buildings and intelligent buildings have emerged. As an important means of transportation inside high-rise buildings, elevators are increasingly used. As an indispensable part of the elevator system, the application of elevator call display panels (referred to as elevator call panels) has also increased dramatically.


The elevator hall call board is used outside the elevator door on each floor for passengers and elevator maintenance personnel to use. The elevator hall call board transmits the demand information of passengers and maintenance personnel to the elevator main board through the CAN bus. 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 hall call board through the CAN bus, and displays it through the hall call board LED for passengers to refer to. See Figure 1

Figure 1: Description of the elevator call board

Figure 1: Description of the elevator call board


AVR microcontrollers have the characteristics of high reliability, powerful 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. The oscillation period of the on-chip crystal oscillator can be set by changing the fuse bit, which can save the design of the peripheral watchdog circuit and crystal oscillator circuit.


1. Hardware structure of elevator door call board system


The hardware circuit of the elevator call board is mainly composed of a passenger button module, an indicator light control module, an LED module, a CAN communication circuit and a power supply module, as shown in Figure 2.

Figure 2: Elevator call board system hardware composition

Figure 2: Elevator call board system hardware composition


1.1 CAN communication module


1.1.1 Technical Features 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, including physical layer, data link layer and application layer. Its communication rate can reach 1 Mb/s. The CAN bus dedicated interface chip integrates the physical layer and data link layer functions of the CAN protocol in the form of firmware to complete the framing of communication data, including bit filling, data block encoding, cyclic redundancy check, priority determination and other tasks. It has the following characteristics:


1) Abolish the traditional station address coding and replace it with coding the communication data block, which can work in multi-master mode;


2) Adopting non-destructive arbitration technology, when two nodes transmit data to the network at the same time, the node with lower priority will actively stop sending data, while the node with higher priority can continue to transmit data without being affected, thus effectively avoiding bus conflicts;


3) Adopting short frame structure, 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 to ensure high reliability of data transmission and is suitable for use in high interference environments;


5) In the event of a serious error, 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) Data can be transmitted and received 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 main board can send broadcast information (such as floor operation information) and can also send 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 four 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 /INT 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.


In the CAN module circuit, as shown in Figure 3, SS, MOSI, MISO, SCK, and INT of ATmegal6 are connected to /CS, SI, SO, SCK, and /INT 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.

Figure 3: CAN module circuit

Figure 3: CAN module circuit


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 4.

Figure 4: CAN message format

Figure 4: CAN message format


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 communication type code, and the last 7 bits are used as the ID number of the CAN node. The data field is used to store 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 three 8x8 LED display screens and a drive circuit with a single-chip microcomputer as the core. The LED display screen is composed of 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 narrow pulses with large peak values. It continuously selects each row of the display screen from top to bottom, and sends pulse signals representing graphics or text information to each column. By repeatedly cycling the above operations, various graphics or text information can be displayed. The drive circuit with AVR high-speed single-chip microcomputer as the core is shown in Figure 5.

Figure 5: LED driver circuit

Figure 5: LED driver circuit


The LED display function uses a line-by-line 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 uses line-by-line scanning, and the modulus of each row display is from right to left, and the bytes are 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 in line with the flicker characteristics of the human eye.


2. Software Design of Elevator Call Board


The software design process of the elevator call board is shown in Figure 5. The elevator 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 call board, the corresponding indicator light is on, and at the same time, the elevator call board sends a data frame to the elevator main board through the CAN bus, and the data frame content contains the call information. The communication method establishes a handshake response mechanism.

Figure 6: Elevator call board software design flow chart

Figure 6: Elevator call board software design flow chart


3 Conclusion


This system uses AVR single chip microcomputer and CAN bus communication, which is safe and reliable with good real-time performance. It is mainly used for outbound call display in elevator system and can also be used for floor information display in elevator car. When connected 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.

Keywords:AVR Reference address:Design of elevator call board system based on AVR microcontroller

Previous article:Application design of LED lighting control system based on AVR
Next article:Design of solar power generation detection device based on AVR microcontroller

Recommended ReadingLatest update time:2024-11-23 10:41

Using the IIC in the AVR chip to implement the continuous writing (page writing) and continuous reading procedures of AT24C256
I recently bought an AT24C256 EEPROM with a capacity of 32K Byte, a data address width of 16Bit, and supports IIC 1M (5V)400K (2.7V) speed mode. Using the AVR M16 on-chip IIC, I can read data at high speed and stably... Cool! After debugging, I would like to share it with you. The program is as follows: (winavr)
[Microcontroller]
Programming with the cheapest AVR programmer
1) Open the Xiaoma software   2) Click OK    3) Set up the hardware, click SetupInterface Setup…    4) If you run it for the first time, you will see the interface shown in the figure below    5) Select Avr ISP I/O under Parallel    6) Click Probe to test the hardware. You have to see OK.   7) Select the chip,
[Microcontroller]
Programming with the cheapest AVR programmer
Design and implementation of intelligent charger for lithium battery based on AVR
1 Introduction Lithium batteries have the advantages of high specific energy and low self-discharge, making them an ideal power source for portable electronic devices. In recent years, with the popularity of high-power and high-capacity portable electronic products such as laptops, PDAs, and cordless phones
[Power Management]
Old article backup: Analysis of AVR reading and writing EEPROM
Since the AVR EEPROM write cycle is relatively long (usually in milliseconds), special attention should be paid during programming. There is nothing much to say about reading EEPROM. It takes 4 clock cycles to read one byte of data, which is tolerable. Writing is more troublesome, although the data stored in EEPROM is
[Microcontroller]
How to avoid AVR microcontroller fuse lock
People who are new to AVR will inevitably encounter the trouble of their beloved microcontrollers' fuse bits being locked and going out of service. In most cases, this is caused by the wrong setting of our working clock source. Here are some preventive measures. 1. For a newly purchased AVR, there is no program in
[Microcontroller]
How to design an electronic ballast with AVR microcontroller as the control chip?
introduction Electronic ballast is a new energy-saving product that can not only drive some lighting fixtures, but also be combined with some ultraviolet lamps, which has a great effect on air purification and water purification. At present, the whole world is vigorously advocating environmental protection, and electr
[Microcontroller]
How to design an electronic ballast with AVR microcontroller as the control chip?
AVR microcontroller matrix keyboard program (2 methods)
AVR matrix keyboard 2 methods to achieve! Normal method: #include iom16v.h // #include macros.h // #define uchar unsigned char// #define uint unsigned int// #define setb(val,bitn) (val|=(1 (bitn)))//Set a bit of an IO port to 1 #define clr(val,bitn) (val&=~(1 (bitn)))//Set a bit of an IO port to 0 #define get(
[Microcontroller]
Introduction to IO ports of AVR microcontroller
ATmega16 has four 8-bit bidirectional I/O ports PA, PB, PC, and PD, which correspond to 32 I/O pins, each of which can be used independently for the input and output of logic signals. Under the working voltage of 5V, when the output is high, each pin can output a driving current of up to 20mA; when the output is low,
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号