Back to selected work

Selected work

Rewriting robotic manipulator firmware for reliable real-world operation

A C firmware rewrite for two controller modules on the existing hardware. The modules shared a bootloader and a library for motor operation, communication and other common functions; each implemented its own axis-control routines.

Anonymised professional project · my role: firmware for both controller modules

Application
Laboratory automation
Starting point
Sound hardware, prototype-level firmware
Scope
Two internal controller modules
Focus
Firmware, motion control, diagnostics and safe states
Two controller modules share a bootloader and a library for motors and communication. Each module has its own routines for controlling specific axes.
The shared parts were a bootloader and a common library. Each module implemented its own routines for controlling specific axes. The diagram does not show wiring or specific axis assignments.

Starting point

The robotic manipulator had working hardware and prototype firmware written in interpreted BASIC. Both controller modules were approaching their flash-memory limits, and the implementation constrained performance and further functionality.

Calibration required firmware changes for the mechanical properties of each unit. This created separate software variants and complicated maintenance. Systematic error handling, diagnostics and a practical update path at the customer site were missing.

Assignment and approach

My task was to rewrite the firmware for both modules on the existing hardware, including configuration, diagnostics, defined fault handling and an update path.

The control software had to account for the machine’s mechanics and communicate with motor drivers through a proprietary protocol. It also had to handle occasional driver faults that were difficult to reproduce.

Technical implementation

I rewrote the firmware in C. The new architecture reduced memory use and made room for additional functionality.

Key parts of the implementation:

  • Architecture and memoryBoth modules used a common bootloader and a shared library for motors, communication and other functions. Each module implemented its own routines for controlling specific axes.
  • Motor communicationIntegration through a proprietary protocol, including prevention of known driver issues and defined handling when they could not be avoided.
  • Motion controlParallel multi-axis motion and optimisation of motion sequences.
  • Calibration and configurationSemi-automatic calibration with parameters stored in flash. Differences between units and device variants were handled through configuration instead of separate code changes.
  • Boundary and fault handlingHoming with boundary-condition handling, interlock response and controlled movement against an obstacle with automatic stopping.
  • ServicingA bootloader for firmware updates at the customer site.

Result

The new implementation enabled additional functionality and parallel multi-axis motion on the original hardware. Calibration parameters were stored in flash, so configuring individual units no longer required separate software variants.

The firmware included diagnostics, defined fault responses and a bootloader for updates. These functions provided a foundation for maintenance and further development on the original hardware.

A similar task

Do you need to change the firmware or extend an existing device?

Tell me about the hardware and what you need to change.

Tomáš Vávra · independent engineer

tomas@vavrasystems.cz