I am very happy to participate in this Liangshan School training camp. This is also the first microcontroller I have come into contact with. As a newbie, the first thing I want to do is of course a car (big guys, please don't come, I'm afraid of embarrassment).
When I first started making a car, I had no idea where to start, so I went to station B to look for videos and codes. But after looking around, I found that the code for 51 was very different from the code for gd32, and then I went to look for stm32 cars. Code, found that there are still differences. At the beginning, I tried to write the code for the gd32 car based on the 51 and stm32 programs. I found that many aspects were unworkable. Then I went to the official website to find the code for the gd32 car, and then debugged the car based on the code on the official website.
I have compiled two generations of versions of my car (both are about the appearance of the build, but the code has not been changed).


For the first version, I chose to hand-weld a Liangshan School expansion board, and then chose to use two L298N pieces for the motor drive. The first piece was used to control the left front wheel and left rear wheel, and the second piece was used to control the right front wheel. and the right rear wheel, using three 18650 lithium batteries (taken out of the power bank, the voltage of each battery should be controlled at 3.7V~4.2V). The digital tube module is directly connected in parallel to the battery box to detect the battery voltage ( Everyone must remember to always pay attention to the voltage. There was a battery that was over-discharged before, and the senior in the laboratory told me about it (laughing)), and then connect the switch in series to the red line of the battery box (it is convenient to cut off the power. It is very easy to use in my personal test. It’s much more comfortable than picking at the battery all the time in the beginning). But there are disadvantages to this. First, my initial shelf was built with two layers of acrylic boards, but there were very few things on them. The acrylic on the front part of the car was knocked off (which means my layout is unreasonable), and the battery box is placed on the bottom layer, which is very difficult to pull out when the battery needs to be charged; secondly, let’s talk about my hand welding For this Liangshan School expansion board, I welded the pin holder, pin header, and enameled wire in order. It took about three hours to weld the entire board. At the same time, I also made three measurements with a multimeter: the first measurement was done directly after the welding was completed. When I measured it, I remembered that three to four wires were missing from the welding, and after the repair welding, five more wires were missing, so I completed the expansion board by checking and repairing at the same time. The second measurement was about a week later. After powering on, one wheel of the car kept spinning, and then I went to check the flying wires below, and there were five or six wires that fell off. The third time I went home, because the school's Innovation Cup competition was over, and I packed my things. I dismantled the car and put the expansion board in the box without any processing. When I got home, I saw that two or three wires were missing. I was so upset that I started assembling the second version.

There are two differences between the second version and the first version. The first is that an acrylic plate has been removed, the overall structure of the car has been lowered by one layer, and the battery box has been glued to the ground side (I took a two-cell battery from the laboratory). box, but after powering on, the digital tube module only showed the voltage of one cell. At first I thought one of the batteries was installed backwards, so I installed it backwards and then turned on the switch... Goodbye battery box and battery); The second is to replace the expansion board of the Liangshan School that was hand-soldered before with a PCB board drawn by a group friend (I saw it in the group the day after I finished hand-soldering, and it was almost It was so uncomfortable that I immediately placed the order, but it smelled really good when it was used on the car after welding.) Overall, it was the same as the previous hand-soldered expansion board, only the pin header and pin holder were welded.
Finally, I still have an unsolved problem, which is that every time I turn on the power, the front wheel will spin a few times quickly and then stop. I hope the experts can help solve it.
There is no PCB in this project (I have just started to learn microcontrollers and can’t draw yet). I hope friends with strong hands-on skills can try it, hehehe.