Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial

Components and supplies

Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial
Arduino UNO
×1
Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial
3DR Solo
×1
Servos (Tower Pro MG996R)
×1
Solo Breakout Board
×1

About this project

Intro

Solo has a great development environment but a lack of I/O. Currently the Accessory port breaks out CAN, Mavlink Serial to Pixhawk, and USB to Sololink(imx6). By using an arduino and firmata can add custom sensors, control servos, blink LEDs, or any other arduino function. 

This tutorial will walk you through the steps of using an arduino with Solo to control a servo. 


Software Preqs:

  • Solo update 1.2.0 or greater
  • Arduino IDE
  • Filezilla
  • Putty or any other SSH Client

Step 1: Upload Firmata Host to Arduino Uno

Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial
Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial

Open StandardFirmata from the examples tab. Select board and port. Upload!  


Step 2: Hardware Setup

Parts

Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial
Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial
Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial
Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial

Note: The breakout board is not sold at this point. Please refer to here

Assembly

Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial
Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial
Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial
Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial
Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial

Power on

Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial

Step 2: Download pyMata and Code

pyMata

SoloServoSweep.py

Step 3: Transfer Files to Solo

  • Connect to your Solo's Wifi network!
Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial
    Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial

    Step 4: SSH into Solo

    SSH into Solo using your OS's SSH client. For Windows we will use Putty.

    Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial
    Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial
    Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial

    Make sure you are still connected to Solo's Wifi!

    See the photos captions for more details

    Step 5: Install pyMata

    Run this command in your SSH session:

    This should be your result

    Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial

    Step 7: Run the example

    While your ssh session is still open run:

    Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial

    Code

    • SoloServoSweep.py
    SoloServoSweep.pyPython
    Drive a servo in python from Solo
    from PyMata.pymata import PyMata
    import time
    import sys
    
    SERVO_MOTOR = 9  # servo attached to this pin
    
    END = 170 # Max servo travel
    
    # create a PyMata instance
    board = PyMata("/dev/ttyACM0")
    
    # configure pin as servo
    board.servo_config(SERVO_MOTOR)
    
    try:
        while True:
            for i in range (0,END):
                # sweep up
                board.analog_write(SERVO_MOTOR, i)
                time.sleep(.015)
            for i in range (END,0,-1):
                # sweep down
                board.analog_write(SERVO_MOTOR, i)
                time.sleep(.015)
    
    except KeyboardInterrupt:
        board.close()
        sys.exit()
    

    Custom parts and enclosures

    Solo Breakout Board
    Breakout board for 3DR Solo accessory porthttps://github.com/3drobotics/Pixhawk_OS_Hardware/tree/master/Accessory_Breakout_X1

    Schematics

    Master Solo Drone Servo Control with Arduino: Easy Setup & Sweep Tutorial

    Manufacturing process

    1. Servo‑Driven Obstacle‑Avoiding Robot: Build with Arduino & HC‑SR04
    2. Arduino & MPU6050: Precise Servo Motor Control with SG90 & MG996R
    3. Master ServoTimer2 Library: Simple Guide to Servo Sweep Control
    4. Arduino‑Powered Smart Trash Bin with Auto‑Open Lid
    5. Control Multiple Servos via Bluetooth: Arduino & Android App
    6. Build a Two-Legged Arduino Robot: Baby Dino DIY Guide
    7. Bluetooth‑Controlled Servo Motor with Arduino Uno & HC‑05
    8. Build a Self-Stabilizing Arduino Gimbal with 3‑Axis Servo Control
    9. Build an Arduino Color Sorter: Simple Guide with TCS3200 & Servos
    10. Build an Arduino Radar System with Ultrasonic Sensor & Servo – Step‑by‑Step Guide