张小哥

#FirstLichuangcompetition# Modular MINI two-wheeled balancing car

 
Overview

1. Introduction to the work Picture of the whole machine:   What is the purpose of this electronic production? What functions can be achieved? Purpose: Used to learn the basic knowledge related to the use of balancing cars (I2C, PWM, filtering, attitude calculation, PID algorithm) Functions implemented: Obtain the attitude of the car through the sensor and use the control algorithm to control the balance of the car so that the car can stand upright without falling over. Want to make this piece? Various self-balancing scooters are very popular nowadays, and people can be seen riding them everywhere, so I wanted to explore the principles behind them, and thus came up with the idea of ​​making this work. What changes, benefits or progress can this work bring to users or society? First of all, from a technical perspective, by developing this work, users can learn many aspects of knowledge, which involves physics, data protocols, data processing, control algorithms and many other aspects of knowledge. Secondly, in terms of life, this work can bring a lot of fun to the user's life. Watching the car standing awkwardly, the feeling is still very wonderful. That is: practicality, where do you think it is reflected? In terms of practicality, this car is relatively limited. Of course, users can improve the accuracy by upgrading the algorithm, and can even use it in real manned balancing vehicles.

2 **. Highlights of the work** What new technologies or innovations did you use in the design, implementation details or ideas of this work? The particularly good performance and parameter indicators are also a highlight. The highlights are summarized in two: 1. The PCB area is very small (2.5cm 5.0cm) 2. The device can be disassembled, which is convenient for development, debugging and learning_Unlike the balancing cars made by ordinary netizens on the Internet, the biggest feature of this balancing car is that it is very compact as a whole. Small, the PCB area is only 2.5cm_5.0cm. This may not be as big as a motor drive board of the balancing car made by netizens, but it has achieved the same function. I used as small components as possible when selecting components, which greatly reduced the PCB area.

3 **, System Architecture Diagram**  

4 **. Schematic diagram** Attach the picture or source file of the schematic diagram (we officially recommend that you upload the source file as much as possible). If it is a picture, please ensure that the picture is clear and legible. In addition, please use words to briefly explain the implementation principle of the work and the working process of the system.

5 **、Bill of materials (BOM list)** RTU BBear Revised: Saturday, October 22, 2016 Revision: v1.0 Bill Of Materials October 27,2016 20:19:27 Page1 Item Quantity Reference Part __________________________________________________  1 5 C1,C2 ,C3,C4,C8 0.1UF 2 1 C5 1UF 3 2 C6,C7 22PF 4 1 C9 10UF 5 2 LED2,C10 POWER 6 1 K1 KEY-4 7 1 LED1 HEARTLED 8 1 L1 LM1117 9 3 R1,R2,R3 10K 10 2 R4,R5 1K 11 1 S1 MPU6050 12 1 U1 STM32F103C8T6 13 1 U2 BOOT0 14 1 U3 CON4 15 1 U4 switch 16 1 U5 BOOT1 17 1 U6 SWD 18 3 U7,U8,U11 CON2 19 1 U9 MOTOR-A 20 2 U10,U13 MOTOR0805 21 1 U12 MOTOR-B 22 1 X1 XTAL

Key chips: 1 STM32F103C8T6 http://www.szlcsc.com/product/details_9243.html 2 MPU6050 sensor http://www.szlcsc.com/product/details_24852.html 6 **, PCB physical picture** PCB 3D* ***Picture PCB actual picture

7 **. Description of the software part** Software process: The software part is divided into two parts: 1. Data part The data part revolves around the MPU6050 sensor. Divided into data acquisition, filtering, and data processing 1.1 Data acquisition STM32 communicates with MPU6050 through I2C, which involves the implementation of the basic I2C communication protocol. Based on I2C, it involves the setting of various parameters of the MPU6050, such as the range of acceleration, etc. The data obtained by different settings will be different and the accuracy will be different. 1.2 Filtering After obtaining the original data, it is simply converted into an angle. However, this data is inaccurate, so filtering is required. Since the car is relatively simple, complementary filtering is used for filtering. In this way, more accurate data can be obtained. 1.3 Data processing Before filtering, the acquired raw data needs to be processed. This requires a little physical knowledge. The starting point is the principle that acceleration and the direction of force are consistent. Another one is the integral operation of angular velocity. This requires the use of a timer. To be done. 2 Control part The control part is mainly divided into PID algorithm and motor drive 2.1 PID algorithm. The PID algorithm is the interaction of the three variables of proportion, integral and differential and is finally output to the controller. Here we only need P. 2.2 Motor drive The main design knowledge of motor drive is the control of PWM wave. STM32 has related library operations. You only need to set it as required. Then input the results generated by the PID algorithm as parameters here to achieve control. If your work involves software or firmware, please introduce it. For example, list the software flow chart, routines of exciting or key parts, source code, or all source code (if you want to open source it).

8 **. Work demonstration** recorded a short video: it made everyone laugh~~~

9 **. Summary** The experience of this production can be summarized in four words - easier said than done. It turns out that when I looked at the balancing cars made by others, I didn’t feel like they were anything special. But when I did it myself, I realized it was not that simple. Only after I have done it myself can I be qualified to judge others. less talking, more working. Finally, I will share all the information about my own modular balancing car with everyone. The following is the git address: https://github.com/bigbearishappy/BBear_balance_car.git . I will also maintain it in the future to achieve better results.

For more project details, please see the link: http://club.szlcsc.com/article/details_741_1.html

This project is owned by Lichuang Community " Big Bear is Happy Now "
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-19 01:31:29
  • NIOS II + Linux
  • I am a novice, please tell me about the switch circuit
  • Help!
  • Wire harness disc abnormal noise test
  • Born only for uC, uS growth process 11 (personal public function library released!)
  • Question + How to learn and use analog and digital electronics better!

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号