That which lies beneath the surface...
From the veteran engineer to the novice enthusiast, the mesmerizing maneuvers of a robotic arm in motion are unlikely to ever cease to be a source of awe for a lot of people. A multitude of components come together and form this mechanical marvel that has the capacity to perform the most intricate tasks with unparalleled accuracy. Witnessing the smooth movements of the robot while it is going about its business with apparent ease and an eerie certainty tends to pull a veil over the spectator's eyes, making it hard to truly appreciate what goes on behind the scenes.
The heart and the soul of the machine, one thing that brings a collection of immaculate yet otherwise motionless parts into life: the firmware, or the “embedded software” as some would like to refer to it by. The intangible nature of this crucial part of the system of many elements that make up a functional robot makes it the most elusive and possibly the most under-appreciated component of the bunch even though you will find it, silently and relentlessly doing its job, literally in all the corners of the robot.
When your trusty robot wants to execute a set of instructions to move and take a specified pose or maybe move an object from one point to another, it is the firmware’s job to properly spin the the motors at the proper speed, with enough power and for an exact duration to actuate the the joints and complete the task at hand with the required speed and accuracy. Looking into it a bit deeper, one quickly realizes, this deceivingly simple task that comes naturally to the human brain under similar circumstances is quite intricate in reality when being handled by a few thousand lines of carefully written computer code that helps the robot in performing it.

It all starts with the algorithm receiving a demand from a central motion planner that instructs it to move the joint either at a certain speed, or to a certain point or move it with a certain amount of force. The algorithm tries to respond to this demand by energizing the motor in a very specific way. Through carefully manipulating the phases of 3 concurrent streams of current that run through the windings of the motor and generating an ever changing magnetic field, the algorithm makes the rotor spin. This endeavor requires utilizing sensors to get an idea about what exactly is going on with the fluctuating magnetic field inside the motor in real time; by using this information, the algorithm tries really hard to make sure the electrical energy supplied to the motor is converted to mechanical motion as efficiently and effectively as possible. At the same time, another sensor that accounts for the physical position of the rotor has to be constantly monitored and the information obtained goes into regulating the algorithm, helping it achieve precise positional control over the continuous motion the motor generates, as one would expect from one of the robot’s joints.
While the firmware in all the joints performing this task in concert with perfect harmony to produce the all too familiar motions of the robotic arm is a great candidate for being named the “chief” of all, keep in mind that the joint motor driver is only one of the many examples of where firmware plays a critical role in a robot’s activities. Other significant examples that come to mind immediately include IO-Boards that help the robot interface with its surroundings and accomplish more complicated tasks that require the robot to collaborate with many external sensors and actuators. Another example is gripper-controllers that are responsible for actuating the variety of attachments robots use to hold onto objects and tools.

No-matter where it resides in the system and what requirements it fulfills, unlike some of the lesser shortcomings and limitations of the physical components, which can be tolerated or even compensated by a cleverly executed firmware up to a certain point, a poorly performing firmware is much harder to make up for especially through external, after-the-fact, interventions. The bottom line is: when it comes to how well your robot functions, the contribution and value of a masterfully crafted firmware can hardly be overstated.
#mcflyrobot #bringsyouthefuture