Firmware for the Gantry three-axis motion control system, built on the Teknic ClearCore platform. This firmware provides precision control for X, Y, and Z axis movements with synchronized dual-motor Y-axis control, homing routines, and network/USB communication.
Designed to work with: BR Equipment Control App - A Python/Tkinter GUI for controlling and monitoring the Gantry and other Blue Robotics manufacturing equipment.
- Three-axis control - Independent X, Y, Z axis control with synchronized Y-axis dual motors
- UDP/Ethernet communication - Network-based control with device discovery
- USB Serial fallback - Direct USB communication support
- Command-based control - Simple text-based command protocol
- Real-time telemetry - Position, velocity, torque, and status reporting for all axes
- Automatic homing - Configurable homing routines for all axes
- Software limits - Configurable travel limits for safety
- Error handling - Comprehensive error reporting and recovery
- Atmel Studio 7 (Windows) or compatible ARM GCC toolchain
- Teknic ClearCore libraries (included in
lib/folder)libClearCoreLwIP(Lightweight IP stack)
- Open
gantry.atslnin Atmel Studio - Ensure libraries are properly referenced:
lib/libClearCore/ClearCore.cppprojlib/LwIP/LwIP.cppproj
- Select build configuration (Debug or Release)
- Build the solution (F7)
Debug/gantry.bin- Binary firmware imageDebug/gantry.uf2- UF2 format for bootloader flashing
The easiest way to update firmware on an already-running device is through the BR Equipment Control App:
- Open the Firmware Manager in the app
- Select your device
- Choose the firmware file or download the latest release
- Click "Update Firmware" - the app handles the entire flashing process automatically
Note: Firmware flashing is only supported over USB connections. For initial flashing of a new device, use the bootloader method below.
For initial flashing of a new device or when the app is not available:
- Put the ClearCore into bootloader mode (hold button during power-on)
- Copy
gantry.uf2to the mounted bootloader drive - The device will automatically reboot with new firmware
- Connect ClearCore via USB
- Select "Custom Programming Tool" in project settings
- Build and program (F5)
The firmware uses a simple text-based command protocol over UDP or USB serial:
- Commands:
move_x <position> mm,move_y <position> mm,move_z <position> mm - Status:
DONE: <command>,ERROR: <message>,INFO: <message> - Telemetry: Periodic status updates with position, velocity, torque
See the BR Equipment Control App for full protocol documentation and command reference.
- X-axis: Single motor (M0), 1219mm travel range
- Y-axis: Dual synchronized motors (M1, M2), 410mm travel range
- Z-axis: Single motor (M3) with brake control, -160mm to 0mm travel range
- Homing sensors: Digital inputs for each axis (IO0, IO1, IO3, IO4)
- Limit switches: Y-axis back limit (IO2)
- Z-axis brake: Digital output control (IO5)
Key parameters can be configured in inc/config.h:
- Steps per mm: Conversion factors for each axis
- Travel limits: Software limits for X, Y, Z axes
- Homing parameters: Velocities, accelerations, and torque limits
- Network settings: UDP port, packet sizes, telemetry interval
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Blue Robotics
For issues, feature requests, or contributions, please open an issue or pull request on GitHub.
⭐ Star us on GitHub if you found this useful!
Made with 💙 by the Blue Robotics team and contributors worldwide
bluerobotics.com | Manufacturing Equipment Control