Introduction: Arduino Robot Arm Marble Run

This is an instructable to show one of the projects I've been working on recently.

All the robots I create have low cost as the main theme. All robots which have been created cost between £5 and £20. I will hopefully get a few more (if not all) on here in the coming weeks but you can head over to www.lollybotrobotics.co.uk for the current progress.

For this project you will need:

Arduino Nano (I used a compatible board from ebay)

Nano shield (from ebay)

3x servo motors (I used tower pro form ebay)

AAx3 Battery holder (Ebay is quite expensive, I buy from rapid online)

Lollipop sticks (you can get 1000 for £6ish from ebay) - Plenty for loads of projects

Rubber non slip matting (poundshop uk) - Pleanty for loads of project

Kebab skewers (Local supermarket)

A5 Cardboard packaging box (or any material for base)

Tools:

3mm Drill bit

Cordless drill / multi tool

Glue gun with glue sticks

Batteries

Maybe a ruler (optional!)

Step 1: Building

Image 1

Cut the lid off the box from the Lollybot kit. If you don’t have a Lollybot kit a piece of wood or card 230mm by 160mm should do.

Cut 4 lollipop sticks , stack and stick them close to one of the corners of the box as shown.

Cut 2 kebab skewers to 160mm long and glue them to the box so they slant down.

Image 2

Set the servo to the centre position. You will see a white tab as shown in this image.

Image 3

Cut 2 lollipop sticks the same size as the base of your servo. Drill a 3mm hole in one end. Glue gun a small piece of kebab skewer into this hole.

Image 4

Glue the last step to the base of the servo making sure the skewer is in line with the servo output shaft.

Image 5

Drill the ends of two lollipop sticks 3mm dia.

Image 6

On one of the sticks glue two servo horns over the drilled holes.

Image 7

Glue a servo into the box or on your base.

Image 8

Screw the stick with servo hornes onto the servo at the angle shown.

Step 2: Building Continued...

Image 9

Put the other servo motor with the skewer onto the other end of the stick as shown.

Make sure the angle is the same as shown and screw in one of the larger screws to hold it in place.

Put the other drilled lollipop stick onto the skewers. These are there to help the movement.

Image 10

Glue two lollipop sticks to the third servo motor. Make sure these are glued to the edge furthest to the motor shaft.

Glue these as shown in the image making sure the third servo is inline with the marble feed.

Image 11

Using some wire, neaten the wires by tying them to the arms of the robot.

Make sure the arm has free movement and is not held back by the wires at any point.

Image 12

Cut a lollipop stick 40mm long.

Glue a servo motor over a 3mm drilled hole.

Image 13

Screw this stick to the servo motor and glue another lollipop stick to the edge of the servo motor as shown.

Make sure that both lollipop sticks come down to meet each other, having the same length.

Image 14

Glue some more lollipop sticks to form a platform for the rubber grips. Make sure that when closed, they are inline with each other.

Image 15

Follow the three images for sticking on the rubber gripper and for creating a marble off loading mechanism from lollipop sticks.

Image 16

Check to see where the robot arm comes to on the skewers and create a marble stop as shown.

Step 3: Finidhing Off and Coding

Now its time to get creative.

Here I've used simple shutes to get the marble from the gripper to the kebab skewer.

Once you've created the marble run, connect the arduino Nano to:

Shoulder servo to digital pin 4

Elbow servo to digital pin 5

Hand servo to digital pin 6.

Good luck!

Below is the code:

#include

Servo handservo;

Servo elbowservo;

Servo baseservo;

void setup() {

handservo.attach(6);

handservo.write(130);

delay(1000);

elbowservo.attach(5);

elbowservo.write(125);

delay(1000);

baseservo.attach(4);

baseservo.write(75);

delay(1000);

}

void loop() {

elbowDown();

baseDown();

handClose();

baseUp();

elbowUp();

handOpen();

}

void handOpen(){

for(int h = 97; h <= 130; h += 1){

handservo.write(h);

delay(15);

}

delay(1000);

}

void handClose(){

for(int a = 130; a >= 97; a -=1){

handservo.write(a);

delay(15);

}

delay(1000);

}

void elbowDown(){

for(int d = 125; d >= 5; d -=1){

elbowservo.write(d);

delay(20);

}

delay(1000);

}

void elbowUp(){

for(int e = 5; e <= 125; e += 1){

elbowservo.write(e);

delay(20);

}

delay(1000);

}

void baseUp(){

for(int b = 147; b >= 75; b -=1){

baseservo.write(b);

delay(20);

}

delay(1000);

}

void baseDown(){

for(int c = 75; c <= 147; c += 1){

baseservo.write(c);

delay(20);

}

delay(1000);

}

Comments

author
tomatoskins made it! (author)2015-08-28

So cool! I love these types of little projects!

About This Instructable

555views

4favorites

More by wcbower:Arduino robot arm marble run
Add instructable to: