Maestro Servo Controller (Raspberry Pi)

4,279

27

2

Introduction: Maestro Servo Controller (Raspberry Pi)

About: the Raspberry Pi is Awesome!

Basic tutorial of how to setup a Maestro Servo Controller with the Raspberry Pi.

Step 1: Parts

PARTS:

RPI Zero W (Barebones Kit) – https://goo.gl/fSioxP

4 Amp Power Adapter – https://goo.gl/fSioxP

16GB Micro SD – https://goo.gl/fSioxP

120 pcs jumper cable: https://goo.gl/fSioxP

5.5×2.1mm Male+Female DC Power Socket: https://goo.gl/fSioxP

Micro USB to DC barrel converter: https://goo.gl/fSioxP

Mini USB to USB cable: https://goo.gl/WmXsfy

Maestro Servo Controllers: https://www.pololu.com/category/102/maestro-usb-s...

Step 2: Setup

5V -> 5V

GND -> GND

TX -> RX

RX -> TX


1. Disable console serial

sudo raspi-config select interfacing options -> Serial -> No -> Yes save & exit

2. Install pyserial

python -m pip install pyserial (may be a bit slow)

3. Clone Repo

git clone https://github.com/FRC4564/Maestro

4. Disable bluetooth uart

sudo nano /boot/config.txt

append to bottom: dtoverlay=pi3-disable-bt

save

5. Reboot RPI

sudo reboot

Step 3: Code

Maestro Python Library: https://github.com/FRC4564/Maestro

Step 4: Additional Info

1 Person Made This Project!

Recommendations

  • Clocks Speed Challenge

    Clocks Speed Challenge
  • Toys & Games Contest

    Toys & Games Contest
  • Big vs Small Challenge

    Big vs Small Challenge

2 Comments

0
aaronleeeyeti
aaronleeeyeti

3 months ago on Introduction

Hey awesome tutorial!! but it didn't initially work for me.
1. This didn't work for me "python -m pip install pyserial"
a. to get this to work i did
sudo apt-get install python-serial
2. Also this didn't work for me
servo = maestro.Controller()
a. instead to get it to work -- i had to specify the actual serial device to use:
servo = maestro.Controller('/dev/ttyAMA0')
3. also i had to run the script with sudo (or give /dev/ttyAMA0 permissions -- chmod 777 /dev/ttyAMA0)
4. i also found (on Polulu) site -- an easier way to control the stepper motor from the bash shell -- rather than do it in python. just for funzies.
a. https://www.pololu.com/docs/0J40/5.h.4
5. also you can also just wire a 5+ volt from the raspberry pi and ground directly to the maestro's power needed for the stepper motors (instead of having to power it from an external power supply -- in your diagram as 'servo power supply' -- as long as your servo's just need 5volts)

anyways... super fun!