cywJWF

Balance car with TB6612 drive

 
Overview
This project is a balance car built using the Liangshanpai development board. I integrated all the necessary modules onto one board, plus a TB6612 driver. This driver was developed after researching a module purchased by someone else, and it has been verified to be usable. The use of the hole in the disc works without any problems. This project uses a 0.96-inch screen, an ultrasonic module, a self-made driver module, a buzzer, a Bluetooth module, an MPU6050 module, and grayscale to achieve line tracking and remote control functions.
  Next, I'll explain the modules I used, my learning methods, and the process. First, for the 0.96-inch screen, you mainly need to learn IIC, and then briefly learn interface graphic design.
The MPU6050 is used for balance, reading the accelerometer measurements (raw values) for the X/Y/Z axes, and it also
transmits data via IIC.
Then there's the ultrasonic module for distance measurement and grayscale line tracking. I didn't include grayscale because I didn't have it.
Because long-distance control is required, Bluetooth control is necessary. The HC-05 Bluetooth module is a master-slave integrated module, connecting via UART and MCU. The car is controlled via a mobile phone. Note that it needs to be powered on at 3.3V, and RXD and TXD need to be cross-connected with a baud rate of 38400.
Regarding the learning and application of PID, we first need to know its uses. Secondly, the uses of PID are: 1. Basic requirements for automatic control systems: stability, accuracy, and speed: Stability (P and I decrease system stability, D increases system stability): In a balanced state, after a disturbance, the controlled variable can reach a certain stable state after a period of time; Accuracy (P and I increase steady-state accuracy, D has no effect): The steady-state error of the system when it is in a steady state; Speed ​​(P and D increase response speed, I decrease response speed): The system's requirements for dynamic response. Generally measured by the length of the transition time. 2. Stability: When the system is in a balanced state, after a disturbance, if the system output can recover to the original steady-state value, then the system is stable; otherwise, the system is unstable. 3. Dynamic Characteristics (Transient Characteristics, caused by system inertia): The dynamic response curve of the system output when a given quantity is suddenly applied (or the load changes suddenly). This includes delay time, rise time, peak time, settling time, overshoot, and number of oscillations. Typically: a. Rise time and peak time are used to evaluate the system's response speed; b. Overshoot is used to evaluate the system's damping degree; c. Settling time reflects both response speed and damping degree.
 
 
Next is the TB6612 driver module, which uses a 12V input and has outputs of 12V, 5V, and 3.3V. It also features over-temperature protection, which is truly impressive. This system includes
a brushless motor drive circuit

with LED power indicator
and an OLED display connected via IIC and MCU, primarily displaying PID parameters. It also includes
a BAT (Battery Unit) 18650 battery,
an MCU (GD32F470)
, and a Bluetooth module (HC-05 master-slave integrated module connected via UART and MCU). The system allows control of the vehicle's
buttons, power switch, and PID adjustment via a mobile phone
. A custom-made motor drive board (TB6612FNG) drives two motors (
*2) with encoders and a top
gyroscope (MPU6050)

. Hope this is helpful.
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-27 01:15:57

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号