Hardware Overview

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 (HFSI) to track the magnetic saliency of the rotor. This allows it to hold full nominal torque at absolute zero speed without encoders.

Key Features

  • Sensorless Operation: Tracks rotor position down to 0 RPM via magnetic saliency tracking.
  • Integrated Measurement: 3-Phase low-side shunt resistor current sensing for high-accuracy FOC control.
  • Compact Thermal Layout: Direct thermal-via coupling to an aluminum heat plate for optimal dissipation.
  • Multiple Control Modes: Seamlessly transition between Torque, Velocity, and Position loops.
  • Connectivity: Standard CAN-FD, high-speed UART, and I2C interfaces for robotic system bus configurations.

Electrical Specifications

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
Input Voltage (V) 12 48 75 V
Peak Phase Current - - 60 A
Logic Output (3.3V Rail) 3.2 3.3 3.4 V
PWM / FOC Loop Frequency 20 20 24 kHz
Maximum Speed - - 60,000 ERPM
Internal Driver Thermal Cutoff - 140 160 °C
⚠️
Voltage Spikes & Regenerative Braking: During decelerations or heavy reverse loads, motors generate electricity that pumps back into the DC power source. If your power supply is not capable of absorbing this current (or does not have a shunt regulator), V_IN may spike above 70V, causing destructive over-voltage failures.

TIM8-Synchronized Current Oversampling

The controller employs a specialized hardware-synchronized phase current oversampling system to minimize switching noise and maximize current loop control authority:

  • Hardware Triggering: The auxiliary timer TIM8 is configured in OnePulse Mode (Slave Mode triggered by TIM1 TRGO via the internal ITR0 coupling). This ensures current measurements are started exactly at the center-point of the PWM cycle where switching transients are minimal.
  • Dynamic Symmetrical Windowing: Based on the active duty cycles (CCR1, CCR2, CCR3), the firmware dynamically adjusts the oversampling window length. A Duff's Device implementation processes up to 17 samples symmetrically balanced around the PWM midpoint in a half-cycle.
  • 16x Telemetry Resolution Scaling: Raw ADC current averages are multiplied and accumulated to scale values 16x larger. This preserves low-level sub-mA resolution inside the integer math pipeline.

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 (10-Pin JST-GH)

This connector houses the primary communication protocols (CAN-FD, UART, I2C) 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 I2C_SDA I/O I2C Serial Data (onboard pulls to 3.3V) 3.3V
8 I2C_SCL Output I2C Serial Clock (onboard pulls to 3.3V) 3.3V
9 PWM_IN Input PPM/PWM input signal (RC servo signal) 3.3V (5V Tolerant)
10 ADC_TEMP Input Analog Input for motor temperature thermistor 0V - 3.3V

3. SWD Programming Port (4-Pin, 2.54mm Pitch)

Exposed on the bottom edge of the board for debug and low-level flashing of the STM32 microcontroller.

Pin Label Description Voltage
1 GND Ground reference 0V
2 SWCLK Serial Wire Clock signal 3.3V
3 SWDIO Serial Wire Debug Data I/O 3.3V
4 +3.3V Core Logic power (DO NOT power from programmer if VIN is connected) 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 10-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. There is no need to install external drivers or compilers.

Web-Based Flashing via USB

Firmware updates are flashed over a standard USB-C connection using the built-in USB bootloader:

  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 a custom .bin file) 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.

Flashing command (OpenOCD)
# Erase chip and program the ELF binary
openocd -f interface/stlink.cfg -f target/stm32g4x.cfg \
  -c "init" \
  -c "reset halt" \
  -c "flash write_image erase build/vdrivemotion_firmware.elf" \
  -c "verify_image build/vdrivemotion_firmware.elf" \
  -c "reset run" \
  -c "shutdown"

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), inductance (L), 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 (Chrome recommended for Web Serial).
  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 RL Detection. The motor will hum quietly for 3 seconds while measuring winding resistance and phase inductance.
  6. Click Run Flux Linkage Detection. The motor will spin slowly in both directions to calculate the rotor's flux constant.
  7. Review the measured parameters. Click Apply and Save Configuration to write these values to the non-volatile EEPROM 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.

Serial Command API

The controller exposes a standard ASCII text-based Serial/USB communication API. Commands can be sent via the USB-C virtual COM port or the primary JST-GH UART interface. Command packets use the format COMMAND:PARAM1,PARAM2,... followed by a newline (\n).

Command Parameters Description Target State Machine Transition
START None Initiate the Field Oriented Control (FOC) motor drive loop. Run_Foc
STOP None Shut down PWM outputs and place the motor into high-impedance coasting. Idle
Enable_Driver None Power up complementary gate driver hardware outputs. Enable_Driver_Output
Disable_Driver None Power down complementary gate driver hardware outputs. Disable_Driver_Output
SET_CURRENT I_D, I_Q, Speed Set direct axis current limit I_D (A), quadrature axis torque current I_Q (A), and velocity reference Speed (rad/s). Active parameters updated inline
Start_HFI None Enable High-Frequency Signal Injection for sensorless zero-speed saliency tracking. Start_HFI (FOC Loop HFI active)
Stop_HFI None Disable High-Frequency Signal Injection. Stop_HFI (Sensorless back-EMF only)
Meas_Res None Run automated Stator Resistance (Rs) measurement cycle. MeasureRS
Meas_Ld None Run automated d-axis Inductance (Ld) identification cycle. MeasureLD
Meas_Lq None Run automated q-axis Inductance (Lq) identification cycle. MeasureLQ
Meas_Shunt_Offset None Identify and calibrate the current sense operational amplifier voltage offsets. Measure_Offset
Meas_Shunt_Gain None Calibrate current shunt amplification gains. Calibrate_Shunts
Meas_Phase_Offset None Measure voltage offset errors on the phase feedback lines. State_Measure_Phase_Offset
Align_Encoder None Execute magnetic encoder angle alignment procedure. CalibrateEncoder
Save_Memory None Store current parameter configurations permanently to non-volatile Flash memory. Save_Memory
Read_Memory None Load stored configurations from non-volatile Flash memory. Read_Memory
FW_version None Query firmware build identifier and system compatibility. ReadFwVersion
Log_Start Mask Start real-time high-speed data stream for logging variables matching Mask bitwise flags. Telemetry active
Log_Stop None Stop active telemetry stream and clear local serial ring buffers to avoid lag. Telemetry inactive
Read_Loggable_Params None Retrieve JSON-formatted list of all variables available for logging and their bitmasks. Transmit Parameter JSON
Update_Firmware None Reboot the microcontroller directly into the DFU USB bootloader for flashing. UpdateFirmware