Robot Log

Learning to build a drawing arm: parts, diagrams, wiring and code

A working record of building a two-servo pen arm on an Arduino. Each entry notes what was made, what went wrong, what changed, and exactly how it is wired and coded, so it can be rebuilt.

The arm is groundwork for The Secret Lives of Punctuation. The aim is for it to draw punctuation marks from the conversation data on the same sheet as my own hand-drawn gestures, so the human marks and the machine's marks sit as two separate outcomes.

Aim

I think the process matters more than the outcome. We spend our lives developing things and are often disappointed with the result, which is why I like the European approach to education, where the process comes first. So anything I build, I will log.

At my PhD interview, it was suggested that I look into robotics. Before committing to a five to eight year PhD, I wanted to understand what that might involve, so I started today with a very simple drawing machine built from cheap materials and code I found online.

The aim is to make things that exist in the physical world, and to see what happens when a bot’s output becomes a mark on paper. This will extend one of the marks in The Secret Lives of Punctuation. I will make my part: hand-drawn gestures, Cricut-cut shapes and expressive keyboard marks. The bot has already produced a sonic version of each mark’s data, but not yet a drawn one. This arm may be a way to get it onto paper. It is an awkward machine, so the bot’s language gets translated through it. How do its marks diverge from, or relate to, mine?

Method: I draw first

  1. I respond to each punctuation mark by hand first: a drawn gesture, cut shapes and colour, and what I call keyboard painting, using elements of the mark alongside other marks.
  2. Only when that is finished do I look at the bot’s response, so its marks never influence mine.
  3. I then compare the two. Things I had not envisaged only show up once the making is done, which seems right to me: as humans we advance through lived experience, and by reflecting on it.

Rules for the build

  • No soldering.
  • As cheap as possible, from one shop.
  • I write the code myself and use help to check it.
  • Log the mistakes as well as the results.

Entries

01
Two servos and a paper arm
Done
02
Centre both servos, fix the base
Planned
03
First punctuation mark from data
Planned

01
Two servos and a paper arm

16 October 2026

Both servos sweep. The arm draws arcs.
First run (video)

The first run: arm 1, arm 2 and a fine-liner pen drawing arcs on watercolour paper. Base not yet fixed down. Powered over USB from the laptop.

The first experiment was to get two servos moving and to see whether a paper arm built on them could hold a pen and make a mark. Both servos sweep, and with arm 1, arm 2 and a fine-liner in place the arm draws overlapping arcs. Nothing is calibrated yet and the base is not fixed down.

Materials
ItemQtyNotesCost
Arduino Uno R3 with USB cable1USB-A to USB-B cable£8.46
SG90 micro servos4 in pack, 2 usedListed as SG90 with metal gears, so possibly MG90S£7.29
ELEGOO jumper wires, 120 pcs1 packMale-to-female, male-to-male and female-to-female£6.99
Solderless breadboard, 400 points1Used for the + and − power rails£4.99
Moqinai M2 screw, nut and washer set, 1215 pcs1 setSocket-head cap screws, 4 to 20 mm, hex key included. Washers are spring (lock) washers.£6.99
300gsm watercolour paper, laminated–Arms and base plate, cut on a Cricut Air 2already owned
Fine-liner pen1Sits in a 9 mm hole in arm 2already owned
Wooden board and clip1Holds the paper stillalready owned

Bought items total £34.72. No soldering: a servo plug is three female sockets, so male-to-male jumpers join it to the breadboard or the Uno.

Tutorial followed for the first sweep: Using an SG90 servo motor with Arduino (electronics-lab.com).

How it is built
Swipe sideways to see the whole diagram
table / paperservo 1servo 21234
Side view of the stack, not to scale. Only the horns and arms turn; the servo bodies and the base plate stay still.
  1. Base plate on standoffs. Servo 1's body hangs through a window in it, with its tabs resting on top.
  2. Arm 1 (110 x 24 mm) on servo 1's horn. Servo 2 sits in a window at the far end, with its tabs resting on top of arm 1.
  3. Arm 2 (80 x 16 mm) on servo 2's horn.
  4. Fine-liner pen through a 9 mm hole near the end of arm 2, tip on the paper. The pen stays down, so the line is continuous.

How the paper arm fixes to the servo

Swipe sideways to see the whole diagram
paper armhole 2.4 mm in the armbase plateservo body1234
Close-up of one joint, side view, not to scale.
  1. The servo's own small silver screw goes down through the paper arm and the horn into the shaft. In the latest file the hole in the arm is 2.4 mm, so the screw head clamps the paper to the horn.
  2. The white plastic horn pushes onto the servo shaft. Choose the single-arm horn; the cross-shaped one gets in the way, and a two-arm horn can be trimmed.
  3. The shaft turns when the servo moves.
  4. The servo body hangs below the plate, with its tabs resting on top.

Measurements

WhatSize
SG90 overall length, with tabs32 mm
SG90 body length22 mm
SG90 tab hole spacing28 mm
Window for a servo body21.8 x 12.5 mm (snug fit, tested)
Tab slots3.6 x 2.2 mm, 14 mm either side of the window centre
Layer-fastening holes2.2 mm, for M2 6 mm screws
Servo tab screwsM2 8 mm
Horn-screw hole in the arms2.4 mm (latest file)
Pen hole in arm 29 mm
One laminated layer of 300gsm paperabout 0.4 to 0.5 mm
Layers per part4 for the base plate and arm 1, 2 to 3 for arm 2

Each layer is cut separately and then glued, with screws through the layer holes to keep them aligned. This worked better than cutting a glued stack.

Cut file (Cricut)
ARM 1110 x 24 mmARM 280 x 16 mmPEN-HOLE TESTholes 8 to 12 mmBASE PLATE70 x 50 mmHORN-SCREW TESTholes 2.0 to 2.8 mm
Cut file layout, version 5. The whole file is 120 x 140 mm.

Cricut Design Space settings

  • Design Space reads the millimetre values in the file as inches, so the upload comes in far too large.
  • Select all, keep the padlock locked, and set the height to 5.51 in. The width follows.
  • Check that the holes and windows show as empty, and do a test cut on scrap first.
  • Mat: 12 x 12 in.

How the file changed

VersionChangeWhy
v1First fileWindow sized from the servo's published dimensions
v2Windows 22.8 mm. Round tab holes replaced with 3.6 x 2.2 mm slotsServo too loose in the window, and one tab hole lined up while the other did not
v3Windows 22.2 mmStill loose
Window testSmall test piece with four window sizesCut to find the fit rather than guess. 21.8 mm was the right one.
v4Windows 21.8 mmSnug fit, servo body is 22 mm
v5Horn-screw hole 2.4 mm (was 6 mm). Added a test strip of holes from 2.0 to 2.8 mmThe 6 mm hole let the screw head drop through and the arm wobbled
Wiring
Swipe sideways to see the whole diagram
ARDUINO UNO R3(simplified)PIN 85VGNDPIN 9+ RAIL (red line)− RAIL (blue line)SERVO 1 · baseSERVO 2 · in arm 1signal+5VGNDGND+5Vsignalblackyelloworangeorange
Wiring diagram. The Uno is simplified: pins 8 and 9 are on the digital header and 5V and GND on the power header. A wire that hops over a rail is not connected to it.
FromTo
Servo 1, orange (signal)Uno digital pin 8
Servo 1, red (+5 V)Breadboard + rail (the red line)
Servo 1, brown (GND)Breadboard − rail (the blue line)
Servo 2, orange (signal)Uno digital pin 9
Servo 2, red (+5 V)Breadboard + rail
Servo 2, brown (GND)Breadboard − rail
Black jumper, Uno 5VBreadboard + rail
Yellow jumper, Uno GNDBreadboard − rail

Notes

  • SG90 wire colours: brown is GND, red is +5 V, orange is the signal.
  • Each servo plug is three female sockets, so each wire needs a male-to-male jumper to reach the breadboard or the Uno. The jumper colours do not matter.
  • The Uno's power header, with the USB socket on the left, reads: IOREF, RESET, 3.3V, 5V, GND, GND, Vin.
  • The breadboard rails are not connected to anything until the 5V and GND jumpers are in. Both servos take their power from the rails.
  • Both servos run from the laptop's USB power. If they jitter or the Uno resets when both move, the next step is a separate battery pack for the servos with its ground joined to the Uno's GND. Never connect a battery pack to the Uno's 5V pin.

Check before plugging in

  • The 5V jumper goes to the + rail only, and the GND jumper to the − rail only.
  • All three wires are in for each servo, and no red wire is in the − rail or brown wire in the + rail.
  • Nothing connects the + rail to the − rail.
Code

Setting up the Arduino IDE

  • Arduino IDE 2.3.10. Board: Arduino Uno. Select the USB port the Uno appears on.
  • The sketches need the Servo library. The first upload failed with Servo.h: No such file or directory. Fix: Tools, Manage Libraries, search for "Servo" and install the one by Michael Margolis, Arduino.

Sketch 1: centre a servo

centre_servo.ino
#include <Servo.h>

Servo servo;

void setup() {
  servo.attach(8);   // servo 1 signal wire is on pin 8
  servo.write(90);   // go to the middle of the range
}

void loop() {
  // nothing to repeat
}

Sets servo 1 to 90 degrees, the middle of its range, so the horn can be fitted pointing the right way. Use this before putting the horn on.

Sketch 2: two-servo test

two_servo_test.ino
#include <Servo.h>      // library for driving hobby servos

Servo s1;                // servo 1 (base), signal on pin 8
Servo s2;                // servo 2 (in arm 1), signal on pin 9

void setup() {
  s1.attach(8);
  s2.attach(9);
  s1.write(90);          // hold servo 1 in the middle
  s2.write(90);
}

void loop() {
  for (int a = 60; a <= 120; a++) {   // sweep servo 2 from 60 to 120 degrees
    s2.write(a);
    delay(20);                        // wait 20 ms per degree
  }
  for (int a = 120; a >= 60; a--) {   // and back again
    s2.write(a);
    delay(20);
  }
}

Holds servo 1 at 90 degrees and sweeps servo 2 between 60 and 120. At 20 ms per degree, each sweep takes about 1.2 seconds. This sketch was supplied by Claude for this test; the code that follows will be my own.

Earlier sketch

The first sweep, from the tutorial above: one servo on pin 8, sweeping from 10 to 180 degrees with a 15 ms delay per degree. Pin 8 is not a PWM pin and does not need to be, because the Servo library handles the timing. Saved as sketch_oct13a.

What happened, in order

1Plan and parts

On 13 October I worked out a two-servo arm from layered paper and ordered the Uno, servos, jumper wires, breadboard and M2 screws. Two servos, so the pen stays on the paper and the line is continuous. A third servo could later lift the pen.

2The servo did not fit its window

Problem The window was too long, so the servo's tab holes lined up at one end but not the other.

Fix Shortened the window in steps (v2 to v4) and cut a small test piece with four window sizes. 21.8 mm was exactly right.

3First sweep

Problem The first upload failed with Servo.h: No such file or directory.

Fix Installed the Servo library through Tools, Manage Libraries. The servo then swept.

4The arm wobbled on the horn

Problem The hole for the horn screw was cut at 6 mm, so the screw head dropped through and the arm was loose.

Fix Reduced it to 2.4 mm in v5, so the screw head clamps the paper to the horn, and added a test strip of hole sizes from 2.0 to 2.8 mm.

5Wiring the second servo

Problem The new servo's power wires went into the breadboard rails, but the rails were not yet connected to the Uno, and the feeder jumpers had gone into the wrong rows.

Fix Rewired from a table of eight connections (see Wiring): black jumper from 5V to the + rail, yellow from GND to the − rail, servo reds in the + rail, servo browns in the − rail, orange signals to pins 8 and 9. Both servos moved.

6First arcs

With arm 1, arm 2 and a fine-liner in place, the arm drew overlapping arcs on the paper. The base was not fixed down, so it also moved slightly with the arm.

What I noticed

[Your observation]

Question this raises

[Your observation]


Not yet tested, and next

Still to test

  • Which horn-screw hole on the test strip (2.0 to 2.8 mm) fits, and whether the paper arm slips on the horn. If it does, a second M2 screw through a spare hole in the horn is the fallback.
  • Centring both servos at 90 degrees before fitting the horns.
  • Fixing the base to the board with thick double-sided foam pads or Blu Tack, with the paper clip and the wires kept outside the pen's reach.
  • How much clearance the servo bodies need below their tabs.

Next steps

  • Learn how angles map to places on the page. The arm reaches about 13 cm from the base, a half-disc.
  • Python on the laptop reads punctuation_data.csv and sends instructions to the Uno over USB serial. The Uno only moves the servos.
  • Log the intended path next to what was actually drawn.
  • Later: a camera to look at the drawing, and a separate battery pack if the servos stutter.