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.
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.
Previous article:Noise Countermeasure Basics (I): What is an EMI Filter?
Next article:The relationship between digital amplifier sound quality and carrier frequency
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- New breakthrough! Ultra-fast memory accelerates Intel Xeon 6-core processors
- New breakthrough! Ultra-fast memory accelerates Intel Xeon 6-core processors
- Consolidating vRAN sites onto a single server helps operators reduce total cost of ownership
- Consolidating vRAN sites onto a single server helps operators reduce total cost of ownership
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- STM32H743 development board transplants micropython and expands 32M SQPI flash and 32M SDRAM
- How big is our misunderstanding of green oil? Let’s analyze it with real cases!
- Application and design overview of power line communication analog front end AFE031
- How much do you know about impedance matching?
- DLP Dynamic Floor Projection Technology for Automotive Exterior Lighting
- 16 PCB welding defects! What are their hazards?
- I saw a post next door and it seems okay since I work there every day.
- EEWORLD University ---- PCB Design Video - Learn PADS PCB Design in 1 Day
- 【NUCLEO-L552ZE Review】-3: Arduino vs. Mbed?
- What is the reason why IIC fails when the MSP430FR2311 power supply voltage rises to 3.5V? How to solve it?