Looking for a holiday DIY project? Build your own pen-plotter, for under $15

BrachioGraph: 'The cheapest, simplest possible pen-plotter'

Ubuntu Summit BrachioGraph is a DIY pen-plotter built from a Raspberry Pi Zero, a few $2 servomotors, plus household parts such as clothes pegs and bulldog clips… and controlled in Python.

An enjoyable side to the Ubuntu Summit was that unlike some of the more worthy events from the commercial side of the industry, here people were presenting their own personal passion projects. BrachioGraph is one of these, and was presented by its creator, Daniele Procida, whose day-job is director of engineering at Canonical.

brachiograph

BrachioGraph in action. Pic courtesy Daniele Procida

These days, if you want a hard copy of something big, such as an engineering diagram, there are large-format printers which will oblige, but in days gone by, this job fell to X-Y plotters. Decades ago, your author had one himself, hooked up to an Acorn Archimedes. As Procida put it, "You don't really see them any more, but they were nice to watch working."

They were also quite complex kit – they have featured in On Call, indeed more than once. Hobbyist versions still exist: for instance, there's AxiDraw, whose budget MiniKit is some $325.

So, Procida decided to build his own… "But all my tools were for repairing bicycles." So, he bought some cheap $2 servomotors from a Chinese sales site, and used household items for the rest: some popsicle (ice-lolly) sticks, a clothespin (clothes peg), a binder clip, a sheet of cardboard, and a spare Raspberry Pi Zero. "That's what I had in my hands, and wanted to do something with," he explained. "I like having limits, because whenever you encounter a limit, you have a challenge."

He dubbed the result brachio-graph, from the ancient Greek βραχίων (brakhīón), arm, and γράφω (gráphō), to write: "arm-writer." (This vulture has been a sucker for a classical allusion ever since Asterix and Obelix.) Instead of an X-Y mechanism, the brachiograph has a shoulder motor, an elbow motor, and a rudimentary wrist, for lifting the pen off the paper.

The result is that it can only draw curves: as Procida put it, "It's much harder to draw a straight line with your arm than to walk one."

To do so, he had to go back to high-school trigonometry and Python, with some help from the numpy library. The result is limited: it can only draw over a fairly small, curved area of a piece of card or paper, and its lines are wobbly. Each of the three servomotors has a limited range of movement of about 120°. He told us: "you can get about 150°, but it gets very, very inaccurate. Any more than that, and they burn out. I have destroyed so many of these. Never a single Raspberry Pi – they take so much abuse! – but the servos, loads."

He recommends the basic $2 servos: apparently, more expensive ones actually deliver worse results. (Beware even cheaper motors: there are ones on offer for about $1, but they're fakes and don't work.) A big problem is that the devices have a non-linear response, and he's had to allow for that in his Python code. You can calibrate your particular setup by drawing some pre-programmed lines, measure the results with a ruler, and enter the resulting values into the code, which will improve the output.

The code can do line-extraction on bitmap files, and for a more artistic drawing, you can put a charcoal pencil into the clothes peg for a sketch-like result.

As you might expect from the person in charge of Ubuntu's documentation, the project and its accompanying code are conspicuously well described, especially for a project labelled as version 0.1. It was great fun to watch the device in action, and the Reg FOSS desk plans to try to build one.

Youtube Video

You can watch one in action in the video above. ®

Similar topics

TIP US OFF

Send us news


Other stories you might like