Single chip robot design

Publisher:缘到泉Latest update time:2013-03-08 Source: 51heiKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1 Introduction
    Wheeled mobile robot is an important part of the robot research field. 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 steering gear drive module, etc. The block diagram of the control system is shown in Figure 1.

Click to browse the next page

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:

    Click to browse the next page

    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:

    Click to browse the next page

Click to browse the next page


    Adjusting the duty cycle of this signal can make the DC motor obtain a speed of 0-255. [page]

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.

Click to browse the next page

    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.

Click to browse the next page

    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 adopts 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.

Click to browse the next page

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 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, and has 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.

Keywords:MCU Reference address:Single chip robot design

Previous article:Comparison between MSP430 series and 89C5l series
Next article:Design method of frequency meter based on single chip microcomputer 89C51,

Recommended ReadingLatest update time:2024-11-16 20:35

Design of four-bit BCD encoder circuit based on microcontroller
1 Introduction BCD code is also called binary/decimal code, which is a binary coded decimal code. When designing and testing digital circuit hardware or dealing with integrated circuits with BCD code interfaces, we often hope to generate BCD codes conveniently and quickly. Complete the current work and check
[Microcontroller]
Jump Jump game source program based on 51 single chip microcomputer
During this period, I learned how to use the LCD12864 without font library, and designed a microcontroller jump game based on it. The main function is to control the jumping of the firewood man and determine whether it jumps on the floor. Without further ado, here is the picture: The simulation schematic diagram is
[Microcontroller]
Jump Jump game source program based on 51 single chip microcomputer
Application of 74HC154 decoder in single chip microcomputer
Hardware Connection: Code: #include reg52.h #define uint unsigned int #define uchar unsigned char void Delay(uint x) {   uchar i; while(x--) { for(i=0;i 120;i++); } } void main() {   while(1) { P2 = (P2+1)%16; Delay(50); } }
[Microcontroller]
Application of 74HC154 decoder in single chip microcomputer
Design scheme of temperature error compensation based on single chip microcomputer
1 Introduction For high-precision sensors, temperature error has become a serious obstacle to improving their performance, especially in applications where the ambient temperature changes greatly. It is very difficult to rely on the sensor itself to add some simple hardware compensation measures. At present, a
[Microcontroller]
Design scheme of temperature error compensation based on single chip microcomputer
A lamp head infrared remote control system using single chip microcomputer
Infrared is an invisible light, named because it is outside the visible light (red light) in the entire electromagnetic spectrum. It is between visible light and microwaves, and has the properties of visible light, such as rectilinear propagation, reflection, refraction, etc., and also has some characteristics of mi
[Microcontroller]
A lamp head infrared remote control system using single chip microcomputer
Optimizing Algorithm Design with Customizable Microcontrollers
From global positioning systems to audio and video media streaming, these applications require the execution of complex algorithms in real time, many of which need to comply with regularly updated industry standards. The challenge facing engineers developing these applications is to optimize the execution of these algo
[Microcontroller]
Optimizing Algorithm Design with Customizable Microcontrollers
Program and debugging of driving AD9954 with C51 single chip microcomputer
The first time I used the 51 single-chip microcomputer to write AD9954 program, after carefully reading the datasheet and referring to the sample program of previous classmates, I simply implemented single-tone mode. When debugging, you must first correctly control SYNC_CLK, because this output pin is the 4th freque
[Microcontroller]
Program and debugging of driving AD9954 with C51 single chip microcomputer
Application of MSP430 single chip microcomputer in underwater acoustic response releaser
    The underwater acoustic transponder is one of the key control units of the cooperative target positioning and navigation system. The transponder is deployed underwater for a long time, receives the control instructions of the water system, and completes the ranging by receiving and transmitting a single pulse. The
[Microcontroller]
Application of MSP430 single chip microcomputer in underwater acoustic response releaser
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号