Card to Control RC-servos from a Raspberry Pi





The interactive transcript could not be loaded.



Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Jul 17, 2012

Showing my prototype version of a small expansion card for the Raspberry Pi.

more info on: http://electronics.chroma.se/rpisbv3.php

The code is published as GPL on the above site.

It makes it quite easy to control up to eight RC-servos. The interface is a simple command set via the serial port of the GPIO port of the Raspberry Pi. The real version is of course above the Pi, not sticking out on the side as the prototype version. The servo connections is forward in the final version. The serial connection defaults to 9600bps 8N1.

It has an ASCII command-"language".

s0 1000 // Will move the first servo to 100% Same as below
s0 1000 0 // Will move the first servo to 100% Only servo speed limits speed.
s0 1000 10 // Will move the first servo to 100% at roughly 0.1% / ms
s0 -1000 // Will move the first servo to -100%
s2 1300 0 // Will move the third servo to 130% as fast as the servo can

st // Test: all servos will slowly go between -100% and 100%

sa 0 1000 500 -1000 // Move first servo to 0%, second to 100% and third to 50% and fourth to -100% the remaining 4 will be moved to 0%.

sav 1 1 1 1 // Set slowest possible speed for the first four servos, the remaining four will get speed 0 (as fast as possible)

sbr 1 // Set bps to 19200 (ACK comes with "old" speed) Supports up to 500kbps

sia 1000 0 0 100 0 0 0 0 // Set initial positions used at powerup.


When autoplay is enabled, a suggested video will automatically play next.

Up next

to add this to Watch Later

Add to

Loading playlists...