Design of intelligent car based on 51 single chip microcomputer

Publisher:平静宁静Latest update time:2011-11-18 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

O Introduction
On the basis of the existing toy electric car, a photoelectric detector is added to realize the real-time measurement of the speed, position and running status of the electric car, and the measured data is transmitted to the single-chip microcomputer for processing, and then the single-chip microcomputer realizes intelligent control of the electric car according to the various detected data.

1 DC speed regulation system uses PWM speed
regulation The DC speed regulation system uses a thyristor DC chopper and rectifier circuit. The thyristor is not phase-controlled, but works in a switching state. When the thyristor is triggered and turned on, the power supply voltage is added to the motor. When the thyristor is turned off, the DC power supply is disconnected from the motor, and the motor is freewheeling through the diode, and the voltage at both ends is close to zero. Pulse Width Modulation (PWM), referred to as PWM. The pulse period remains unchanged. Only the conduction time of the thyristor is changed, that is, the DC speed is adjusted by changing the pulse width.
Pulse width speed regulation can also be achieved by controlling the closing of the relay through a single-chip microcomputer, but the driving capacity is limited. In order to realize the left and right turns of the electric car, this design uses a reversible PWM converter. The main circuit structure of the reversible PWM converter has H type, T type and other types. In our design, we used the commonly used bipolar H-type converter, which is a bridge circuit composed of 4 triode power transistors and 4 freewheeling diodes. FIG1 is a circuit diagram of a bipolar H-type reversible PWM converter.

a.JPG


The base drive voltages of the four power transistors are divided into two groups. VT1 and VT4 are turned on and off at the same time, and Ub1=Ub4 in their drive circuit; VT2 and VT3 act at the same time, and their drive voltages are Ub2=Ub3=-Ub1.

2 Detection system
The detection system mainly realizes photoelectric detection, that is, various sensors are used to measure the obstacle avoidance, position, and driving status of the electric vehicle.
2.1 Driving start, end, and light detection
The system uses a reflective infrared photoelectric sensor to detect the start and end of the road (2 cm wide black line). A set of sensors is placed along the black line on the chassis of the toy car to meet the needs of starting the count and stopping at the end. Ultrasonic sensors are used to detect obstacles. Light tracing uses a photosensitive transistor to receive the light emitted by the bulb. When it senses the light, the resistance between the CE drops, and the detection circuit outputs a high level, which is shaped by the LM393 voltage comparator and the 74LSl4 Schmitt trigger and sent to the microcontroller for control.
This system designs two phototransistors, which are placed on the left and right sides of the front of the electric vehicle to control the direction of travel of the electric vehicle. When the left phototransistor is illuminated, the microcontroller controls the steering motor to turn left; when the right phototransistor is illuminated, the microcontroller controls the steering motor to turn right; when both the left and right phototransistors are illuminated, the microcontroller controls the vehicle to go straight. See Figure 2 for the direction detection circuit of the electric vehicle.

b.JPG
2.2 Driving direction detection circuit
A pair of infrared emitting and receiving sensors are configured using the reflection receiving principle. The circuit includes an infrared light emitting diode, an infrared photosensitive transistor and its pull-up resistor. The infrared light emitting diode emits infrared rays of a certain intensity to illuminate the object, and the infrared photosensitive transistor is turned on after receiving the reflected infrared rays, and sends out a level jump signal. [page]

This set of infrared photoelectric sensors is fixed on the front edge of the chassis, close to the ground. During normal driving, the transmitting tube emits infrared light to illuminate the ground. The light is reflected by the white paper and received by the receiving tube, and a high-level signal is output; when the electric car passes through the black line, the light emitted by the transmitting end is absorbed by the black line, and the receiving end cannot receive the reflected light. The sensor outputs a low-level signal and sends it to the 80C51 microcontroller for processing to determine which pre-compiled program is executed to control the driving state of the toy car. When moving forward, the driving wheel DC motor rotates forward. When entering the deceleration zone, the microcontroller controls the PWM frequency conversion speed regulation, and the duty cycle of the pulse width modulation waveform is changed by software to achieve speed regulation. Finally, the car stops by reverse braking.
2.3 Forward and arrival control
The core of the forward and reverse control circuit is the bridge circuit and relay. There are two sets of switches on the bridge, one set is normally closed and the other set is normally open; one end of the bridge is connected to the power supply and the other end is connected to a transistor. When the transistor is turned on, the bridge is grounded through the transistor, and current flows through the motor armature; when the transistor is turned off, the bridge floats. No current flows through the motor armature. The system supplies power to the steering motor through the output end of the bridge. By controlling the opening and closing of the relay, the motor can be controlled to control the on and off and the speed direction, thereby achieving the purpose of controlling the forward and reverse movement of the toy car and realizing the deviation correction function of the follow-up control system. Figure 3 shows the forward and reverse control circuit.

c.JPG


2.4 Driving distance detection
Since infrared detection has the advantages of fast response speed, high positioning accuracy, strong reliability and unmatched advantages over visible light sensors, an infrared photoelectric encoder speed measurement solution is adopted. Figure 4 shows the driving distance detection circuit.

d.JPG

3 Display circuit
In this design, two 4-bit eight-segment digital tubes gem4561ae are used as displays, and the new chip EM78P458 is used as the display driver. It is controlled by the parallel port of the microcontroller. One digital display circuit uses 4 port lines. Using a dedicated driver chip to control can reduce the CPU utilization time, and the microcontroller will have more time to complete other functions.

4 Power supply design
The power supply of this design is the vehicle power supply. To ensure the reliability of the power supply, the power supply of the microcontroller system and the power servo system uses a high-power, large-capacity battery, while the working power supply of the sensor uses a small and lightweight dry battery.

[page]

5 System Schematic Diagram
The smart electric vehicle uses 80C51 single-chip microcomputer for intelligent control. The car is manually started and reset at the beginning. When it passes the specified starting black line, it is detected by the ultrasonic sensor and infrared photoelectric sensor. The single-chip microcomputer controls the car to start counting, displaying, avoiding obstacles, and adjusting speed. The automatic obstacle avoidance function of the system is realized by the single-chip microcomputer through the ultrasonic sensor's front detection and the infrared photoelectric sensor's left and right detection. During the driving process of the electric vehicle, the bipolar H-type PWM pulse width modulation technology is used to improve the static and dynamic performance of the system. The dynamic common cathode is used to display the driving time and mileage. The system schematic diagram is shown in Figure 5.

e.JPG

6 System software design
When designing a microcomputer control system, in addition to the system hardware design, a lot of work is how to design the application program according to the actual needs of each production object. Therefore, software design occupies an important position in the design of microcomputer control systems. Figure 6 shows a flow chart.

f.JPG

7 Conclusion
This design uses the 80C51 microcontroller as the control core, mainly because the microcontroller has good stability. Other series of microcontrollers can also be used. The main technologies used are:
(1) Controlling the speed of the car through programming;
(2) Effective application of sensors;
(3) The use of new display chips.

Reference address:Design of intelligent car based on 51 single chip microcomputer

Previous article:Design and simulation of electronic password lock based on 51 single chip microcomputer based on C language
Next article:Design of Ultrasonic Distance Measurement System Based on 51 Single Chip Microcomputer

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号