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.

2 thoughts on “Controlling 5 Servos With a Raspberry Pi

  1. calvin says:

    Very neat! ‘

Comments are closed.

Discuss this article with the rest of the community on our Discord server!

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

View more articles by John Baichtal
Maker Faire Bay Area 2023 - Mare Island, CA

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

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).