Build an Arduino Robot Arm
That Draws Pictures!
A hands-on STEM project for kids aged 10–16 — learn servo motors, coding, and mechanical design while making a robot artist! 🖊️🤖
Overview
What Are We Building? 🤔
Imagine a robot that can hold a pen and draw shapes, letters, and patterns all by itself! That's exactly what we're making — a 3-joint robotic arm powered by 4 servo motors and an Arduino UNO. You'll learn how real robot arms work (the same way as the arms on the International Space Station! 🚀).
The arm has a shoulder, elbow, and wrist joint — just like your own arm — plus a 4th servo that lifts the pen up and down. You'll program it to draw squares, triangles, and stars automatically!
Shopping List
Components You Need 🛒
All parts are available on Amazon India, Robocraze, or your local electronics shop!
| # | Component | Qty | Purpose | Price (₹) |
|---|---|---|---|---|
| 1 | Arduino UNO R3 | 1 | Brain of the robot | ₹450 |
| 2 | SG90 Servo Motor | 4 | Shoulder, elbow, wrist + pen lift | ₹80 × 4 = ₹320 |
| 3 | Popsicle Sticks / Acrylic Strips | 1 pack | Arm linkage frame | ₹50 |
| 4 | 5V Power Bank or 9V Adapter | 1 | Power supply | ₹150 |
| 5 | Jumper Wires (M-M & M-F) | 20+ | Connections | ₹80 |
| 6 | Breadboard (Half-size) | 1 | Power rail distribution | ₹60 |
| 7 | Ballpoint Pen / Marker | 1 | Drawing tool | ₹10 |
| 8 | Rubber bands / Hot Glue | – | Assembly | ₹30 |
| 9 | USB-A to USB-B Cable | 1 | Upload code | ₹50 |
| 10 | A4 Paper (drawing surface) | – | Canvas for your robot artist! | ₹10 |
| 💰 Estimated Total | ₹1,210 – ₹1,400 | |||
Concept
How Does the Arm Work? 🦾
A robotic arm works like your own arm — by rotating joints! Each servo motor controls one joint angle. By changing combinations of angles, the tip of the arm (where the pen is) moves to different positions on the paper.
The 4 Servos Explained
| Servo | Joint | What it controls | Arduino Pin |
|---|---|---|---|
| Servo 1 | Shoulder | Rotates the whole arm left/right | Pin 9 |
| Servo 2 | Elbow | Raises/lowers the forearm | Pin 10 |
| Servo 3 | Wrist | Fine-tunes the pen angle | Pin 11 |
| Servo 4 | Pen Lift | Lifts pen up (travel) / down (draw) | Pin 6 |
Wiring
Circuit Diagram 🔌
Here's the complete wiring diagram in ASCII art. Each servo has 3 wires: Orange/Yellow = Signal, Red = Power (+5V), Brown = Ground (GND).
╔══════════════════════════════════════════════════════════════════════╗ ║ ARDUINO DRAWING ROBOT ARM — WIRING DIAGRAM ║ ╚══════════════════════════════════════════════════════════════════════╝ ┌─────────────────────────────────┐ │ ARDUINO UNO R3 │ │ │ │ 5V ──────────────────────────── ─────── (+) Power Rail (Breadboard) │ GND ─────────────────────────── ─────── (–) Ground Rail (Breadboard) │ │ │ Pin 9 (PWM) ─── SIG ──────────┼──── [SERVO 1 - Shoulder (Blue)] │ Pin 10 (PWM) ─── SIG ──────────┼──── [SERVO 2 - Elbow (Green)] │ Pin 11 (PWM) ─── SIG ──────────┼──── [SERVO 3 - Wrist (Purple)] │ Pin 6 (PWM) ─── SIG ──────────┼──── [SERVO 4 - Pen Lift (Red)] └─────────────────────────────────┘ ────────────────────────────────────────────────────────────────────── EACH SERVO WIRING (repeat for all 4 servos): ────────────────────────────────────────────────────────────────────── [Signal Wire] ────────────── Arduino PWM Pin (9/10/11/6) [VCC Wire] ────────────── (+) Power Rail on Breadboard [GND Wire] ────────────── (–) Ground Rail on Breadboard ────────────────────────────────────────────────────────────────────── POWER SUPPLY: ────────────────────────────────────────────────────────────────────── [5V Power Bank (+)] ─────────── (+) Power Rail [RED wire] [5V Power Bank (–)] ─────────── (–) Ground Rail [BLACK wire] └──────────────── Also connect to Arduino GND [9V Adapter] ─────────────────── Arduino DC Jack (for Arduino only) ────────────────────────────────────────────────────────────────────── PHYSICAL ARM LAYOUT: ────────────────────────────────────────────────────────────────────── [PEN] │ ← Servo 4 (Pen Lift) raises/lowers pen ╔══╧══╗ ║ SV3 ║ ← Wrist Servo (Pin 11) ╚══╤══╝ │ ← Forearm segment (popsicle stick ~10cm) ╔══╧══╗ ║ SV2 ║ ← Elbow Servo (Pin 10) ╚══╤══╝ │ ← Upper arm segment (popsicle stick ~12cm) ╔══╧══╗ ║ SV1 ║ ← Shoulder Servo (Pin 9) ╚══╤══╝ ╔══╧════════════════╗ ║ BASE (Heavy book ║ ║ or box as anchor) ║ ╚═══════════════════╝ └── Arduino + Breadboard sit next to the base
Construction
Step-by-Step Build Guide 🔧
-
Build the Base 🏠 Use a heavy book, a wooden block, or a thick cardboard box as your arm's base. Glue or tape Servo 1 (shoulder) on top, flat side down. Make sure it can rotate freely without tipping over. The heavier the base, the more stable your drawing will be!
-
Build the Upper Arm 💪 Take 2 popsicle sticks and glue them side-by-side to make a ~12cm upper arm segment. Attach the servo horn (the plastic piece that comes with SG90) of Servo 1 to the bottom of the upper arm. Mount Servo 2 (elbow) at the top of the upper arm — the servo body is fixed to the upper arm, and its horn will connect to the forearm.
-
Build the Forearm 🖐️ Make a ~10cm forearm segment from 2 popsicle sticks. Attach the horn of Servo 2 (elbow) to the bottom of the forearm. Mount Servo 3 (wrist) at the top of the forearm with its horn pointing toward the pen holder.
-
Build the Pen Holder ✏️ Cut a small rectangle of cardboard (~3cm × 6cm). Roll it into a tube slightly bigger than your pen. Tape or hot-glue it securely. Attach Servo 4 (pen lift) horizontally so it can push/pull the pen up and down by ~1cm. Thread the pen through the holder.
-
Wire Everything Up ⚡ Following the circuit diagram above, connect each servo's Signal wire to its Arduino pin (9, 10, 11, 6). Connect all servo VCC (red) wires to the (+) power rail on the breadboard, and all GND (brown/black) wires to the (–) rail. Power the breadboard rail from your 5V power bank. Connect a separate 9V adapter to the Arduino's power jack.
-
Upload the Code 💻 Connect your Arduino to your computer via USB. Open the Arduino IDE, paste the code below, and click Upload. Once uploaded, disconnect USB and power the arm with your 9V adapter + power bank.
-
Test and Calibrate 🎯 First run the calibration sketch (see FAQ below) to find the angles your arm needs to reach the paper corners. Update those angles in the main code. Place your paper on the table, position the arm base so the pen can reach the drawing area, and hit Reset on the Arduino. Watch it draw! 🎉
Programming
The Arduino Code 💻
This code makes the robot draw a square, then a triangle, then a star-like pattern! Copy the whole thing into the Arduino IDE.
Servo.h library — no need to install anything extra!// ================================================================ // MAKEMINDZ — Arduino Drawing Robot Arm // 4-Servo Arm: Shoulder (9), Elbow (10), Wrist (11), Pen (6) // Draws: Square → Triangle → Star Pattern // Compatible with: Arduino UNO R3 + 4x SG90 Servos // ================================================================ #include <Servo.h> // ── Create servo objects ──────────────────────────────────────── Servo shoulder; // Joint 1 – rotates arm base (Pin 9) Servo elbow; // Joint 2 – raises/lowers forearm (Pin 10) Servo wrist; // Joint 3 – fine pen angle control (Pin 11) Servo penLift; // Servo 4 – lifts pen up or down (Pin 6) // ── Pin Definitions ───────────────────────────────────────────── const int PIN_SHOULDER = 9; const int PIN_ELBOW = 10; const int PIN_WRIST = 11; const int PIN_PEN = 6; // ── Pen positions (adjust after calibration!) ─────────────────── const int PEN_DOWN = 20; // Servo 4 angle when pen touches paper const int PEN_UP = 80; // Servo 4 angle when pen is lifted // ── Movement delay ────────────────────────────────────────────── const int MOVE_DELAY = 600; // ms to wait after each servo move const int SLOW_STEP = 2; // degrees per step for smooth motion // ================================================================ // HELPER FUNCTIONS // ================================================================ // Smoothly move a servo from current to target angle void moveSmooth(Servo& srv, int fromAngle, int toAngle, int delayMs) { if (fromAngle < toAngle) { for (int a = fromAngle; a <= toAngle; a += SLOW_STEP) { srv.write(a); delay(15); } } else { for (int a = fromAngle; a >= toAngle; a -= SLOW_STEP) { srv.write(a); delay(15); } } delay(delayMs); } // Move all 3 arm joints at once to a position void moveTo(int sh, int el, int wr) { shoulder.write(sh); elbow.write(el); wrist.write(wr); delay(MOVE_DELAY); } // Put pen on paper void penDown() { penLift.write(PEN_DOWN); delay(300); } // Lift pen off paper void penUp() { penLift.write(PEN_UP); delay(300); } // ================================================================ // DRAWING FUNCTIONS // NOTE: Angles below are EXAMPLE values. // Run the calibration sketch first and update these angles // to match YOUR arm's geometry! // ================================================================ // Draw a square (4 corners) void drawSquare() { penUp(); moveTo(70, 100, 90); // Corner A (top-left) penDown(); moveTo(110, 100, 90); // Corner B (top-right) moveTo(110, 130, 90); // Corner C (bottom-right) moveTo(70, 130, 90); // Corner D (bottom-left) moveTo(70, 100, 90); // Back to Corner A penUp(); } // Draw a triangle (3 corners) void drawTriangle() { penUp(); moveTo(90, 90, 90); // Apex (top centre) penDown(); moveTo(70, 130, 90); // Bottom-left moveTo(110, 130, 90);// Bottom-right moveTo(90, 90, 90); // Back to apex penUp(); } // Draw a star pattern (5 zigzag moves) void drawStar() { // Star drawn as 5 continuous strokes from centre int cx = 90, cy = 110; // centre angles // 5 tip positions (approximate servo angles) int tips[5][3] = { { 90, 80, 90 }, // tip 1 – top { 115, 120, 90 }, // tip 2 – bottom-right { 70, 95, 90 }, // tip 3 – middle-left { 110, 95, 90 }, // tip 4 – middle-right { 65, 120, 90 } // tip 5 – bottom-left }; penUp(); moveTo(tips[0][0], tips[0][1], tips[0][2]); penDown(); for (int i = 1; i < 5; i++) { moveTo(cx, cy, 90); moveTo(tips[i][0], tips[i][1], tips[i][2]); } moveTo(cx, cy, 90); penUp(); } // ================================================================ // SETUP — runs once on power-on // ================================================================ void setup() { Serial.begin(9600); // Attach servos to their pins shoulder.attach(PIN_SHOULDER); elbow.attach(PIN_ELBOW); wrist.attach(PIN_WRIST); penLift.attach(PIN_PEN); // Move to home/rest position penUp(); moveTo(90, 90, 90); delay(1000); Serial.println("🤖 MakeMindz Robot Arm Ready!"); } // ================================================================ // LOOP — runs repeatedly // ================================================================ void loop() { Serial.println("Drawing Square..."); drawSquare(); delay(2000); Serial.println("Drawing Triangle..."); drawTriangle(); delay(2000); Serial.println("Drawing Star..."); drawStar(); delay(2000); // Return home and wait before drawing again moveTo(90, 90, 90); delay(5000); }
70, 110, 90 etc.) are starting values. Every arm is different because your arm lengths and servo mounting will vary. Use the Serial Monitor + calibration sketch to find the right angles for your arm before trying to draw!Help & FAQ
Got Questions? We've Got Answers! 🙋
🔧 How do I calibrate the servo angles? ▶
Upload this quick calibration sketch first. It lets you type angles into the Serial Monitor and watch the arm move in real time:
#include <Servo.h> Servo s1, s2, s3, s4; void setup() { Serial.begin(9600); s1.attach(9); s2.attach(10); s3.attach(11); s4.attach(6); Serial.println("Type: s1:90 or s2:45 and press Enter"); } void loop() { if (Serial.available()) { String cmd = Serial.readStringUntil('\n'); int colon = cmd.indexOf(':'); String servo = cmd.substring(0, colon); int angle = cmd.substring(colon + 1).toInt(); if (servo == "s1") s1.write(angle); if (servo == "s2") s2.write(angle); if (servo == "s3") s3.write(angle); if (servo == "s4") s4.write(angle); Serial.print("Moved "); Serial.print(servo); Serial.print(" to "); Serial.println(angle); } }
Type commands like s1:70 and press Enter to move Servo 1 to 70°. Write down the angles for each corner of your drawing area!
😵 My servo is making noise but not moving properly! ▶
This usually means the servo doesn't have enough power! Check:
- Are all servo VCC wires connected to the external 5V power bank (not Arduino 5V)?
- Is the power bank fully charged and turned on?
- Are all GND connections joined (servo GND + Arduino GND + power bank GND)?
- Is anything physically blocking the servo arm from rotating?
📐 The arm can't reach all areas of the paper! ▶
The arm's reach depends on the segment lengths. If the arm can't reach far enough:
- Make your arm segments longer (try 15cm + 12cm instead of 12cm + 10cm)
- Move the base closer to the paper
- Use a smaller drawing area — a 10cm × 10cm square is realistic for a 3-servo arm
- Increase the shoulder servo range in the code
✏️ Can I make it draw letters or my name? ▶
Yes! Each letter is just a series of moveTo() and penUp()/penDown() calls. For example, to draw the letter "L":
- PenUp → Move to top-left of "L"
- PenDown → Move straight down (vertical stroke)
- Move right (horizontal base of "L")
- PenUp → Done!
You can write a function for each letter and then call them in order to spell words!
🚀 What can I build next after this? ▶
You're officially a robot arm engineer! Here are your next missions:
- 🕹️ Add a joystick — use two potentiometers to manually control shoulder + elbow in real time
- 📲 Bluetooth control — control the arm from your phone via HC-05 module
- 📷 Computer Vision — use a webcam + Processing to trace any image!
- 🦾 Gripper upgrade — replace the pen with a gripper to pick up small objects
Achievement Unlocked!
Skills You Just Learned 🏆
By completing this project, you've earned serious robotics credentials:

Comments
Post a Comment