Current location - Education and Training Encyclopedia - Graduation thesis - Using 5 1 single chip microcomputer to design and make the C language program of infrared remote control car.
Using 5 1 single chip microcomputer to design and make the C language program of infrared remote control car.
This paper introduces an infrared remote control car. AT89S5 1 single chip microcomputer is used as the core controller, and L289 is used to drive DC motor to control the operation of the car. This car has the functions of infrared remote control, manual driving, automatic driving, tracing ahead and so on. The system adopts modular design, and the software is written in C language. Published on 5 1 essay website www.5 1lun-wen.cn 1. Design tasks and requirements To make an infrared remote control car with at89c 5 1 single chip microcomputer as the core. The car has the functions of automatic driving, manual driving and tracking. When driving automatically, you can avoid obstacles in the process of moving forward. When driving manually, the remote controller controls the car to move forward, backward, turn left, turn right and accelerate. When tracing forward, the car can also follow the pre-designed trajectory. Published in 5 1 essay website www.5 1lun-wen.cn 2. System composition and working principle The system consists of hardware and software. The hardware part mainly completes the functions of transmitting and receiving infrared coded signals, obstacle detection, trajectory detection, DC motor operation and so on. The software mainly completes the functions of signal detection and processing, device driving and control. AT89S5 1 MCU inquires and decodes the infrared signals, inquires the signals input by each detection part, and carries out corresponding processing, including the forward and reverse rotation of the motor, to judge whether the car encounters obstacles and whether its gold has derailed. The system structure block diagram is shown in figure 1. Published on 5 1 www. 5 1 lun-wen.cn 1 system structure diagram III. Main hardware circuit 1, remote control transmitter circuit The main control device of this circuit is remote control chip HT622 1, as shown in Figure 2. HT622 1 modulates the infrared code into a pulse signal of 38KHZ, and sends it out through the infrared emitting diode. In Figure 2, D 1 is an infrared emitting diode, and D2 is a key indicator light, which lights up when a key is pressed.