Complete the balance car project in one week with zero foundation

Recently, I saw a lot of friends leave messages in the background: balance car. Therefore, some resources will be released in this issue, and I hope my friends will avoid detours. For undergraduates in the Department of Electronics, the balance car based on STM32 can be regarded as the best practice project. You may think that it is difficult to make a balance car, but it is not difficult. Everyone thinks that the difficulty is nothing more than a few moments that stump everyone.

1. The program is difficult: STM32 single-chip microcomputer is not proficient enough to play, and PID algorithm has not been learned.
2. High cost: There are a lot of materials needed to make a small car, and it is also very expensive, and it takes several hundred yuan to make it.
3. No time: long learning cycle, having classes every day, and little time.

It is nothing more than these three points, of which the difficulty of the procedure is the most important. In fact, it is not difficult. The difficulty is that you did not find the right person, nor did you find the correct information and great tutorials. So here I will find good information for everyone. Follow the steps below. You can get yours in one week. The balance car stands up.

1. Prepare components

Everyone's first reaction to making a balance car is the information of the balance car home, because his family specializes in making a car, the information is very complete, and the tutorial is relatively high-quality. I personally think that his family's information is not very friendly to beginners. In addition there is a balance of the car is the public number: author of "big fish electronic": the Zhangqiao Long, a master's degree just graduated from university teacher. I think the board of the big fish family's balance car is the most beautiful, especially the STM32F103C8T6 core board is very beautiful, of course, the price is also a few dollars more than the most common blue core board. In addition, the code and information of his home are also open source, and you can follow the official account to get it for free. Well, not much nonsense, the required components are as follows: the

following is welded with a hole plate, the Bluetooth module, ultrasonic function is the mobile phone Bluetooth remote control car and ultrasonic obstacle avoidance, which are not needed in the early stage.

2. Code resources

Beginners are not recommended to build wheels and write code by themselves. It is recommended to refer to the program of "Big Fish Electronics" or "Balance Car Home". I put the codes and information of these two companies at the end of the article, and you can receive them for free if you reply to the keywords in the background:


3. Video resources

To make a balance car is definitely to watch some video resources, mainly about "PID video tutorial", "MPU6050 porting video", "hand-written balance car code"

3.1 PID video,

Recommend here: Teacher Xu of Lingyu Technology.

This PID video is recognized as the best, and anyone who has never learned a single-chip computer can understand it. It is recommended to make a balance car or a small four-axis or a friend who uses PID control to check it out.

3.2 MPU6050 video

Recommended here: Xi’an Xiaoma’s mpu6050 video explains that Xiaoma

is a small four-axis. In addition, the principle diagram and code of the small four-axis are open source. If you are interested in four-axis or want to make a four-axis small for graduation design Partners can go and have a look.

3.3 Handwritten balance trolley code

Station B is recommended here: Walking in the World ㅍ_ㅍ

The code explained in the video is based on: "Big Fish Robot"'s balance car code. It is completely hand-in-hand to teach you to write the balance car code. The editor also unintentionally sees it and recommends it to everyone , Generate power for love.

3. Hardware resources

The above has given all the resources for making a balance car. For the hardware part, you can use the hole board or buy the main control board from Taobao. It is recommended that you do DIY. The layout can refer to the editor or you can play by yourself.

Of course, if there are friends who draw PCBs to themselves, there is no problem. The editor also provides PCB schematic diagrams for everyone. There is a download method at the end of the article.

Finally, take a look at the video display:

The learning of single-chip microcomputer requires actual combat. Of course, finding the correct information videos and high-quality public accounts is the fastest way for us to learn.
It is not difficult to balance the trolley. I hope your trolley will stand up soon!

In addition, for the 8th anniversary of Baidu Netdisk, SVIP annual membership only needs 1? Yuan, once a year, the editor only spent 68 yuan on SVIP last year. Go ahead and activate it!

Guess you like

Origin blog.csdn.net/qq_39400113/article/details/109893452