Home
About Me
Projects
&c.

I.A.G.O., the prototype pen plotter

Alternate title: "What I did with my free time in Hong Kong"

I'm writing this from my Hong Kong apartment which is, without exaggeration, the size of two queen beds, but that's not the point. Why am I in Hong Kong, I ask myself pretty much all the time. Well, it's a long story, but part of the reason is this goofy robot here.

Please, allow me to explain. I'm working for Robot Sapience, a robotics education program for primary and secondary students. The majority of the program offerings have a competitive aspect to keep students interested and engaged. As part of my application process, I pitched a new suggestion. A servo-controlled pen plotter, I argued, could be a good centerpiece for the current introductory, "get young students accustomed to hands-on learning" batch of lessons. They asked how I'd control it. "Probably Arduino," I answered, outlining the lessons and the system I envisioned. And then I got the job and came to Hong Kong!1

In my downtime at work, I've been playing around with the pen plotter idea, because I felt like I owed it to the hypothetical machine from the job interview. But now I'm genuinely convinced it could be a benefit to the teachers and students:

The last thing the project needed was a name. Something silly. A friend suggested naming it Iago, in honor of the greatest plotter in Shakespeare's œuvre. That quickly got back-formed into an acronym: I.A.G.O., the Instructional Autonomous Graphing Opifex2.




The Early Design Stage

Like I said, this started as a project during breaks at work. This is why the first design iterations feature so many office supplies and things from the stationery store next-door to my building. Here is a version with popsicle sticks, poster-board, zip ties, and M3 hardware scrounged from the bin. The ball-and-socket parallelograms, which are critical to delta robot operation, were sourced from an RC hobby shop in Yau Ma Tei. Still, they only cost about 50 Hong Kong dollars (roughly $6.50 U.S.).

At the end of the video above, you also see the Python simulator I wrote, which brings us to...


The Simulator, the Arduino and the Batch Script

I wrote the code to control I.A.G.O. twice, in Python and the Arduino language, concurrently. The former is only intended to work as a simulator on the computer screen, and the latter is only meant to control the physical machine. Both operate the same way: take in a plain-text list of Cartesian coordinates, and visit them one by one, moving in a straight line between each point.


I.A.G.O. simulator writing 香港 "Hong Kong" from a set of coordinates

I've implemented two ways to get the coordinates from a text file into the Arduino brain. The first is simple, straightforward serial communication, which means you have to connect I.A.G.O. to your computer by USB. If you don't want to do that, I wrote a Windows Batch script that automatically converts the list of coordinates into an array of floats, compiles a new Arduino program to visit those coordinates, and uploads it to the Arduino. Then you can unplug it and run I.A.G.O. without any cables! Well, except the power cable. Speaking of which....

I designed I.A.G.O. to work on 4 AA batteries. This doesn't supply enough current to run all three servos at once, so I implemented a function that only permits one servo to move at a time. It splits up the paths into discrete segments so small that the movement still looks fluid. You can see an early, less-fluid version of this algorithm in place in the video above. A much more fluid version is seen here:




Fancier Hardware and an Arduino "Shield"

Much later, I made a couple improvements for aesthetic and structural reasons. I replaced the posterboard and popsicle sticks with laser-cut acrylic, which proved to be much sturdier, not to mention visually pleasing. Still, there's something to be said for a chassis that costs roughly zero dollars...anyway, here's a video of the acrylic parts in production, then a video of the acrylic parts in action:



In the second video, you might have noticed that I swapped out the breadboard and rats-nest of jumpers for a much more organized protoboard with header pins. But I quickly ditched the protoboard for my own custom PCB, thrown together in a couple minutes in KiCad. This being Hong Kong, it only took a couple days and less than $10 U.S. to get a cleanly laid out PCB in my hands! It may just be header pins and a DPDT switch, but as far as I'm concerned this counts as manufacturing my own Arduino Shield!




Putting It All Together, then Calibrating, Calibrating, Calibrating....

I borrowed a jig saw and threw together a gantry. Not my finest work, I admit. Then I filed down the end of a whiteboard marker to fit snugly and securely in the end effector.


Please endorse me on LinkedIn for my new skill, "filing the edges of whiteboard markers".

I.A.G.O.'s first test was the words 香港, "Hong Kong." Here's how that turned out:


It's...legible, but by no means sufficient. I tuned the physical constants to minimize the spherical aberration, and mounted the writing platform on a cheap postal scale so it could move up and down with the irregular pressure of the pen.

This has not improved legibility, but I'll keep tuning it when I feel like it.




Q: Is it open-source? A: Yes!

All the design files—Arduino code, CAD models, computer simulation, and the Arduino shield—are freely available on my Github page! The files are organized using my original name for the project, Biro-Bot.




1. I promised myself I wasn't going to sugar-coat the truth of my job search. I didn't get a job simply by being creative/intelligent/interested/whatever; no, there was plenty of distasteful networking and cronyism. My job search, like so many others', was not the purely meritocratic process that school counselors pretend it will be.

2. Latin. opifex, opificis (third declension). One who does a work; a worker, maker, framer, fabricator; in particular, a workman, mechanic, artist, artisan, etc. This definition is from A Latin Dictionary by Charlton T. Lewis & Charles Short, Oxford: Clarendon Press, 1879.