Design of Intelligent Car Based on Single Chip Processor STC89C52
暂无分享,去创建一个
Smart car is a kind of system which can precisely along the path of automatic driving mazes to the end point and return to the starting point accurately according to the optimal path, Under the effect of control system. In this paper, the hardware/software design and implementation of the intelligent tracking car control system are introduced. This tracking car uses three rows of laser sensors to collect road information, software to judge its effectiveness by the corresponding algorithm, control algorithms to control vehicle steering. The proper duty ratio of PWM wave is gived by single chip microcomputer to control the motor speed, and the positive&negative operation of motor is drived by H bridge. The smart car can return to the starting point along the optimal path after reach the end point. The smart car can complete the tracking task preferably, and is able to complete the prescribed path with faster speed, always maintains stable operation. Introduction The tracking car competition is an activity carried out for promoting higher educational reform, cultivating undergraduates the ability of practice, innovation and team-work spirit. Manufacturing photoelectric tracking car is divided into two parts: hardware manufacturing and software programming. This article proposes a design scheme for photoelectric tracking car. The experiment indicates that this scheme can adjust the speed and angle of car body, combining with all kinds of track’s traffic information, in order to ensure cars can finish the full distance in a minimum duration. Systematic overall hardware structure design and working principle brief introduction Intelligent car’s overall hardware structure design The structures of the car mainly divided into a few parts following: 1. Power module. Because cars adopt the battery to supply electricity, reasonable design is a power module, the premise of car’s stable operation. 2. Tracking module. It’s made up of several phototubes, using for exploring the position of black line, judge if there is black line or not through the change of reflected infrared. 3. driver module of electric motor. As the SCM’s current output is limited, and it cannot drive motor to work directly, thus it needs to be driven by appropriative circuit. This article takes H bridge driver chip L298N that is used commonly for an example. 4.One-chip computer module. The whole design selects 8-bit microcontroller STC89C52 to finish the treatment of collecting data and controling command of each driver, the processing speed of 12M can deal with all kinds of road information in time and control the direction of cars, and the power dissipation is low, the collocation is simple, and the price is comparatively cheap. Intelligent tracking car hardware structure diagram as shown in figure 1 [2] : International Power, Electronics and Materials Engineering Conference (IPEMEC 2015) © 2015. The authors Published by Atlantis Press 247 Fig.1 intelligent tracking car hardware structure diagram Introduction of working principle of the intelligent car In this design, tracking refers to the car in the white floor walking along the black line 2.5 cm wide. The tube of infared sensor emits infared, which received by the receiving tube. Simultaneously, the receiving quantity is converted into electrical signals, after processing, signal amplification circuit by MCU to port P1, after processing, the signal by the port output to the motor drive circuit L298N chip, so as to achieve the purpose of driving the car to walk and tracking. Hardware system design of intelligent tracking the car Power supply module The electricity of power supply module is supplied by two ways, and we can use one way to supply power for single chip microcomputer, lamp etc. and the other way provide the working voltage of L298N, photocell, and motor. Besides, the drive voltage of L298N is given directly by the battery without any treatment. Profile of master control module STC8952 TC89C52 chips 40 + 5 v power supply pins, 20 pins grounded.XTAL1 of 18 pin and XTAL2 of 19 pin connect crystal which vibration frequency is 12 MHZ , and connect 30 pf capacitors.9 pin RST connect reset circuit outside, providing electric reset for single chip microcomputer. Pin 10 and 11 pins of P3 mouth as the communication terminal of single chip microcomputer ,namely, serial input port and serial output needed to complete the program download. The eight ports of the output of sensor send signals correspondingly into microcontroller through the P1 port. After processing , P00 ~ P05 output to EN1, EN2, IN1 ~ IN4 pin of L2938N, finishing controlling the car. Fig.2 Loop circuit diagram The design of tracking module This design is adopted eight ST188 models of infrared electric sensor. The parts of photocell distribution adopt the 332 layout. This method can distinguish every port accurately and simply, control algorithm of program is simple and the car is controlled stably. ST188 type infrared electric sensor consists of a high power infrared photodiode and a highly