Maker.io main logo

Another Ambassador Moment: BLDC Motor Control

2022-01-14 | By Robby Huang

License: Attribution Non-Commercial No Derivatives

 

System Description

The motor controller manages the speed and direction of the motor by modifying the amount of current flowing through the three coils of our brushless DC motor. The main objective is to make the motor run with high efficiency, which is achieved by maximizing the torque applied to the magnetic rotor.

Terminology

MC - motor controller

BLDC - brushless DC motor

FOC - field-oriented control

FET - field effect transistor, treat as an electrical switch

IC - integrated circuit, semiconductor circuit that performs some task

Driver - integrated circuit that provides the necessary current to drive a motor

uC or MCU - microcontroller

PCB - printed circuit board

VESC - VESC project is an open source BLDC motor controller project that includes a circuit board and a software GUI. The VESC software is designed to work with a wide variety of hardware, from very low power to very high power

Design Requirements and Key Parameters

We used a Koford Motor (model 129H42A), which is a 24 V, 10 pole BLDC motor. This motor is supplied with 3 hall sensors. It has a max no load speed of 1040 rpm and peak power output of 390 W. For our purposes, we have estimated a max current of 20 A, meaning the MC must have output power of 480 W.

BLDC Motor Control

System Design

The motor controller can be broken into hardware and software components. The hardware component has 3 main stages. In the first stage, we have a microcontroller which generates the necessary PWM signals needed to spin the motor. It also processes feedback from the power stage and inputs from the hall sensors and throttle. Since the microcontroller can only generate output signals with current on the order of milliamps, we need a driver stage that amplifies the current so that it is large enough to drive a motor. Lastly, we have a power stage with 3 pairs of high/low-side FETs. The connections between the FETs in each pair are taken as the phase signals to the motor. Our software is in charge of using inputs to generate the proper PWM signals.

Hardware & Schematic

SCH1SCH2SCH3

Software

There are 3 primary methods of BLDC motor control: trapezoidal, sinusoidal, and field oriented control. Trapezoidal is the easiest; it applies a high voltage to one phase, a low to another and floats the third phase. There are 6 possible states and it changes a state every 60 degrees. Sinusoidal requires a continuous rotor angle estimate rather than knowing within 60° what the rotor angle is. It knows the specific angle by sensing the specific feedback current. You also use a rotor angle estimation in FOC. In FOC, first you transform the 3 measured phase currents into a 2D representation using the Clarke transform. Then, you transform these into a rotating coordinate frame with the Park transform using the rotor angle. Since we cannot configure the Koford motor with sensorless or sensored mode, we can only use FOC. After we increase the ramp time, we are able to achieve smooth spinning. We use the code from the VESC gui, firmware version 3.33.

Testing Plan

We used an incremental testing plan. For assembly, we tested connections after each component was soldered. For each IC, we tested that each pin had a good connection to the pad. We tested the connection of the thermal pad to ground later on when powering the chip. After testing the soldering, we powered the chip, and checked that the fault pin on the driver was not low. We then worked to upload the bootloader to the MCU. After doing so, we worked to upload the firmware. We verified that it was successful by connecting our board to the GUI, and updating the configuration from there. We then worked on receiving a motor detection result. The motor seems to move a bit, but gets stuck. We are currently working to debug the issue, which may be because of a power surge and ill-rated FETs. When choosing our FETs, we did not account for ripple, which could push the voltage above 30 V when we supply 24 V. We plan to test our motor controller on a lower voltage motor.

制造商零件编号 NUCLEO-H723ZG
NUCLEO-144 STM32H723ZG EVAL BRD
STMicroelectronics
¥245.59
Details
制造商零件编号 EKZN101ELL681ML40S
CAP ALUM 680UF 20% 100V RADIAL
Chemi-Con
¥23.44
Details
制造商零件编号 CL10C180FB8NNNC
CAP CER 18PF 50V C0G/NP0 0603
Samsung Electro-Mechanics
More Info
Details
制造商零件编号 CL10B474KO8NNNC
CAP CER 0.47UF 16V X7R 0603
Samsung Electro-Mechanics
¥0.81
Details
制造商零件编号 TPSA476M006R0800
CAP TANT 47UF 20% 6.3V 1206
KYOCERA AVX
¥5.70
Details
制造商零件编号 GRM1885C2A121JA01D
CAP CER 120PF 100V C0G/NP0 0603
Murata Electronics
¥1.22
Details
制造商零件编号 CGA3E1C0G2A682J080AC
CAP CER 6800PF 100V C0G 0603
TDK Corporation
¥1.95
Details
制造商零件编号 UCD1K100MCL6GS
CAP ALUM 10UF 20% 80V SMD
Nichicon
¥4.88
Details
制造商零件编号 RC0603FR-07100RL
RES 100 OHM 1% 1/10W 0603
YAGEO
¥0.81
Details
制造商零件编号 IRFS7530TRL7PP
MOSFET N CH 60V 240A D2PAK
Infineon Technologies
¥36.14
Details
制造商零件编号 WSLF25121L000FEA
RES 0.001 OHM 1% 5W 2512
Vishay Dale
¥9.85
Details
制造商零件编号 NCP18XH103F03RB
THERMISTOR NTC 10KOHM 3380K 0603
Murata Electronics
¥1.47
Details
制造商零件编号 AC0805FR-074R7L
RES SMD 4.7 OHM 1% 1/8W 0805
YAGEO
¥0.90
Details
制造商零件编号 FY0800027
CRYSTAL 8.0000MHZ 18PF SMD
Diodes Incorporated
¥6.35
Details
制造商零件编号 STM32F405RGT6
IC MCU 32BIT 1MB FLASH 64LQFP
STMicroelectronics
¥97.68
Details
制造商零件编号 DRV8302DCAR
IC MOTOR DRIVER 8V-60V 56HTSSOP
Texas Instruments
¥47.46
Details
制造商零件编号 SN65HVD1050DR
IC TRANSCEIVER HALF 1/1 8SOIC
Texas Instruments
¥10.74
Details
制造商零件编号 10118194-0001LF
CONN RCPT USB2.0 MICRO B SMD R/A
Amphenol ICC (FCI)
¥3.34
Details
制造商零件编号 DC0011/10-TG-A373F-0.25-2A
THERM PAD 19.05MMX12.7MM W/ADH
t-Global Technology
¥2.30
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum