WiFi-Based Servo Drive Tuning: Eliminating the Laptop from the Shop Floor
The traditional process for commissioning a servo drive goes like this: you bring a laptop to the machine, connect a USB or RS-232 cable, open the vendor's proprietary software, and spend thirty minutes adjusting PID gains while watching plots update at 5 Hz. Then you disconnect the cable, close the cabinet, and find out that the drive behaved differently with the cabinet closed because the temperature changed by eight degrees.
We built our DC Servo Drive with a different workflow in mind — one where tuning, monitoring, and firmware updates happen over WiFi from a phone or tablet, with no cable, no proprietary desktop software, and no reason to ever open the electrical cabinet during commissioning.
The Hardware: RP2350 + CYW43439
The DC Servo Drive is built around the Raspberry Pi Pico 2W: an RP2350 microcontroller with an onboard Infineon CYW43439 WiFi/Bluetooth module. This combination gives the drive full 2.4 GHz 802.11n connectivity with no external hardware. In the factory, we configure the drive to connect to the plant WiFi network. In standalone installations without a network, the drive creates its own access point — the technician connects to it directly from their phone.
The drive specifications:
- Continuous output: 1.5 kW at 48V DC / 31A continuous, 62A peak
- Encoder interface: RS-422 differential, up to 1250 CPR (5000 PPR quadrature)
- Command interface: STEP/DIR (3.3V TTL) or ±10V analogue velocity reference
- Safety: PLd / SIL2 rated via ERRin/ERRout hardware fault chain
- Communication: WiFi 802.11n (AP or station mode)
- Control loop bandwidth: 1 kHz current loop, 500 Hz velocity loop, 200 Hz position loop
The Web Interface
The drive hosts a lightweight HTTP server directly on the RP2350. The web interface — served from a 4 MB flash partition — loads on any browser with no installation. It provides:
- Live oscilloscope view. Position error, velocity, current draw, and PWM duty cycle, streamed over a WebSocket at 1 kHz to a Chart.js plot in the browser. You can see PID response in real time, at full control loop bandwidth, with no sampling decimation.
- PID gain adjustment. Sliders for Kp, Ki, Kd (velocity and position loops separately), with immediate live effect. Changes are applied to the running control loop without stopping the drive.
- Step response test. Command a configurable position step and watch the response on the oscilloscope. Adjust gains, step again, iterate — in seconds, not minutes.
- Fault log viewer. The drive maintains a wear-levelled fault log in flash. The web interface shows the last 64 fault events with timestamp, fault code, motor speed, current, and temperature at the time of fault. No serial terminal needed.
- Drive status dashboard. Bus voltage, motor temperature (via NTC), heatsink temperature, cumulative run hours, cumulative fault count, encoder health (A/B/Z signal quality).
- Configuration export/import. Download the complete drive configuration as a JSON file, modify offline, re-upload. Allows rapid commissioning of multiple identical drives by copying a known-good configuration.
The RS-422 Encoder Interface
Accurate velocity control depends on accurate velocity measurement, which depends on fast, noise-immune encoder decoding. The drive uses RS-422 differential signalling for the encoder interface: four twisted pairs carrying A+/A−, B+/B−, and optionally Z+/Z−.
RS-422 differential signalling gives 200 mV of common-mode noise rejection — essential in an industrial environment where a 1.5 kW PWM inverter is operating centimetres from the encoder cable. Single-ended TTL encoder interfaces are a common source of mystery faults in industrial servo systems; they pick up switching noise from the power stage and generate phantom encoder counts, which the position controller interprets as velocity spikes, which the current controller attempts to follow, which generates current spikes, which trip the overcurrent protection. Differential RS-422 eliminates this failure mode.
The RP2350 decodes the differential encoder via a DS26LV32A receiver driving the PIO state machines. As with the CNC controller, quadrature decoding is done entirely in PIO hardware — the ARM cores never see individual encoder edges, only the accumulated count in SRAM.
The ERRin / ERRout Safety Chain
A 1.5 kW servo drive is capable of doing serious damage if it loses control. The drive implements a hardware fault chain using ERRin and ERRout signals — open-drain lines that are pulled high when the drive is healthy and driven low (by hardware comparator, not software) the instant a fault is detected.
Any drive in the chain can pull ERRout low. This propagates immediately to the ERRin of all downstream drives, which immediately disable their power stages — without any software intervention, without any communication latency. In a multi-axis machine with four servo drives, a runaway condition on any one axis shuts down all four axes within one PWM switching cycle (16 µs at 62.5 kHz).
E-stop ─── ERRin[Drive 1] ─── ERRout[Drive 1] ─┐
├─── ERRin[Drive 2] ─── ERRout[Drive 2] ─┐
└─── ...
Any fault on any drive → ERRout goes low → all drives see ERRin low → immediate shutdown The ERRin/ERRout chain also connects to the machine's main E-stop circuit. The entire fault propagation path is implemented in hardware — no firmware, no RTOS, no network. This is required for PLd / SIL2 safety certification.
Commissioning Workflow
A typical commissioning sequence with the WiFi interface:
- Power up the drive panel. The drive connects to the plant WiFi (or creates an AP) and displays its IP address on the RS-485 diagnostic terminal output.
- Open a browser on a phone or tablet, navigate to the drive's IP address.
- Select "Step Response Test", set position step to 100 encoder counts, run. Watch the step response on the oscilloscope view.
- If overshoot is observed, reduce Kp via the slider. Re-run step test. Iterate. Typical tuning time for an experienced engineer: 5–10 minutes.
- Export configuration to JSON. Save as the baseline for this machine model. All future drives of the same type can be commissioned by uploading this JSON — first power-up, upload config, done.
- Close the browser. The drive is running. No cable was ever connected; the cabinet was never opened after initial wiring.
Security Considerations
WiFi access to industrial drive configuration is a legitimate security concern. The drive implements:
- WPA2-PSK authentication on both AP and station modes
- HTTP basic authentication on the web interface (default credentials must be changed on first power-up)
- A physical "lock" jumper that disables all WiFi configuration changes when installed — for deployed systems where the configuration should not be modified from the network
- All configuration changes are logged to the fault log with a timestamp and source IP address
For high-security installations, the WiFi interface can be disabled entirely in firmware, leaving only the RS-485 diagnostic port active. This is a compile-time option, not a runtime setting.
Availability
The T&C Technology DC Servo Drive (1.5 kW) is available for industrial OEM and system integrator customers. We supply the drive bare (PCB + heatsink) for panel integration, or in a DIN-rail enclosure. Custom rated versions (up to 5 kW in the current generation) are available on request.