Every DQ Drives controller lists its communication interfaces in the technical information on the product page. This guide explains what each one is for, how it behaves on our controllers, and what to watch for when you wire it into your system. Pin assignments are in each product's info sheet.
All controllers run VESC® firmware, so everything here applies to the standard VESC® feature set. If you use our DQ ETA firmware, ask us about the interface set for your application.
Which controller has which interface
| Interface | Speedstick | M-Classic | M-Neo | M-Compact | L-Classic | L-Compact | XL-Classic | Rugged line |
|---|---|---|---|---|---|---|---|---|
| USB | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ (USB-C) |
| UART (serial) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | – |
| CAN | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| DroneCAN | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | – |
| PPM / servo PWM | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | – |
| Analog inputs (ADC) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ (ADC1, ADC2) |
| I2C | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | – |
| SPI | ✓ | ✓ | ✓ | ✓ | ✓ | – | ✓ | – |
M-Compact includes the high current edition. XL-Classic includes the 160 V Solarracing Edition.
Which interface should I use?
- Flight controller (ArduPilot, PX4): DroneCAN if your autopilot has a CAN port, otherwise servo PWM.
- Several controllers in one vehicle: CAN. One USB or wireless connection then configures all of them.
- Your own embedded controller or companion computer: CAN for robustness over longer cables, UART for a simple point-to-point link.
- Throttle pedal, twist grip or potentiometer: analog input.
- RC receiver: servo PWM.
- Configuration and logging on the bench: USB.
USB
The USB port enumerates as a virtual serial port. It is the interface for VESC Tool: configuration, motor detection, firmware updates and real-time plots. USB is a configuration and development interface. Don't use it as the command link in a vehicle, because a reconnect resets the communication.
The USB ground is the controller's signal ground, which sits on battery negative. When the controller is powered from a high-voltage battery and connected to a laptop that is itself grounded (charger plugged in, oscilloscope attached), ground loops can form. A USB isolator is cheap insurance on the bench.
UART (serial)
UART is a two-wire (TX, RX) point-to-point serial link at 3.3 V logic levels. Do not connect it directly to RS-232 or 5 V-only devices. VESC® firmware uses it for three things:
- VESC® packet protocol: the same command set VESC Tool uses over USB, framed with a CRC. Open-source libraries exist for Arduino, Python and ROS, so a companion computer can set current, duty cycle or speed and read back telemetry.
- Wireless modules and remotes that speak the VESC® protocol, such as Bluetooth or WiFi bridges.
- Custom scripts in LispBM that read or write the port directly.
The baud rate is set in VESC Tool (App Settings → UART). Keep the cable short and twist TX/RX with ground. For runs longer than about 30 cm, or in electrically noisy vehicles, prefer CAN.
CAN
CAN is a differential two-wire bus (CAN-H, CAN-L) built for vehicles. It tolerates long cables and electrical noise, and many devices can share one bus. It is the interface we recommend for anything that moves.
Wiring: connect all nodes in a line (no star topology) and terminate both physical ends of the bus with 120 Ω between CAN-H and CAN-L. A correctly terminated bus measures about 60 Ω between the two lines with power off. Run a common ground alongside the pair.
Bit rate: all nodes must use the same bit rate. The VESC® default is 500 kbit/s; it can be changed in VESC Tool (App Settings → General).
Controller IDs: every controller on the bus needs a unique ID (App Settings → General → VESC ID). VESC Tool can then reach every controller through the one it is plugged into, using CAN forwarding.
Native VESC® CAN: controllers broadcast status messages (eRPM, motor and input current, duty cycle, temperatures, input voltage, Ah/Wh counters) at a configurable rate and accept commands for current, duty cycle, speed and position. The frames use 29-bit extended IDs with the command number and the controller ID encoded in the identifier, so they are simple to parse on any microcontroller with a CAN peripheral. Ask us for a DBC file if you want to decode them with standard CAN tools.
DroneCAN
DroneCAN (formerly UAVCAN v0) is the CAN protocol used by ArduPilot and PX4. With the CAN mode set to DroneCAN in VESC Tool, the controller accepts ESC commands from the autopilot and reports RPM, voltage, current and temperature back to it, all on the same pair of wires. Compared with PWM, you get closed-loop telemetry per motor and no extra signal cable per ESC.
Things to match on the autopilot side: the CAN bit rate (ArduPilot commonly runs 1 Mbit/s), a unique node ID per controller, and the ESC index that maps each controller to a motor output. Native VESC® CAN and DroneCAN are selected per controller; check the setting before mixing both on one bus.
PPM / servo PWM
This is the standard RC servo signal: a pulse of roughly 1 to 2 ms, repeated at 50 to a few hundred Hz, with the pulse width setting the command. It connects directly to RC receivers and to the PWM outputs of flight controllers.
In VESC Tool (App Settings → PPM) you calibrate the pulse range and choose the control mode: current, duty cycle or speed, with or without reverse and brake. Set a timeout so the motor stops if pulses are lost. PWM carries no telemetry; use DroneCAN or CAN if you need feedback.
Analog inputs (ADC)
The analog inputs read a voltage and turn it into a command: hall-effect throttles, brake levers, foot pedals or potentiometers. On most controllers the inputs read 0 to 3.3 V; check the pinout in the info sheet before connecting a 5 V sensor, and use the controller's own logic output to supply it.
VESC Tool (App Settings → ADC) maps the voltage range to the command, sets dead bands and throttle curves, and can use a second input for regenerative braking. On the Rugged line, ADC1 and ADC2 come out on the waterproof connector for exactly this use.
I2C
The I2C pins share the communication header and are mainly for expansion: external sensors, displays or port expanders read from LispBM scripts. Use I2C only on short, on-board cables. It is not designed to leave the enclosure.
SPI
SPI on our controllers is the interface for absolute magnetic position encoders, such as the AS5047 family, used for sensored FOC with precise position at standstill. It is also listed under Supported Sensors on each product page. Keep encoder cables short and shielded, because the signals are single-ended and run close to the motor phases.
Motor sensors at a glance
All our controllers run sensorless FOC, which is enough for propellers, pumps and most vehicles. Add a sensor if you need full torque from standstill or precise positioning:
- Hall sensors: three digital signals, robust and common in hub and traction motors.
- ABI (incremental) encoders: high resolution, needs an index or an alignment step at startup.
- SinCos: analog sine and cosine signals, used in some industrial motors.
- SPI encoders: absolute position over SPI, see above.
Need a different interface?
RS-485, isolated CAN, a specific connector or a custom protocol can usually be added on a custom signal board without changing the power stage. Tell us about your system and an engineer will get back to you.