Get started — Ready to use firmware
Every Duilio F4 board ships with a baseline firmware already flashed and working. It is designed for real motion control with common external motor drivers (such as ZS-X11), providing two-motor open-loop PWM control, integrated safety logic and optional speed limiting.
Power it, wire your driver, plug your controller -- you can drive two wheels in minutes.
What is already included
The baseline firmware ships ready for real machines, with the most common control blocks already configured.
Two-motor PWM control
Open-loop control for left and right wheels.
ZS-X11 style drivers
- ENABLE_X/ENABLE_Y active LOW
- BRAKE_X/BRAKE_Y active HIGH (if used)
Optional speed limiter
- default limit: 25 km/h
- based on 6" wheels and 45 pulses per revolution
- if not needed, leave the RPM input unconnected
RC mapping + auxiliary outputs
Inputs and NPN outputs are already configured.
Failsafe and safe states
Safe behavior on command loss is built in.
Dual sonar inputs
Supports 2 ultrasonic sensors out of the box.
Battery voltage sensing
Battery voltage input is included out of the box.
Sonar distances and battery voltage are reported over USB and can be used as host feedback.
Control sources (RC, Raspberry Pi, PC)
The baseline firmware can be commanded in two ways, without reflashing:
- RC receiver (standalone mode)
- Raspberry Pi or PC over USB
USB host (Raspberry Pi/PC) can command the board via USB using the provided Python or Arduino library.
When controlled from a host:
- USB commands in
- USB telemetry out (battery voltage + sonar readings + basic status)
- Official Python and Arduino libraries are provided
- The host can fully replace or override RC inputs
No firmware change is required to switch between RC and host control.
Default RC mapping
RC inputs:
- CH1 -> STEER
- CH2 -> SPEED (throttle)
- CH3 -> controls OUT3 (NPN output)
- CH4 -> controls OUT4 (NPN output)
Outputs:
- RC1 -> Left wheel
- RC2 -> Right wheel
- STEER output
- CH4 output
NPN outputs:
- OUT3 driven by RC CH3
- OUT4 driven by RC CH4
Driver wiring (ZS-X11 example)
The minimum required connection for each motor is PWM + DIR. This allows basic motion control to work.
The ENABLE_X/ENABLE_Y pins are strongly recommended for safety. They allow the firmware to fully disable motor outputs on failsafe, disarm, or fault conditions. Using ENABLE_X/ENABLE_Y provides a safer system compared to PWM/DIR only.
Expected logic:
- ENABLE_X/ENABLE_Y active LOW
- BRAKE_X/BRAKE_Y active HIGH (optional)
Minimum wiring:
- PWM_X -> driver left PWM
- DIR_L -> driver left DIR
- PWM_Y -> driver right PWM
- DIR_R -> driver right DIR
- Common ground between Duilio and driver
Recommended wiring:
- PWM_X -> driver left PWM
- PWM_Y -> driver right PWM
- ENABLE_X/ENABLE_Y -> driver enable (active LOW)
- BRAKE_X/BRAKE_Y -> driver brake (if used)
- Common ground between Duilio and driver
Speed limiter
The speed limiter uses an RPM signal. Default assumptions:
- 6" wheel
- 45 pulses per revolution
- 25 km/h limit
If RPM is not connected, the limiter is automatically inactive.
Quick start & safety
Follow these steps to validate wiring and motion safely.
- Test with wheels off the ground
- Wire power and common ground
- Wire driver PWM and ENABLE_X/ENABLE_Y
- Connect RC or USB host
- Apply power and test at low speed
Always keep a physical power switch or emergency stop accessible.
Other baseline options (on request)
The shipped baseline firmware is the standard configuration described above. Alternative baseline configurations can be provided on request, for example:
- Brushed motor drivers (BTS7960-like) where the second PWM channel is mapped differently (e.g., DIR line repurposed as the second PWM input).
- Other mappings or driver styles available on request.
With Duilio Tools you can switch configurations in a few clicks, without writing a single line of code.