Hardware Overview: FOC Motor Controller

Welcome to the official VDriveMotion Hardware Wiki. This documentation provides comprehensive pinouts, electrical characteristics, wiring schematics, and configuration instructions for the VDriveMotion High-Performance Sensorless FOC (Field Oriented Control) Motor Controller.

The VDriveMotion controller is engineered for applications demanding high torque density, precision dynamics, and space-constrained integration, such as quadrupeds, robotic arms, aerospace actuators, and automated guided vehicles (AGVs).

True Zero-Speed Sensorless FOC: Unlike typical sensorless ESCs that rely solely on back-EMF and require the motor to spin before estimating position, VDriveMotion utilizes High-Frequency Signal Injection (HFI) into the direct axis to track rotor magnetic saliency (Lq ≠ Ld). This allows it to hold 100% full nominal stall torque at absolute zero speed (0.0 RPM) without optical encoders or Hall effect sensors.

Key Features

  • Sensorless Operation: Tracks rotor position down to 0.0 RPM via pulsating D-axis HFI saliency tracking.
  • Integrated Measurement: 3-Phase low-side shunt resistor array with hardware CORDIC and Dynamic Over-Sampling in CCMRAM.
  • Compact Thermal Layout: Direct thermal-via coupling to an aluminum heat plate for optimal dissipation up to 60.0A RMS continuous.
  • Deterministic Communication: Binary COBS wire protocol with CRC16/CRC8 over native USB CDC and CAN-FD.
  • Zero-Install Web Tuning: Full motor identification and dead-time LUT calibration in under 60 seconds via WebSerial.

System Architecture

The block diagram below illustrates the layered system integration topology of the VDriveMotion FOC Motor Controller, including interfaces for host communication, dictionary mapping, real-time motion core, and power stage.


Electrical Specs: 70V / 60A FOC Driver

Ensure that all operating variables remain within the absolute maximum bounds listed below. Exceeding these specifications can result in permanent damage to the onboard power stage (MOSFETs, gate drivers) and logic controllers.

Parameter Minimum Typical Maximum Unit
Operating Bus Voltage 12 48 70 V DC
Continuous Phase Current - - 60.0 A RMS
Peak Phase Current Safety Limit - - 80.0 A Peak
Logic Output (3.3V Rail) 3.2 3.3 3.4 V
PWM / SVM Switching Frequency 24.0 36.0 36.0 kHz
Maximum Velocity (Observer Ceiling) - - 100,000 ERPM
Standby Quiescent Current - 15 25 µA
Internal Driver Thermal Cutoff - 140 160 °C
Voltage Spikes & Regenerative Energy: The Phasor50 regulates kinetic deceleration energy through closed-loop motor phase current absorption and low-ESR bus capacitance. When operating on non-battery bench supplies, ensure the DC supply can sink regenerative current or verify bus voltage does not exceed the 70V DC limit.

High-Precision Current Oversampling

The Phasor50 utilizes a hardware-synchronized multi-sample ADC oversampling pipeline to eliminate switching noise and maximize Field-Oriented Control (FOC) torque precision:

  • Midpoint Noise Rejection: Current measurements are triggered synchronously at the exact center of each PWM cycle when switching noise is lowest, delivering whisper-quiet operation and vibration-free motion.
  • Adaptive Symmetrical Sampling: The controller automatically captures and averages up to 17 samples per PWM half-cycle, dynamically adjusting the sampling window to maintain clean, distortion-free current feedback across all speeds and duty cycles.
  • Sub-Milliamp Precision (16x Resolution): Oversampled measurements are accumulated with 16x scaling, preserving ultra-fine current resolution for exceptional low-speed position hold and delicate torque control.

Connectors & Pinouts

The controller exposes interfaces for power, phases, communication, and auxiliary peripherals. Below are the physical layouts and pin mappings for the primary ports.

1. Main Power & Motor Terminals

Terminal Label Description Connection Type
V+ (VIN) Power Input Positive supply voltage input (12V - 70V DC) Solder Pad / XT60 Male
GND Power Ground Negative supply ground Solder Pad / XT60 Male
Phase U U Motor Phase U Output Solder Pad / 4.0mm Bullet
Phase V V Motor Phase V Output Solder Pad / 4.0mm Bullet
Phase W W Motor Phase W Output Solder Pad / 4.0mm Bullet

2. Control Port (8-Pin JST-GH)

This connector houses the primary communication protocols (CAN-FD, UART) used to interface with a master controller (such as a Raspberry Pi, Jetson Nano, or microcontroller board).

Pin Pin Name Direction Description Logic Level
1 GND Power Signal Ground reference 0V
2 +5V Power Out 5V supply out (for receiver or master controller) 5V (1A Max)
3 CAN_H I/O CAN Bus High terminal CAN Standard
4 CAN_L I/O CAN Bus Low terminal CAN Standard
5 UART_TX Output UART Transmit (serial telemetry) 3.3V (5V Tolerant)
6 UART_RX Input UART Receive (serial control command) 3.3V (5V Tolerant)
7 PWM_IN Input PPM/PWM input signal (RC servo signal) 3.3V (5V Tolerant)
8 GND Power Signal Ground reference 0V

3. SWD Programming Port (10-Pin Cortex Debug)

Exposed on the board (connector J7, FTSH-105-01-L-D-K) for debug, real-time tracing, and low-level flashing of the STM32 microcontroller using a standard 1.27mm pitch Cortex Debug connector.

Pin Pin Name Direction Description Logic Level
1 +3.3V Power Out Reference voltage for debugger / Core Logic Power 3.3V
2 SWDIO I/O Serial Wire Debug Data I/O 3.3V
3 GND Power Ground reference 0V
4 SWCLK Input Serial Wire Clock signal 3.3V
5 GND Power Ground reference 0V
6 SWO Output Serial Wire Output (trace telemetry) 3.3V
7 NC - No Connection (Unused) -
8 NC - No Connection (Unused) -
9 NC - No Connection (Unused) -
10 RESET Input System Reset signal (active low) 3.3V

Wiring & Setup

Follow these wiring steps to configure the controller safely for initial power-on. Incorrect polarity or shorted phases can lead to immediate silicon failure.

1

Phase Connection

Solder or plug the three brushless motor phase wires to the terminals labeled U, V, and W. If using sensorless FOC, the wire order does not matter; direction can be reversed in software during calibration.

2

Control Bus Connection

Connect your UART/CAN interface wires from your master host (e.g. Raspberry Pi) to the 8-pin Control Port. Ensure that GND on the control port is connected to the master's ground reference to establish a common ground.

3

Power Connection

Connect your DC supply (12V - 70V) to the power terminals. Double-check polarity. Apply power using a current-limited benchtop power supply (set to 1.0A max limit) for the first boot to prevent damage in case of wiring shorts.


Firmware Flashing

The controller runs a custom STM32-based FOC firmware. Firmware updates can be performed directly from your browser using the web tool, or via a hardware debugger using the Serial Wire Debug (SWD) port for recovery.

Easiest Method: For most users, firmware updates should be done via USB using our online tool at tool.vdrivemotion.com with authenticated .vdfw anti-brick containers. There is no need to install external drivers, Python toolchains, or compilers.

Web-Based Flashing via USB

  1. Connect the controller to your PC using a USB-C cable.
  2. Power on the controller via the DC input.
  3. Open Chrome or Edge and navigate to tool.vdrivemotion.com.
  4. Click Connect and select the controller's USB COM port.
  5. Once connected, click the Firmware Update button in the top menu or connection panel.
  6. Select the firmware version you wish to flash (or upload an authenticated .vdfw container) and click Flash Firmware. Do not disconnect the power or USB cable during this process.

Advanced: SWD Flashing via ST-Link

For fresh boards or recovery flashing after a bricked bootloader, connect an ST-Link V2 or V3 debugger to the SWD port. Note: only connect GND, SWCLK, and SWDIO if the board is powered via the main battery terminals.

Advanced: Using STM32CubeProgrammer GUI

  1. Connect the ST-Link programmer to your PC and the controller's SWD port.
  2. Power on the controller via the DC input.
  3. Open STM32CubeProgrammer. Set the interface mode to SWD and click Connect.
  4. Go to the Erasing & Programming tab. Browse to select your firmware file (vdrivemotion_firmware.bin or .hex).
  5. Check the Verify programming checkbox.
  6. Click Start Programming. Once complete, click Disconnect and power-cycle the board.

Motor Calibration

Before driving a brushless motor under FOC, you must perform motor identification parameter detection. This configures the internal resistance (R), direct/quadrature inductance (Ld, Lq), and flux linkage (λ) parameters inside the controller.

Pre-requisites: Mount the motor securely to a test stand. Uncouple it from any high-inertia gearboxes or linkages to allow free rotation during the parameter measurement sweep.

Step-by-Step Parameter Detection

  1. Open your browser and navigate to tool.vdrivemotion.com (Chromium-based browser required for WebSerial).
  2. Click Connect, select the controller's USB COM port, and verify that telemetry readings display in the side dashboard.
  3. Navigate to the Motor Tuning menu and select the FOC Setup Wizard.
  4. Enter the approximate current limits (e.g. 15A for estimation) and the number of pole pairs (typically 7 for a standard 14-pole gimbal or outrunner motor).
  5. Click Run Autonomous Calibration. The controller executes a 2-point stator resistance test (1A and 3A cancelling MOSFET VDS drops), identifies inductances (Ld, Lq), characterizes dead-time compensation LUTs, and tunes current loop gains in under 60 seconds.
  6. Review the measured parameters. Click Apply and Save Configuration to write these values to the non-volatile Flash memory.

Zero-Speed Saliency Tracking

The controller features fully automated zero-speed saliency tracking using High-Frequency Signal Injection (HFI):

  • Active HFI Ripple Cancellation: Dampens phase current ripples in the alpha-beta domain, improving position estimation signal-to-noise ratio (SNR).
  • Dual-Pulse Saliency PLL: Automatically tracks the magnetic saliency axis, which repeats twice per electrical cycle.
  • Adaptive Observer Bandwidth: The Saliency PLL dynamically adjusts its loop bandwidth and damping to filter out mechanical noise under different speed and load configurations.
  • Phase Lead Compensation: Compensates for filter group delays with a smooth, software-faded lead angle transition to eliminate zero-speed jitter.

Host Communication & 16-Bit Parameter Dictionary

The VDriveMotion Phasor50 operates a high-throughput, deterministic Binary Wire Protocol over its native USB Full-Speed Virtual COM Port (CDC Class at 12 Mbps) and primary UART/CAN interfaces. Raw binary packets are framed using Consistent Overhead Byte Stuffing (COBS) and terminate with a 0x00 delimiter byte, guaranteeing unambiguous packet synchronization with zero ASCII/CSV overhead.

Master Frame Architecture

The protocol defines three core structured frame types and three lightweight command packets:

Type Frame Name Direction Wire Size Integrity Function
0x01 Control Frame Host → MCU 13 B (11B raw) CRC16-CCITT Real-time setpoints, parameter writes, commands
0x02 Stream Frame Bidirectional 508 B (501B raw) 8-bit Sequence 36 kHz FOC telemetry (120 × Float32) & 36 kHz audio downlink
0x03 Dict Burst MCU → Host 64 B (62B raw) CRC8 (0x07) Dynamic dictionary schema discovery & variable naming
0x20 Subscribe HS Host → MCU Variable (2..14B) Stream Watchdog Channel selection for 36 kHz real-time telemetry (0-6 signals)
0x23 Heartbeat Host → MCU 3 B (1B raw) 4.0s Watchdog Maintains active high-speed streaming without timeout
0x24 Subscribe Audio Host → MCU Variable (2..14B) Stream Watchdog Enables host-to-motor 36 kHz acoustic audio streaming

Binary Frame Visualizers

All structured frames are encoded via COBS to eliminate 0x00 from the payload before wire transmission:

Type 0x01 Control Frame (11 Bytes Raw • 13 Bytes Wire Size)
Type1B (0x01)
Dev ID1B
Data Type1B
Group1B
Signal ID1B
Value (4B LE)4B
CRC162B
0x001B
Transmitted by the host to execute commands (e.g. cmd_run_foc, cmd_stop), adjust setpoints (target_iq, target_speed), or write tuning parameters. Decoded and validated via CRC16 before application.
Type 0x02 High-Speed Stream & Audio Frame (501 Bytes Raw • 508 Bytes Wire Size)
Type1B (0x02)
Dev ID1B
Data Window (120 × Float32)480B
Has Cmd1B
Cmd Type1B
Cmd Grp1B
Cmd Sig1B
Cmd Val4B
Slow Dev1B
Slow Type1B
Slow Grp1B
Slow Ch1B
Slow Val4B
State1B
Fault1B
Seq Counter1B
0x001B
The high-throughput streaming highway. Uplink (MCU → Host): carries 120 × Float32 real-time FOC telemetry samples @ 36 kHz, multiplexes background dictionary parameters in bytes 490..497, and reports state/fault health. Downlink (Host → MCU): streams 120 acoustic samples into the 512-entry audio FIFO to drive windings as a loudspeaker.
Type 0x03 Dictionary Burst Frame (62 Bytes Raw • 64 Bytes Wire Size)
Type1B (0x03)
Dev ID1B
Group1B
Channel1B
Name String (ASCII)55B
Data Type1B
Access1B
CRC81B
0x001B
Transmitted by the ESC upon connection (or via cmd_broadcast_dict) to dynamically publish its complete dictionary schema, register names, and memory permissions to the web tool or host SDK without requiring static code generation.

Command & Subscription Packets

Compact, single-frame messages for keep-alive monitoring and telemetry stream configuration:

0x23

Heartbeat / Keep-Alive Packet

Raw: [0x23] (1 Byte) • Wire: [0x02, 0x23, 0x00] (3 Bytes). Resets the 4.0-second telemetry watchdog timer. Must be sent by the host at least once every 3.0 seconds during high-speed streaming to prevent stream auto-pause.

0x20

High-Speed Telemetry Subscribe

Format: [0x20, Count, ID_1_L, ID_1_H, ...]. Subscribes up to 6 real-time channels (e.g. 0x0205 iq_meas, 0x0201 vbus) for 36 kHz packed streaming. Halts streaming when sent with [0x20, 0x00].

0x24

Host Downlink Stream Subscribe

Format: [0x24, Count, ID_1_L, ID_1_H, ...]. Configures host-to-MCU sample streaming (e.g. 0x0373 streamed_iq) for 36 kHz motor acoustic playback. Halts playback and resets target values when sent with [0x24, 0x00].

Interactive Parameter & Signal Dictionary Explorer

Explore all public commands, telemetry signals, tuning registers, and calibration error codes. Search by name, Hex ID, or category with instant copy support.

Showing all registers Click any Hex ID or name to copy
Hex ID Register Name Group Data Type Access Action

Protocol Implementation Examples