Building a Brushless Motor Driver Board with ESP32

Building a Brushless Motor Driver Board with ESP32

Project Name: SimpleFOC_X Brushless Motor Driver Board

Project Author: LazyWoo

Introduction

Created a product-level SimpleFOC brushless motor driver board!

Building a Brushless Motor Driver Board with ESP32

Called SimpleFOC_X.

0102
What are the features/highlights of this project?
01
Position Control Mode

Building a Brushless Motor Driver Board with ESP32

02
Closed-loop Speed Control

Building a Brushless Motor Driver Board with ESP32

03
Ratchet Mode

Building a Brushless Motor Driver Board with ESP32

04
Damping Return

Building a Brushless Motor Driver Board with ESP32

05
Supported Speed: 0.5rad/s—50rad/s

Building a Brushless Motor Driver Board with ESP32

06
Supports Heavy Load Rotation

Building a Brushless Motor Driver Board with ESP32

07
More Parameter Descriptions
  • Supports current loop, speed loop, position loop three closed-loop control

  • Supports Bluetooth and WIFI

  • Current sampling range: -3.3A-3.3A

  • Master Control Model: ESP32-WROOM-32E

  • Operating Voltage: DC12V-24V

  • Driver Chip Model: DRV8313PWPR

  • Current Sampling: Inline sampling INA240A2*2

  • Automatic Download: Onboard CH340C + automatic download circuit

  • Onboard Voltage Output: 5V(1.0A max)3.3V(200MA max)

  • Magnetic Encoder Interface: I2C

  • Other Interfaces: Serial Port 0, Serial Port 2

  • Other Functions: Input reverse connection protection, driver fault alarm, onboard colorful lights

02
Circuit Principle

Building a Brushless Motor Driver Board with ESP32

Schematic Diagram

Building a Brushless Motor Driver Board with ESP32

PCB Diagram

Building a Brushless Motor Driver Board with ESP32

3D Preview Diagram

Now let’s explain the 6 main modules:

01
Power Supply Scheme

Building a Brushless Motor Driver Board with ESP32

SimpleFOC_X V1.0 input voltage is 12-24V DC voltage input.

Reverse connection protection diode can prevent damage to the circuit from reverse DC power supply, but will cause a certain degree of voltage drop. The SS54 diode has about 0.5V voltage drop at full load of 5A, but in this usage scenario, the current cannot reach 5A, and its voltage drop is about 0.3V. When setting the supply voltage in the program, you can subtract 0.3V from the input voltage to get VCC voltage (it can also be ignored).

02
USB to Serial Circuit

The USB to serial chip uses CH340C. To adapt to the ESP32 level, 3.3V is used for power supply.

The VCC pin and V3 pin are both connected to the 3.3V level, 100nF capacitor is used for decoupling, RTS and DTR pins are used for the automatic download circuit of ESP32.

03
Brushless Motor Driver Chip

DRV8313 provides internal shutdown functions to achieve overcurrent protection, short circuit protection, undervoltage lockout, and overtemperature protection.

  • When the LED4 fault light is on, power down immediately, and power up again after eliminating the fault cause.

  • When only connecting USB and not connecting DC power supply, the fault light may light up due to undervoltage, which can be ignored.

After powering up, the fault light will automatically turn off.

DRV8313 maximum current is 2.5A (peak current) @25°C@24V, it cannot work for a long time at currents above 1.5A.

Building a Brushless Motor Driver Board with ESP32

04
INA240A2 Current Sampling Circuit

INA240 has enhanced PWM suppression capabilities, making it an excellent choice for built-in current detection.

The sampling resistor is connected in series with the motor phase line, and the detected current is always the motor phase current. Since the current in the inductor does not change suddenly, the sampled current is continuous and stable regardless of the PWM duty cycle state.

Building a Brushless Motor Driver Board with ESP32

The current of the motor is sine wave, for the sampled differential signal, the negative half cycle is negative. For convenience, it needs to add a bias voltage to ensure that the full cycle output is positive.

05
Power Input Interface

Building a Brushless Motor Driver Board with ESP32

Input Voltage: DC 12-24V, D2 is used for reverse connection protection, D2 can withstand a maximum forward current 5A, but there is a 0.5V voltage drop under full load, and there is about a 0.3V voltage drop during low current usage.

VCC=Input Voltage-0.3V.

  • C14 is used for energy storage

  • R11 is a 0Ω resistor used to isolate motor PGND and digital GND.

06
Magnetic Encoder Interface & Brushless Motor Interface

The magnetic encoder interface is an I2C interface, powered by 3.3V, used to connect to the AS5600 magnetic encoder. U, V, W connect to the three-phase line of the brushless motor.

03
Open Source URL

This project is open source!

—— Want to replicate ? Want to give the author a thumbs up ? You can copy the open source URL to go to the original text.

Open Source URL:https://oshwhub.com/yourallo/simplefoc_x

Building a Brushless Motor Driver Board with ESP32

Click the end of the article 【Read the original text】 to directly enter the original text.

Building a Brushless Motor Driver Board with ESP32

04
What? Are you possessive?

The editor guesses that there will definitely be friends saying:

Building a Brushless Motor Driver Board with ESP32

This can really be!

Currently, SimpleFOC_X has been listed on the Lichuang Open Source Market, a set for 179.9, and the motor for 99.9, scan to immediately own it~

Building a Brushless Motor Driver Board with ESP32

After scanning, click the red box 【button】▽

Building a Brushless Motor Driver Board with ESP32

What is the Lichuang Open Source Market?

Some say open source doesn’t make money…

So we launched the open source market!

To provide benefits such as chip placement for the authors on the shelves, allowing them to easily produce in bulk and sell open source works or kits at low cost.

We strive to let creative friends see good projects, choose to replicate DIY, or directly purchase a finished product/kit

Building a Brushless Motor Driver Board with ESP32

The Lichuang Open Source Market aims to provide online trading channels for open source users. The platform will provide product incubation support to help open hardware enthusiasts monetize their creations!

Want to browse, just scan this code:

Building a Brushless Motor Driver Board with ESP32

Website: https://oshwhub.com/market

Want to list original works and earn extra income, just add Chen Gong:

Building a Brushless Motor Driver Board with ESP32

Please note [Shelf Market], explain your intention~

* This article reprinted user creations from the “Lichuang Open Source Hardware Platform”, if there is any infringement, please contact for deletion

If you are watching, please like me!
Building a Brushless Motor Driver Board with ESP32
Click here to view the original project

Leave a Comment

Your email address will not be published. Required fields are marked *