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.
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
- Popular Resources
- Popular amplifiers
- A review of learning-based camera and lidar simulation methods for autonomous driving systems
- Multi-port and shared memory architecture for high-performance ADAS SoCs
- Computer Vision Applications in Autonomous Vehicles: Methods, Challenges, and Future Directions
- Monocular semantic map localization for autonomous vehicles
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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- Transfer idle STM32 development boards, etc.
- EEWORLD University ---- How does high voltage isolation technology work - Capacitor structure
- [RVB2601 Creative Application Development] 3. WiFi network communication
- Rookie Learning Manual
- Can it replace the human arm?
- Analysis of spike hazards and absorption circuits in switching power supply modules
- RF Tips: What is beamforming? What is Massive MIMO? Finally someone explains it clearly
- What is the baud rate register used for? The documentation seems to be somewhat contradictory. It says baud rate register first and counter later.
- TMS320VC5502EMIF external flash configuration problem
- Implementing SoC Based on 8051 Microcontroller Using FPGA IP Platform