introduction
With the continuous development of microelectronics technology, it is easy to combine computer technology with measurement and control technology to form an intelligent measurement and control system. At present, people can completely design and manufacture simple intelligent robots with certain special functions .
1 Design concept and overall plan
1.1 Design ideas of simple intelligent robots
The robot can walk along the guide line in any area, automatically bypass obstacles, and walk along the light source under the guidance of a light source. At the same time, it can detect metal pieces buried underground, emit sound and light indication information, and store and display the number of detected breakpoints and the distance between each breakpoint and the starting line in real time. Finally, it can stop at a designated location and display the time of the entire running process.
1.2 Overall design and block diagram
This design uses AT89C51 microcontroller as the detection and control core. Infrared photoelectric sensors are used to detect black lines and obstacles on the road surface, metal sensors are used to detect metal iron sheets under the road surface, photoelectric encoders are used to measure distance, photoresistors are used to detect and judge the location of the garage, and PWM (pulse width modulation) technology is used to dynamically control the rotation direction and speed of the motor. Software programming is used to achieve precise control of the robot's movement, obstacle avoidance, and stop, as well as the storage and display of detection data. By optimizing the combination of circuits, all resources of the 51 microcontroller can be utilized to the maximum extent.
Port P0 is used for digital tube display, port P1 is used for PWM drive control of the motor, and ports P2 and P3 are used for data acquisition and interrupt control of the sensor. The advantages of this are: making full use of the internal resources of the microcontroller and reducing the cost of the overall design. The overall scheme of this solution is shown in Figure 1.
2. Hardware composition and design principle of the system
The hardware part of this system consists of a single-chip microcomputer unit, a sensor unit, a power supply unit, an audible and visual alarm unit, a keyboard input unit, a motor control unit and a display unit, as shown in Figure 2.
2.1 Microcontroller Unit
This system uses AT89C51 single-chip microcomputer as the central processor. Its main task is to scan the signal input by the keyboard to start the robot, and continuously read the data collected by the sensor during the robot's walking process. After processing the obtained data, it generates PWM pulses with different duty cycles to control the motor according to different situations, and sends the relevant data to the display unit for dynamic display to generate sound and light alarm signals. Among them, P0 is used for dynamic display of digital tubes, P1.0-P1.5 controls 2 motors, P1.6 and P1.7 are independent keyboard interfaces, P2 is connected to the sensor, P3.2 is connected to the photoelectric code disk for mileage, P3.7 is connected to the sound and light alarm unit, and P3.4, P3.5, and P3.6 are connected to the light-emitting diodes used to display the number of breakpoints.
2.2 Motor Control Unit
This robot uses a dual-motor dual-wheel driven car as its base. The two motors independently control the left and right wheels, and the turning function is achieved by the different speeds of the two motors. It can also turn on the spot, which is easy to control. Traditional cars are driven by power motors and steering motors, and the turning angle is difficult to control, making them inconvenient to use.
The motor control circuit uses an H-type drive circuit composed of high-power transistors BDl39 and BDl40. The microcontroller generates PWM pulses with different duty cycles to accurately adjust the motor speed. This circuit works in the saturation or cut-off state of the transistor, avoiding the transistor consumption when working in the linear amplification area, and can maximize efficiency; the H-type circuit ensures that the motor speed and direction can be easily controlled; the speed and stability of the electronic switch can also fully meet the needs. The whole set of drive circuits is a widely used motor drive technology. The circuit is shown in Figure 3.
[page]
2.5 Display unit
The display unit consists of two 7-segment digital tubes. In order to reduce the power consumption of the entire system, it adopts single-chip software decoding and dynamic display to display the distance from each breakpoint to the starting point and the time of the entire running process in real time.
2.6 Sound and light alarm unit
Use 555 as the oscillation source, use the single chip microcomputer to trigger the oscillation source to drive the electromagnetic sounder as the sound indicator and a light emitting diode as the light indicator device, thus forming an audible and visual alarm unit.
2.7 Power supply unit
This system uses two sets of power supplies to supply power to the motor and control circuit separately. The system control circuit uses the output power supply (5V) after voltage stabilization by 7805, and the motor uses 4 AA batteries to power it.
3 System software design
The software program of this system adopts a modular structure and is written in C language. It mainly consists of initialization program, lane deviation adjustment program, deviation light source adjustment program, sound and light indication subroutine, sensor status reading, display program, timer 0 interrupt service program, timer 1 interrupt service program, external interrupt 0 service program, parking processing and other modules. The main flow of the system is shown in Figure 6.
4 Conclusion
The robot has achieved the expected results after many experiments on the set track, but its intelligence is far from enough. With the continuous research and deepening of artificial intelligence and neural network technology, the development prospects of intelligent robots will become more and more broad.
Previous article:Design of electronic password lock based on single chip microcomputer
Next article:Design of Radio Remote Control Multi-way Switch System Based on C8051F920
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
- How to download the executable file from PC to the development board?
- Automobile Camshaft Position Sensor Signal Measurement and Waveform Analysis - Oscilloscope
- FX3/CX3(CYUSB3065) thread locked issue:
- HC32F460 external interrupt PC3
- Application of Real-time Spectrum Analyzer in Radio Frequency Microwave Interference Analysis
- Toshiba's new stepper motor driver chip TB5128
- Keysight spectrum analyzer measurement abnormality maintenance--N9010A maintenance
- BQ4050 cannot be unlocked using BQStudio
- [New Year's flavor competition] + Zongzi brown sugar with fish every year, Guizhou's strong special New Year flavor
- The difference between brushed motor and brushless motor