Giovanni Gentile
Published © CC BY-SA

A Robotic Arm with Viper and ST Nucleo

Creates with Viper, a simple robotic arm with a Nucleo board, two servo motors and a cheap laser indicator. You can move the arm by writing.

IntermediateFull instructions provided1,811
A Robotic Arm with Viper and ST Nucleo

Things used in this project

Hardware components

Servo Motor 9g
×2
3D printed Laser Structure
×1
Laser Pen
×1
STM32 Nucleo ST Nucleo f401RE
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Zerynth Studio
Zerynth Studio

Hand tools and fabrication machines

Viper IDE

Story

Read more

Custom parts and enclosures

3D printed servo junction structure

3D printed laser ring

Schematics

Connect the servo data to the board

Connect the servo motor power pin

I've used a simple power shield to multiply the Nucleo's power pin, but you can use a breadboard.

Code

Robotic Serial Servo Arm

Python
##########################################################################
# Robotic Servo Arm
# 
# Created: 17-12.2015 by 0lab Team - www.0lab.it
# Authors: G. Gentile
#
# Materials:
# 1 x ST Nucleo shield
# 2 x 9g servo motor
# 1 x 3D printed interfacing (Thingiverse link: http://)
##########################################################################

import streams
from servo import servo

s = streams.serial()


MyServoX=servo.Servo(D11.PWM,400,2400,500,3000)
MyServoY=servo.Servo(D10.PWM,400,2400,500,3000)

sleep(200)
print("All servo ON")
MyServoX.attach()
MyServoY.attach()
sleep(2000)
MyServoX.moveToDegree(0)
sleep(300)
MyServoX.moveToDegree(180)
sleep(300)
MyServoY.moveToDegree(0)
sleep(300)
MyServoY.moveToDegree(180)

while True:
    print("insert X:")
    line = s.readline()
    if line == 0:
        MyServoX.detach()
        print("Servo X OFF")
    MyServoX.moveToDegree (int(line))
    print("You wrote:", line)
    print("The servoX is", MyServoX.getCurrentDegree())
    print("insert Y:")
    line = s.readline()
    if line == 0:
        MyServoY.detach()
        print("Servo Y OFF")
    MyServoY.moveToDegree (int(line))
    print("You wrote:", line)
    print("The servoY is", MyServoX.getCurrentDegree())

Credits

Giovanni Gentile

Giovanni Gentile

31 projects • 64 followers
Graduated in Psychology expert in new technologies and communication, with expertise in electronics, automation and home automation.

Comments