Bono: a wall-drawing plotter

9 minute read

Published:

Last week at Quark, on the library lawns, a whiteboard drew the Batman logo on its own while people ate breakfast around it. Behind it were two stepper motors, two cords, a pen in a 3D printed carriage, and a laptop. The machine is called Bono. It’s our version of the polargraph, a wall-drawing robot, and this post is about how it works, the math that decides where it can draw, and what we learned building it.

Bono at the Quark booth on the library lawns: whiteboard on a stand, cords running from corner pulleys to the pen gondola, the laptop driving it

How a polargraph works

A polargraph has no rails. Two motors sit at the top corners of the board, each winding a cord, and the pen carriage (the gondola) hangs where the two cords meet. That’s the whole mechanism. The two cord lengths fix the gondola’s position the same way two compass arcs fix a point. So the machine’s native coordinates are cord lengths, and X and Y only exist in software.

The kinematics

Put the left motor at the origin, the right motor at (W, 0), and measure y downward. Our motors are 1,100 mm apart. For a pen at (x, y) the two cord lengths are

L1 = sqrt(x^2 + y^2)
L2 = sqrt((W - x)^2 + y^2)

That’s the inverse kinematics, and it’s all the firmware needs to move to a point. Going the other way, from cord lengths back to a position, is two circles intersecting:

x = (L1^2 - L2^2 + W^2) / (2 * W)
y = sqrt(L1^2 - x^2)

The forward solve only matters for homing and for reporting position. The real problem is straight lines. A straight line in x and y is a curve in (L1, L2), so both motors have to change speed continuously along the move. The Makelangelo firmware does what every plotter firmware does. It chops each line into short segments, solves the two square roots at the end of every segment, and runs each motor at constant speed within the segment. We used 2 mm segments, which puts the error on a curve far under the pen width.

Steps, microsteps, and current

Each motor is a 200-step NEMA 17 driven at 1/16 microstepping, so one revolution is 3,200 microsteps. The printed sprocket has a circumference of 60 mm, which gives about 53 microsteps per millimetre of cord, or 19 µm per microstep. That’s the resolution in cord space. In board space it’s worse, for reasons in the next section. Microstepping has a cost, though: a stepper only holds a microstep with a fraction of its full-step torque, so under load it’s easy to lose one and snap to the nearest full step.

The driver upgrade was about current. The L293D shield is an H-bridge rated for 600 mA continuous with no current regulation, so it either starved the motors or cooked them. The A4988 drivers on the RAMPS 1.4 board are chopper drivers. They set the coil current from a reference voltage, I = Vref / (8 × Rs), and with the board’s 0.1 Ω sense resistors a Vref of 0.8 V gives 1.0 A. The motors are rated at 1.2 A. Running them at 1.0 A keeps them warm instead of hot at idle and still gives enough torque to lift the gondola against the counterweights. With full steps every curve had a visible scallop, because the pen traced the motor’s cogging one step at a time. Microstepping removed it.

Gravity, tension, and the usable area

Gravity does two things. It keeps both cords taut, since a motor can wind a cord but can’t push one, and it pulls the gondola down into the V. It also decides where on the board the machine can draw well.

It’s a statics problem. The two cord tensions have to add up to the gondola’s weight in the vertical direction and cancel in the horizontal, so the tension in each cord depends on the angle it makes with the horizontal. Three regions come out of that.

Near the top edge, between the motors, both cords are nearly horizontal. With each cord at 10° from horizontal, vertical equilibrium T1 sin φ1 + T2 sin φ2 = mg means each carries mg / (2 sin 10°), almost three times the gondola’s weight. The vertical stiffness is tiny there, so a small change in tension moves the pen a lot in y. That’s where the gondola sags and wobbles, and a small error in cord length turns into a large error in position.

Near a top corner, the near cord is steep and carries almost all the weight, and the far cord goes nearly slack. The counterweight is the only thing keeping it seated on its sprocket.

Near the bottom, both cords approach vertical. The horizontal stiffness falls toward that of a long pendulum, so the pen is easy to push sideways and slow to settle, and the lag under acceleration grows with cord length.

The area that draws well is the middle band, roughly the middle sixty percent of the board, and we placed every image there.

Counterweights

The cords carry counterweights, and ours are water bottles. We use water bottles for a lot of things. They keep the slack side of each cord under tension so the printed ball-chain sprockets can’t skip, and the water level is adjustable: top up for coarse changes, pour some out for fine ones. Half full worked best, about 250 g per side. Working that out took an afternoon.

Bono halfway through the Batman logo on paper taped to the whiteboard, counterweight bottles hanging on both cords

The pendulum

The gondola hangs on cords about 0.6 m long in the middle of the board, so it’s a pendulum with a natural frequency of f = (1/2π) sqrt(g/L), about 0.64 Hz. Any acceleration near that frequency builds up the swing, and the swing shows up in the drawing. The motors sit a few centimetres in front of the board plane, so the cords pull the gondola against the surface and friction damps most of it while the pen is down. Pen-up travel moves have no such damping, so a fast machine starts its next stroke in the wrong place.

The fix lives in the acceleration setting. We run 150 mm/s² up to a cruise of 60 mm/s, which means a 0.4 s ramp at each end of a move, under half a swing period, so the gondola lags by under a centimetre and settles before the pen touches down. At 500 mm/s² the lag is three times that, and strokes visibly miss where they were meant to start.

Software and shading

The Polargraph controller does what the Quark crowd saw: import a bitmap, click draw. Under the click, the image is downsampled to a grid whose cell size is set by the pen. A 2 mm whiteboard marker means a 2 mm cell is the finest useful pixel, so a 900 mm wide drawing area gets about 450 pixels across. For each cell the software draws a zigzag whose amplitude scales with the cell’s darkness. Light cells get a nearly straight line and dark cells get a tight scribble that fills the cell. A servo on the gondola lifts the pen between strokes. A whiteboard marker draws all of it. That was the pitch: notice boards and lecture diagrams drawn by a machine whose only consumable costs thirty rupees.

This is the gondola shading a dark patch, cords in a V above it, pen down. The two steppers make different pitches because they’re running at different speeds.

Cost

Our expense sheet shows how the electronics went. The first driver purchase is an L293D shield. The second, eleven days later, is the RAMPS 1.4 with A4988 drivers. The final stack is two NEMA 17 steppers, the RAMPS board on an Arduino Mega, an SMPS with cooling fans, and printed mounts for all of it. Total cost was ₹20,372, and the 3D printing again cost more than the electronics.

What we learned

  1. Gravity tensions the cords for free, and it also swings the gondola at about 0.64 Hz. The fix is the acceleration cap in the firmware, 150 mm/s² for us. There’s no feedback loop to tune, so PID doesn’t apply.
  2. Scalloped curves were full-step cogging. Sixteenth-microstepping on chopper drivers at 1.0 A fixed what pen pressure couldn’t, and the motors stopped overheating.
  3. The top band and the top corners are bad for different reasons. Near-horizontal cords need almost three times the gondola’s weight in tension, and near a corner the far cord goes nearly slack. Keep the drawing inside the middle sixty percent.
  4. Water bottles beat fixed counterweights because you can adjust the mass in ten-gram sips.
  5. Drawing Batman got a crowd and drawing calibration grids didn’t. Pick the demo for the audience.
  6. Buying the wrong motor driver and then the right one eleven days later looks like waste on the expense sheet. It was the fastest way to learn what we needed. The ₹20,372 sheet is the most useful project log we have.

Bono shared the Quark table with the submarine and the scanner. Of the three, the one that draws cartoons got the biggest crowd.