###### Smart car project description
The smart car uses two lithium batteries (7.4V), which are reduced to 5V through a step-down chip to power the microcontroller system. This system includes the following circuit modules: Lichuang·Liangshanpai core board and The LED lights, button circuit, obstacle avoidance circuit, tracking circuit, ADC voltage acquisition circuit, Bluetooth remote control circuit (wireless remote control function), buzzer, and motor drive circuit on the smart car expansion board.
1. Scheme design
The smart car uses two lithium batteries (7.4V), which are reduced to 5V through a step-down chip to power the microcontroller system. This system includes the following circuit modules: Lichuang·Liangshanpai core board and smart car expansion board LED car lights, button circuit, obstacle avoidance circuit, tracking circuit, ADC voltage collection circuit, Bluetooth remote control circuit (wireless remote control function), buzzer, and motor drive circuit.
2. Hardware introduction
2.1 Power supply
BAT is two lithium batteries (7.4v) connected in series.
D1 is a Schottky diode, which prevents reverse connection.
SW3 is a sliding switch that controls power on and off.
U6 is a linear voltage regulator that reduces the input voltage to 5V to power microcontrollers and other devices.
C1 and C2 are bypass capacitors, which play a filtering role.
LED7 is the power indicator light, which lights up in red after power is supplied.
![Screenshot 2023-02-26 231945.png]

2.2 Buzzer
Q1 is PNP, collector-emitter saturation voltage (VCE(sat)@Ic,Ib): 500mV
buzzer is driven by low level, BUZZER When the port is at low level, the collector-emitter voltage is about 0.83V, and the buzzer sounds; when the BUZZER port is at high level, the collector-emitter voltage is about 0.28V, and the buzzer is off.
![Screenshot 2023-02-26 232037.png]

2.3 Motor drive circuit
The current directly output by the microcontroller is too small to drive the car. The motor circuit uses the RZ7889 driver chip, which has simple peripheral circuits. Cooperating with the PWM output of the microcontroller, the motor speed can be controlled.
![1.jpg]

![2.png]

![Screenshot 2023-02-26 232121.png]

2.4LED
LED_L is the left car light, LED_R is the right car light
LED_M, LED_S is the button indicator
![Screenshot 2023 -02-26 232200.png]

2.5 buttons
need to configure the GPIO of these two buttons into pull-down mode, and they also need to debounce these two buttons
! [Screenshot 2023-02-26 232230.png]

2.6 Bluetooth
is used for mobile phones Bluetooth remote control
! [Screenshot 2023-02-26 232300.png]

2.7 ultrasonic wave
is used for obstacle avoidance
! [Screenshot 2023-02-26 232311.png]

3. Physical picture
! [IMG20230226214042.jpg]