Electronic production: digital circuit intelligent tracking car

Publisher:colcheryLatest update time:2012-10-17 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

As quality-oriented education is increasingly valued, many schools have chosen the making of smart cars as their first choice. Smart cars are lively and interesting, and they also involve knowledge of many disciplines such as mechanical structure, electronic basics, sensor principles, automatic control and even single-chip microcomputer programming. Students can greatly improve their ability to solve practical problems through hands-on practice. Moreover, smart cars are also a very good hardware platform. As long as some control circuits are added, they can complete topics such as tracking cars, fire-fighting robots, football robots, obstacle avoidance robots, and remote-controlled cars.

There is a 16mm wide black track on the white field. Our tracking car can automatically drive along the black track. It is amazing that the car can drive automatically no matter how curved the track is! As we all know, the reflectivity is different when the light source shines on white objects and black objects. We use a red LED as the light source here. The light is reflected from the ground to the photoresistor. By detecting the change in the resistance of the photoresistor, we can determine whether the car is driving on the white area. If it is detected that it is a black track, it means that the car is running off the track. The motor on this side will slow down or even stop, and the green LED on this side will go out, driving the car to drive in the opposite direction, so that the car can always drive along the track.

Product 1 Tracking car with digital circuit

In line with the principle of starting from the simple to the complex, we first make an intelligent tracking car controlled by a digital circuit. During the assembly process, we can not only become familiar with the mechanical principles but also gradually learn related electronic knowledge such as photoelectric sensors, voltage comparators, and motor drive circuits.

Let's first get familiar with the three main components:

Photoresistor devices

This is the photoresistor, which can detect the intensity of external light. The stronger the external light, the smaller the resistance of the photoresistor, and the weaker the external light, the larger the resistance. When the red LED light is projected onto the white area and the black runway, the resistance of the photoresistor will be significantly different due to the different reflectivity, which is convenient for subsequent circuit control.

LM393 Comparator IC

LM393 is a dual voltage comparator integrated circuit, which consists of two independent precision voltage comparators. Its function is to compare two input voltages and change the output voltage according to the high and low input voltages. The output has two states: close to open circuit or pull-down close to low level. LM393 uses collector open circuit output, so a pull-up resistor must be added to output a high level.

DC motor with reduction gear

If the DC motor drives the car, it must be decelerated. Otherwise, if the speed is too high, the car will run too fast and cannot be controlled in time. Moreover, if it is not decelerated, the torque is too small or even cannot run. This kind of motor we specially customized has integrated reduction gears, which greatly reduces the difficulty of production and is very suitable for our use.

First, let's get familiar with the working principle diagram of the whole machine. LM393 compares the size of the two photoresistors at any time. When an imbalance occurs (for example, one side presses the black runway), it immediately controls one side of the motor to stop and the other side of the motor to accelerate, so that the car corrects its direction and returns to the correct direction. The whole process is a closed-loop control, so it can be controlled quickly and sensitively.

Assembly steps:

Step 1: Basic welding of the circuit part

The circuit welding part is relatively simple. The welding order follows the principle of component height from low to high. First, weld 8 resistors. When welding, be sure to use a multimeter to confirm whether the resistance value is correct. When welding polar components such as transistors, green indicator lights, and electrolytic capacitors, be sure to distinguish the polarity and try to refer to the component direction in our picture for welding. When welding capacitors, the short pin is the negative pole and insert it into the shadowed side on the PCB silk screen. When welding the green LED, pay attention to the long pin is the positive pole, and the welding time should not be too long, otherwise it is easy to damage the soldering. D4 D5 R13 R14 can be temporarily unwelded, and the integrated circuit chip can be unplugged. After the initial welding is completed, please be sure to check carefully to prevent carelessness.

Step 2: Mechanical Assembly

Insert the universal wheel screw into the PCB hole, and screw in the universal wheel nut and universal wheel. The battery box is attached to the PCB with double-sided tape, and the lead wires are soldered to the PCB through the reserved holes of the PCB. The red wire is connected to the 3V positive power supply, the yellow wire is connected to the ground, and the excess lead wires can be used for motor connection.

The mechanical part can be assembled by assembling the wheels first. The wheels are composed of three black acrylic wheels. Please peel off the protective film before assembly. The center hole of the innermost wheel is a long circular hole, the diameter of the middle wheel is relatively small, and the center hole of the outer wheel is circular. Use two screws and nuts to fix the three wheels, and use black self-tapping screws to fix them on the motor shaft. Finally, put the silicone tire on the wheel. Connect the motor leads with leads, and finally stick the wheel assembly to the designated position of the PCB with adhesive tape. Pay attention to keep enough gap between the wheel and the edge of the PCB, and solder the motor leads to the PCB. Pay attention to leaving the leads longer to prevent the motor from rotating in the wrong direction and facilitate the replacement of the lead sequence.

Step 3: Install the photoelectric circuit

The photoresistor and LED (pay attention to polarity) are installed on the PCB in reverse order, with a distance of about 5 mm from the ground, and the distance between the photoresistor and the LED is also about 5 mm. Finally, you can power on the test.

Step 4: Vehicle debugging

Put 2 AA batteries into the battery box and turn the switch to the "ON" position. The correct reverse direction of the car is to drive in the direction of the universal wheel. If you press the left photoresistor, the right wheel of the car should rotate. Press the right photoresistor and the left wheel of the car should rotate. If the car moves backward, you can swap the connections of the two motors at the same time. If one side is normal and the other side is moving backward, just swap the connections of the motor on the backward side.

Note:

On the back of the assembly instructions is a simple track for the tracking car. Customers can also directly use 1.5-2.0 cm black electrical tape to stick it directly on the ground to design a complex track, which will be more fun.

Reference address:Electronic production: digital circuit intelligent tracking car

Previous article:Noise Countermeasure Basics (I): What is an EMI Filter?
Next article:The relationship between digital amplifier sound quality and carrier frequency

Latest Analog Electronics Articles
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号