The invention discloses a two-wheeled self-balancing vehicle, and relates to the technical scheme of a two-wheeled self-balancing vehicle based on an STM32 microcontroller. A traditional two-wheel self-balancing vehicle mechanical structure is adopted, a mainstream microcontroller is utilized, a vehicle body posture detection circuit with MPU6050 as the core is designed, meanwhile, a software program with a PID controller as the core is designed, posture information of a vehicle body can be sensed in real time and intelligently processed, motor rotation is adjusted and controlled according to the processing result, and vehicle body self-balancing is achieved. The balance car hardware part comprises a mechanical structure, a main control circuit, an attitude acquisition module, a motor driving module, a power supply circuit and a motor, the balance car software part comprises a system flow control program, a sensor data acquisition, processing and analysis program and an attitude control program, meanwhile, a JLINK interface is used, a serial port circuit is expanded, modulation is convenient, and the balance car software part can be applied to a balance car. The attitude data of the trolley can be conveniently observed. The reliability and effectiveness of the two-wheeled self-balancing vehicle are verified through prototype testing.
本发明公开了一种两轮自平衡车,是一种基于STM32微控器的两轮自平衡车技术方案。采用传统的两轮自平衡车机械结构,利用主流的微型控制器,设计了以MPU6050为核心的车体姿态检测电路,同时设计了以PID控制器为核心的软件程序,能够实时感知车体的姿态信息并进行智能处理,根据处理结果调整控制电机转动,实现车体自平衡。平衡车硬件部分包括机械结构、主控电路、姿态采集模块、电机驱动模块、电源电路和电机五部分,平衡车软件部分包括系统流程控制和传感器数据的采集处理分析及姿态控制程序,同时,使用了JLINK接口,扩展了串口电路且便于调制,方便观测小车的姿态数据。通过样机测试验证了两轮自平衡车的可靠性和有效性。
Two-wheeled self-balancing vehicle
一种两轮自平衡车
2024-02-02
Patent
Electronic Resource
Chinese