SZOvgiI8

balance_car_esp32_simplefoc

 
Overview

Preface

I graduated with a bachelor's degree in automation. During this period, I learned various motor motion control principles and automatic control principles, but I only took exams and did not study the principles. Recently I came into contact with simplefoc, an open source brushless motor driver library based on Arduino, and I wanted to take this opportunity to apply what I learned in undergraduate studies into practice, so I came up with this small project, a balancing car based on brushless motor FOC .
Compared with brush motors used in ordinary cars, brushless motors have greater torque under the same volume. When driving a car, brushless motors can be directly driven, unlike brushed motors that require a reducer to meet torque requirements, and the response speed is faster. quick. Using a brushless motor can make the car more compact and beautiful.
The drive circuit and algorithm of the brushless motor are more complex. When the brushless motor works at low speed, the field-oriented control algorithm FOC (Field-oriented control) is used at the algorithm level to accurately control the motor's position, speed and even current, which is torque. , you can make a lot of fun things from this. FOC-based brushless motors are widely used in fields such as robot joints and camera gimbal motor control.

The main function

  • Onboard dual-channel brushless motor driver and current loop chip, with a maximum current of 2.5A per channel, can drive two gimbal brushless motors and control the current to
  • The car can be self-balancing, and can control forward, backward, and steering through Bluetooth connection on the mobile phone app.
  • Equipped with dual rows of RGB, each row has a total of 24 lights, which can be expanded to more to achieve a variety of lighting effects without affecting vehicle control.
  • Image transmission interface, through the external ESP-CAM module to achieve WIFI image transmission, which can be viewed on the mobile phone (20220421 The socket cannot be used.)

Open source information link

Blog document link
https://blog.csdn.net/weixin_42487906/article/details/124898392

Video link
https://www.bilibili.com/video/BV1Sv4y137FG/

Github warehouse, containing code, 3D printing files, pcb board making files:
https://github.com/FranHawk/simplefoc_balance_car

The schematic diagram and pcb can be viewed online at Lichuang eda project:
there are a total of three boards,
main boards (including motor control and drive parts) : https://oshwhub.com/FranHawk/balance_car_esp32_simplefoc
encoder board : https://oshwhub.com/FranHawk /as5600-16mm
RGB light strip board : https://oshwhub.com/FranHawk/rgb_strip

Material purchase link

All electronic component materials can be purchased by referring to the BOM list or the schematic diagram in the project. You can buy them on Taobao or Lichuang. Here are some links to key materials.

AS5600 L6234PD INA240A1 : [Taobao] https://m.tb.cn/h.ft947n2?tk=gn3u2P8IocI "L6234PD L6234D L6234 HSOP original automotive IC imported chip hot sale quality super good" Click the link to directly open
the motor part chip to buy from this store The goods arrived are quite cheap, and
other electronic components can be found at Uxin Electronics and the like. Those with sufficient financial resources can start their own business directly, which saves trouble.
2210 gimbal motor (at least two) [Taobao] https://m.tb.cn/h.fslSDE8?tk=G8Pk2P8HluO "Clearout HJ2210-75T brushless gimbal motor Dog 3 gimbal special aerial photography motor gimbal hollow shaft "Ma" click on the link to directly open
the tire skin (at least two) [Taobao] https://m.tb.cn/h.ft9UFV4?tk=L8Ez2P8u1Ma "AXIAL 1:24 car SCX24 90081 Xiaomi Jimny universal rubber climbing tire skin Diameter 52mm" Click the link to directly open
the motor bracket (at least two) [Taobao] https://m.tb.cn/h.fsl86Kp?tk=i9Oo2P8FvxY "390 motor bracket 385 fixed base 365 mounting base 380 motor fixed frame with screws Nut click on the link to directly open
the black acrylic plate (at least two) [Taobao] https://m.tb.cn/h.fH9ybkd?tk=2OCV2P8vqAf "Balance car DIY special acrylic bracket plate expansion board" click on the link to directly open
the battery 900mah [Taobao] https://m.tb.cn/h.fGk2f0O?tk=33dF2PjbvTN "Model Aircraft Battery 5200mAh 11.1V Full Capacity High C7.4V Car Model Ship Model RC Climbing Car Quality Assurance" Click the link to open it directly

Other small mechanical parts

  • sh1.0 mm wires, 3P and 4P. Before wiring, be sure to check whether the wire sequence of the encoder board and the main board is corresponding. Directly purchased wires cannot be used. You need to solder them yourself to change the sequence.
  • m2.5 screws, at least 8mm long, and several m2.5 washers, used to fix the encoder, motor and motor bracket
  • m3 6mm long screws, m3 5 6mm copper posts, m3 20 6mm copper posts, some m3 nuts
  • AB glue or glue of equivalent strength is used to fix the radial magnet to the motor axis.
  • Straps and Velcro to secure the motherboard and battery
  • 3.81mm plug, used to plug the motor cable into the motherboard, XT30 male interface, used to connect the motherboard to the battery, red and black power cord
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-21 20:46:32

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号