Let's Make Robots! | RobotShop

Micro Servo Robot

MiniRobot_1_3.ino_.zip2.73 KB
MiniRobot_1_3EN.ino_.zip3.52 KB
Micro_Servo_Robot_Flowchart.pdf84.04 KB
Micro_Servo_Robot_Diagramm.pdf74.13 KB

4 axis robot arm with a small gripper and teach function. (In fact: it is a 3 axis robot)

This robot can follow. This robot can learn. And this robot can repeat endles. And he lost all his memory if the batterys are low. This makes it new all the time he is powered again. - The idea for this project is taken from https://www.robotshop.com/letsmakerobots/node/21633 - Stoerpeak made me do it! -

Arduino mini pro 5V/16MHz

4 micro servos 180degrees

4 22k potentiometer

NmH Battery 4.8V

Wires, Button, Switch

Balsa wood, Metal, Plastic

Zip Ties and Glue


Teach mode: After a reset the robot arm follows the teach in arm while simple mapping the analog inputs every 25ms to the servo motors. Pressing the button stores each servo position in a array

Play mode: Double press the button switch to play mode. The sketch reads the array step by step and and moves the robot arm. For cool loocking movements i added a routine calculates different micro steps for each servo to have moving start and end sync on all axis. Also added a ramp for soft increase/decrease velocity. Shorter travel distances the robot does slow, longer distances with faster speed. Its all about timing so my thoughts in this moment

Play Mode version 1.1 The gripper input is used to set the delay (0,1,3,15,60,300 seconds) after a loop is done. The switch (it was left from the project start) pauses the robot

08/2015 i added the same code 1.3 but i try add english comments

10/2015 flowchart for the code and electrical diagram. (make sure you use a pullUp resistor at input 4,6 / change the code for input 4. This should fix the 'slow running problem' often happend)


Hey people!!: If u share my code please keep decency and give me credits. And dont forget Stoerpeak!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

nice stuff, great writeup, great pics and video! Welcome to LMR!


As an early start on this, I tossed together the 4 pots and 4 micro servos, just wired (power wise) in serial to the 5v and ground on the Arduino.  (through a breadboard)

When running one pot and micro servo (and a quick wacked tougher piece of code) it is working OK, but when I wired in all 4 of each I appear to not have enough power to drive them.


does your design have power directly wired to the Arduino and separately to the servos and pots, or am I missing something else obvious?


The OctopusInAKilt

While programming this project i run the (micro!)servos directly from the arduino mini powered by the usb port from my macbook.  This has given 'jumping' and imprecisely servo movements. This is extremly non-serious! Don't do that with bigger size servos! After change to the Battery power - yes arduino and servos are paralell - the servos running well.

Pinaut, thanks for sharing.

I am just finished the wiring on the breadboard and have a question: does anyone have any idea why any servos move very slow in the Play mode? very slow, like 10 seconds for around 20 degrees.

The follow mode is fine, all servos move as quick as the potensio.

please help. Thank in advance,

DK (a newbie who want to learn programming)

Hi there

Tested the code 1.3 again and cannot see your 'very slow movement' effect. Did you change something in the code? What is your power source? (see discussion below)


Pinaut. Thanks for sharing your build @ LMR. It was the coolest bot I found, so I built it. Code changes for me were Serial.begin (57600); , pinMode(6, INPUT_PULLUP) and corresponding True/False logic in void Button(); The programming button seems to work fine. The schematic is here  https://www.robotshop.com/letsmakerobots/mini-robot-arm . I'm hoping to fix the slow playback. The hardware is straight forward, but the software will keep me busy for awhile. Your a very skilled with arrays. Any ideas would be appreciated. Thanks again.

Hello !
I am a newbie in this field and this would be my very first attempt at a robot. I do have experience in electronics and programming though. I was wondering if I could get the instructions for making this robot  ? Like the connection diagram,steps or something ?:)

Simple as it is:

Analog inputs 0,1,2,3
PWM out 3,5,10,11
Button DI 6, Switch DI 4 > may button goes to LOW instead HIGH; cant remember ;-)
Did i forget something?

Thanks a lot :)! 
Could you please post a clear schematic or a picture of your circuit :s ? I have some doubts in this one , it's not very clear .
Especially the pot part.