Popsicle Stick Robotic Arm (Group B) (this tutorial is an ongoing experiment in layout/format)

Learn how to build a simple Arduino-based robotic arm with a gripper using popsicle sticks and a few servos.

Materials

  • 14 Popsicle Sticks
  • 4 Micro Servos
  • 4 Rotary Potentiometers
  • 1 Half Size Breadboard
  • 1 Arduino Uno
  • 1 6-Volt Battery Pack
  • 26 Jumpers Cables

Tools

  • Hot Glue Gun + Hot Glue Sticks
  • Precision Screwdriver or Other Small Screwdriver
  • Arduino IDE (download this)
  • USB to Arduino Cable

1

Align the Servos

Attach the horns (white wing attachments) to the servos by popping them on top of the servos. Three of the servos need the horn that extends in two directions while one servo will need the horn that extends in just one direction. Turn the horn counter-clockwise as far as it will go. Pop the horn off and then back on at the calibrated position. One of the servos with the two-direction horns needs to be calibrated parallel to the servo while the other three need to be perpendicular to the servos. Finally, Screw the horns securely in using the small screw and a screwdriver.

2

Prepare Individual Parts

For the servo that was calibrated so the horn is parallel to the servo, hot glue one end of the popsicle stick to the flat side of the horn.

For one of the two-direction horned servos that was calibrated so the horn is perpendicular to the servo, hot glue one end of the popsicle stick to the flat side of the horn.

For the other two-direction horned servo that was calibrated so the horn is perpendicular to the servo, hot glue the middle of the popsicle stick to the flat side of the horn.

(The following servo is a little different, read carefully). For the servo with the one-direction horn, hot glue one end of the popsicle stick to the thin clockwise side of the horn.

Hot glue 4 popsicle sticks together so that they stack on top of one another. Glue the flat side of the stack to the bottom of the servo that was calibrated to be parallel to the servo. Tear off any excess glue around the edges so the stack can lay flat.Lay 3 popsicle sticks down in one direction and 3 popsicle sticks perpendicular to the first 3 to create a grid. Hot glue all the pieces together.

3

Assemble the Structure

Glue the bottom of the servo that has the middle of the popsicle stick attached to the servo to the base you just created. Orient the servo with the stack of popsicle sticks attached so that the popsicle stick attached to the horn can rotate upwards into the air. Glue the side of the popsicle stick stack to the popsicle stick on the base servo. Glue the bottom of the servo that has the middle of the popsicle stick attached to the servo to the base you just created. Glue the last servo with a two-direction horn to the popsicle stick on the previous servo so that the popsicle stick rotates away from the center of the robot. Glue the side of the last servo (as opposed to the bottom) to the popsicle stick on the previous servo so that when this servo rotates, the ends of the two popsicle sticks will close and act as a gripper.

4

Wiring

Build the circuit shown. After programming the Arduino, this will allow you to control each of the servos with the corresponding potentiometer.

5

Code

Open the Arduino IDE and create a new project. Delete all of the default content so you have a completely blank sketch. Copy the code below and paste into your project. Connect you Arduino to your computer via a USB cable. Go to Tools > Board and make sure “Arduino/Genunio Uno” is selected. Then go to Tools > Port and select the appropriate port. The correct port might contain: “USB”, “COM”, “Arduino”. If you are struggling with this, you may reach out to us. Finally, upload the code to your Arduino by clicking the arrow button on the top left of the editor. If there are any errors, delete everything and re-copy paste. If there are still errors, make sure you have the right board and port selected.

#include <Servo.h>

Servo servo1; // Servos
Servo servo2;
Servo servo3;
Servo servo4;

const int pot1 = A0; // Attach potentiometers
const int pot2 = A1; 
const int pot3 = A2;
const int pot4 = A3;

void setup() {
  // Set up everything and will run once
  
  servo1.attach(5); // Attach servos and define the pin modes
  servo2.attach(6);
  servo3.attach(9);
  servo4.attach(10);
}

void loop() {
  // put your main code here, to run repeatedly:
  
  int pot1Value = analogRead(pot1); // Read the values of the potentiometers
  int pot2Value = analogRead(pot2);
  int pot3Value = analogRead(pot3);
  int pot4Value = analogRead(pot4);
  
  int pot1Angle = map(pot1Value, 0, 1023, 0, 179); // Map the values of potentiometers (0-1023) to angles that the servo can read (0-179 degrees)
  int pot2Angle = map(pot2Value, 0, 1023, 0, 179);
  int pot3Angle = map(pot3Value, 0, 1023, 0, 179);
  int pot4Angle = map(pot4Value, 0, 1023, 0, 179);
  
  servo1.write(pot1Angle); // Make the servos move to the mapped angles
  servo2.write(pot2Angle);
  servo3.write(pot3Angle);
  servo4.write(pot4Angle);
}

6

We’re Done!

To use, simply turn a potentiometer to turn one joint in the robotic arm! The gripper can only turn about halfway so make sure you don’t try to turn the servo further than it should!

Troubleshooting

Nothing is Moving

  • Make sure the battery pack is on and the Arduino is plugged in.
  • Double check the circuit to make sure everything is connected correctly.

A Servo isn’t Working

  • Try pressing the reset button on the Arduino. Sometimes the servo stops working if its been pushed too far.
  • The servo may be dead, try replacing the wires with the wires of a working servo to see if this servo is working.

A Servo is Jittery

  • The servo may be bearing too much weight. Try adding a capacitor to the wiring of the servo.