Design of automatic line patrol wheel robot control system based on single chip microcomputer

Publisher:滁州鱼儿Latest update time:2011-03-14 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Reference address:Design of automatic line patrol wheel robot control system based on single chip microcomputer

Previous article:Design of battery management system based on Freescale microcontroller
Next article:A Multitasking Mechanism and Application Based on C51

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号