Design and implementation of intelligent robot control system

Publisher:灵感狂舞Latest update time:2009-08-10 Source: 控制工程网Keywords:Robots Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1 Introduction

Robotics is a fusion of knowledge from many disciplines, such as mechanics, electronics, sensors, computers, artificial intelligence, etc., and involves technologies in many cutting-edge fields today. Some developed countries have used robot-making competitions as a strategic means of innovative education. For example, Japan holds various types of robot-making competitions such as the "NHK Cup College Robot Competition", "All Japan Robot Sumo Conference", and "Robot Football Competition" every year. Most of the participants are students. The purpose is to comprehensively cultivate students' hands-on ability, creativity, cooperation ability and enterprising spirit through the competition, and also popularize the knowledge of intelligent robots.

Carrying out robot-making activities is one of the best practices for cultivating college students' innovative spirit and practical ability, especially the best platform for students majoring in electromechanical engineering to carry out comprehensive knowledge training. This paper focuses on the hot issue of path tracking in a guide line environment. Based on the principle of single-chip microcomputer control and sensors, a robot is made through hardware circuit production and software programming, which realizes the robot's path tracking and automatic deviation correction functions, and can detect metal and display distance in real time.

2 Functions to be completed by the robot

Select a smooth floor or wooden board, lay white paper on it, and draw any black lines on the white paper (the lines should not cross) as the robot's walking trajectory to guide the robot to walk autonomously. Several thin iron sheets are randomly buried along the black line under the paper, with a thickness of 0.5 to 1.0 mm. The robot walks along the track for one circle, detects the iron sheets buried under the paper, issues an audible and visual alarm, and displays the position of the iron sheets from the starting point.

3 Hardware Design Scheme

Overall composition of the robot

Figure 1 Overall structure of the robot



As shown in Figure 1, the microprocessor is the core, which receives external information from the sensor, processes it, and controls the operation of the robot.

System power supply part

Since the robot motor, sensor and system CPU are all powered by +5V, considering the power, vehicle mass and friction resistance of the electric vehicle, we use the dry battery pack that comes with the electric vehicle for power supply, which has low power consumption, small size and light weight, and is relatively easy to install.

Motor drive and PWM speed regulation part

The robot needs to be controlled to travel at a suitable speed. If the speed is too fast, the car will easily deviate from the track because the microcontroller has a response and processing time for the signals from each sensor. The speed of the car is controlled by the speed of the rear wheel DC motor. Changing the speed of the DC motor is usually achieved by voltage regulation, magnetic regulation and other methods. Among them, the voltage regulation method is simple in principle and easy to implement.

An H-type PWM modulation circuit composed of transistors is used. Through the PWM modulation circuit shown in Figure 2, the transistor is controlled by the microcontroller to work in an adjustable duty cycle state to achieve speed regulation.

Figure 2 Motor drive circuit


Set the microcontroller P1.7 port to a low level and P1.6 port to a high level. At this time, Q1 and Q4 are turned on, Q2 and Q3 are turned off, and the motor works normally. Changing the high level period of P1.6 port, that is, changing the PWM modulation pulse duty cycle, can achieve precise speed regulation. The pulse frequency has an impact on the motor speed. The high pulse frequency has good continuity, but the load capacity is poor; the low pulse frequency is the opposite. It is found through experiments that when the pulse frequency is above 30Hz, the motor rotates smoothly, but when the car is driving, the motor speed decreases rapidly due to friction, or even stops; when the pulse frequency is below 10Hz, the motor rotates with a jump phenomenon. Experiments have shown that the pulse frequency is best between 25 and 35Hz. We choose a pulse frequency of 30Hz.

Guide line detection module

According to the different reflection coefficients of white paper and black line, the two colors of the road surface are distinguished by the photoelectric detection circuit with photoelectric sensor as the core, and converted into different level signals. This level signal is sent to the microcontroller, and the microcontroller controls the steering motor to make corresponding steering to ensure that the car travels along the guide line. Considering the relative position between the car and the road surface, a reflective photoelectric detection circuit is used. The infrared photoelectric sensor TCRT1000 is a device that scans photoelectrons, emits photodiodes, and receives and outputs transistors. It is characterized by small size, easy use, high signal output, and little influence of temperature on the working state. Its peripheral circuit is simple (as shown in Figure 3). The C end of the diode and the E end of the transistor are grounded, and the A end of the diode is connected to the power supply through a resistor to form a bias current circuit; the C end of the transistor is also connected to the power supply through a resistor to form an output circuit. When the detector detects white, it outputs a low level; when it detects black, it outputs a high level.

In order to improve the detection accuracy, multi-sensor information fusion technology is used. In the design, three photoelectric sensors are evenly arranged on the front of the car, among which the middle one (Q1) is installed in the center of the car. The output of Q1 is connected to the P1.3 pin of the microcontroller through a first-level comparator and a NOT gate. A sensor is arranged on the left and right ends of Q1, and is also connected to the P1 port of the microcontroller after the same circuit as Figure 3. If a sensor on either side detects a black line, it indicates that the car is leaving the track. The results of the three detection points are integrated as the input of the microcontroller. The robot makes judgments and adjustments based on the information from the microcontroller P1 port to achieve path tracking and automatic deviation correction.

Figure 3 Photoelectric detection conversion circuit


Metal detection part

Figure 4 Metal detection circuit



As shown in Figure 4, the metal detector uses a proximity switch with an effective detection distance of about 4mm. It is fixed on the robot. When a metal piece is detected, the detector outputs a low level, and is connected to a light-emitting diode and a buzzer after the inverter to emit an audible and visual indication signal. At the same time, the output is reversed and connected to a single-chip microcomputer to count the number of metal pieces detected.

Hall element distance measurement design

The Hall integrated chip consists of three Hall metal plates. When the magnet is facing the metal plate, the metal plate is transversely conductive according to the Hall effect. Therefore, the magnetic sheet can be installed on the wheel, and the Hall integrated chip is installed on the fixed shaft to measure the distance by counting the pulses. Every time the rear wheel of the car rotates one circle, the pulse generated by the Hall element is sent to the T0 port of the single-chip microcomputer for counting, and the single-chip microcomputer completes the conversion of the number of pulses to the distance. A magnetic pole is installed on the rear wheel, and the measurement error is the circumference of a wheel, which can be compensated in the software.

LCD display

The liquid crystal display is more and more widely used in pocket instruments and low-power application systems due to its many advantages such as low power consumption, small size, rich display content, and ultra-thin and light weight. Here, a DM-162 LCD module with 2 lines and 16 words is used to connect to the microcontroller and program it to complete the display function.

4 System software flow

The system software flow is shown in Figure 5.

Figure 5 System software flow chart



5 Conclusion

Based on the principle of single-chip microcomputer and sensor, this paper takes single-chip microcomputer as the core of the controller, small DC motor as the driving element, configures different types of sensors, and produces a low-cost, modular small robot through software programming. A large number of walking experiments have proved that the robot can smoothly track the path and automatically correct the deviation to walk autonomously, and complete the functions of detection and display.

The author's innovation point: This paper aims at the hot issue of path tracking in the environment with guide lines, adopts multi-sensor information fusion technology, and realizes the path tracking and automatic deviation correction of the robot through single-chip microcomputer control. The method is simple, easy to implement, low cost, and good effect.
Keywords:Robots Reference address:Design and implementation of intelligent robot control system

Previous article:Design and implementation of binocular vision monitoring system based on DM642
Next article:Design and simulation of remote meter reading system based on Proteus

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号