他们逼我做卧底

2021 Question I-Energy storage car with power generation function

 
Overview
Describe
the 2021I electronic competition question: Energy storage car with power generation function.
The competition and
0ElFNK36Hd8oFMmPI1AP9stePOr2Oa36wtrB6Cga.pngthe basic requirements for analysis are not difficult. Only the third question displays the distance in real time and calculates the distance through the number of pulses from the motor encoder.
T6GTjflrEMgJN8OAtSbl3nDxzSww5SucfazvCAec.pngThe performance part is a bit of a test of the player's overall strength, not only to find a way to charge enough within a specified distance, but also to consider the power consumption of the microcontroller and accurate tracking and detection of coins. Here we chose MSP-EXP430F5529LP as the main control.
Project Introduction
This project uses MSP-EXP430F5529LP as the core to build an energy storage car system with power generation function. The supercapacitor is used as the only energy storage element of the car, and the motor of the car is manually pushed to generate electricity, and the mechanical energy is converted into electrical energy and stored in the supercapacitor. The step-down module is used to power the main control of the microcontroller and drive the infrared photoelectric tracking module, metal detection module, motor drive and other circuits to complete functions such as car tracking, distance display, and metal detection.
This system has three measurement modes: linear distance measurement mode, tracking mode, and metal detection mode. It can use the supercapacitor to store electricity after each manual charging of the car to complete the automatic travel display distance of the car, tracking of a 60cm diameter circular car, and designated Circular tracking line coin number detection and other functions until the car's battery is exhausted.
The design of the energy storage unit based on supercapacitor was completed. The design of the main control circuit of a low-power energy storage car based on the embedded main control is completed. The design of a transistor-based motor drive circuit with low power consumption and low operating voltage is completed. Completed the overall design requirements.
System block diagram
7%_CV~G%XSLP%~9}RVJIY6O.png
 

The capacitor storage module uses a farad capacitor module to directly connect a 12V DC motor to realize motor generation and energy storage.
System analysis and calculation:
According to the competition requirements, the car must be able to walk in a straight line and track. When the car walks in a straight line, the speed of the left and right wheels must be synchronized. When external interference occurs, the left and right wheels will move at different speeds. When performing circular tracking, the left and right wheels of the car need to be controlled at different speeds. According to the characteristics of the supercapacitor, the power supply voltage of the car will slowly decrease during the tracking process, so the wheel speed needs to be controlled in a closed loop. Therefore, when the system controls the wheel speed, it uses a digital PID controller to dynamically regulate the wheel speed deviation based on the speed measured by the encoding module of the left and right drive motors of the car.
Digital PID can be divided into positional PID and incremental PID. The incremental PID controller outputs this control increment, which is only related to the latest k sampling values. There is no need to accumulate all previous states, and the calculation is fast. , and can realize the function of positional PID through program code. Based on the control requirements of the car's tracking and the characteristics of the PID controller, the system uses the incremental PID control algorithm as the basic controller. The function expression is as follows:
K06XE~3RO71O)GJ{WRFBGCYI9R.pngG4D)L9M(`EM5HZWVVH7LL.pngAW4F71890SJJL}_Y%IA6L.pngG4D)L9M(G4O7B.pngIn order to avoid vehicle body vibration caused by excessive wheel adjustment, a control dead zone is added to the PID controller to form an incremental PID controller with a dead zone. The corresponding control formula is as follows:

 


 

XA~%8)B~3HT57EW~R@MYZ~D.png
 


 

In the formula , Debugging dead zone      B7(FTX0W_TWQN2L21@(Y7.pngschematic design
We designed the charging circuit through Lichuang EDA. We used 12 10uf2.7V farad capacitors to charge in series, and used the single conductivity of the diode to prevent the motor from discharging when charging. According to the requirements of the topic, combined with the solution we have considered, we need to have two different power supply voltages. 3.3v is supplied to the microcontroller for work, and we use MD7333H linear LDO to step down. 5V We use the existing modules in the laboratory to increase the voltage to 5v to power metal detection.
6`H}BITR@{SATO@FB)V23D.png
 

In the motor drive part, since the motor only needs to move in one direction, it is directly driven by a transistor. The circuit is simple and it can also save the power of the capacitor and avoid the static consumption of the H-bridge.
LBOVGDF}IN0{8{6$$@ME5BW.png
 

The tracking circuit, 0.96OLED, motor coding, and metal detection circuit we use all have a triode connected to our microcontroller. We use the triode as a switch to turn off the power of the module when our module is not needed to save capacitance. of power.
image.pngThe PCB design circuit
is drawn based on the above circuit and the corresponding PCB
}Y50SJ6CQ~5LS@LFFU4L.pngphysical display shows
B1F986F034D680272859E094A103F43B.png
 


 

DC63AC71CFCEEFB48B30C64B2107A48E.pnga one-meter wooden board being cycled and charged five times.
For the measurement of straight-line distance, the car is charged and started from a standstill with one click, and the straight-line distance between the starting point and the stopping point is measured.
After the electricity is discharged, charge it five times on a one-meter wooden board. Place three coins under the tracking line of the white advertising paper. After charging, place them on the circular tracking line of the white advertising paper. Start tracking with one click. After the car stops, use a string to measure the distance from the starting point to the stopping point and compare it with a tape measure to read the value.
Test results After
five cycles of charging a one-meter wooden board, we can reach 11.65V, with a straight-line distance of 6.87m. In order to save power, the screen used is very small and the data displayed in the video may not be clearly visible. The picture below is recorded by our additional storage function.
51E189519967B654E3226D2FDC9EC34D.pngTracing 3 coins is correct, the distance is 3.85m.
9CA9122716AC17FEC140030CEC8E0A6B.pngThe test video is in the attachment.
The program is designed
to charge. When the microcontroller starts to work, the power supply of the OLED, encoder and tracking board is immediately turned off through the transistor (the default is turned off), and then enters a high-level low-power consumption mode. Only the external interrupt generated by the start button can Wake up the microcontroller to exit low-power mode and power on the corresponding peripherals. The specific codes
of the linear program flow chart and

 

tracking program flow chart
E$WD`SR8~X4F9UZDKB08K1.png
 

are in the attachment MSP430_CAR.rar. In
summary
, I benefited a lot from this e-sports competition. During the competition, the coordination and tacit understanding between teammates were fully demonstrated. They must be calm and steady in order to be strong. ~~~~
Competition questions and analysis

 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-07-04 13:54:01

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

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号