Polargraph Drawing Machine

Picture of Polargraph Drawing Machine
This machine, a variation on the hanging-pen plotter is a conspicuous and wilfully naive attempt to break out of the pristine, pixel perfect, colour-corrected space that exists inside our computers. It's a drawing machine, that takes a pen (a human tool) and uses it to draw in a singularly robotic way, with some grand results.

It doesn't draw at all like we would (though it could), and we would struggle to draw exactly as it does (though we could).

It can draw on things bigger than itself - the question is really "how long is a piece of string?" when it comes to working out it's maximum area.

It's easier to look at what it does, than to explain it, so just have a look.

Remove these adsRemove these ads by Signing Up

Step 1: History

Picture of History
Well there have been lots of new drawing machines doing the rounds lately, there's a real thirst to see devices that leap out of the virtual into the
physical. For me, it's all too easy to produce digital things which are interesting - programming or mash-ups or virtual experiments are devalued because they are intangible, you can run a hundred, a thousand, a million variations in a day - it's the proverbial roomful of monkeys with typewriters. The output becomes disposable, it get's hard to see the value, the craft.

So 3D printers and other desktop manufacturing tools and technologies (laser cutters etc) have got more and more popular, it's hard to overestimate how much hunger there is for a tangible, physical, touchable, smellable product of all this clever-clever digital work.

So this isn't wholly original, check out this prior art for more inspiration:

Hektor - the daddy of all hanging drawing machines
Der Kritzler - the smartest one yet
AS220 Drawbot - the basis for mine
SADBot - Instructable for an automatic drawing machine on the same pattern by Dustyn Roberts

Or have a look at what I've been doing with mine
Polargraph website
Polargraph project code and wiki
Flickr stuff

I'm having a weird issue where when I click on "set home" I see no purple dot, and only one of the motors will lock. Then when I click "Move pen to point" and select a point, the line from where the machine thinks the pen is starts way off the screen up to the left and the machine does not move. I tried deleting the default config file and starting over, but it still seems to think the pen is there. Also, when I select "return to home" it will do the same, thinking the pen is up in the far left beyond the screen, and the purple dot is in the correct place, so I believe "home" is still in the right locations. My motors are working just fine with the Accelstepper Multistepper example btw, so no issue with the electronics side of it.

Like I said in my other comment (page 13), I am using a motorshield v2, so I'm checking to make sure I didn't update the program improperly, but so far I can't find anything that is wrong. I've updated all the Arduino libraries to accommodate the motorshield v2, but per your instructions I am using Processing 1.5 and the libraries that you provided on github for the processing side of things.

So, any ideas? I am stumpted!

Euphy (author)  Seeshi_suin6 days ago
Only one of the motors locking is a sign that something is wrong with your firmware, so that's a start. BUT even if that is the case, the rest of the stuff should probably work as you expect.

You have already set your machine size, and uploaded it with "upload machine spec"?

And just to be sure, you're based on the code from the latest release zip at github:

Open the console with ctrl-c, then issue your "set home" command, see if the numbers that come back are the same as the number you send.

Seems to me that the issue is probably with Accelstepper. I contacted Adafruit and they told me that Accelstepper is not compatible with the Motorshield v2, unless you use the adafruit edited version that you can download from their site. That version doesn't seem to work with the polargraph though.

Euphy (author)  Seeshi_suin3 days ago

Aha, that's worth knowing. I wonder what is different about adafruits fork of accelstepper. I've actually got a motorshield v2 now, so I hope I'll be able to get it put together and have a go myself sometime soon. The work you have already done will be useful, but if I get it working I'll let you know and write it up as part of this instructable, and on the site (

nam20023 days ago

Hi, i posted a comment. I havent got a reply for it. plz help!!!

squeakychair5 months ago
Hi Sandy,

First, Great project! This is my first Instructable, you have inspired me.

I purchased the new Adafruit Motorshield v2 and the Library has changed. I was able to update your source to accommodate the new Library however now the compiled code is too large for the Arduino Uno. Looks like the new shield library adds some additional libraries. I'm also assuming the shields new ability to add additional shields creates a new array variable that is taking up space. (just a guess)

Binary sketch size: 32,474 bytes (of a 32,256 byte maximum)

My next step would be to graduate to a Arduino Mega 2560 however I wanted to ask you if there was anything that could be done to simply reduce the code by 218 bytes? This reminds me of code length issues with my TRS-80 / 4k memory way back when.

Here is what i changed in file "configuration" to update for the new Library. I'm assuming this will work however its not tested as I'm unable to load.

// 1. Adafruit motorshield V2 - testing
#include "utility/Adafruit_PWMServoDriver.h"

// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield();

const int stepType = INTERLEAVE;

Adafruit_StepperMotor *afMotorA = AFMS.getStepper(motorStepsPerRev, 1);
Adafruit_StepperMotor *afMotorB = AFMS.getStepper(motorStepsPerRev, 2);

void forwarda() { afMotorA->onestep(FORWARD, stepType); }
void backwarda() { afMotorA->onestep(BACKWARD, stepType); }
AccelStepper motorA(forwarda, backwarda);

void forwardb() { afMotorB->onestep(FORWARD, stepType); }
void backwardb() { afMotorB->onestep(BACKWARD, stepType); }
AccelStepper motorB(forwardb, backwardb);

void configuration_motorSetup()
// no initial setup for these kinds of motor drivers
void configuration_setup()
defaultMachineWidth = 650;
defaultMachineHeight = 650;
defaultMmPerRev = 95;
defaultStepsPerRev = 400;
defaultStepMultiplier = 1;
currentlyRunning = true;
// end of Adafruit motorshield definition
// =================================================================

Euphy (author)  squeakychair5 months ago
Very good point squeakychair, I knew the space was getting tighter and tighter on the ATMEGA328 boards and I have already done a little code optimisation to make it fit. The only thing I can think to do is make two versions, one that only does bitmap shading and another that only does vector drawing.

You could empty the function exec_drawBetweenPoints(..) and remove desiredSpeed() to cut out the vector drawing features (drawing straight lines), saving 2k.

To remove the pixel shading features, delete the entire "pixel" tab and snip a little out of the exec_executeBasicCommand(..) function, freeing a mighty 3.5k.

I think the AccelStepper library has grown a little bit during the last couple of releases too - it all adds up.

good luck!

I just did this with an UNO and MotorShield v2. I replaced all the config code like Squeakychair suggested, but I had to cut down some stuff to get my sketch down from 33,242 bytes. I cut the DC motor code out of Adafruit_MotorShield.h and Adafruit_MotorShield.cpp, but that wasn't enough. Ultimately I had to cut out the penlift code to get the sketch small enough

Euphy (author)  Seeshi_suin8 days ago

Aha, thanks for the note - very good to know.

I found my issue, I'm able to compile. I did not change the include to point to the new Library.
Hi squeakychair... Could you explain (or show) what you had to modify in the source code you attached above to make it all work? Thanks!
Squeakychair - I've got the same issue re: implementing with the V2 Motorshield. I get the "too big" error on compile. Would you mind sharing your final version (after you resolved your issue) of the file?

Many thanks!
ltaddeo14 days ago

Hi there!!

Sorry if I'm asking anu absurd here, but It's my first project using arduino.

I'm trying to build a variation from this project.. the same software and everything, but with a diferent "hardware" structure.

But In a distraction, I bought the Adafruit's Motorshield V2. I already mapped the correct wires positions for the stepper motors. I know i'll have to use the V2 libraries as well.

Do you have any idea were I'll have to change code to use the new library?

Euphy (author)  ltaddeo12 days ago
Hello, I haven't done it myself, but I'm told the polargraph code can run on the motorshield v2 with minor adjustments. There's a couple of threads on the polargraph forum about it - is a good place to start.

Good luck!
ltaddeo Euphy11 days ago


That's REAAAAAALLY good!

I'll give it a try, and if it works, I'll tell you! :)

EoinM1719 days ago

Hi, first off I want to say that this is an amazing instructible and machine! I have been thinking about making one after i finish my current arduino project.

I saw this board on sparkfun: and I was wondering if it would be suitable for controlling a polargraph. It looks suitable as it has 2 axis stepper control and a servo control for the pen lift. if anybody knows whether or not this would be compatible a response would be greatly appreciated!

Euphy (author)  EoinM1719 days ago
Hello, thank you :) The eibot board is absolutely perfect for a polargraph type drawing machine. In every way, it is the logical choice of board to base a 2-axis machine on. The only reason I didn't use it back in the day was that it wasn't an arduino, and I was only just starting with hardware, so wanted to stay with what I knew.

So yes, I would be very surprised indeed if there are not plenty of EBB-based drawing machines out there. It is NOT, however, compatible with polargraph. Polargraph uses arduino firmware, and would need to be rewritten to use the PIC chip in the EBB.

That said, the general firmware that _is_ in the EBB is already capable of behaving as a 2-axis plotter, so modifying or rewriting the polargraph control software (rather than the firmware) would also be an option.

dustmason29 days ago

Also check out these guys for high quality bead chain sprockets! . They are based in NYC and have a very old web page. They also have a $50 minimum order :(

Euphy (author)  dustmason28 days ago

Good spot. I've never seen beaded cord, or bead chain used in an engineering / precision application - I wonder what they use it for where a regular ladder chain isn't right?

dustmason Euphy28 days ago
You can see one or two in some photos of the fancy equal arm balances they also sell:

Hi Sandy,

It works perfect. :) :)

Thank you very much.

Euphy (author)  pablodearriba20061 month ago

Hi Sandy,

Very grateful for your quick response, I'll try to implement it.

Hi Sandy,

First, thank you for your wonderful project!.

Adafruit Motorshield v2 and I do not know if it is possible to develop this project with this shield. I would be very grateful if you contribute some guidance on how to adapt the configuration code for the new Library.

Euphy (author)  pablodearriba20061 month ago
Hello, thank you :) might help. I haven't tried it myself (I don't have a motorshield v2!), but I'm told it works.
mickeypop1 month ago

FYI i built a smaller version a month ago and works great.

The FYI part; I couldn't find the beaded cord in my area and while getting together beads for a Mardi Gras party i noticed 1 box all the beads were glued in a constant spacing and all the same round bead. A slight change in pitch on the drive spools and i was able to make it on the cheap.

Just in case you have trouble finding the cord in your area.

Euphy (author)  mickeypop1 month ago
Excellent report, thanks!
nam20021 month ago

hey, nice instructable'

i have a problem here, can you help me?

can i use servos instead of steppers? and i dont have a motorshield, can it be without it or is it necessary?

if so please help me with the code,

thanks ,


etabeta2 months ago

I do not understand what is wrong.

Start the controller, load the parameters of my plan work, load an image, then "select area" and then "set frame to area" imposed "grid size" to the end "render pixels"
I select, for example, "solid square wave" and then "generated commands".
If you check the preview of the track is smooth, with no changes. then the image is not reproduced. I just get waves all the same.
Sometimes I can get the correct commands and preview.
I've tried various images but the results do not change, only a few times I have a correct path
Euphy (author)  etabeta1 month ago

Solid square wave will always give you a pixel at maximum density, regardless of the underlying shade. It's for exactly that, laying down solid areas of pattern, usually in conjunction with the mask pixels feature. Use variable size or variable frequency pixel to get changing density.

etabeta Euphy1 month ago

I did various tests
Forgive me, but I did not understand.
I tried to apply your directions, but do not get a consistent result.
While apparently doing the same operations do not always get a path.
Whether you use "variable size square wave" that "variable frequenci square wave".
Maybe I'm wrong sequence of work.
load config (with the parameters of my work plan), load image, select area, complimentary frame area to render pixels (here I choose the various options).
Should I use a "controller" (sw) special?

thanks in advance for your patience

Euphy (author)  etabeta1 month ago

Hello, your sequence sounds correct to me:

1. Open controller software,

2. Your machine size should be loaded already (settings saved in,

3. Load image

4. Resize and move image to be where you want it

5. Choose area to draw by clicking 'select area' and dragging a box over the image.

6. (You should see a pixellated preview of diamonds of different greys)

7. Click "render pixels..." then in the small window, choose anything _except_ solid square wave, and click 'render'.

8. You should see a lot of commands generated and placed into the command queue.

hotcheezy2 months ago

Hey Sandy, just watched one of these sketching robots.

is it possible to implement some sort of a sketching ability to the Polargraph machine? Anyways, i'll do more research on this. I'll try my best to implement this ability.

Euphy (author)  hotcheezy2 months ago

That's amazing stuff isn't it. Too much sums for me, I'm afraid, but I'm hoping that the new polargraph library will make it generically accessible enough that other folks can work with a polargraph machine as an output device. However, if you'd like to write the code for it, I'm happy to accept the pull request :)

indiantinker2 months ago

Awesome! Will Build it Asap! :D
Thanks for a great write-up. The processing GUI is fantastic :)

hotcheezy2 months ago
Hey Sandy, I recently built one of these. The problem is my machine width is about 2 meters and heigh is about 1 meter and also it appears that the beads on my beaded cord were to slightly to big to fit in each of the sockets of the wheel. So each time when the gondola gets very low on the board, the cord would start to slip. Could you tell me the dimensions of the beaded cord?
I saw that the gondola shakes a lot should I use something different than beaded cords?
Another problem the drawings I were doing we're quite big and so the sharpie's ink would usually run out before the drawing's even complete. Are there some alternative pens?
Euphy (author)  hotcheezy2 months ago

Peter literally any pen will do, you just have to experiment a bit. If you want pens to last, look for either dry-wipe pens (meant to be left with their caps off), or otherwise water based inks. The ones I've had the most success with are Kuretake "Writer", these have a thin end (<1mm) and a fat end (2-3mm), last a long time, and don't seem to dry up.

The beaded cord I use is notionally 4mm beads, every 12mm on the cord. In actual fact, the beads are around 4.4mm. The actual pitch varies a little too, but only a fraction of a millimetre. You can sometimes see the pattern in a large, dense drawing, but otherwise it's hard to spot.

It isn't surprising that things get a bit shaky at the extremes of the machine, but there should be no reason to slip. There is no more weight on the machine at the bottom than there is at the top. Depending on which way it slips, you could add or reduce the counterweight to see if that helps.

hotcheezy3 months ago
Hi Sandy, i've ran into some problems with the software. I have a 32 bit windows and when I ran the processing software it showed "Error: could not open 'C:\Program Files\Java\jre7\i386\jvm.cfg'". I checked my computer and the file is in the D drive. maybe the path is wrong? I don't know how to change it. I tried the code. I have the Processing 2.0b8 and I did add the library to the the C:\Users\Administrator\Documents\Processing\libraries. But when I ran the program it showed "the key KeyEvert is ambiguous" I don't know what is wrong maybe I have to use an older version? Please help.

Euphy (author)  hotcheezy3 months ago

Hello, yes the software currently only works in v1.5x of Processing, and with older versions of the ControlP5 library. If you use the versions in the polargraph zip (, it aught to work.

The precompiled executable should work if you aren't wanting to faff on with compilation.

I've updated the pages to indicate the version requirement I hope.

The pen is held embedded in a blob of blue-tak. The machines that I make now have these jinjawhoppers ( which is also a great way of holding the pen.

hotcheezy3 months ago
One addition question, is the sharpie just resting in the brass tube or is it being somehow glued in?

Get More Out of Instructables

Already have an Account?


PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!