[51 microcontroller]: Intelligent construction elevator system

Project effect:

Intelligent construction elevator system based on 51 microcontroller


Summary

Intelligent construction elevator systems are currently widely used in people's construction projects, providing great convenience for people to carry up and down during construction. The intelligent construction elevator system includes functions such as password opening, overweight reminder, elevator operation and related information display, etc. Construction elevators have brought huge changes to the up and down transportation of our construction projects.

This design is an intelligent construction elevator system controlled by AT89C52 microcontroller, including project overview, overall plan, hardware design, software design and system debugging, etc. The hardware part mainly consists of 51 microcontroller, stepper motor module, 4*4 matrix button, weighing HX711 module, LCD1602 display and buzzer module, etc. composition. The code control chip is used to enable the stepper motor module to control the up and down movement of the elevator, the 4*4 matrix buttons are used to detect the floor information requested by the user, the weighing HX711 module is used to detect whether the elevator is overweight, and the LCD1602 display is used to display the elevator's Status information and time, the buzzer module is used to sound the alarm. The peripheral devices are controlled by the single-chip microcomputer, and the single-chip microcomputer is comprehensively applied.

The ultimate goal of this design is to implement a simple elevator control system that can control the up and down movement of the elevator and detect whether the elevator is overweight. By using a single-chip microcomputer to control peripheral equipment, intelligent control of the elevator is realized, improving the safety and convenience of the elevator. At the same time, the design also has certain practicality and can be used as the basis of a small elevator control system to expand more functions and performance to meet the needs of different occasions.

Keywords: 51 microcontroller; stepper motor module; 4*4 matrix buttons; weighing HX711 module; LCD1602 display; buzzer


Table of contents

Project effect:

Summary

 Overview

1.1 Application and development of elevators

1.2 Development status of elevators

1.3 Background and content of research on intelligent construction elevator systems

Chapter 2 Design Requirements and Contents

2.1 Intelligent construction elevator system design requirements

2.2 Intelligent construction elevator system design content 

Chapter 3 Overall System Plan and Hardware Design

3.1 Overall plan of intelligent construction elevator system

3.2 Hardware selection

3.3 Hardware design

Edit

Chapter 4 Software Design

4.1 Overall system process design

4.2 Overall system flow chart

Chapter 5 System Debugging

5.1 Bugs and solutions encountered during system debugging

5.2 Experience in solving bugs

Chapter 6 Project Experience

6.1 Project summary


1.1Application and Development of Elevators

    In 1854, at the World's Fair held in the Crystal Palace in New York, American Elisha Graves Otis demonstrated his invention to the world for the first time - the first safety elevator in history. Since then, lifts have been widely used around the world. The elevator company named after Otis also began her glorious journey. Over the past 150 years, it has developed into a leading elevator company in the world, Asia and China.

        Life goes on, technology is developing, and elevators are also making progress. The materials of the elevators range from black and white to colors, and the styles range from straight to oblique. In terms of operation and control, they are even more innovative - handle switch operation, button control, signal control, collective selection control, human-machine dialogue, etc. Many elevators also Parallel control and intelligent group control have appeared; double-decker car elevators have shown the advantages of saving hoistway space and improving transportation capacity; variable-speed automatic walkway escalators have greatly saved pedestrians’ time; different shapes of fan-shaped, triangular, semi-prismatic, round The shape of the sightseeing elevator makes the sight of passengers no longer closed. A century and a half of ups and downs have brought about earth-shaking changes in history, but what remains unchanged is the promise of elevators to improve the quality of life of modern people.

1.2The development status of elevators

        With the development of computer technology and power electronics technology, modern elevators have become typical mechatronics products. Elevators have high safety requirements. They are shipped from the factory in the form of parts, and the final assembly is performed at the construction site. The installation is completed through the assembly of mechanical parts and the connection between mechanical devices and civil structures, and finally forms an elevator product. Careful manufacturing and installation cannot fully guarantee trouble-free operation, and its operational reliability depends to a large extent on maintenance. Therefore, the manufacturing, installation and maintenance of elevators should not be separated.

        Large-scale economic construction, especially the booming real estate industry, has opened up a broad market for the elevator industry. In 2001, my country's elevator output reached 45,000 units, creating a new peak in the history of industry development and being called the "third elevator" by industry insiders. second wave”. At present, almost all types of elevators required by China's economic construction can be produced in China. It can be seen that a prosperous elevator market has been formed. Since the 1980s, with the sustained and rapid development of economic construction, the demand for elevators in our country has been increasing.

       In the field of smart elevators, there is a simple elevator system, which is the construction elevator in construction projects. Due to the booming real estate industry, large-scale construction projects have emerged. In order to speed up the project progress and save manpower, construction elevators are often used in construction projects.

1.3Background and content of research on intelligent construction elevator systems

With the continuous development of society and the advancement of science and technology, people have higher and higher requirements for engineering construction. In building construction, elevators, as one of the necessary equipment, have become an indispensable part of the project construction. However, there are some problems in the construction of traditional elevator equipment, such as difficulty in installation and disassembly, inconvenience in movement, low safety, etc. These problems not only increase the difficulty of construction, but also affect the efficiency and quality of construction.

In order to solve these problems, the intelligent construction elevator control system came into being. This system can effectively improve the safety and convenience of construction elevators, making the installation and disassembly of elevators easier, while also improving construction efficiency and quality.

First, we need to consider how to realize intelligent control of elevators. Traditional elevator control systems usually use mechanical control, but in construction, this method is obviously not suitable. Therefore, it is necessary to adopt more advanced electronic control technology, such as single-chip microcomputer control technology. Microcontroller control technology can improve the accuracy and stability of elevators, while also reducing the cost and maintenance difficulty of elevators.

Second, we need to consider how to realize automated control of the elevator. The intelligent construction elevator control system needs to be able to automatically respond to user requests and automatically control the up and down operation of the elevator. Therefore, it is necessary to use some sensors and control modules, such as stepper motor modules, 4*4 matrix buttons, weighing HX711 modules, etc., to realize automated control of elevators.

Third, we need to consider how to implement elevator safety control. The intelligent construction elevator control system needs to be able to detect whether the elevator is overweight to avoid overload operation of the elevator. It also needs to be able to issue an alarm sound to ensure the safety of the elevator. Therefore, it is necessary to use some safety control modules, such as LCD1602 display and buzzer module, to realize elevator safety control.

Fourth, it is necessary to consider how to achieve the practicality and reliability of the elevator control system. The intelligent construction elevator control system needs to be adaptable to different construction environments and needs, and it also needs to have sufficient reliability and stability to ensure the normal operation of the elevator. Therefore, the elevator control system needs to be fully tested and optimized to ensure its practicality and reliability.

In summary, the intelligent elevator control system has broad application prospects and research value. This article introduces the design and practice of this system, and also discusses the technical issues and challenges existing in this system. It is believed that in future research, more technologies and methods will be applied to this system to make it more complete and practical.

Chapter 2 Design requirements and content

2.1Design requirements for intelligent construction elevator systems

The intelligent construction elevator system uses the AT89C52 microcontroller as the core to control the intelligent construction elevator system to realize the up and down movement and intelligent control of the elevator. The system has functions such as password opening, overweight reminder, elevator operation and related information display, which can facilitate transportation in construction projects and improve the safety and convenience of steps. In addition, the design also has certain practicality and can be used as the basis of a small elevator control system to expand more functions and performance to meet the needs of different occasions.

Comprehensive consideration, the requirements for making an intelligent construction elevator system are as follows:

System stability: During the design process, the stability of the system needs to be ensured to prevent dangerous situations such as elevator loss of control. Therefore, sufficient testing and debugging of hardware and software are required to ensure the reliability and stability of the system.

System security: The elevator is a special piece of equipment and its safety needs to be ensured. Therefore, abnormal situations such as elevator overweight need to be taken into account during the design process and handled accordingly to ensure the safety of the elevator.

System ease of use: The elevator is a commonly used equipment and its ease of use needs to be ensured. Therefore, the user's usage habits and operating methods need to be taken into consideration during the design process, and a simple and easy-to-understand interface and operating methods need to be designed to improve the ease of use of the elevator.

System scalability: This design is a simple elevator control system, which can be expanded with more functions and performance according to actual needs in the future. Therefore, the scalability of the system needs to be taken into consideration during the design process, leaving enough room for subsequent functional expansion and upgrades.

System implementation: AT89C52 microcontroller realizes the up and down movement of the elevator by controlling the forward, reverse and speed of the stepper motor module; the 4*4 matrix buttons are used to detect the floor information input by the user; the weighing HX711 module is used to detect whether the elevator is overweight. The elevator status display module is composed of LCD1602 display screen, which can realize the display of elevator status information and time. The safety alarm module consists of a buzzer module. When the elevator is overweight, the buzzer module will sound an alarm.

System testing: After the system design and construction is completed, sufficient testing and debugging are required to ensure the reliability and stability of the system. During the test process, it is necessary to test the functions of the elevator control module, elevator status display module and safety alarm module, as well as the stability, safety, ease of use and scalability of the system to ensure that the system can meet the design requirements.

2.2Intelligent construction elevator system design content 

This design adopts a design based on a single-chip microcomputer and is mainly composed of three parts: the elevator control module, the elevator status display module and the safety alarm module. Among them, the elevator control module is mainly responsible for the up and down movement of the elevator and the processing of floor information requested by the user; the elevator status display module is mainly responsible for the display of elevator status information and time; the safety alarm module is mainly responsible for alarm prompts for elevator failures and other abnormal situations.

The system flow of this design is as follows:

Elevator start: The user needs to enter the correct password inside the elevator and press the start button before the elevator can start.

Monitor elevator status: Elevator status includes information such as the floor where the elevator is located, the elevator's running direction, whether it is overweight, etc.

User requests floor: The user inputs the floor request information inside the elevator, and the elevator automatically runs to the corresponding floor based on the requested information.

Overweight detection: The elevator has a built-in load sensor. When the elevator load exceeds the preset value, the system will sound an alarm and cannot start the elevator.

    The system implementation of this design is as follows:

Elevator control module: The elevator control module consists of a single-chip microcomputer, a stepper motor module and a button module. The single-chip microcomputer realizes the up and down movement of the elevator by controlling the forward and reverse rotation and speed of the stepper motor module; the button module is used to detect the floor information input by the user.

Elevator status display module: The elevator status display module consists of an LCD display screen, which can display elevator status information and time.

Safety alarm module: The safety alarm module consists of a buzzer module. When the elevator is overweight, the buzzer module will sound an alarm and the elevator cannot start.

The system advantages of this design are as follows:

Improve the safety and convenience of construction elevators: This design adopts intelligent control, which can realize automatic control of elevators, avoid manual operation of traditional elevators, and improve the safety and convenience of elevators.

Realize password opening and overweight prompt functions: This design uses password opening and overweight prompt functions to prevent unauthorized persons from using the elevator, and at the same time avoid overloading of the elevator, ensuring the safety of the elevator.

Display elevator status and time: This design uses an elevator status display module, which can display the status information and time of the elevator in real time to facilitate users to understand the operation of the elevator.

Chapter 3  Overall system plan and hardware design

3.1 Overall plan of intelligent construction elevator system

The hardware part of the system is mainly composed of AT89C52 microcontroller, stepper motor module, 44 matrix buttons, weighing HX711 module, LCD1602 display and buzzer module. The software part uses C language and Keil software to complete the main engineering part. The code control chip is used to enable the stepper motor module to control the up and down movement of the elevator. The 44 matrix buttons are used to detect the floor information requested by the user. The weighing HX711 module is used to To detect whether the elevator is overweight, the LCD1602 display is used to display the status information and time of the elevator, and the buzzer module is used to sound an alarm.

1. Hardware design

The hardware design of the intelligent construction elevator control system includes the elevator main control board, motor module, various sensors and safety control modules. Among them, the elevator main control board is the core component of the entire system and is responsible for the intelligent control and automatic control of the elevator. The motor drive board is responsible for controlling the operation of the elevator motor. Sensors and safety control modules are responsible for detecting information such as the weight, height, and operating status of the elevator to ensure the safety of the elevator.

2. Software design

The software design of the intelligent construction elevator control system includes two parts: the elevator control program and the safety control program. The elevator control program is responsible for controlling the up and down operation, stopping and calling functions of the elevator, and is implemented using single-chip microcomputer control technology. The safety control program is responsible for detecting information such as the weight, height, and operating status of the elevator, and issuing alarm signals to ensure the safety of the elevator.

3. Safety control design

The safety control design of the intelligent construction elevator control system includes overweight protection, upper and lower limit protection, and motor overload protection. The overweight protection function detects the weight of the elevator through the weighing HX711 module. When the elevator is overweight, the system will send out an alarm signal to avoid overload operation of the elevator. The upper and lower limit protection function detects the height of the elevator through the limit switch. When the elevator reaches the upper and lower limits, the system will automatically stop the elevator. The motor overload protection function is implemented through the motor drive board and current detection module. When the motor is overloaded, the system will automatically stop the elevator.

4. System testing and optimization

The testing and optimization of intelligent construction elevator control systems include hardware testing and software testing. Hardware testing mainly tests the development board to ensure the normal operation of the system. Software testing mainly tests the elevator control program and safety control program to ensure the stability and reliability of the system.

3.2 hard case type

MCU chip selection:


Considering that this design needs to control the up and down movement of the elevator, it is necessary to choose a microcontroller that can control peripheral devices. The 51 MCU has strong performance and reliability, which can meet the needs of this design, and the price is relatively affordable, so the 51 MCU is chosen as the controller.

STC89C52RC is a 51 microcontroller chip based on the 8051 architecture, produced by China's STC Company. It contains 52KB of flash program memory, 1KB of RAM data memory, and a series of peripheral interfaces, such as serial ports, timers, counters, etc., and can be widely used in industrial automation, instrumentation, smart homes, electronic products and other fields. STC89C52RC has the advantages of low power consumption, high performance and high reliability, and its cost is relatively low, so it has been widely used in the field of embedded system development in China.
Sensor selection:

1. Stepper motor module: The stepper motor module is the core part of controlling the up and down movement of the elevator. It is necessary to choose a stepper motor module with better performance. According to the parameters such as the load and operating speed of the elevator, the stepper motor module model is selected as 28BYJ-48, which has the advantages of high precision, fast speed, and low price, and can meet the needs of this design.


2. 4*4 matrix buttons: 4*4 matrix buttons are used to detect the floor information requested by the user. It is necessary to select a matrix button with good stability to prevent false triggering. According to the demand, the 4*4 matrix key model is selected as the 16-key matrix keyboard, which has the characteristics of good stability, excellent touch, and low price, and can meet the needs of this design.


3. Weighing HX711 module: The weighing HX711 module is used to detect whether the elevator is overweight, and a high-precision weighing module needs to be selected. According to the needs, select the HX711 module. HX711 is a 24-bit A/D converter chip specially designed for high-precision electronic scales. Compared with other chips of the same type, this chip integrates peripheral circuits required by other chips of the same type, including a regulated power supply, on-chip clock oscillator, etc. It has the advantages of high integration, fast response speed, and strong anti-interference. The overall cost of the electronic scale is reduced and the performance and reliability of the entire machine are improved. It has the characteristics of high precision, low noise and low price, which can meet the needs of this design.


4. LCD1602 display: The LCD1602 display is used to display the status information and time of the elevator. It is necessary to choose a display that is easy to use and integrated. According to the demand, the LCD1602 monitor is selected, which has the characteristics of good display effect, easy use, and low price, and can meet the needs of this design.


5. Buzzer module: The buzzer module is used to sound alarms. You need to choose a buzzer module with moderate volume and clear sound. According to the needs, choose the mainstream active buzzer module. The advantages of the active buzzer are: convenient program control, direct DC voltage drive can produce sound. It has the characteristics of moderate volume, clear sound, and low price, which can meet the needs of this design.

6. DS1302 is a commonly used real-time clock chip with the characteristics of low power consumption, high precision, and easy control. It can be widely used in time and date display functions in electronic products. The benefits of DS1302 selection include low power consumption, highly accurate clock and calendar functions, precise time information, simple control, easy integration, affordable price, suitable for various application scenarios, and can meet the needs of this design.

       Features of the smart construction elevator system hardware selection plan: high system integration, modular design, easy maintenance and upgrades; the use of a variety of sensors and modules enables the elevator to have automatic control, safety prompts and other functions; a single-chip microcomputer is used to control the up and down of the elevator Movement, with the characteristics of high precision and good stability.

3.3 ​​hard case design

       In hardware design, electronic CAD software is an indispensable tool. As one of the well-known PCB design software in China, Lichuang EDA is easy to learn and use, has complete functions, and is affordable. It is favored by more and more electronic engineers. The use of Lichuang EDA can greatly improve the efficiency and quality of hardware design, allowing designers to focus more on product innovation and optimization.

When using Lichuang EDA for hardware design, we need to perform the following steps:

1. Circuit design: According to the needs and functional requirements of the product, select appropriate electronic components and combine them into a circuit and draw a schematic diagram. When designing a circuit, it is necessary to consider the stability, accuracy, power consumption and other factors of the circuit, and conduct simulation and debugging.

2. PCB layout: Convert the circuit design into PCB layout, including the location of components and the layout of traces. During layout, factors such as signal integrity, electromagnetic compatibility, and heat dissipation of the circuit need to be considered and optimized and adjusted.

3. PCB manufacturing: Convert PCB layout into actual PCB board, and conduct manufacturing and quality inspection. During manufacturing, it is necessary to select a suitable PCB manufacturer and conduct process flow and quality control.


4. PCB testing: Test and debug the PCB board, including circuit testing, signal integrity testing, electromagnetic compatibility testing, etc. During testing, it is necessary to select appropriate testing equipment and methods, and perform data analysis and correction.

Chapter 4Chapter Software Design

4.1 Overall system process design

Solution implementation process:

  1. Start hardware self-test, LCD1602 displays the startup interface and prompts for the next step.
  2. Click button K1 to enter the password input interface. There are three opportunities to enter the password. If you enter the wrong password three times, the system will be locked and you will not be able to proceed to the next step. Button K2 is the exit button, click to exit the system.
  3. After entering the correct password, enter the system. The first line displays the current time and the second line displays the current weight. The weighing module is automatically turned on and the weight is detected in real time. When the weight is >100g, the buzzer will alarm immediately and the control cannot be entered. System, the elevator cannot rise or fall.
  4. Click button K3 to enter the elevator lifting system. The 4*4 matrix keyboard simulates the floor buttons and the stepper motor simulates the elevator lifting. The system floors are 1 to 9 floors in total, controlled by the 4*4 matrix keyboard. When S4 is clicked, the stepper The motor rotates forward 4 times and reaches the 4th floor; when S9 is clicked, the stepper motor continues to rotate forward 5 times and reaches the 9th floor; when S1 is clicked, the stepper motor rotates reversely 9 times and reaches the 1st floor.
  5. Click K4 to exit the system.

4.2 System connection flow diagram


The flow charts are as follows: system prompt interface flow chart, display input password flow chart, elevator control flow chart, main flow chart, and system control elevator flow chart.


Chapter 5 System study exam

5.1 Bugs and solutions encountered in system debugging

System debugging is a very important link in software engineering, and we often need to face various bugs. In the actual system debugging, I also encountered a lot of bugs. I will share some experiences and lessons below.

  1. Insufficient memory, the number of bytes occupied by the defined variables exceeds the number of bytes specified within the chip, causing the program to crash. Solution: Streamline the program, merge or delete unnecessary variables, and delete parts that are not called by the program.
  2. Stepper motor failure: The motor is the power source for elevator lifting. If the motor fails, the elevator will not be able to rise and fall normally. Solution: Check whether the wiring and configuration of the motor are correct. If the problem cannot be solved, replace the motor.
  3. Program logic error: Program logic error refers to a problem with the logical relationship in the program, causing the elevator to fail to operate normally. Solution: Debug the program line by line to find out the cause of the logic error and fix it.
  4. Hardware failure: Hardware failure refers to hardware failure in the elevator system, such as circuit board damage, poor line contact, etc. Solution: Conduct hardware testing on the elevator system to find out the faulty components and repair or replace them.
  5. MCU pin conflict problem: When multiple peripherals are used, the device may occupy too many pins and may conflict with each other, resulting in program errors. Solution: Combine the pins that can be combined and use the chip to convert serial to parallel to achieve the effect of single control of multiple pins.
  6. Debugging and downloading interface failure: The debugging and downloading interface of the microcontroller may fail, making debugging impossible. Solution: Check whether the debugging interface is connected correctly, check whether the debugging tool is damaged, and replace the debugging tool if necessary.
  7. Timing errors: When the timing of the microcontroller is incorrect, the system will not operate properly. Solution: Check whether the timing settings are correct and modify the timing parameters to meet the system requirements.
  8. Power supply problems: Power supply problems with the microcontroller may cause the system to not work properly. Solution: Check whether the power connection is correct, check whether the power quality is good, and replace the power supply if necessary.

5.2 Experience in solving bugs

    After a long period of study and exploration, the production of intelligent construction elevator systems has solved many problems. Solving bugs is an indispensable part of software development. It not only requires developers to have solid programming skills and experience, but also needs to have strong problem solving skills and patience. Below I will share some experience in solving bugs.

1. Determine the steps to reproduce the bug

Before solving the bug, you first need to determine the steps to reproduce the bug. The bug phenomenon should be reproduced as much as possible, and the operating steps, input data and other information that caused the bug should be recorded. This helps locate problems faster and reduces unnecessary debugging time.

2. Analyze the causes of bugs

After determining the steps to reproduce the bug, you need to analyze the bug to find out the root cause of the bug. This process requires combining code debugging tools, log files and other tools to carefully check the execution flow of the program and the values ​​of variables and other information. During the process of analyzing bugs, you should stay calm and avoid excessive speculation and assumptions to ensure that the analysis results are accurate and reliable.

3. Fix bug code

After analyzing the cause of the bug, the bug code needs to be repaired. In the process of fixing bugs, good programming habits should be followed to keep the code readable and maintainable. At the same time, we must also pay attention to the compatibility and stability of the code to ensure that the repaired program will not introduce new bugs.

4. Test and verify

After fixing the bug, testing and verification are required to ensure that the bug has been completely resolved. The testing and verification process can include manual testing, automated testing, code review and other methods. The repaired code needs to be thoroughly tested and verified to ensure that the program functions and performs as expected.

In general: Solving bugs requires solid programming skills and experience, as well as strong problem-solving abilities and patience. In the process of solving bugs, developers need to follow good programming habits, keep the code readable and maintainable, and also pay attention to the compatibility and stability of the program. Ultimately, successfully resolving bugs not only improves the stability and reliability of the program, but also enhances the developer's confidence and professionalism.

Chapter 6 Item body meeting

Item 6.1 Conclusion

In the process of completing the course design of intelligent construction elevator systems, I gained a lot of valuable insights and experiences. The following is my personal course experience:

1. Technical learning is a process of continuous iteration

In the process of developing intelligent construction elevator systems, I continue to learn new technologies and knowledge. During the learning process, I deeply realized that technical learning is a continuous iterative process. We need to continue to learn and practice in order to master new technologies and knowledge. At the same time, we also need to maintain a humble and open mind, and constantly learn from the experiences and lessons of others in order to better improve our own skills and levels.

2. Requirements analysis is the key to project success

Before developing an intelligent construction elevator system, we need to fully analyze and understand user needs. Requirements analysis is the key to project success. Only by understanding user needs can we develop a system that meets user requirements. During the demand analysis process, we need to fully communicate with users in order to better understand their needs and expectations.

3. Code standards and good programming habits are essential

In the process of developing intelligent construction elevator systems, we need to follow code specifications and good programming habits. Code specifications and good programming habits can improve the readability and maintainability of code, and help us collaborate and communicate better. At the same time, good programming habits can also improve our programming efficiency and code quality, helping us to better complete development tasks.

4. Testing and debugging are essential links in the project development process

In the process of developing intelligent construction elevator systems, testing and debugging are essential links. Only through sufficient testing and debugging can the stability and reliability of the system be ensured. During the testing and debugging process, we need to carefully and patiently troubleshoot problems, identify loopholes and problems in the system, and repair and improve them in a timely manner.

In general, I gained a lot of valuable insights and experience in the process of completing the design of the intelligent construction elevator system. These experiences and insights will be very helpful for my future project development. I will continue to study and practice hard, improve my skills and level, and make more contributions to better complete project development tasks.

Guess you like

Origin blog.csdn.net/oxygen23333/article/details/134026125