3S ESC
Introduction
BLDC motor controller compatible with 3S systems. Will initially be standalone, connecting to 12V -> 5V @ 4A Buck Converter + ELRS Receiver externally and then later physically integrated into another board revision for an all-in-one fixed wing solution.
Depending on the cost and performance of the board, it may be integrated elsewhere. Target design parameters are also being pulled from Houston spec in Houston: Configuration.
Architecture & EE Designer: @Kenny Na (WARG EE F24 Co-op)
Project Manager: @Daniel Puratich
Requirements
Powered by a 3S (12V) battery input.
In the context of integrating with the ELRS board, an XT60 connector should be provided, and additional input from a header pin should be placed for speed control.
3x solder pads for BLDC connection.
Supports DSHOT input.
More resistant to noise in transmission versus PWM, as DSHOT is a digital protocol.
12-5V Buck + ELRS was designed with PWM in mind but this can be altered.
Includes a “BEC” (battery-elimination circuit). Just means it can be powered by one input.
Must use the AM32 open-source firmware for motor control. (https://am32.ca)
This uses a sinusoidal algorithm to control the BLDC. (no field-oriented control?)
Has a strict MCU compatibility list (we would preferably use a smaller ST chip)
Commutation using back EMF. Likely no current or Hall sensing.
Designed around an target motor (in Houston): https://innov8tivedesigns.com/cobra-cm-2217-20-brushless-motor-kv-950.html
Standard 3-phase brushless DC motor with 12 stator windings and 14 exterior magnet poles, meaning 4 coil windings per phase. Designed for 3S/4S power source.
Maximum continuous current of 20 Amps.
Maybe 30A maximum burst current.
Should be accounted for during FET selection.
Resources
BLDC Motors for BLDC theory and operation.
Vishay | Power MOSFET Basics: Understanding Gate Charge and Using it to Assess Switching Performance
https://electronicsbeliever.com/how-to-compute-mosfet-switching-losses/
Components
Microcontroller Selection
Compatibility with AM32
AM32 provides a list of supported microcontrollers in their GitHub repository’s README file. Additionally, there is an MCU “target compatibility list” that can be found inside of the code. These were used to guide the selection of an appropriate MCU.
Comparison Table
Microcontroller | Option 1 | Option 2 | Option 3 |
---|---|---|---|
Name | STSPIN32F0 | STM32L431 | STM32F051 |
Price/unit | $4.34 | $5.20 | $5.59 |
Notes | Integrated MCU with STM32F031, DC-DC, LDO, and gate driver for BLDC applications. Capable of FOC, 6-step, Hall sense, etc. Price can’t really be compared to other options. Physical size of ESC would be more compact since gate driver is integrated. Internal buck is asynchronous, runs in DCM, and has lower efficiency (~80%). | Existing design part of WARG, cheaper option. | Used in previous ESC design from WARG, may possibly be overkill. |
STSPIN32F0
https://www.digikey.ca/en/products/detail/stmicroelectronics/stspin32f0/6236758
https://www.digikey.ca/reference-designs/en/motor-control/2704
STSPIN32F0 Datasheet: Advanced BLDC controller with embedded STM32 MCU
As an integrated package with the STM32F031C6, 3-phase gate driver, 12V LDO, and VM to 3.3V buck, the STSPIN32F0 is very cheap and enables simpler hardware design. As a bonus, the STSPIN32F0 comes with motor driver software from STMicroelectronics that enables FOC.
VREG12 (the output of the linear regulator and gate driver supply voltage) can output 12V by stepping down from up to a 45V input, or can be shorted to VM when less than 12V.
For a 3S application (11.1V to 12.6V), VREG12 can be shorted to VM. With this shorted, 4S batteries cannot be used, due to the 15V maximum rating.
https://www.digikey.ca/en/products/detail/taiyo-yuden/CBC3225T220KR/2763319
Gate Driver Selection
STSPIN32F0 Gate Driver Specs
The STSPIN32F0’s integrated gate driver does 600mA sink/source at a voltage level close to the power supply input (our battery).
The selected FETs for the half-bridges must be able to withstand the supplied gate-to-source voltage (VGS) with margin to avoid breakdown, and have a low enough gate charge (GGD) that the integrated gate driver’s 600mA peak current sourcing capability would be enough to switch the FET fast enough to be desirable for motor control.
MOSFET Selection Criteria
Main parameters to sort by are the continuous and peak current requirements, as well as RDS(on) of the FET, as that will be the main source of power loss given our low switching frequency (e.g. 20 kHz). There is also a consideration to be had between picking a cheaper FET that will need active cooling vs. a more expensive FET that is capable of passively cooling itself.
DigiKey Search: N-CH Power MOSFETs
DigiKey Search: N-CH Power MOSFETs, Optimized Search
MOSFETs product selection | TI.com
Shortlisted MOSFETs:
https://www.digikey.ca/en/products/detail/nexperia-usa-inc/PXN012-60QLJ/15778333
https://www.digikey.ca/en/products/detail/vishay-siliconix/SIRA88DP-T1-GE3/6707789
https://www.digikey.ca/en/products/detail/nexperia-usa-inc/BUK9Y6R5-40HX/12325015
https://www.digikey.ca/en/products/detail/texas-instruments/CSD17577Q3A/4965736
https://www.digikey.ca/en/products/detail/texas-instruments/CSD17581Q3A/6235429
https://www.digikey.ca/en/products/detail/toshiba-semiconductor-and-storage/TPH7R204PL-LQ/6570922
https://www.digikey.ca/en/products/detail/infineon-technologies/IPZ40N04S5L7R4ATMA1/5960382
The following calculations are summarized into a Desmos sheet, linked below:
https://www.desmos.com/calculator/ksmxjhu14u
PXN012-60QLJ
The PXN012-60QLJ is one of the cheapest “power” N-channel (positive gate voltage) MOSFETs on DigiKey, with a price of $0.56 CAD per count. It is the top result for the search query linked above.
At surface level, this MOSFET seems useable for the required application.
Drain-to-source voltage well exceeds our intended values (3S (or even a 4S) battery from 11.1V to 16.8V)
Gate-to-source voltage rating is good (given that the STSPIN32F0’s gate driver voltage output is going to be shorted to VM for 3S batteries)
Drain current ID seems to satisfy our requirements, being rated for 42A at 25C and 26A at 100C.
Power Loss & Thermal Dissipation Calculations
Example: PXN012-60QLJ
In order to deeply assess the performance of this MOSFET (and others), calculations will be had for total power dissipation with conduction and switching losses taken into account.
The Ptot value given in the datasheet is a fixed value for the performance at 25°C.
“34.7W” doesn’t help us because we don’t know if the device has the means to keep itself at Tsp = 25°C ambient without a heatsink or fan. It is a figure for instantaneous behaviour at that Tsp.
Conduction Loss
We can find the total power dissipated while the MOSFET is turned on (conducting) using RDS(on), or the drain-to-source resistance. This value is a parasitic resistance embedded within of the body of the MOSFET itself.
We can use our maximum continuous current value of 20 Amps to calculate for a high-demand scenario:
Pcond = ID2 x RDS(on)
Pcond = (20A) x 11.5mOhms
Pcond = 4.6W
11.5mOhms is the max RDS(on) taken from the datasheet when VGS = 10V and ID = 10A at 25°C ambient. We could assume RDS(on) would be lower for VGS = 12V and ID = 20A, but overhead is fine.
We can then find the average conduction losses during operation by multiplying by the duty cycle of the motor control sequence. For our worst-case calculation, we can set the duty cycle to be 50%.
Pcond = 4.6W x 50%
Pcond = 2.3W
Switching Loss
Losses generated by the MOSFET while it is switching states (from on to off, or vice versa) are characterized as switching losses. This is the second-largest form of power loss.
Power loss during state transition of an ideal MOSFET is zero. This is due to how Pon (power lost during the on transition) is equal to VDS (drain-to-source voltage; the input MOSFET voltage) multiplied by ID (drain current; the current through the MOSFET). If VDS and ID switch on and off at the exact same moment in time respectively, then there would be no losses.
It then makes sense how in a real MOSFET, because of the transitory periods VDS and ID require (called ton), how the waveform overlap between the two would multiply to become the power loss Pon.
This is a more detailed version of the previous waveforms, combined into one graph.
VBUS is the voltage supplied to the input of the MOSFET.
IL is the current drawn by the load on the low-side of the MOSFET.
When the threshold voltage Vth is crossed, current IDS begins to flow through the MOSFET.
Power loss is instantaneously generated by the increasing IDS and decreasing VDS.
This PSW(on) (power loss during on transition) waveform can be further simplified to a triangle (1/2 x b x h).
Using ID and the values tr (rise time) and tf (fall time) given in the datasheet:
PSW(total) = (PSW(on) + PSW(off)) x Fsw
ESW(on) = 1/2 x (tr) x (ID x VDS) and ESW(off) = 1/2 x (tf) x (ID x VDS)
Then:
PSW(total) = 1/2 x (tr + tf) x (ID x VDS) x Fsw
PSW(total) = 1/2 x (18.5ns + 10.9ns) x (20A x 12V) x (20 kHz)
PSW(total) = 0.07056W or 70.56mW
Gate Charge Loss
q = CV where q is charge, C is capacitance and V is the potential difference across the capacitor plates.
E = 1/2 CV2, where E is energy.
We want to account for the entire period of losses where (1) VGS (and therefore QGS) rises to meet Vthreshold, (2) where VGS plateaus (Miller effect) due to having to charge QGD (or the CGD capacitance), and (3) the remaining charge to bring the VGS up to the full voltage of the gate driver. The charge required for all of these events are summarized in the Qtotal value.
Equating the two equations from above:
EQ(loss) = (1/2) x Qtotal x VGS
Multiplying both sides by the switching frequency of the MOSFET:
PQ(loss) = (1/2) x Qtotal x VGS x Fsw
PQ(loss) = (1/2) x (18.77 nC) x (12 V) x (20 kHz)
PQ(loss) = 0.0022524 W, or 2.2524 mW
Output Capacitance Loss
The parasitic capacitance COSS within a MOSFET is the capacitance between the drain and source terminals. COSS is charged immediately as the MOSFET turns off and discharged as the MOSFET turns on. The discharged capacitance is released as heat (in much high power systems, it may be recovered using ZVS).
EC(loss) = (1/2) x COSS x VDS2
PC(loss) = (1/2) x COSS x VDS2 x Fsw
PC(loss) = (1/2) x (600 pF) x (12 V)2 x (20 kHz)
PC(loss) = 0.000864 W or 0.864 mW
Total Power Loss
The total power loss of the MOSFET can be calculated by adding the individual losses.
Ptotal = Pcond + PSW(loss) + PQ(loss) + PC(loss)
Ptotal = 2.37W
Thermal Impedance
Now that the total power loss is characterized, we can use the value to find how fast the power can be dissipated through the MOSFET.
Many datasheets include a junction to ambient thermal resistance value, that can simply be multiplied with the total power loss calculated above to find the maximum/peak temperature. For those that don’t, including this example MOSFET, we can use thermal circuits.
The heat flow can be modelled by analogy to an electrical circuit where heat flow is represented by current, temperatures are represented by voltages, heat sources are represented by constant current sources, absolute thermal resistances are represented by resistors and thermal capacitances by capacitors.
In our system model, the MOSFET will be a constant source of heat flow, creating a potential of temperature at the MOSFET’s junction. This node will then be connected through Rth(j-sp), or the junction to solder point thermal resistance, to the temperature at the solder point. The solder point is then connected to the PCB copper, which has its own thermal resistance as well. There is a final thermal resistance from the PCB copper to ambient, which is the “ground” net of the thermal circuit.
The datasheets with junction-to-ambient thermal resistance values are essentially approximating the temperature drops and thermal resistances above into one single resistive value.
MOSFET Selection Matrix
Name/MPN | Price (CAD/ct, Digikey) | Dimensions | Total Power Loss | Temperature @ Peak Power Loss |
---|---|---|---|---|
Nexperia PXN012-60QLJ | $0.56 | 3.3 x 3.3 mm | 2.37 W |
|
5.0 x 5.0 mm |
| |||
3.3 x 3.3 mm |
| |||
3.3 x 3.3 mm |
| |||
TI CSD17581Q3A | $1.70 | 3.3 x 3.3 mm |
|
|
TI CSD17577Q5A | $1.76 | 5.0 x 6.0 mm |
|
|
Total power loss and thermal performance derived from https://www.desmos.com/calculator/mcqyiebnlk.