Servo motors are fascinating as a result of, not like steppers or DC motors on their very own, a servo motor is a closed-loop system that is aware of its personal place. That’s why they’re so in style for robotics tasks. However servo motors may also be a headache to work with, as they typically require libraries with slightly irritating management implementations. Wouldn’t your servo-based tasks be a lot extra nice if you happen to may simply ship a easy textual content command over serial to set your servo motor to a selected place or to ask for its present place? Now you’ll be able to, due to the Servio challenge.
Servio is an open-source servo design that features firmware code and a customized controller PCB design. The latest replace reveals that PCB becoming right into a Hiwonder LX-15D servo motor enclosure (with a customized 3D-printed cowl), however the identical PCB ought to work for a lot of different designs and sizes—or fully customized servo enclosures. The PCB is actually small for precisely that purpose. However it’s also full of helpful {hardware}, which is what makes Servio intriguing.
That {hardware} begins with a microcontroller, which is an STM32H5. That’s a tad on the expensive facet for a microcontroller devoted to a single servo, however it’s highly effective and versatile. It drives the servo’s DC motor by a DRV8251A H-bridge that has a formidable peak present output of 4.1A (voltage is 4.5 to 50). It additionally has built-in current-sensing capabilities, which is a pleasant bonus that permits for a couple of totally different operation modes: present mode, place mode, and velocity mode. The construct documentation goes into quite a lot of depth on this topic (significantly current-sensing), which is an efficient learn if you happen to’re within the intricacies.
The takeaway is that customers can make the most of all of that to regulate their Servio servo motors in a approach that’s far more intuitive than they’re used to, whereas nonetheless permitting for precision and efficiency. Earlier variations of Servio used a Protobuf-based communication protocol, however the newest model has a easy text-based interface. Simply join your main microcontroller to your Servio by way of serial (software program serial is okay) and ship a command, then get a response again with a affirmation or requested knowledge.
For instance, if you wish to use the servo within the “regular” approach for place management, simply ship the command “mode place X” (the place X is the place you need). Servio will reply with a affirmation ([“OK”]) after which try to maneuver to that place. Or you’ll be able to ask Servio for its present place with the command “prop place” and it’ll return that info. There are equally intuitive instructions for the entire modes and features.
Whereas Servio has been in improvement for a couple of years now and appears to be performing nicely, it isn’t precisely polished but. You possibly can head over to the GitHub web page to search out the present recordsdata, however you’ll want some know-how to make use of them.