Abstract
: A control system for an automatic line-patrolling wheeled walking robot is designed. The AT89S52 single-chip microcomputer is used as the main control CPU, and a complex programmable logic device (CPID) is added to assist the CPU in processing data. The program parameter memory is expanded, and the PWM control of the detection guide line and the DC motor and steering gear can be performed.
Keywords
: control system; complex programmable logic device; memory; photoelectric detection; pulse width modulation
1 Introduction
Wheeled mobile robot is an important part of the field of robot research. It integrates mechanics, electronics, detection technology and intelligent control. Among various mobile mechanisms, wheeled mobile mechanism is the most common. The reason why wheeled mobile mechanism is widely used is that it is easy to control its moving speed and moving direction. Therefore, it is necessary to develop a complete wheeled robot system and conduct corresponding motion planning and control algorithm research. The author designed and developed an automatic line patrol wheeled robot control system based on 5l single chip microcomputer.
2 Overall design of control system
The robot control system consists of main control circuit module, memory module, photoelectric detection module, motor and servo drive module, etc. The block diagram of the control system is shown in Figure 1.
3 Main control module design
3.1 CPLD design
In the robot control system, it is necessary to control multiple motors and travel switches, and also to perform photoelectric detection. If all tasks are completed by the AT89S52 microcontroller, the CPU burden will be too heavy, affecting the processing speed of the system. Therefore, a CPLD is added. The model is EPM7128. It belongs to the MAX7000 series device. It includes 2 general I/O ports and 2 dedicated I/O ports. The dedicated I/O ports can be used as high-speed control signals (clock, clear and output enable, etc.) for each macro unit and input and output pins. The motor's PWM signal is also generated by it.
The pin arrangement of EPM7128 is shown in Figure 2. The output of M1P-M4P pins is PWM pulse width modulation signal, M1FB-M4FB pins are motor direction control signals, P00-P07 are connected to the PO port of the microcontroller, 100-1015 are two extended general I/O ports, S11-S17 pins are travel switch input signals, LI11-LI17 pins are photoelectric sensor input signals. CPLD is programmed in VHDL language, and the source code of part of the program that generates 1 PWM signal is as follows:
The microcontroller uses a 24MHz crystal oscillator, the frequency of the ALE signal fALE=f16=6MHz, and the frequency of the pin MlP that finally outputs the PWM signal is:
Adjusting the duty cycle of this signal can make the DC motor obtain a speed of 0-255.
3.2 Expansion of the robot operation parameter memory
The robot's operation path and action can change according to the different competition situations. In this way, the Flash of the microcontroller must be erased and written every time the operation parameters are changed. In order to solve this problem, the program parameter memory is expanded to store the robot's operation path and action parameters. The expansion circuit is shown in Figure 3.
IC1 is 24LC08B, which is a serial E2PROM memory of I2E bus, and can store up to 1K bytes of data. IC2 is a MAX3232 level converter, which has a power supply voltage converter inside, which can convert the computer level to the standard TTL level, realize the data transmission between the computer and the single-chip microcomputer through the serial port, and enable the single-chip microcomputer to complete the data storage operation of 24/LC08B. When the single-chip microcomputer is running, it directly reads the robot's operating parameters from 24LC08 to control the robot's operation.
4 Photoelectric detection module design
4.1 Photoelectric detection process
The photoelectric detection module is designed to enable the robot to detect the white guide line on the ground. The photoelectric detection circuit mainly includes the transmitting part and the receiving part, and its principle is shown in Figure 4.
The waveform modulation of the transmitting part adopts the frequency modulation method. Due to the fast response speed of the light-emitting diode, its operating frequency can reach several MHz or more than ten MHz, while the modulation frequency of the detection system is in the range of tens to hundreds of kHz, which can meet the requirements. The light source driver is mainly responsible for amplifying the modulated waveform to sufficient power to drive the light source to emit light. The light source adopts an infrared light-emitting diode, which has a high operating frequency and is suitable for the emission of modulated light with a square wave waveform.
The receiving part uses a photosensitive diode to receive the modulated light and convert the optical signal into an electrical signal. This electrical signal is usually weak and needs to be filtered and amplified before it can be processed. The amplification of the modulated signal adopts the form of AC amplification, which can separate the modulated light signal from the background light signal, providing convenience for signal processing. The modulated signal processing part identifies the amplified signal and determines the characteristics of the detected object. Therefore, the essence of this module is to separate the "AC" and useful modulated light signal from the "DC" and useless background light signal, so as to achieve the purpose of anti-interference.
4.2 Photoelectric probe
The photoelectric probe is installed at the front of the robot chassis, and a total of 5 detection points are set. Theoretically, the more and denser the detection points are, the higher the accuracy and reliability of recognition will be, but the hardware cost and software complexity will also increase accordingly. The use of this line patrol system ensures the accuracy of detection and saves hardware cost. The modulated light emitted by the light-emitting diode is reflected by the ground to the photodiode. The photocurrent generated by the photodiode changes linearly with the intensity of the reflected light. By detecting this change, it is possible to determine whether a certain detection point is above the white guide line, thereby determining the relative position of the robot and the white guide line.
5 Motor drive module
The driving parts of the robot are mainly motors and servos, both of which can be regulated and controlled by PWM. According to the feedback signal of the pulse encoder, the motion state of the robot is controlled in real time. The control principle of the DC servo motor is shown in Figure 5. Adjustment: The PWM signal can quickly adjust the steering angle of the servo, thereby realizing the direction control of the robot.
6 Conclusion
The automatic line patrol wheeled robot control system based on the 5l-type single-chip microcomputer runs smoothly and reliably, with strong anti-interference ability. It not only meets the design requirements of the robot competition, but also builds a good control platform for intelligent robots.
Previous article:Design of battery management system based on Freescale microcontroller
Next article:A Multitasking Mechanism and Application Based on C51
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 【New Year's Festival Competition】+2019 Shopping
- EEWORLD University Hall----Live Replay: Renesas Electronics R-Car Advanced Driver Assistance System Solution
- Security chip design information
- 【Xianji HPM6750】Embedded Studio installation
- [NXP Rapid IoT Review] + First Day Review Experience
- CAN communication
- Can the required driving current or driving power be calculated based on the Ciss, Qg and driving frequency of the MOS tube?
- "Constant power" power control strategy for hard-start loads (such as high-power permanent magnet brushed motors and solenoid valves)
- Please help me explain the principle of this filter circuit and the calculation of inductance and capacitance parameters.
- CAN standard features of power system and emission diagnosis in China VI OBD online monitoring