Controlling 5 Servos With a Raspberry Pi

Raspberry Pi Robotics
Controlling 5 Servos With a Raspberry Pi
YouTube player

Pierre Villeneuve attached five hobby servos to a Lego model, controlled with a motor control board board and a RasPi. This is a nice way of controlling a Lego robot without needing to use Lego’s robotics components!

I initially tried to control my servos directly from the Raspberry Pi through its GPIO ports using the RPIO library, which has built-in support for software PWM. In my first implementation I saw excessive jitter in the resulting servo motion. This may have simply been a problem with my code?? I bailed on that approach and switched over to the nifty yet inexpensive hardware 16-channel 12-bit PWM controller board from Adafruit.

The most intriguing part of the project for me, however, is how Pierre made a histogram of a royalty-free music track he found, and used that to sync the motors’ movement to the beat. His GitHub has the source files for this project.

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

Tagged

My interests include writing, electronics, RPGs, scifi, hackers & hackerspaces, 3D printing, building sets & toys. @johnbaichtal nerdage.net

View more articles by John Baichtal
Discuss this article with the rest of the community on our Discord server!

ADVERTISEMENT

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK