Upgrading My Beginner 5-Axis Arduino Robot Arm – MG996R Servo + Record & Playback

After building my original beginner-friendly 5-axis Arduino robot arm, I wanted to go back to the project and make a few improvements.

I didn't want to completely redesign the robot. The original arm was intended to be relatively simple to build, understand and modify, so I wanted to keep that idea.

Instead, this version concentrates on two major upgrades:

  • A stronger MG996R servo for the shoulder joint

  • A new Arduino program that can record a sequence of movements and replay them automatically

I also had to modify several of the 3D-printed parts to accommodate the larger shoulder servo.

Updated Shoulder Joint

The result is essentially Version 2 of my original robot arm.

New to the project?
You can find my original beginner 5-axis robot arm build here:
LINK TO ORIGINAL ROBOT ARM POST

LINK TO ORIGINAL YOUTUBE POST


Why these changes?

1. MG996R Shoulder Servo

The original arm used an MG90S servo at the shoulder, this servo was struggling with the weight of lifting objects. The torque it produced was just too small to raise and hold things in position.

For this version I've replaced it with the larger and stronger MG996R.

Because the MG996R is physically larger than the MG90S, it wasn't simply a case of removing one servo and fitting the other.

Several of the 3D-printed components around the shoulder and base needed to be modified as well.

2. Record and Playback

The second upgrade is in the Arduino software.

The original program allowed me to control each joint manually through the Arduino Serial Monitor.

I've kept that functionality but added the ability to:

  1. Start recording

  2. Move the robot normally

  3. Stop recording

  4. Save the movement sequence

  5. Replay the whole sequence automatically

The final version also saves the recorded routine into the Arduino Uno's EEPROM, so the sequence isn't lost when power is removed.

I added this feature to show that even a beginner robot could be made useful.

Modifications

Because of the larger servo, I modified four of the original 3D-print files.

The replacement parts for this version are:

  • 5_ARM_BASE_L-Body.stl

  • 5_ARM_BASE_R-Body.stl

  • 6_BASE_TOP-Body.stl

  • 2_ARM_LWR_MOTOR-Body.stl

You only need these modified pieces for the V2 shoulder upgrade; the remaining parts come from the original robot arm project.

Download the Modified STL Files

Upgrades 3D Printed Parts

If you're building the arm from scratch rather than upgrading an existing one, start with the original build and substitute these parts where the shoulder assembly is constructed.

Installing the MG996R Shoulder Servo

The biggest physical difference between V1 and V2 is immediately obvious when comparing the two shoulder servos.

New / Old Servo Comparison

The MG996R requires much more space than the original MG90S, which is why the surrounding parts needed redesigning.

After printing the modified pieces, I removed the original shoulder assembly and rebuilt this section around the new servo.

New Shoulder Joint Fitted

The rest of the robot remains very similar to the original version.

Updated Arduino Program

The software is probably my favourite part of this upgrade.

Program Running in the Arduino Serial Monitor

The arm can still be controlled manually, but it can now remember what I've done and perform the same sequence again.

The complete V2 Arduino program can be downloaded here:

Download Robot Arm V2 Arduino Program

The program uses two standard Arduino libraries:

#include <Servo.h>
#include <EEPROM.h>

Servo.h controls the five servo motors while EEPROM.h allows the Arduino to retain a recorded movement sequence even after it has been switched off.

Using the updated Arm

The arm is currently controlled through the Arduino Serial Monitor.

Set the Serial Monitor to: 115200 baud

Homing the Robot

When the Arduino starts, it doesn't immediately move all of the servos.

Instead, the Serial Monitor displays:

Robot arm controller ready.
Press 0 to home the arm.
Movement controls are disabled until homing is complete.

Press:

0

and the robot begins its homing sequence.

Each joint is moved to its home position one at a time.

My current home positions are:

JointHome Angle
Base90°
Shoulder90°
Elbow90°
Wrist90°
Gripper60°

Once homing has finished, manual movement is enabled.

Home Command Running

Manual Robot Arm Controls

The movement controls are:

KeyMovement
A / DBase
W / SShoulder
R / FElbow
T / GWrist
Y / HGripper

Each key press changes the selected joint by 5 degrees.

For example, repeatedly entering:

d

moves the base in one direction.

Entering:

a

moves it in the opposite direction.

You can also press:

p

to display the current angle of every joint.

For example:

Base: 90  Shoulder: 90  Elbow: 90  Wrist: 90  Gripper: 60

Recording Robot Movements

This is where V2 becomes much more interesting.

The program can record up to 150 positions.

Each recorded position contains the angle of all five servos:

struct ArmPosition {
  uint8_t base;
  uint8_t shoulder;
  uint8_t elbow;
  uint8_t wrist;
  uint8_t gripper;
};

Whenever I move one of the joints while recording, the program saves the complete position of the robot.

Start Recording

First home the arm:

0

Then enter:

1

The Serial Monitor will show:

NEW RECORDING STARTED
Your previous saved routine is still protected.
Move the arm using the normal controls.
Press 2 to replace the old routine with this one.
Press 5 to cancel and keep the old routine.

Now simply operate the robot normally.

For example:

d
d
w
w
r
r
y
y
a
s

As each movement is made, the Arduino records another step.

You'll see:

Recording Process

Saving the Movement

When you've finished teaching the robot its sequence, enter:

2

The recording is completed and becomes the robot's new saved routine. The recording is also automatically saved if you reach 150 movements.

Autosave

The Arduino then stores the sequence in EEPROM.

You should see something similar to:

RECORDING FINISHED
New saved routine: 71 steps.
The previous routine has now been replaced.
Press 3 to replay the new routine.

One important feature is that starting another recording doesn't immediately delete your previous one.

The old sequence is only replaced once the new sequence has been completed using command 2.

Cancelling a Recording

If you start creating another routine and decide you don't want it, enter:

5

The new recording is cancelled and the previously saved routine is restored.

This is useful because it means an accidental recording doesn't immediately destroy a sequence you've already spent time creating.

Playing the Recorded Sequence

To make the robot repeat the saved routine, enter:

3

The Arduino then works through each stored position.

The Serial Monitor shows the progress:

PLAYBACK STARTED
Playing step 1 of 71
Playing step 2 of 71
Playing step 3 of 71
...
Playing step 71 of 71
PLAYBACK COMPLETE

Pressing 3 again repeats exactly the same saved sequence.

Playback of recording

This opens up quite a few possibilities.

You could teach the arm to:

  • Move an object from one position to another

  • Open and close the gripper as part of a sequence

  • Repeat a simple demonstration

  • Perform the same movement multiple times

  • Experiment with basic robot automation

It's still a very simple robot, but this starts to demonstrate the same basic idea used by larger automated systems: teach a sequence and then repeat it.

The Sequence Survives Power-Off

Originally I stored the movements only in the Arduino's normal RAM.

That worked, but there was one obvious limitation.

Switch the Arduino off and the recording disappeared.

For the final V2 program I've moved the completed routine into the Arduino Uno's built-in EEPROM.

The program uses 5 bytes for each position — one byte for each of the five servo angles.

With a maximum of 150 positions, the movement data uses:

150 × 5 = 750 bytes

When the Arduino starts, it checks the EEPROM for a valid saved routine.

If one exists, you'll see something like:

Robot arm controller ready.
Saved routine found: 71 steps.
It will remain saved until you record over it or clear it.

You can then home the robot with:

0

and replay the stored routine with:

3

So the robot can now be switched off, switched back on and still remember the movement sequence I previously taught it.

Clearing the Saved Sequence

If I want to deliberately delete the saved routine, I can enter:

4

This permanently clears the stored movement.

The important difference between the commands is therefore:

CommandFunction
1                    Start recording a new routine
2                    Finish and permanently save the new routine
3                    Replay the saved routine
4                    Permanently delete the saved routine
5                    Cancel the new recording and keep the previous routine

Complete Control List

For reference, here are all of the V2 controls:

0 = Home arm

A / D = Base
W / S = Shoulder
R / F = Elbow
T / G = Wrist
Y / H = Gripper

P = Print current angles

1 = Start new recording
2 = Finish recording and save it
3 = Replay saved routine
4 = Clear saved routine
5 = Cancel new recording

? = Show help

What I Like About This Upgrade

I think this is a much more interesting robot than the original version without making the project dramatically more complicated.

The first version proved that I could build a simple five-axis robot arm and control its individual joints.

Version 2 builds on that.

The MG996R shoulder servo gives me a more substantial shoulder assembly, while the software upgrade means the robot can now do something with the movements I give it rather than simply responding to one command at a time.

It can now:

Move → remember → save → replay.

For a relatively simple Arduino robot, that's a big improvement.

It also demonstrates something I really like about making your own projects: the first version doesn't have to be the finished version.

Build something.

Use it.

Find out what you want to improve.

Then build Version 2.

Downloads

Arduino Program

Modified STL Files

Modified FreeCAD Files

What's Next?

There are still plenty of things I could add to the robot in the future.

One possibility would be moving away from Serial Monitor control and giving the robot a dedicated controller.

Another would be experimenting with smoother movement between recorded positions rather than simply moving through the sequence step-by-step.

Sensors could eventually give the robot some feedback about the world around it too.

For now, though, I'm pleased with Version 2.

The arm has a stronger redesigned shoulder, can learn a sequence of movements, retain that sequence after being switched off and replay it whenever I want.

That's quite a step forward from the original beginner robot arm.

If you're building one yourself, let me know what you would add to Version 3.

Watch the Build

I've also made a video showing the V2 upgrade, fitting the new shoulder servo and demonstrating the record and playback system.

VIDEO COMING SOON

If you enjoy projects like this, you can also find more of my electronics, robotics, retro-computing and programming projects here on Make It With Matty.

Comments

Popular posts from this blog

BBC Model B + MMFS: Command Guide

BBC Model B – Installing Turbo MMFS

Op-Amp Series – Part 5: The Differential Amplifier