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 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)


3mm Drill bit

Cordless drill / multi tool

Glue gun with glue sticks


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:


Servo handservo;

Servo elbowservo;

Servo baseservo;

void setup() {











void loop() {








void handOpen(){

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






void handClose(){

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






void elbowDown(){

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






void elbowUp(){

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






void baseUp(){

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






void baseDown(){

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