To achieve constant torque across a wide variable speed range, you must use a Brushless DC (BLDC) or AC synchronous servo motor driven by Field Oriented Control (FOC). Standard steppers lose torque exponentially as speed increases, and basic Volts-per-Hertz (V/f) AC drives struggle to produce rated torque at low speeds. FOC solves this by continuously calculating and aligning the stator magnetic field exactly 90 degrees to the rotor flux, yielding maximum torque per ampere from 0 RPM up to the motor's base speed.
The Core Principle: FOC and Constant Torque at Variable Speeds
Field Oriented Control (also known as vector control) relies on the Clarke and Park mathematical transforms to convert the three-phase AC currents of the motor into a two-axis DC coordinate system (d and q axes). The 'd' axis controls the magnetic flux, while the 'q' axis controls the torque. By holding the d-axis current at zero and modulating only the q-axis current, the drive delivers pure, ripple-free torque regardless of the rotor's angular position or speed.
This creates a distinct constant torque zone from 0 RPM up to the motor's rated base speed. Beyond the base speed, the drive enters the constant power zone (field weakening), where torque drops off inversely with speed. For applications demanding constant torque, you must ensure your maximum operating speed stays within the constant torque zone.
Size the motor's continuous stall torque to be at least 1.5x the peak load torque required at your lowest operating speed. This accounts for static friction breakaway and prevents thermal saturation during prolonged low-speed, high-torque operation.
Worked Load Example:
You are building a filament extruder that requires 2.5 Nm of torque to pull material through the die at a minimum speed of 10 RPM.
Calculation: 2.5 Nm × 1.5 = 3.75 Nm.
You must select a servo motor with a continuous torque rating of at least 4.0 Nm. Do not size based on the peak (intermittent) torque rating, as running a motor at peak torque at 10 RPM will quickly exceed its I²t thermal limits and trip the drive's overtemperature fault.
Motor Type Comparison: Why FOC Servos Win for This Profile
Treating steppers and servos as interchangeable is a common mistake that leads to stalled mechanisms and melted windings. Here is how the three common motor topologies handle a constant-torque, variable-speed profile.
| Motor Topology | Torque Curve Profile | Control Needs | Low-Speed Smoothness | Approx. Cost (NEMA 23 class) |
|---|---|---|---|---|
| Open-Loop Stepper | High holding torque, drops exponentially past 300 RPM | Step/Dir pulses, open-loop | Poor (resonance and cogging) | $25 - $50 |
| BLDC w/ Hall Sensors (Trapezoidal) | Flat to base speed, but high torque ripple at low RPM | 6-step commutation, Hall feedback | Fair (noticeable pulsing under 50 RPM) | $80 - $120 |
| BLDC/AC Servo w/ FOC | Perfectly flat constant torque to base speed, smooth field weakening | Sinusoidal FOC, high-res encoder | Excellent (zero cogging at stall) | $180 - $300 |
For a constant torque variable speed application, the BLDC/AC Servo with FOC is the only correct choice. Steppers will overheat if forced to hold high torque at low speeds without closed-loop current limiting, and trapezoidal BLDC drives will introduce mechanical vibration due to commutation torque ripple.
Wiring and Terminal Identification for FOC Servo Drives
Wiring an FOC servo requires meticulous attention to phase sequencing and encoder signal integrity. A typical integrated FOC drive and motor setup uses the following terminal designations:
- Power Terminals (U, V, W): The three motor phases. Swapping any two will reverse the motor direction, but the FOC drive will auto-detect and correct this during the initial calibration sequence. Use crimped ferrules on stranded wire to prevent stray strands from shorting.
- DC Bus (DC+, DC- or VCC, GND): For low-voltage maker drives (24V-56V). Ensure your power supply can handle regenerative braking; if the motor decelerates a high-inertia load, it will pump voltage back into the bus. A brake resistor wired across the DC bus is mandatory for high-inertia variable-speed loads.
- Encoder Feedback (A, B, I or SSI/SPI): Incremental encoders use A/B quadrature and an Index (I or Z) pulse. Absolute encoders use SSI or SPI.
Controller Demands: Driving FOC from an ESP32 or Arduino
You cannot reliably run high-frequency, 3-phase FOC math directly on a standard Arduino Uno or even an ESP32 while simultaneously handling WiFi/Bluetooth stacks. The 20kHz PWM interrupts will starve the RTOS tasks, causing communication dropouts.
The correct architecture is to use a dedicated hardware FOC node (like the ODrive S1 or a SimpleFOC shield) and use the ESP32 as a high-level master controller.
| Communication Protocol | Best Use Case | ESP32 Hardware Requirement |
|---|---|---|
| CAN Bus (CANopen/ODrive Native) | High-speed torque/velocity updates, noisy industrial environments | ESP32-S3 with native TWAI or external MCP2515 transceiver |
| RS485 / Modbus RTU | Long cable runs (>5 meters) to the drive | MAX485 TTL-to-RS485 module |
| UART / ASCII | Simple configuration, low-frequency setpoint updates | Hardware Serial pins (avoid SoftwareSerial) |
For constant torque applications, you will command the drive in Torque Control Mode (often called current control mode). The ESP32 calculates the required torque based on load cell feedback or kinematic models, and sends a direct current command (e.g., 15.5 Amps) to the FOC drive via CAN bus. The drive's internal current loop executes at 20kHz to maintain that exact torque regardless of speed variations.
Failure Signatures: Diagnosing Hum, Overheat, and Stall
When an FOC system misbehaves, the physical symptoms map directly to specific tuning or wiring faults. Do not just increase the PID gains and hope for the best.
- High-Frequency Audible Hum or Whine: This is rarely the motor itself. A 10kHz+ whine indicates encoder noise bleeding into the derivative (D) term of the velocity PID loop. The drive is micro-correcting for phantom position jumps. Fix: Check encoder shield grounding, lower the velocity D-gain, or add a low-pass filter to the encoder input in the drive software.
- Overheat at Low Speeds (Thermal Fault): If the motor is running at 5 RPM but the casing is too hot to touch, you are exceeding the continuous I²R limit. FOC provides maximum current at stall, but without back-EMF and rotor movement, the motor relies entirely on conduction for cooling. Fix: Add a forced-air blower to the motor housing, or select a physically larger motor frame with a higher continuous thermal rating.
- Stall and 'Following Error' Fault: The drive reports a position tracking error. This happens when the load torque suddenly exceeds the motor's peak torque limit, or the velocity P-gain is too low to correct for disturbances. Fix: Verify your load hasn't mechanically bound, and ensure the drive's peak current limit is set to 2x the continuous rating for short bursts.
The Decision Path: Sizing and Selecting Your Exact Part
Use this decision matrix to finalize your hardware selection for a constant-torque, variable-speed embedded project.
| Application Parameter | If True... | Hardware Consequence |
|---|---|---|
| Load requires > 3 Nm continuous torque | Select NEMA 34 or 80mm AC Servo frame | Requires 48V-72V DC bus and heavy-gauge (12 AWG) phase wires |
| Load requires < 1 Nm continuous torque | Select NEMA 17 or NEMA 23 BLDC frame | 24V DC bus is sufficient; can use integrated driver boards |
| System requires real-time WiFi telemetry | Use ESP32-S3 as master, CAN bus to drive | Isolate the high-current FOC drive from the low-voltage ESP32 logic |
| Load has high inertia (flywheels, winches) | Mandatory regenerative braking | Size a brake resistor to absorb the kinetic energy (E = 1/2 Iω²) |
The Default Recommendation:
For the vast majority of maker, CNC, and robotics projects requiring precise constant torque and variable speed control, the optimal balance of cost, performance, and embedded compatibility is the ODrive S1 Controller paired with the ODrive 42BLF01 BLDC motor (or an equivalent NEMA 23 BLDC with an integrated 8192-count magnetic encoder).
The ODrive S1 natively handles the complex FOC math, provides native CAN and UART interfaces for seamless ESP32 integration, and includes built-in brake resistor circuitry. The 42BLF01 provides a flat torque curve up to its base speed, and the integrated magnetic encoder eliminates the EMI wiring nightmares associated with external optical encoders. Configure the ODrive in INPUT_MODE_PASSTHROUGH with CONTROL_MODE_TORQUE_CONTROL, and your ESP32 will have direct, ripple-free command over the motor's torque output at any speed.






