Skip to the content
PCBKitNew board
4 layers35.9 × 10.9 mmThruster Controller, the printed circuit board in 3D

Custom FOC motor controller designed for underwater robotics.

Size
35.9 × 10.9 mm
Copper layers
4
Thickness
1.6 mm
Parts
110
Nets
106
Pads
381
Tracks, vias
1,513, 359
Pours
34
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
6 Jan 2020
Updated
14 Nov 2021

Overview

Thruster Controller is an open-source printed circuit board by mark-belbin, from the mark-belbin/motor-controller repository on GitHub, published under the GPL-3.0 licence. It is a 4-layer board of 35.9 × 10.9 mm with 110 parts on 106 nets, routed with 1,513 tracks and 359 vias.

It is built around the TMS320F28027FPTT, MCP2562-H/P and MCP2515-I, with the RTQ2569-50GQW-QA and SIZF906DT among its other parts. Its parts include 41 capacitors, 32 resistors, 8 connectors, 6 ICs and 5 diodes. It belongs with the robots and motor control boards of this library.

Main components

5

README

README.md

FOC Motor Controller

This project was a multi-year effort to develop a ground-up, brushless motor (BLDC) controller for use in underwater robotics.

The final controller is designed for T200 or T100 thrusters from BlueRobotics, boasting sensorless FOC and a miniature form-factor that is built right into the thruster.

Key Features

  • Sensorless FOC / sinusoidal commutation
  • Input voltage up to 14V
  • 250W Continuous Power
  • CAN Bus telemetry and control
  • Built into the T200 thruster, water-cooled
  • Low underwater acoustic noise
  • Up to 10-20% better efficiency than standard ESCs
  • Great low-RPM operation and control
  • Ludicrous mode, able to overmodulate and reach higher RPMs

PCB Front

FOC Thruster Controller V2 Top View

PCB Back

FOC Thruster Controller V2 Bottom View

Table of Contents

  1. Introduction
  2. FOC Benefits
    1. Phase Currents
    2. Operating Noise
    3. Efficiency
    4. Other Benefits
  3. Motor Controller PCB
  4. Controller Firmware
  5. T200 Thruster Mount
  6. Repository Content

Introduction

Brushless motors, such as BLDC or PMSM motors, have no physical link between the stator and rotor like in a standard DC motor. Therefore, these motors must be commutated (spun properly) using an external controller. The key is knowing where the motor's rotor is relative to the stator, such that the magnetic field of the stator can be generated with accuracy in order to successfully push along the rotor and get the motor to spin.

For most hobby BLDC controllers, commonly referred to as electronic speed controllers (ESCs), motor commutation is accomplished through sensorless trapezoidal 6-step control. This commutation method steps through 6 distinct stator magnetic field positions in order to keep the motor spinning, based only on the feedback of the back-EMF voltage of the three motor phases. With only 6 available control positions, this method of commutation lacks maximum possible efficiency, but it remains a simple, reliable, and cheap control method.

This motor controller design implements Field-oriented control (FOC), also known as sinusoidal control or sine wave control. The FOC algorithm used is provided by Texas Instrument's InstaSPIN product line. This enables FOC using sensorless feedback, meaning no extra encoders or sensors are attached to the motor. The TI sensorless system measures only the 3 phase voltages and 3 phase currents of the motor in order to estimate the current rotor position with high accuracy. Also important is the intrinsic properties of the motor, such as the phase resistance, inductance, and the motor flux linkage. InstaSPIN requires a motor calibration procedure be run on each unique motor to automatically determine these intrinsic values, if not the FOC algorithm will not run.

This custom FOC controller design was evaluated by comparing against the BlueRobotics Basic ESC R3, a standard hobby-style ESC. Both will run the same BlueRobotics T200 thruster, which is the intended use-case of the custom developed controller.

T200 and Basic ESC

BlueRobotics T200 Thruster and Basic ESC R3.

FOC Benefits

FOC has numerous potential benefits compared to traditional trapezoidal control. The most striking are the increase in efficiency and reduction in motor noise. This is possible since FOC control applies the most optimal stator magnetic field to push the rotor forward, and as a result generates clean and noise-free sine-wave current wave forms.

Phase Currents

A comparison of current waveforms is shown below. Both the custom FOC controller and the Blue Robotics Basic ESC R3 are controlling a submerged T200 thruster at 2000 RPM. The FOC phase currents are much cleaner and closer to sinewaves, while the Basic ESC waveforms are more choppy and trapezoidal.

FOC Currents

FOC phase currents vs the BR Basic ESC R3 at 2000 RPM.

Operating Noise

A significant difference in operating noise is observed because of the current waveform difference. This is very noticeable underwater too, as the louder electrical sounds generated by the Basic ESC travel far. By comparison the custom FOC controller runs quiet, especially for low to mid-range speeds of 0-2000 RPM.

Efficiency

An efficiency test was completed for both the custom and off-the-shelf controllers. A T200 was secured and submerged in a relatively large tub full of water. A separate waterproof, magnetic RPM sensor was attached to the shaft of the T200 to independently measure the RPM of the thruster. Measurements were taken of the input power of the motor controller under test for RPM settings in steps of 100 RPM.

Controller Testing

FOC Controller Testing

The FOC controller is more efficient across nearly the entire RPM range. The graph below is shows superiority up until about 2500 RPM, beyond which the FOC controller has the same or slightly worse performance. This is a limitation of FOC, where at a certain voltage the controller will switch to overmodulation control, where the controller will gradually transition to trapezoidal control as the RPM increases. To remain efficient at upper RPMs, a higher input voltage would need to be supplied.

Efficiency Graph

FOC Controller vs the BR Basic ESC R3.

Here's how the efficiency difference changes over the course of the RPM range:

  • From 0 to 600 RPM, the FOC controller consumes about 50% less power, a percent increase in efficiency of 100-150%
  • From 600 to 1500 RPM, 20% less power is consumed, a percent increase in efficiency of 25-30%.
  • From 1500 to 2000 RPM, 15% less power is consumed, a percent increase in efficiency of 15-20%.
  • From 2000 to 2500 RPM, 5-10% less power is consumed, a percent increase in efficiency of 8-10%.
  • Beyond 2500 RPM, the FOC controller consumes 0-5% more power than the Basic ESC.

The outperformance at lower RPMs is significant, since many underwater robotics applications operate in this range, such as Autonomous Underwater Vehicles (AUVs) or Autonomous Surface Vessels (ASVs). Battery life is critical for these types of vehicles, and the reduction in motor power from FOC control could have a big impact.

Other Benefits

A few other minor benefits were observed with the custom controller and FOC:

  1. Great low speed control; The controller can operate at speeds down to a few RPM, where the Basic ESC cuts out under about 100 RPM.
  2. Clean forward / reverse switching; During 0 RPM crossings, the FOC controller is much more stable, and can make these forward / reverse jumps with much quicker acceleration (about 25kRPM/s vs 14kRPM/s). This could improve position locking or increase accuracy for delicate maneuvers.
  3. Ludicrous mode; The FOC controller's overmodulation feature can push the thruster faster than the Basic ESC for the same input voltage, about 100 more RPM at 12V. Since thrust is proportional to the square of the RPM, this extra 100 RPM is a nice power boost.

Motor Controller PCB

The motor controller PCB design was created using KiCAD. It's a 4 layer board, approximately in the shape of a xx diameter circle. The notches in the design allow it to be dropped in a mount for the T200 thruster. The PCB project is located in "hardware/Thruster_Controller_V2". An older version of the controller is found in "hardware/Thruster_Controller_V1", with the main difference being a different TI microcontroller.

PCB Angled

FOC Thruster Controller V2 Angled View

The board itself is dense, and probably could have benefitted from a 6 layer design instead. However, limiting the design to 4 layers keeps the prototype costs very cheap. In total, for an order of 10 PCBAs, the total cost for the boards were about $2 each thanks to JLCPCB, and the total component cost is about $36.50 per board. So in total, less than $40 CAD per PCBA for only a 10 order quantity, not bad! At scale, this can shrink further, but probably not less than $25 per board.

Some major components are:

  • TMS320F280041C -> TI microcontroller with InstaSPIN.
  • DRV8320S -> Motor driver from TI.
  • SIZF906DT -> Dual-MOSFETs in a compact package
  • ATA6561 -> CAN Transceiver

Controller Firmware

The controller firmware is based on MotorControl SDK 3.01 from TI. This SDK enables sensorless FOC with select TI microcontrollers. The microcontrollers have a proprietary InstaSPIN sensorless algorithm embedded in the ROM, which restricts this system to compatible TI MCUs only.

The code is modified from a MotorControl SDK example lab, with extra drivers written for CAN communication. There is also some modification to disable a built-in overcurrent feature using the CMPSS. For whatever reason the feature seems to be bugged. I haven't yet figured out a good solution to either fix it or replace the overcurrent protection. So take caution if using this project as a base for something else!

The IDE used is TIs Code Composer Studio, a customized version of Eclipse. The most up-to-date project is found in "firmware/TI_ESC_V2". The project is completely separated from TIs MotorControl SDK libraries, so it should be portable and importable in to Code Composer Studio from any computer with/without MotorControl SDK installed.

T200 Thruster Mount

The motor controller PCBA was designed to be integrated into the back of the T200. The PCBA is first placed in an aluminum mount. Then, the thruster phase wires are soldered to the PCB. These wires are exposed by hacking away the jacket of the thruster very delicately. A new 10-conductor cable is then soldered to the PCB, replacing the original thruster cable. The final assembly is then potted, and mounted to the back of the thruster using the existing two screw holes originally for the back nose-cone. With this integration, the controller is water-cooled by the the thruster itself as water is forced passed it.

CNC Mounts

Fresh-cut aluminum PCBA mounts

Controller Mount

Anodized mount + PCBA

An interesting aspect of the mount design is the inclusion of a sealing disk. This disk, plus an o-ring, seals a programming port on the controller. This allows for reprogramming of the TI microcontroller while still maintaining water resistance. In the future it might be nice to include a bootloader on the microcontroller, which would allow programming over CAN instead, eliminating the need for this extra sealing disk!

T200 + Controller Angled

T200 + Controller Angled View

T200 + Controller Top

T200 + Controller Top View

AUV Integration

An immediate application of the FOC thruster controller was in my final-year engineering senior design project; an autonomous underwater vehicle (AUV). The AUV includes six thrusters in the design, and I built an FOC controller in each one. In the end, the project was a resounding success, and a very good test scenario for the custom controllers. The controllers were smooth, operating well at low speeds, which is all the AUV needed. The thrusters also operated very quietly, even when pushing the AUV to higher speeds for fun.

AUV Top

Capstone AUV Top View

AUV Bottom

Capstone AUV Bottom View

Check out the AUV in action here -> https://www.youtube.com/watch?v=-c5bOXZom5M

Repository Content

The repository is organized into 3 categories; hardware, firmware, and docs. Included in the hardware folder is the latest FOC controller V2, as well as an older version V1, and many test boards built to test and evaluate the project along the way. The firmware folder includes the latest V2 firmware, as well as the V1 firmware and sample test projects that were provided by TI and were useful for debugging.

Parts

110
QtyValueFootprintReferences
91uFCapacitors_SMD:C_0603C3, C5, C20, C27, C28, C29, C39, C40, C41
70.1uFCapacitors_SMD:C_0402C6, C7, C8, C17, C23, C30, C42
6Net-Tie_2MCU_Powertrain:NetTie-2_SMD_5milNT1, NT2, NT3, NT4, NT5, NT6
52.2uFCapacitors_SMD:C_0402C34, C35, C36, C37, C38
42.2kResistors_SMD:R_0402R27, R28, R29, R30
422.0kResistors_SMD:R_0402R3, R4, R5, R15
44.99kResistors_SMD:R_0402R12, R13, R14, R16
31000pFCapacitors_SMD:C_0402C9, C16, C18
32200pFCapacitors_SMD:C_0402C24, C25, C26
322uFCapacitors_SMD:C_1206C12, C14, C31
322uFCapacitors_SMD:CP_Elec_6.3x5.8C10, C13, C15
356Resistors_SMD:R_0402R20, R21, R22
35mResistors_SMD:R_2512R8, R9, R11
3SIZF906DTThruster_Controller:SIZF906DTQ1, Q2, Q3
3TestPointThruster_Controller:TestPoint_Pad_D1.0mmTP1, TP2, TP3
20.047uFCapacitors_SMD:C_0402C2, C4
210kResistors_SMD:R_0402R17, R18
210kResistors_SMD:R_0603R1, R6
215pFCapacitors_SMD:C_0402C21, C22
2330Resistors_SMD:R_0805R10, R19
2680Resistors_SMD:R_0603R24, R31
2820Resistors_SMD:R_0402R25, R26
2Conn_01x01Thruster_Controller:Bus_PadJ7, J8
2Conn_01x01Thruster_Controller:CAN_PadJ4, J6
2MountingHoleThruster_Controller:MountingHole_M2H1, H2
2REDLEDs:LED_0603D2, D4
1100Resistors_SMD:R_0603R2
1100kResistors_SMD:R_0402_NoSilkR23
110uFCapacitors_SMD:C_0805C49
1120Resistors_SMD:R_0402R35
12.2uFCapacitors_SMD:C_0603C19
12.2uHInductors_SMD:L_0805L1
12.7kResistors_SMD:R_0603R7
120MHzCrystals:Crystal_SMD_SeikoEpson_TSX3225-4pin_3.2x2.5mmY1
122uFCapacitors_SMD:C_0805C50
14.7uFCapacitors_SMD:C_0603C1
1BLUELEDs:LED_0603D1
1DRV8305Thruster_Controller:DRV8305U1
1FBInductors_SMD:L_0402L3
1FBInductors_SMD:L_0805L2
1GREENLEDs:LED_0603D3
1MCP2515Housings_DFN_QFN:QFN-20-1EP_4x4mm_Pitch0.5mmU3
1MCP2562Housings_DFN_QFN:DFN-8-1EP_3x3mm_Pitch0.65mmU8
1OrangeLEDs:LED_0603D5
1PHASE_AThruster_Controller:Phase_PadJ1
1PHASE_BThruster_Controller:Phase_PadJ2
1PHASE_CThruster_Controller:Phase_PadJ3
1Pogo ConnConnectors:Tag-Connect_TC2050-IDC-NLJ5
1RTQ2569-50GQWHousings_DFN_QFN:DFN-8-1EP_3x3mm_Pitch0.65mmU2
1TMS320F28027FHousings_QFP:LQFP-48_7x7mm_Pitch0.5mmU5
1TPS62172DSGRThruster_Controller:8-Pin_WSONU4

Questions

How big is the Thruster Controller PCB?

It measures 35.9 × 10.9 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Thruster Controller use?

110 parts, built around the TMS320F28027FPTT, MCP2562-H/P, MCP2515-I and RTQ2569-50GQW-QA. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Thruster Controller KiCad files?

From the mark-belbin/motor-controller repository on GitHub, at the commit this page was made from: the board is hardware/Thruster_Controller/Thruster_Controller.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Thruster Controller design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

More from mark-belbin/motor-controller

6
  • 4 layers108 × 54 mmMCU Powertrain, the printed circuit board in 3D

    MCU Powertrain

    mark-belbin/motor-controller

    Custom FOC motor controller designed for underwater robotics.

    163 parts43GPL-3.0
  • 4 layers35.4 × 10.8 mmThruster Controller V2, the printed circuit board in 3D

    Thruster Controller V2

    mark-belbin/motor-controller

    Custom FOC motor controller designed for underwater robotics.

    112 parts43GPL-3.0
  • 2 layers73.5 × 85 mmPower Sense PCB, the printed circuit board in 3D

    Power Sense PCB

    mark-belbin/motor-controller

    Custom FOC motor controller designed for underwater robotics.

    87 parts43GPL-3.0
  • 4 layers51 × 50 mmESC Drivetrain V1, the printed circuit board in 3D

    ESC Drivetrain V1

    mark-belbin/motor-controller

    Custom FOC motor controller designed for underwater robotics.

    71 parts43GPL-3.0
  • 2 layers91 × 38 mmXDS100v2 Programmer, the printed circuit board in 3D

    XDS100v2 Programmer

    mark-belbin/motor-controller

    Custom FOC motor controller designed for underwater robotics.

    43 parts43GPL-3.0
  • 2 layers19.4 × 10 mmRPM Sensor, the printed circuit board in 3D

    RPM Sensor

    mark-belbin/motor-controller

    Custom FOC motor controller designed for underwater robotics.

    23 parts43GPL-3.0

Similar boards

  • 4 layers72.4 × 45.7 mmEasyBLDCV1 DRV8305, the printed circuit board in 3D

    EasyBLDCV1 DRV8305

    buckles3636/EasyBLDC

    Please ensure your designs meet common standards and include necessary documentation and comments.

    79 parts2MIT
  • 2 layers49.8 × 63.2 mmEdgeberry console cartridge, the printed circuit board in 3D

    Edgeberry console cartridge

    Edgeberry/Edgeberry-HWCartridge-ConsoleCAN

    An Edgeberry Hardware Cartridge with a CAN-bus interface and USB console access

    88 parts4CERN-OHL-W-2.0
  • 4 layers127 × 76.2 mmPayload pcb, the printed circuit board in 3D

    Payload pcb

    austindriggs/urc-payload-pcb

    All-purpose control and interface board designed to manage mission-critical sensors and electronics for University Rover Challenge at WVU.

    114 partsMIT
  • 2 layers65 × 56.5 mmRPi MCP2515, the printed circuit board in 3D

    RPi MCP2515

    GBert/misc

    miscellaneous stuff / unsorted

    47 parts99
  • 2 layers86.4 × 35.1 mmDAQ CAN support, the printed circuit board in 3D

    DAQ CAN support

    waterloo-rocketry/canhw

    Hardware monorepo avionics PCB

    36 parts15GPL-3.0
  • 2 layers116 × 72.3 mmPiMainboard, the printed circuit board in 3D

    PiMainboard

    UofSSpaceTeam/rover-hardware

    Hardware design files for the Rover project.

    32 parts5
  • 4 layers85.3 × 131.6 mmBattery Monitor 1.2, the printed circuit board in 3D

    Battery Monitor 1.2

    team-mountaineers-urc-2023/electronics

    Block diagrams, schematics, and PCB files related to the electronics subteam

    167 parts2BSD-3-Clause