Dum-E (Build Guide)



One of my favourite superheroes is Iron Man. When Tony Stark was my age, he built a massive, functional robotic arm in the basement of MIT — capable of lifting heavy weights! While I might not be able to match his genius just yet, I wanted to capture a bit of that spirit in my own project: a robotic arm I've named aptly Dum-E.
In this Instructible, I'll show you how to build Dum-E, a potentiometer-controlled robotic arm inspired by the one Stark made. This project combines basic electronics with Arduino programming to create a fun, hands-on experience that's perfect for beginners and hobbyists looking to dive into the world of microcontrollers.
What started as a passion project has become something I'm really proud of, and I'm excited to share it with you step by step.
Tinkercad: https://www.tinkercad.com/things/juH8FpGQYH0-exquisite-kup-amur/editel?returnTo=https%3A%2F%2Fwww.tinkercad.com%2Fdashboard&sharecode=CNtBrjlrht3rkYGQj_ElfjLVQKDtnZ162TnhixNUq34
Supplies

What You'll Need to Build Dum-E
To build the robotic arm, you'll need the following components:
- Servo motors × 4 (or more, depending on your desired degrees of freedom)
- Arduino Uno × 1
- LED × 1
- 330Ω resistor × 1
- Slide switch × 1
- Rotary encoders or potentiometers × 4 (one for each servo)
- Breadboard or perfboard × 1
Additionally, you'll need materials to physically construct the arm itself. The exact materials are up to your discretion and can vary depending on your design — feel free to get creative!
Building the Arm











For me, building the physical arm was by far the most challenging and time-consuming part of this project — especially since I had little prior experience. That’s why my biggest recommendation is to look at several design models, consider your budget, and take stock of the materials you already have on hand.
In my case, I chose to 3D print the gripper portion of the arm and used plastic bars I found at the dollar store for the structure. I then cut these pieces to my desired lengths.
One crucial thing to keep in mind is weight. If you're using 9g servos like I did, you’ll quickly run into limitations when it comes to lifting heavier parts. The combined weight of the gripper, fasteners, and arm segments can exceed what these small servos can handle. In fact, I had to remove one servo entirely and shorten the length of my arm just to make it work — which is why there’s a missing servo in my code.
To help you get started, I’ve linked the CAD file I used, which was created in Onshape: https://cad.onshape.com/documents/7fcd9a13b90ade446e80c4a4/w/6be3d90c055ddb4272d6422a/e/d5e0c6589f409feb6f586752?renderMode=0&uiState=6850757b48f1b86428ef539a
Start Wiring

Now that we’re done with the hard part, building the arm, it’s time to move on to the wiring!
Step 1: Power Connections (GND & VCC)
First things first, we need to set up the power rails. Connect the GND (ground) and VCC (5V) from your Arduino to the power and ground lines on your breadboard. These lines will provide power to all your components.
- Connect the GND pin on the Arduino to the negative (blue/black) rail on the breadboard.
- Connect the 5V pin on the Arduino to the positive (red) rail on the breadboard.
Downloads
Add Your Pots
.png)
.png)
Next, we’ll wire up the potentiometers. These will be used to control the position of each servo.
- Connect Power and Ground:
- Attach the left and right pins of each potentiometer to the breadboard’s power (VCC) and ground (GND) rails. It doesn’t matter which outer pin goes to power or ground, as long as it’s consistent for all pots.
- Connect Signal (Middle Pin):
- Connect the middle pin of each potentiometer to one of the analog input pins on your Arduino (e.g. A1, A2, A3, A4). Each potentiometer will control one servo, so make sure to remember which pot is connected to which analog pin.
Tip: If you’re using fewer potentiometers, just connect as many as you need. The number should match the number of servos you plan to control.
The Servos
.png)
.png)
Now it’s time to wire up the servos in your arm.
1. Connect Power and Ground:
- Start by connecting the red wire (VCC) of each servo to the 5V rail on your breadboard, and the brown or black wire (GND) to the ground rail.
2. Connect Signal Wires
- Connect the yellow or orange signal wire of each servo to one of the PWM-capable digital pins on your Arduino. These pins allow for precise control of the servo positions via pulse width modulation.
Tip for Cable Management:
With all the wires running from the base to the arm, things can get messy quickly. I recommend bundling your wires together and securing them with small zip ties or twist ties to keep everything neat and prevent tangling or strain on the connections.
Kill Switch (Optional)
.png)
Sometimes, servos can behave unpredictably, especially if there's a bug in your code or a wiring issue. This can lead to sudden movements that may damage your arm’s chassis or the servos themselves.
To help prevent this, it’s a smart idea to add a kill switch to cut power to the system when needed.
How to Wire the Kill Switch:
- Redirect the GND line from your power source (or the Arduino) through a slide switch.
- When the switch is open, it breaks the ground connection, stopping current flow and effectively shutting down the servos.
Add a Power Indicator LED
To make it easy to see when the system is on:
- Connect a LED in series with a 330Ω resistor between VCC and GND (after the switch).
- This way, when the switch is on, the LED lights up — letting you know the system is active.
The Code

Now that you've completed the physical build of your robotic arm, it's time to dive into the code.
While I’ll provide both a downloadable file and a text version of the code in the following steps, the first thing you should do is test the movement limits of your servos.
Since your chassis design is likely different from mine, the physical range of motion for your servos will vary, and exceeding those limits can strain or even damage your arm.
Testing Servo Limits
You can use a simple test sketch to move each servo and manually observe the safe minimum and maximum angles for your build. Here's a basic example code snippet to help with that:
#include <Servo.h>
Servo myServo;
int potPin = A0;
int servoPos;
void setup() {
myServo.attach(9);
Serial.begin(9600);
}
void loop() {
servoPos = map(analogRead(potPin), 0, 1023, 0, 180);
myServo.write(servoPos);
Serial.println(servoPos);
delay(15);
}
Once you've identified the safe range, you can apply those limits in your final code using the map() function:
- The first two values (0, 1023) are the default range of the analog input from the potentiometer.
- Replace minAngle and maxAngle with the values you discovered while testing. (ex: servoPos = map(analogRead(potPin), 0, 1023, 30, 120);)
This ensures the servo only moves within safe limits, tailored to your specific arm design.
The Code (for Real This Time)

Now that you’ve identified your servo movement limits and finalized your setup, you’re ready to upload your custom code to the Arduino.
You can copy and paste the code provided below directly into the Arduino IDE and upload it to your board. Just make sure to replace any placeholder values (like servo pin numbers or angle limits) with the ones that match your build.
Code:
#include <Servo.h>
Servo myservo1;
Servo myservo3;
Servo myservo4;
Servo myservo5;
int potpin1 = A1;
int potpin3 = A2;
int potpin4 = A3;
int potpin5 = A4;
int val1;
int val3;
int val4;
int val5;
void setup()
{
myservo1.attach(6);
myservo3.attach(10);
myservo4.attach(11);
myservo5.attach(5);
Serial.begin(9600);
}
void loop() {
{
val1 = analogRead(potpin1);
val1 = map(val1, 0, 180, 150, 180);
myservo1.write(val1);
Serial.println(val1);
val3 = analogRead(potpin3);
val3 = map(val3, 0, 180, 28, 172);
myservo3.write(val3);
val4 = analogRead(potpin4);
val4 = map(val4, 0, 512, 0, 180);
myservo4.write(val4);
val5 = analogRead(potpin5);
val5 = map(val5, 0, 512, 0, 180);
myservo5.write(val5);
delay(5);
}
Explanation:
- Libraries and Servo Objects:
- The Servo.h library is included to control servo motors. Four servo objects (myservo1, myservo3, myservo4, and myservo5) are declared to represent the four servos in your arm.
- Potentiometer Pins:
- Four analog input pins (A1, A2, A3, and A4) are assigned to read the values from four potentiometers. Each potentiometer corresponds to one servo motor.
- Variables:
- Four integer variables (val1, val3, val4, and val5) store the raw analog readings from the potentiometers and their mapped servo positions.
Setup Function:
- Each servo is attached to a specific Arduino digital PWM pin (6, 10, 11, and 5) matching your wiring.
- Serial communication is initialized at 9600 baud for debugging or monitoring values in the Serial Monitor.
Loop Function:
- The code continuously reads the analog value from each potentiometer.
- It then maps each raw analog value (typically from 0 to 1023, but your code uses custom ranges) to a servo angle within a specific range:
- val1 is mapped from 0-180 input to a servo range of 150-180 degrees — likely to accommodate the physical limits of that joint.
- val3 is mapped from 0-180 input to 28-172 degrees.
- val4 and val5 use a 0-512 input range mapped to the full 0-180 servo range.
- (Note: The analogRead() function normally returns values from 0 to 1023, so these smaller input ranges indicate custom calibration or testing.)
- Each mapped value is sent as a command to its respective servo using myservoX.write(valX);.
- The first servo’s position (val1) is also printed to the Serial Monitor for debugging.
- There is a brief delay(5); to allow the servos to reach their new positions smoothly.
Overall Behavior:
- As you turn each potentiometer, the Arduino reads the input, maps it to a suitable servo angle, and moves the servo accordingly.
- This setup lets you manually control the arm’s movement in real time, with servo limits customized to prevent mechanical strain.
Enjoy



Now that your robotic arm is built and coded, it’s time to have some fun! You can experiment with adding new functions or “cases” in the code to make Dum-E perform specific motions, or simply enjoy it as a cool desk toy — the choice is yours.
If you found this Instructable helpful or inspiring, please consider giving it a like (or even a 98!). I put a lot of time and mental energy into this project, and your support means a lot.