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

But this is the original Polargraph! The term is a portmanteau word invented for this instructable, and it has caught on. People who don't know their drawbot history often use the word to describe any hanging-v plotter, but it is actually means something very specific: A machine that runs the Polargraph software.

Mostly based on the success of this instructable, I started a little workshop making Polargraph parts, and the next-generation Polargraph gear (PolargraphSD). Couple of links below:

Polargraph website
Polargraph wiki and code
Flickr stuff

10baileys12 days ago

Hey! I love this project, its great! I'm just having a slight (I hope) problem with the software, I think I have installed everything, but when I press play this message appears. Any ideas? (:

Euphy (author)  10baileys12 days ago

diwald_CV_kit is a library that the controller code requires. Exactly as the error message suggests, you are probably missing it. Put it into your libraries folder, along with geomerative and controlp5 libraries.

http://www.instructables.com/id/Polargraph-Drawing-Machine/step11/Controller-software-install/ has the details!

Hi, i've tried that and it still isn't working yet :/ any other things that might be the problem?

Euphy (author)  10baileys8 days ago

Nope, the only thing that could cause that error (library could not be found), is that it can't find the library. Now, I guess you've put it somewhere, but maybe not in the right place. It needs to be in <processing sketchbook>/libraries.

Zhen ChyenL10 days ago

Hi, I got a Tower Pro mg995 servo but the it rotates only to 1 direction! I want to make it go back and forth to the initial position but have no lucks. I already test different ranges of rotational degree but couldnt make it. Any helps? Thanks.

Euphy (author)  Zhen ChyenL9 days ago
The control code for the servo motor is very simple, so there's not much to go wrong there. Could the motor be faulty?
Euphy (author) 9 days ago

Hi, hello, I come from China,

Arduino to send commands from the controller directly with the SD Card This method http://www.polargraph.co.uk/2012/02/state-of-the-art-tangle/

I did not get success

Euphy (author)  海阔凭鱼跃12 days ago

Hi, the blog post you linked to is the only real documentation for this - it isn't really a supported feature. It requires a Arduino MEGA. You will need to figure the rest out yourself, unless you can tell me what you mean by "did not get success".

Please post on the polargraph forum instead of here - the commenting system here is poor.

Address Hello polargraph forum can be made about it

Hello, I'm from China

I would like to ask you a few questions arduino Uno there can also directly read queue commands directly from the SD card in order to draw from their own controllers

Euphy (author)  qu107224706912 days ago

Reading from the SD card requires an Arduino MEGA, as here


Just add an SD card from the computer controller will be able to continue drawing

Lemo_狸猫14 days ago


Hi, hello, I come from China, very like your robot, I am a UI designer, don't understand the procedure, but step by step down, my figure is vector graphics, but has not solved the problem of disorderly line, can when drawing a moderate amount of shapes to pen up automatically?

Euphy (author)  Lemo_狸猫14 days ago
Hi, I'm sorry I don't really understand what you mean. It looks like your drawings are working fine, but you don't have a pen lift servo motor fitted?

If it is fitted, then it is just not lifting the pen high enough?

ChristianE21 month ago

do you think that it will work on android?

Euphy (author)  ChristianE21 month ago
Definitely not.

Hello Windows8.1 control software control software crashes often generated when the queue is often stuck how to solve this problem

Euphy (author)  qu10722470691 month ago
Seriously, this could be anything. The app is exported from Processing 1.5, so you can try googling for problems with exported processing apps. The problems I've had with the controller have usually been generic problems with processing, java environments, that kind of thing.

alan.phan11 month ago

Hi Euphy,

What does it mean by "Have added MEGA as a compilation target" in


Does that mean I can upload "polargraph_server_a1_adafruit_v1.cpp.hex" to my mega using "xloader"?

Euphy (author)  alan.phan11 month ago
Hi, no, the precompiled hexes are for regular Arduino UNOs.

The note refers to these lines https://github.com/euphy/polargraph_server_a1/blob/master/polargraph_server_a1.ino#L35-L41 that allow you to compile for the MEGA, and access a couple of the features that don't fit onto an UNO.
AxelandsW1 month ago

Hello euphy.

Im litterally in love with this machine, i am actually going to do this to make some art for my institution, i wonder does the pen lift if i use images/vectors ? (not including the beginning and end of the queue) .

im currently getting the 3d printed gears sometime this week and im going to finish this proyect, i will ask if i find any issues, thanks for your work

Euphy (author)  AxelandsW1 month ago

Thanks, no problem! The pen lift is definitely required for the vector drawing stuff. It's less essential for the bitmap work, because that is continuous anyway.

Good luck!


AxelandsW Euphy1 month ago

This Is Comming Up Great!... Though... i have this problem where , even if fill the whole board with an image, it cames out REALLY SMALL like an 1:10 Ratio, searching the forum i have seen that increaing weights might help this...

sunfffd1 month ago

Hello! Thanks for all the details.

I quickly hacked around with some hardware on a whiteboard, while i was trying to draw a square image, the output turns out rectangular (width is larger than height). How can I correct this?

I'm using two 200 steps motors with a 40T 2GT belt pulley (~24mm diameter), mmPerRev set to 70mm. And also I have set the step multiplier to 2.

Euphy (author)  sunfffd1 month ago
Hello, you've describe quite a general symptom that can have more than one cause, and I don't think you've given enough information to be able to diagnose it:

What motor shield?
What step type?
Is the width correct?
Is the height correct?
Is the position correct?
Why is the step multiplier changed?
Did you also change the stepsPerRev?
Why is the mmPerRev not 24*3.14 (75mm)?
sunfffd Euphy1 month ago

Hi! Thanks for the help!

I'm running UNO with Adafruit motorshield v1. All with default libraries (AFmotors)
I didnt change the step type (actually I cannot find the place to change it)

The width and height should be correct. I have setup a new test with step multiplier set to 1 and stepsPerRev set to 400, also with 75mm mmPerRev.

The output is much better now. But it seems the proportion of the drawn image is still a little bit off (the height is still a bit short).

Screen Shot 2015-06-15 at 11.39.02 pm.pngScreen Shot 2015-06-15 at 11.38.55 pm.pngIMG_3599.JPGIMG_3598.JPG
Euphy (author)  sunfffd1 month ago

Is the position correct? Use ctrl+I to show the "INFO" and that shows the mm coordinates (Machine x/y mm...)
Is the mmPerRev correct? I mean have you measured it or just calculated it?
What's with the jaggedy line leading from the home position?
Is the home position correct? Measured from the line between the two axes of the motors?

Remember you can use "draw outline selected" to draw the outline of the selected area, rather than waiting to draw the whole image. It's faster.

sunfffd Euphy1 month ago

The belts tends to skip when the motor is going to travel for a long distance.
I have reduced the motor speed from 600 to 300 and it seemed to solve the problem! It got pretty accurate now, thanks! :D

Photo 18-6-15 2 57 38 am.jpg
Euphy (author)  sunfffd1 month ago

Oh nice and square!

alan.phan11 month ago

Is it just me or are my l239D chips really hot on the motor shield? is this normal? I'm running on 9V 2amps plugged into arduino Uno.

Euphy (author)  alan.phan11 month ago
It might be, yes, depends on how much your motors draw though - the L293D is rated to drive 600mA motors, so if yours are pulling down more, it'll get hot.

https://learn.adafruit.com/adafruit-motor-shield/power-requirements has more information.
alan.phan11 month ago
just want to say thank you for your help. Love your detail in your instructable and your dedication in answering questions after such a long time.
alan.phan11 month ago

If I want separate power to the arduino and a separate power to the MotorSheild V1. Do I need to remove the "jumper" on PWR on the motorshield?

Euphy (author)  alan.phan11 month ago
From the motorshield documentation (https://learn.adafruit.com/adafruit-motor-shield/power-requirements):

"If you would like to have 2 seperate DC power supplies for the Arduino and motors. Plug in the supply for the Arduino into the DC jack, and connect the motor supply to the PWR_EXT block. Make sure the jumper is removed from the motor shield."
gliuzzo1 month ago

I have a fastidious problem. I attached a servo and when I try "Pen lift" and "Pen drop" they work perfectly. but if I click these commands after "Set home" the controller shows "BUSY C14, 180"

Euphy (author)  gliuzzo1 month ago
Hello, that is a weird one, does anything else work after you have done your "set home"? Can you drive the pen around with "move to"?

gliuzzo Euphy1 month ago

I don't know because I resolved it. The power supply didn't have enough Ampere..

GowthamV22 months ago

i can't get the software running xloader says upload failed and even the polargraph controller doesn't open up. Somebody help !!!!!

i'm using ATmega 328 arduino clone

adafruit motor shield v1

windows 8.1

gliuzzo2 months ago


E18:47:28 C25,PGXXABCD, END not recognised

that appears when I click upload machine spec?

It's a problem?

Euphy (author)  gliuzzo2 months ago
The C25 is no longer a command that means anything, so it's nothing to worry about :)
GowthamV22 months ago

i get an error as i try to open the controller, i get an error saying javaw.exe notfound

alan.phan12 months ago

Great Instructable! I've ordered the parts and can't wait to put it together. Do you have a SD card addition to this or would I have to keep my computer on for the whole duration of the print?

Euphy (author)  alan.phan12 months ago
Hi, thanks! An UNO-level machine can't have an SD card, but if you have a MEGA, then you might be in luck. I have recently made some changed to the polargraph_server_a1 firmware, and merged in SD card reading features (mentioned at the end of http://www.polargraph.co.uk/2015/05/g-code-importing-and-a-bit-of-calibration-help-controller-v1-2/).

The bad news is, it's entirely untested, so I'll be a little surprised if it works out-of-the-box! Of course you can buy a PolargraphSD (http://polargraph.bigcartel.com/) if you want a short-cut and have lots of money spare.


Hello! I'm extremely new to this and I'm really like the idea of creating a drawing machine. Would this be a hard project for a beginner? Also, what would all of this cost? Thank you

I spent

$30 for arduino uno

$12 motor shield

$14 for each stepper motor (2 needed)

$12 for the window blind cord

$5 maybe for the pla to 3d print many of the blackest, gears, and gondola

$10 for the servo extension wire

Already had the board, wires, and a servo

Plan on about a $100 total. I spent probably 20 hors building mine, and I'm experienced with arduino and electronics. Good beginner project, but expect to work hard at it.

What would you say took up most of your time? Hardware or software side of things?

I've got exactly the same doubt. Also, could I print more in more than one material using a 3d printer? Thank you!

Euphy (author)  matheus.danella8 months ago

I don't really understand this question, sorry.

Homunyan made it!2 months ago

Amazing project, I learned so much , and still got a way to go.The lack of precision should be solved once I get reliable sprockets printed (currently it's an abomination of furniture wheel caps, cereal box carton and tire tube for grip).

Euphy (author)  Homunyan2 months ago
Brilliant! These drawings look like my first ones, made with sprockets that were hacked-up lumps of balsa wood hot-glued together - those were the days!

sick m8

Magic213 months ago

http://www.bc-robotics.com/shop/stepper-motor/ can this be used as the motor?

Euphy (author)  Magic213 months ago

Yep probably will be fine if you can run it at 12v - The machine doesn't actually need a lot of torque because it's counterbalanced, but because dropped steps are so catastrophic (and annoying), I prefer to have more power rather than less! A variable voltage power supply is great if you can afford it.

Magic213 months ago

How much would this project cost and approximately how long did it take you to make it? Nice project btw

Euphy (author)  Magic213 months ago

It cost me nothing, and took me a month.

smalltortoise4 months ago

Oy, Euphy! We got our polargraph drawing robot to draw robots using Circuit Scribe.



Euphy (author)  smalltortoise4 months ago
Brilliant! People always ask whether the polargraph can handle other tools, now I can show them that!
MatheusD5 months ago

Hello! This project is amazing! I am really interested into building one for myself, but I was wondering if there is any way to buy some of the printed products from sellers in Canada. Most of your links of the gondola's parts and running gear are from UK, and the shipping would be twice as the price of each item. Thank you.

Euphy (author)  MatheusD5 months ago
Hi, thanks! There are no other makers of Polargraph gear other than me, but the plans are all available you might find a local laser cutting place that will cut things for you. 3D printing can be done through Shapeways in the USA which should be cheapish. There isn't anything that isn't cheaper to get in the USA actually. If you want something off-the-shelf, you could look up https://www.marginallyclever.com/ who sells a drawing machine kit that can run the Polargraph software.
twopint5 months ago

Well that was an easy fix. Thank you, it is working great now.

twopint5 months ago

Hey Sandy,

Hey again! You must be tired of me by now, though hopefully this will be my last problem/ question... I got this error code response when verifying the code in the arduino program. I tried re installing the libraries but it did not seem to fix the problem. Did I miss a step or something? Also thank you a lot for your help!

polargraph_server_a1.ino: In function 'void setup()':

polargraph_server_a1:220: error: 'configuration_motorSetup' was not declared in this scope

polargraph_server_a1:222: error: 'configuration_setup' was not declared in this scope

Euphy (author)  twopint5 months ago
The polargraph server firmware is made up of 13 files, the .ino files listed here https://github.com/euphy/polargraph_server_a1. It looks like you might have configuration.ino missing?

cclark64 made it!6 months ago

Still haven't been able to get my servo to work, but it's up and running. Experimenting with paper types now. Is there a more precise way to position the image within the page or am I supposed to set the page dimensions to try and match the actual paper size I'm using? Saw something in the instructions that made me think machine, page, and paper size were all different.

2015-01-26 13.01.19.jpg2015-01-26 13.01.55.jpg2015-01-26 13.02.04.jpg
Euphy (author)  cclark646 months ago
Hi there! Looking good! Machine size is the overall size of the machine, but the page and paper size is the same, setting the page size and position is meant to help with that kind of layout / positioning issue.

The machine itself doesn't pay any attention to page or paper size, it's purely for the benefit of the operator, as a visual guide.

Last thing you might be interested in is the "frame". If you select and area, you can click "set frame to area" and you'll see some red crop marks appear near the corners of the area. If you save the default.properties.txt, then when you reload the crop marks will have been saved. Then you can click "select frame" to re-select the exact same area as before. I used this in this sequence (https://www.flickr.com/photos/euphy/5987136642/in/set-72157626497662024) to make sure I drew an area that was exactly the same size and position in all three sheets.
cclark64 Euphy6 months ago
Still having the same garble in the middle of any image I try, with any rendering style, and it scales with different image scalings. This tells me that it's an issue either in software or the port, but I tried using my laptop with the same result. Still no luck with either of the two servos I've tried. I was planning on trying again using a different OS for giggles to see if the drawing issue goes away. Other than that I'm a bit stumped.
Euphy (author)  cclark646 months ago

No, this is a physical issue, the cord getting stuck on something, or the gondola getting hooked on the tape or the edge of a page - something like that.

At some point, the right-hand cord has been prevented from descending the proper distance to the next row. After a couple of rows in the same, place, overlapping each other, the block has managed to work itself free, and the drawing has been able to progress for a dozen or so rows, before getting stuck again.

It could be a sprocket loose on the motor shaft?

cclark64 Euphy6 months ago

Thanks! Now I need to figure out why all my attempts are having serious scaling issues in the middle of the image.

2015-01-26 14.45.06.jpg
twopint6 months ago

Ok Thanks, so that leads me to 2 more qs...

1. I would like to buy the beaded chain but the beaded chain u linked on ebay can only be shipped to UK peeps, i happen to live in sunny California so there's that... So do you know another link/ place to buy chain for us Americans?

2. what causes your blood pressure to rise with (what is wrong with) the motor shield v2, one could put a bigger stepper and effectively have a more "powerful" machine with it?

Euphy (author)  twopint6 months ago
1) The cord comes from a blinds suppliers, a haberdashery might have it. But drop me an email (sandy.noble@gmail.com) with your address and I'll send a couple of metres for you.

2) Main problem I have with AFMSv2 (Adafruit Motorshield v2) is that the top speed is limited by the bus speed that the driver chips are addressed using. Not a massive problem especially if you don't mind stepping a bit slowly, but it becomes a problem with microstepping (have to step 16 times as fast to get the same rotational speed). It also sounded whiney, and seemed quite noisy. It works though, and gives you a bit more power to play with. Maybe I am just a big whingey baby!

twopint6 months ago
Hey Euphy, so I have some quick qs. 1. when the pen gets to the bottom of the paper, the motors start slipping/ failing (i am using 2 400ml amp stepper motors and to save moola i was using a small metal beaded chain instead of a plastic one.

2. how big of a drawing could you make with the motor shield and how big of a stepper motor would u need?

3. would the current code work with the new motor shield?
Euphy (author)  twopint6 months ago

1) With plastic beaded cord, a long length (when the pen is near the bottom) doesn't weigh much more than a short length. With metal chain, the gondola effectively gets heavier the further down the surface it moves. You can probably counteract it by adding some more weight to the counterweight, but then you might have problems moving it up at the top!

2) Size of drawing isn't really related to motor power. Motor power should be related to the weight of the gondola and counterweights, not much more. That's certainly true of a machine that is static. Because it moves around, then the forces that pull and push the motor spindles will change dynamically, and it is likely that very long cords can result in more extreme swings of those dynamic loads. That's one of the reasons the machine moves very slowly by default actually, to reduce the "shock" in the system.

3) The newest version of the polargraph_server_a1 firmware works with

- adafruit motorshield v1

- adafruit motorshield v2

- serial stepper drivers (step / direction pins)

- directly driving signal amplifiers

I don't recommend the adafruit v2 shield though. It just rubs me up the wrong way.

good luck!

Bruno.PXM6 months ago

Hello .... first of all thank you for the excellent toturial.

I have only one problem, when you start to draw, after a few minutes the software turns off the COM ports.

Any reason for this?

Best Regards

Bruno Morais

Euphy (author)  Bruno.PXM6 months ago

Doesn't for me. The comm port needs to stay open for the commands to transfer, so it can't ever close. There is certainly no code in controller or firmware for closing the port.

Neeharika raj6 months ago

how long will it take to complete this project?

Euphy (author)  Neeharika raj6 months ago
Abilities vary so I can't really say, have a read through it and see what you think.
davidbarcomb8 months ago

What a great project. I will definitely try doing this

george.kallarackal.37 made it!8 months ago

Hi Sandy,

Just wanted to say a massive thank you. Saw this guide a long time ago and have dreamt of building it since. Thanks for your prompt responses to my questions. I've just printed my first successful picture and the feeling is awesome! One for my baby (to be's) bedroom! Next up - fit a servo and then the 3d picture guide looks worth a try! Thanks again!


Euphy (author)  george.kallarackal.378 months ago
Thank you George - really kind of you to say you've enjoyed it, and got great results! Keep scribbling :)

mnelson20018 months ago

I've got vector graphics working! But when I try to render a picture in say the scribble setting I get "You probably won't get any detail in this. Max density for penSize: nan, rowSize: 20 is 1." What settings do I need to change?

Euphy (author)  mnelson20018 months ago
It's a bit funky how that works at the moment (with the 'nan'), but I think if you send the pen width again it might clear it up. The longer answer is that it's complaining that the pen is too fat for the grid size - try using a really small pen tip size.

Actually for the scribble pixel, the way it fills the pixel can be very inefficient, so I always tell it that the pen is much much smaller than it really is so I've got a better chance of getting any decent scribbles in it.
mnelson20019 months ago

I can make it move the pen up and down, but when I tell it to move to the right the pen moves to the left, and when I tell it to move to the left it moves to the right. What's wrong?

Euphy (author)  mnelson20019 months ago
Have a look at https://github.com/euphy/polargraph/wiki/It's-going-the-wrong-way!

Hope that's it!
mnelson2001 Euphy9 months ago

That fixed it, thank you! I had the motors switched and the wires backwards!

MattO3 made it!9 months ago

I used the Adafruit Motorshield 2, so thanks a lot for the recent update to that code. Every drawing I adjust a little mechanically to get everything to stay in place. Next step would be to build some mounts for the motors. I'm using toothed belt and matching spindles which works perfectly. I ended up losing patience with the microsteps and set it to interleave, which is fine enough control for the bumpy whiteboard wall I'm using. It makes a great palate to test on as I can wipe away any mistakes and start over quickly. One problem is have is if the belts come off or something fails, I can't back up a few commands and restart from there without everthing getting out of wack. so it's all or nothing. I'm moving to a loft with 25ft walls soon and want to hook up a giant version with a paint sprayer. Thanks soo much for making this open source!

Euphy (author)  MattO39 months ago
Great to hear you're getting something out of it! Thank you for your message!
steezygiraffe9 months ago

I am having constant problems with the drawing starting up just fine, doing anywhere from 25 to 75% of the drawing, then just stopping. The program stops and I can't do anything in the polar graph controller except quitting it. I then have to restart the drawing from the start, but this once again just quits during the drawing. Is there any way to fix this?

IvanB410 months ago

Hi Sandy,

Great guide! This got me really inspired, so I promptly bought all the parts and built one myself. I have an arduino Mega, a motor shield V2 and zero programming experience. So yeah, I'm in way over my head :) I can always learn right?

I don't think you have a code for Mega with shield V2? I've got it to work by combining your mega source code with the motor shield V2 bits from the Uno source code, through the power of copy&paste. It works, but I think I messed up somewhere, because the machine draws really small (and possibly 'compressed': less width than height, if that makes sense).

You can see the results of some test pen widths in the picture. I believe I have set up the controller correct. Any idea of what's wrong?

Thanks & regards

Euphy (author)  IvanB410 months ago
Hello, thank you! You've made a great start there. Unfortunately, can't really tell much from the pen width test - it looks exactly as a pen width test should look.

How did you decide it was drawing too small?

The parameters (or variables) that change between motors and drivers are


The values depend on the actual physical steps per revolution of your motor (probably 200 for your NEMA 17 motors), and your step type that you have configured in the firmware (configuration.ino, line 32 and 43).

If you have stepType = INTERLEAVE (which is the default for motorshield v1), then you should set your stepsPerRev to double your physical steps per rev (ie 400), and your stepMultiplier to 1.

If you have stepType = MICROSTEP (which is the default for motorshield v2, though it makes an awful whine), then you should set your stepsPerRev to be the same as your actual physical steps (ie 200), but set your stepMultiplier to 16.

So the stepType needs to be set in the firmware at compile time, but the other two are configured in the controller, and sent as part of a "upload machine spec".

Apologies if you've already done all that :)

Also bear in mind that unless you're using the extra features of the mega, or polarshield branch (SD card, LCD etc), you might as well use the polargraph_server_a1 branch of the firmware.

good luck!
IvanB4 Euphy10 months ago

Hey, thanks for the help!

Keep in mind that I am very new to this (I have no idea what I'm doing :) So apologies if I fail to explain, or ask something that's obvious. I probably should have also experimented some more before asking for help. But hey, I'm excited because I just made motors rotate and I feel like a god. Seriously, I'm having a lot of fun!

From reading the code for both Mega and Uno, I assumed I needed stepType Microstep. Can I still use Interleave with motorshield V2?

The problem right now is as you say: I have stepType Microstep with stepsPerRev set to 400 and stepMultiplier set to 1 (steps per revolution of my motors is indeed 200).

I have set up my machine size and loaded it up like it should. I then made a small drawing (about 1/4 A4 paper visualy in the controller) which came out as a black rectangle about 5 by 2 cm (see crappy pic). That's why I concluded it was drawing too small. Also, when I use Move pen to point, the horizontal distance travelled by the gondola is greater than the vertical distance, which results in the 'compressed' drawing. This all is probably a result of the faulty motor setup...

I shall fiddle some more in the next week untill I get it to work.

Thanks again for the help, and making this project possible for people with as little experience as me!

Euphy (author)  IvanB410 months ago

Good stuff, fingers crossed that it's just the motor config - good progress so far, and yep such a good feeling when it finally moves :)

You can use INTERLEAVE with the motorshield v2 (AFMS2), but other folks (http://www.polargraph.co.uk/forum/polargraphs-grou... reported pretty jerky movement. I think that is an issue of the motors being over-powered, and if it were a stepstick or a Polarshield (or an adjustable stepper driver), then I would just turn the power down. As it stood, microstepping seemed to solve the problem, so that's why I put it in the firmware as the default.

I don't like microstepping though, it makes an awful noise and really limits the top speed of the motor, so if I found I could get away with INTERLEAVE, I'd much rather use that.

You're very welcome - really glad you're enjoying it and have jumped into the code so successfully!


IvanB4 Euphy10 months ago

Got it to work just by setting multiplier to 16 with microstep! Check crappy pics, that's more like it, right?

So far I have no jerky movement I must say. Also, it doesn't make a lot of noise, other than a bit of a high pitched beep from the steppers. Is this the noise you are referring to? Maybe my steppers (http://www.eztronics.nl/webshop2/catalog/Robotics?... make less noise?

Looking forward to tweaking it some more and getting into the code, processing and TSP. But first I'm going to install the servo for pen lift I bought (after I have finished some drawings of my girlfriend :)

If I can help by giving feedback in any way, just let me know...


Euphy (author)  IvanB410 months ago

Yeah that's looking really good! The squeal of the motors didn't agree with me, but maybe I'm just sensitive :)

Good luck!


steezygiraffe10 months ago

Hi everybody, I am having troubles with getting the stepper motors to start to work. The green light is brightly light on top and the motors are hooked up. The serial connection doesn't seem to be a problem seeing as how the polargraph READY! shows up in green on top of the controller. Wondering if anybody has any possible solutions.

The steppers don't even lock when I do the things that are meant to make them wriggle. I am using the Adafruit V2 and I tried to do the things suggested like changing the code in the configuration section to go from v1 to v2 but the code isn't able to be verified. Power is getting to the motor ports, I tested it with a multimeter but the steppers haven't shown any sign of life yet. Very discouraging. Any and all help is appreciated.

Euphy (author)  steezygiraffe10 months ago
Hello, first off, have you already made sure there are no electrical or physical problems? That means you've tried the example sketches, and had the Adafruit_Motorshield/Accel_Multistepper, Accel_ConstantSpeed or StepperTest, and have seen the motors moving that way.

Also, not sure what you mean by the code not being able to be verified - you mean you can't compile / upload it? Nothing will ever work until you can get the code uploaded, and that's not a physical problem.

The arduino IDE will give you a message saying what it thinks is wrong if it fails (sometimes it's even a useful one). Work on getting that done next.

Post the code you're using if that helps. The configuration.ino should look like
// motor configurations for the various electrical schemes

// =================================================================
// 1. Adafruit motorshield

// Using Adafruit Motorshield V2? Comment out this one line underneath.
//#include <AFMotor.h>

// Using Adafruit Motorshield V1? Comment out the three INCLUDE lines below.
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_PWMServoDriver.h"

and the top part in polargraph_server_a1.ino should look like

// Program features
// ================
#define PENLIFT

// Specify what kind of motor driver you are using
// ===============================================
// REMEMBER!!!  You need to comment out the matching library imports in the 'configuration.ino' tab too.

Hello, thank you for your help.

I did mean that the code could not be compiled before when I said verify. Since your suggestion, I have tried the stepper test and that too yielded no results. From what you said, this probably means that there is a physical problem, correct? The power light does come on when I plug it in, and the soldering I did did't seem to have any visual problems with connectivity. What action should I next take?
Thanks so much for the help, I can't wait to get this awesome project up and running.

Euphy (author)  steezygiraffe10 months ago

Hum if the stepper test is not doing anything then that is your priority to fix first. It could be something wrong with the shield - it could just be your wires are crossed. How did you decide what order to screw the motor wires in?

I would have a bit of a trial with changing the wire sequence, double-check your power supply and then hit up the adafruit website to see if there's any wisdom there.

(Maybe worth mentioning that I've updated the polargraph_server_a1 code in the last few days to be more reliable - http://www.polargraph.co.uk/2014/09/significant-changes-to-uno-firmware/ maybe give it a go when you've got your motors working.)

Hi Euphy,

Love the look of this project. Have bought all the bits and pieces but couldn't get hold of a Motorshield v1 so have a v2 instead. But pretty confused in terms of what software i need to run it. I notice in the comments below you've mentioned writing up a version for the v2 but looking through the various links, i'm completely lost. Are you still planning on doing a write up?

Any help gratefully received!



Euphy (author)  george.kallarackal.3711 months ago
By coincidence, I just updated this last night!
Sembot made it!12 months ago


This is a great guide
I have a Kritzler polargraph built, my question is now , can I use polargraph- controller with my polargraph kritzler hardware and what firmware should I use
Could someone help me please

Kind Regards

Euphy (author)  Sembot12 months ago
Hello, looking good! I know you've already found the polargraph forum, but I'll post this here in case others are interested:

You could have a look at http://www.polargraph.co.uk/2014/05/running-polargraph-on-ramps/ and http://www.polargraph.co.uk/forum/polargraphs-group2/building-hardware-forum3/arduino-mega-2560r3-with-ramps-1-4-thread286.0/ to see the more recent details about running on other hardware.

sandy noble
Martin Balák made it!1 year ago

I made it! I like to upgrade it and try new things, like painting on canvas:


Thanks for the instructions.

Euphy (author)  Martin Balák1 year ago
I love this instructable - I've been skirting around trying to do something like this myself for ages, but never figured it out! Thanks!
chenjian1 year ago

hello,very nice work, i have a problem , when i click the "click to start" the pen didn't working, i don't know what's wrong with that ,please tell me my problem , thanks very much.

Euphy (author)  chenjian1 year ago

Hi Chenjian, thank you! The bad news is I don't even know what you mean by "click to start" - which step are you reading that from?

chenjian Euphy1 year ago

everything is ok now , really thanks , and i am sorry for i didn't reply timely, i was busy for my graduration these days,

Hi Euphy,

I've been slowly following this Instructable to completion, in stolen moments here and there, for a while now and have had a lot of fun (and the odd moment of frustration) doing so.

I'm tantalising close to the end now: i have a machine; I have steppers that respond; I have a functioning gondola; I can set home and move pen to point (now that have set the stepping to SINGLE, for some reason my steppers don't function well with INTERLEAVE); and I've managed to upload and render an image.

Only trouble now is when I hit Render and then Generate commands, I can see the queue gobbling up commands, the pen moves to the start position, then......nothing. The commands continue to get gobbled up but the pen hangs motionless.

I'm sure there is something simple happening that I have overlooked but I'm stumped. Any clues?


Euphy (author)  Dean Wilson1 year ago

Hi Dean, aha, the clues will probably be in the debug console! If you press ctrl-C in the controller, you'll be able to see the raw communication between the controller and the machine itself - the commands being dispatched from the controller, and then some kind of response from the machine itself. If there's something going wrong, then you should see an error, and it might shed some light on what's afoot.

When you changed to SINGLE rather than interleaved, did you also half your steps per rev? And when you are doing "move pen to point", does it definitely move to the exact right point that you've indicated? And of course you've uploaded your machine spec to your machine!

lets see :)

sandy noble

Thx Sandy,

I hadn't changed steps per rev so I've now halved that to 100.

Pen definitely moves to the point indicated when I move pen to point.

What the controller reveals is the following (this is a snippet but you'll get the picture):

"Dispatching command: C05,896,544,23,226,END


incoming: C05,896,544,23,226,END not

incoming: READY

incoming: READY

regenerating preview queue."

This basically repeats for each command. So the Arduino is having problems recognising the coordinates it would seem? Any ideas why this would be?

I have not had this result using move pen to point or return to home which seem to be working just fine.


Euphy (author)  Dean Wilson1 year ago

Ok yes if you're using SINGLE, then 200 is the proper stepsPerRev.

Hmm! Which firmware are you using? The "not recognised" means it doesn't recognise the command (C05) rather the coordinates... The newest release of polargraph_server_a1 1.7 does not, by default, include the code for pixel shading (because it had to go to make room for the new motorshield library).

Ahhhhhhh! It seems I have not paid due attention to the words of the King Fu master and have failed to define pixel drawing!

Thanks for the clues and I will try this out as soon as I have a (stolen) moment.


P.s. your support for this instructable is amazeballs.

Euphy (author)  Dean Wilson1 year ago

Thanks :) The current latest firmware is a bit of a beta version, because it has this ability to load only certain features at compile-time. If you are using the plain adafruit shield v1, then you _should_ probably be able to load pixel shading AND vector functions at once. Give it a go at least - I think I got that working. It's only for the v2 shield that you need to choose which one you need. I need to revise this instructable at some point - things have got a little more complicated since I wrote it up first!

I'm up and running! Still some calibration required (I'm not sure my motors are the best though) but it's definitely drawing things, and the output has a lovely low-fi quality. I'll post some video when I have something worth sharing.

Just pre-ordered the SD version to install on a wall in the Fluxx office (http://fluxx.uk.com/).

Great instructable and great support, long may you prosper!

...apologies, I think the default steps per rev is 400 so I had already halved that (my steppers have a 1.8deg step).

smalltortoise made it!1 year ago

My local hackerspace recently completed this build. I was able to help with some of the build. This was one of the most fun builds I've helped with. I feel less intimidated by motor controls in Arduino IDE and Processing now. We named our bot Pablo. Pablo will be helping out with a local arts festival called the Dogwood Arts Festival. Here's a video:

Thanks to our fearless cat herder @samthegiant for sending us on this mission

Euphy (author)  smalltortoise1 year ago
Looks great, thank you for your message! Really glad that you had a positive experience during the build - good luck at the festival :)

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_suin1 year 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: https://github.com/euphy/polargraphcontroller/releases

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_suin1 year ago

I got this working with the new motorshield recently (well, moving at least), and didn't have to use adafruit's own accelstepper fork.


Euphy (author)  Seeshi_suin1 year 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 (www.polargraph.co.uk).

nam20021 year 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 ,


Euphy (author)  nam20021 year ago

The Polargraph software is written for stepper motors, and a motorshield.

However, the principle of this machine is very simple, and a machine like this can be made using any kind of physical actuator. Equally so, you can construct a motor driver from discrete parts if you wanted to, but the shield is easier.

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)  squeakychair1 year 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 found my issue, I'm able to compile. I did not change the include to point to the new Library.
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!
Euphy (author)  wcritchie1 year ago
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!

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_suin1 year ago

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

nam20021 year ago

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

ltaddeo1 year 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)  ltaddeo1 year 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 - http://www.polargraph.co.uk/forum/polargraphs-group2/troubleshooting-forum5/towards-running-a-polargraph-with-an-adafruit-motorshield-v2-thread284.0/#postid-1652 is a good place to start.

Good luck!
ltaddeo Euphy1 year ago


That's REAAAAAALLY good!

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

EoinM171 year 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: https://www.sparkfun.com/products/10025 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)  EoinM171 year 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.

dustmason1 year ago

Also check out these guys for high quality bead chain sprockets! http://www.raymortool.com/SprocketPages/Brass%20Sprocket%20Spec%20Page.htm . They are based in NYC and have a very old web page. They also have a $50 minimum order :(

Euphy (author)  dustmason1 year 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?

You can see one or two in some photos of the fancy equal arm balances they also sell: http://www.raymortool.com/Used_Images/Raymor%20HCE%20Balance%20Brochure.pdf

Hi Sandy,

It works perfect. :) :)

Thank you very much.

Euphy (author)  pablodearriba20061 year 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 year ago
Hello, thank you :)
http://www.polargraph.co.uk/forum/polargraphs-group2/troubleshooting-forum5/trouble-getting-motors-to-move-thread264/ might help. I haven't tried it myself (I don't have a motorshield v2!), but I'm told it works.
mickeypop1 year 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 year ago
Excellent report, thanks!
etabeta1 year 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 year 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 year 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 year ago

Hello, your sequence sounds correct to me:

1. Open controller software,

2. Your machine size should be loaded already (settings saved in default.properties.txt),

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.

hotcheezy1 year 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)  hotcheezy1 year 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 :)

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

hotcheezy1 year 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)  hotcheezy1 year 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.

hotcheezy1 year 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)  hotcheezy1 year 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 (https://code.google.com/p/polargraph/downloads/list), 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 (http://www.thingiverse.com/thing:31973) which is also a great way of holding the pen.

hotcheezy1 year ago
One addition question, is the sharpie just resting in the brass tube or is it being somehow glued in?
Hi everyone. I want to ask it may i use NEMA-17 Bipolar 48mm Stepper(Step Angle 0.9°) because it is hard to find nema-16.
Euphy (author)  ksakallıoğlu1 year ago
Hello, yes the NEMA number only designates the physical size of the motor. You can use any size, as long as it will work with your motor driver. I only use nema-16 because I happened to find some cheap. NEMA-17 is ideal for this project.
klillas1 year ago
Thank you for this. Making my first real picture now. This was a good introduction into stepper motors and making things move. I plan on A3 sizes, anything larger would probably take up too much space =)
Euphy (author)  klillas1 year ago
Ha ha thank you!
oscbe1121 year ago
Is it anyone who has managed to get the Polargraph working with the new Adafruit Motorshield v2?

Cant get it to work with either Uno or Mega (shield is working fine on both platforms)

eyeh28091 year ago
quick question, Is the distance from the drawing surface to the sprocket the same as the distance from the surface to place between the 2nd and 3rd bearing(where the strings connect) on the gondola?
The reason i ask is because my current setup makes the gondola slightly wobbbly, it certainly produces great results, although I would like to refine it. (and the grid gets a bit off toward the bottom because of this) could you send me a picture of a side view of the gondola with a pen drawing to help me solve this problem, or is there anything that you might suggest?

On a side not:
Thank you so much for this detailed instructable on how this amazing creation of yours can be built, I'm only a fifteen year old in high school, but being a maker is my hobby, and this is my first major personal project, and you have helped out so much! Thank you thank you thank you again!
Euphy (author)  eyeh28091 year ago
Thanks! Your gondola is looking like my first cardboard one - love it. Yours is a good question. I don't have a pic from the side, but in principle you are right - the intention was that the centre of the weight of the gondola would be directly below the sprockets. On mine with three bearings, it was designed to be in-line with the middle one. On yours with two bearings, I would have designed it just as you have, and made it in-line with the gap inbetween the two bearings.

In practice it's not as simple as that. With a sloping surface, that straight in-line arrangement only works at one particular point on the drawing surface. Move any higher and the gondola ends up hanging in mid-air, any lower and the cords end up pulling the gondola into the surface, which makes it more wobbly about its tip. That's my theory for why it gets so wobbly at the bottom.

The stabiliser (the blank CD) was my solution to that - it just stopped the pen tilting so much at the bottom of the drawing. Makerblock has done this great round-up of pen holder designs: http://makerblock.com/2013/03/a-study-of-drawing-robot-pen-holders-and-design-considerations/. Dan Royer's gondola stands out amongst them as being a good balance of pragmatism and features. Kongorilla (on the polargraph forum - http://www.polargraph.co.uk/forum/polargraphs-group2/building-hardware-forum3/no-stabilizing-plate-gondola-experiments-thread246/) has done some recent experiments with a stabiliser-free design too, but I think came to a similar conclusion: It gets wobbly at the bottom.
i seemed to have forgotten to click the upload button for the pictures, here they are
2013-12-09 22.40.23.jpg2013-12-09 22.41.13.jpg2013-12-09 22.41.58.jpg
philipjoep1 year ago
Hi Sandy;

I've been working to update the code for this sketch to use the Adafruit Motor Shield V2 library. I've been able to strip out enough unused code from both the Adafruit Motor Shield and AccelStepper libraries to get within ~20 bytes of the maximum allowable binary sketch size. I'd like to keep all the functionality in the sketch, so I'm resorting to shortening the different print() statement.

Two question (for anyone), and I apologize for my my ignorance... I'm not that great at C:
1) When I see print(F("something"))... what exactly is the F?
2) What's the easiest way of knowing which strings in the print() statements I can shorten without affecting the serial communication between the desktop software and the Arduino? In "comms.h", I suspect that I can shorten the print statements in function comms_unrecognisedCommand() so that the original code (shown below) can change to a shorter print statement (also shown below) without affecting communication over serial... correct?

// Original Code
void comms_unrecognisedCommand(String &com)
Serial.print(F("Sorry, "));
Serial.println(F(" isn't a command I recognise."));

// Shortened Code
void comms_unrecognisedCommand(String &com)
Serial.print(F("Sry, "));
Serial.println(F(" not cmd I."));

Thanks in advance for your help! I'm really excited about trying this project out.
Euphy (author)  philipjoep1 year ago
Good work! I would say that anything that sounds "english" can probably be disposed of. The controller doesn't actually listen to the messages - they're only there for debugging when reading the serial comms with your own eyes. There are a couple of messages that the polargraph controller actually listens for, they're mentioned in the serialEvent method in the polargraphcontroller.pde:

void serialEvent(Serial myPort)
// read the serial buffer:
String incoming = myPort.readStringUntil('\n');
// if you got any bytes other than the linefeed:
incoming = trim(incoming);
println("incoming: " + incoming);

if (incoming.startsWith("READY"))
drawbotReady = true;
else if (incoming.startsWith("SYNC"))
else if (incoming.startsWith("CARTESIAN"))
else if (incoming.startsWith("PGNAME"))
else if (incoming.startsWith("PGSIZE"))
else if (incoming.startsWith("PGMMPERREV"))
else if (incoming.startsWith("PGSTEPSPERREV"))
else if (incoming.startsWith("PGSTEPMULTIPLIER"))
else if (incoming.startsWith("PGLIFT"))
else if (incoming.startsWith("PGSPEED"))

else if ("RESEND".equals(incoming))
else if ("DRAWING".equals(incoming))
drawbotReady = false;
else if (incoming.startsWith("MEMORY"))

if (drawbotReady)
drawbotConnected = true;

The stuff that is in english, you could get rid of it entirely, but the messages are useful from time to time (particularly during development. But no reason you couldn't shorten them to codes:

void comms_unrecognisedCommand(String &com)

would let it still be useful. The F(..) is a arduino function that stores the string value in the flash program area of memory, rather than in the volatile SRAM - there's only 2k of it available.

good luck!

oscbe1121 year ago
First of all thanks, this is a really fun project you've got me into :)

Question, I would like to use regular ULN2003 IC (or similar) to drive my steppermotors (instead of the Adafruit shield). Is it enough to:

In the "configuration" management,update the below functions to make them step my drivers and motor, one step, when called?

Functions to change:
void forwarda() { afMotorA.onestep(FORWARD, stepType); }
void backwarda() { afMotorA.onestep(BACKWARD, stepType); }
void forwardb() { afMotorB.onestep(FORWARD, stepType); }
void backwardb() { afMotorB.onestep(BACKWARD, stepType); }
Euphy (author)  oscbe1121 year ago
Hi Oscar, thanks! For using the ULN2003, I don't have much idea - best thing to do is just to try it. All of the motor movements are entirely wrapped in accelstepper, so if you can find an example of accelstepper being used to drive a ULN2003, then it'll work. I can't think of a good reason it won't, but I've never done it before!
Hi Sandy,

Great instructable, can't wait to try this out. Quick question: I have some steppers already, 200 steps @1.8degs per step, do you think with some modification I'd be able to use these instead of the one's you have specified?

Cheers, Dean
Euphy (author)  Dean Wilson1 year ago
Hi Dean, thanks! Those motor specs will be fine, as long as the motor driver can actually drive the motors sensibly. I mean, as long as they don't draw more current than the motorshield can supply.
The steps per rev and sprocket size and things are all set in EEPROM, using the controller app. The ones I used aren't special, just what I happened to find that had the right current rating.
Something to note is that the firmware uses a kind of half-stepping mode, so the number of steps per revolution should be input as twice your actual motor steps. In my case, it's 800 steps (even though I have 400 step motors). In your case, you'd input 400 steps per rev.

Good luck!
Fantastic, really looking forward to trying this out.

Thanks for your help.

sweta_rocks2 years ago
Hey sandy,
at last i succeeded in designin the polargraph and everything seems to be going fine... I am facin a small problem though... its drawing the image a bit tilted, even though the setup and everything is perfect as far as i know and i havent got any idea y is it happening so...have u any idea about wat cud be going wrong??
i have attached a pic of the same for ur refernce..
don't worry about it and just tilt your paper? :)
eyeh28091 year ago
 Hey Sandy, I was trying to upload the code to my Arduino Uno R3, but there's an error: avrdude: verification error, first mismatch at byte 0x7800          0x9b != 0xff avrdude: verification error; content mismatch I've successfully been able to upload other codes (such as simple blinking led codes) before, perhaps you know what the problem is here? -Evan
Euphy (author)  eyeh28091 year ago
Not something I've come across myself Evan, but there's a few foibles with the arduino loader. It's the first time I've seen the issue raised about the polargraph code, so I guess it's not happening to everybody. However, I don't have a solution for you either - I seem to have broken all the UNOs I have with other things, so I can't even test it right now. Hm! Googling the error message (http://forum.arduino.cc/index.php?topic=135195.0) reveals some talk about re-uploading the arduino bootloader, and that has (in the past) solved most of these uploading problems, but I am never sure if it is by coincidence, or actually causal.

You might try uploading the hex file directly using xloader (http://www.polargraph.co.uk/2012/07/more-updating-firmware-without-using-arduino/) if you haven't already.

good luck
cyiangou21 year ago
Hey, I really like this project and I would like to challenge my self if I can do it as I am a first year Electrical and Electronic Eng.
Can i use arduino uno to make this project instead of Arduino (ATMEGA328) or Seeeduino?
Thank you
Euphy (author)  cyiangou21 year ago
Hi, thanks! Uno is ideal for this project. The Uno is the updated version of the Duemilanove, which is what the seeeduino is based on. They weren't around when I made this instructable!
kvods1 year ago
If I have 608zz bearings instead of 6003z bearings would that make a big difference? They are the same dimensions..
Euphy (author)  kvods1 year ago
If they're the same dimensions, then I guess it would make no difference at all!
fcopeman1 year ago
Hi Sandy
Thanks so much for this. I've been having a lot of fun. Is there any way to pause the machine? It would be great to stop and start it (say if the machine hadn't finished by the end of the day but you wanted to continue it in the morning)? It doesn't look like there is, but thought it worth asking.
Euphy (author)  fcopeman1 year ago
Sorry Fran, you've just got to keep scribbling and break on through! In principle you can just pause the command queue, but the pen will lift and the motor will time out after a couple of minutes and you will lose your position. Once you have lost your position, you need to re-home before restarting with the remaining queue - which is possible, but very very difficult to get the starting point exactly the same as the previous run. Not impossible by any means, but I've concluded impossible with manual homing.

OTOH, the pen lift and power timeout is the thing designed to make it safe to leave on overnight.
twopint2 years ago
Ok one more question for you. I'm no electrician so bear with me. I bought 2, 1.7 amp motors and found out later that the shield can only handle 1.2 amp motors. Is that too big of a range for the board to handle, or will I be ok
Euphy (author)  twopint2 years ago
I would not choose to run 1.7amp motors through a system rated only to provide 600ma continuously. The first motors I got were great 2A things, and I burned out a couple of L293Ds before I figured that one out.

The L293D is rated to hand 1.2amp at _peak_. With good heatsinking (and a fan) you might be ok running close to this continuously, or you could piggy-back extra L293Ds on the chips to give you a bit of extra headroom. The SN754410 is an alternative with slightly higher current rating, but other caveats (google sn754410 vs l293d). Either way, 1.7A is far beyond what the standard motorshield is designed to drive.
buildingpra2 years ago
He Sandy! I have a question. I stored the code on the arduino and copied the folders. Now i'm testing the polargraph for the first time the program does recognize it (It says polargraph (uno) ready). When I sent the signal 'move to point', both engines start running but don't stop anymore and the tekst changes to 'busy ........' and keeps busy.

Do you have any idea what's wrong?

Thanks already!
Euphy (author)  buildingpra2 years ago
Could be anything - have you calibrated? Done a "set home" beforehand? Uploaded your machine spec?

twopint2 years ago
I have 2 large servos I used to move a robot I built, would they work instead of two steppers?
Euphy (author)  twopint2 years ago
Sure, rewrite the movement routines, no reason why not. Seb Lee-Delisle's Lunar Trails project uses DC servos, and that was _awesome_ (http://seb.ly/work/lunar-trails/).
Strangely enough all's working now, nothing changed. I don't know why, but at least it's working.

Thanks so much for help :)
Euphy (author)  Cryptomancer2 years ago
I replied to your other message before seeing this one! Good news! I've had lots of times like this where things just "fix themselves", but I usually work out that it's because I remembered to set the pen width (or some other setting) from the default, OR was expecting the default and had forgotten to reset it. Good stuff!
Variable frequency is mostly what I've been trying. Sorry, yes, meant "shade". The pen width seems fine, I can see the lines, they're just all the same. Preview works, but as soon as I render it just shows a red line going through the middle's of each pixel, no variation.
Euphy (author)  Cryptomancer2 years ago
The red line in preview is ok, that's just a sort of "travel" line from one pixel to the next, the brightness of the red shading in the circles over each pixel represents the the density of the pixel. And the values in the actual command queue are all varied - so it is being extracted properly, and is being sent to the machine.

If, on paper they are all coming out the same density then I can only think it is to do with pen width. You didn't say what the results of your pen width setting or pen width tests were (http://www.instructables.com/id/Polargraph-Drawing-Machine/step25/Pen-thickness/). Remember pen width is _not_ saved in the firmware, it has a default value of 0.8mm, and must be set every time the machine is reset.

Is the dimension of the drawing good? I mean, is the area as big / square as you expect?
weirdly it doesn't seem to let me post a comment in line, only at the top here, something wrong with the captcha it says, sorry for inconvenience
Hey Sandy, such a cool project, the instructions were great. I've just finished setting everything up, but whenever I "render pixels" all I get is a continuous square wave, passing through all the pixels, regardless of colour. Do you have any idea what I'm doing wrong with the software?

Thanks :D
Euphy (author)  Cryptomancer2 years ago
Ha thanks! Well it depends what pixel style you use, variable frequency square wave should change depending on the darkness/brightness of the pixel, but the actual colour itself doesn't make any difference. Mid red, mid green and mid blue will all be rendered using the same pattern (mid-grey).

Could be anything, with no information to go on. Could be wrong pixel style (solid square wave maybe), could be the grid size is too small for the pen to be able to express anything in. Have you done a pen width test to decide what pen width to use? Er, does the preview work ok showing a good range of dark and light pixels?
smacneil2 years ago
Hi Sandy, love your project! I've managed to build a drawing machine of my own thanks to your help, but I wondered if you had any tips or information on how I might run a Processing sketch through it instead of using the Polargraph Controller?
Thanks in advance :)
Euphy (author)  smacneil2 years ago
Thanks! Well the polargraph controller is a processing sketch, so you you can just do it the same way as it does? I'm not really sure what you mean!

Seriously awesome project!!
Euphy (author)  unknowntothem2 years ago
Thank you!
Patrick S2 years ago
Thank you! I built mine about a month ago and have had fantastic results. Such a cool program/project/instructable I'm amazed it isn't one of the top ones of all time. The idea for my first instructable was inspired by this.
Euphy (author)  Patrick S2 years ago
Brilliant work Mizchief, great achievement and I haven't seen anything like it before! You've got my vote :)
This is a great write up. I now plan to make my own with the confidence through knowledge that you have bestowed upon me. Thanks for being awesome like that.
Ok so one like this but lower current
Thanks for quick reply so one like that but lower voltage
Euphy (author)  chubchublolly2 years ago
Voltage isn't that important: Current is more significant. What I meant was that I would use a low-ish voltage power supply. I always use variable-voltage power supplies so I can turn it down when it's getting hot, or up if I need a bit more "bite". Running somewhere between 5 and 8v.
Sorry last motor for you to look at
Euphy (author)  chubchublolly2 years ago
0.65A is over current as far as the spec is concerned - that means it might draw more current than the motorshield is comfortable supplying. It's worth noting though that the L293D chips on the motorshield are rated to supply 0.6A continuously, but can handle peaks of twice that. Personally I would use those motors happily, but stick a couple of heatsinks onto the motorshield, maybe a fan if it came to it. And run it at as low a voltage as I could get away with.
So this one would work
Euphy (author)  chubchublolly2 years ago
Probably yes, the torque is a little low, but only in comparison to the other motor.
So it doesn't anything under 0.6A will work doesn't mater what type of nema it is eg(34,21,17,16)
Euphy (author)  chubchublolly2 years ago
Pretty much yes, it'll work in the sense that it won't burn your motorshield out! Very low current will usually require high voltage, and that's not really a problem up to 12v or so. But you might also find that very low current doesn't provide much torque or holding strength. The NEMA value just describes the physical size of the casing of the motor and the position of the mounting holes, 16/17 are pretty much the same.
For the motor wold these work or any other on this website I am a beginner and am not sure what to look for
Euphy (author)  chubchublolly2 years ago
Yes I don't see why not - current rating is the most important thing, should be under 0.6A, and these are 0.4 so will be ok. Six wires though, just cut the white and black wires, or tie them up somehow. Good luck!
b.sss2 years ago
Hi Sandy,
I liked your polargraph project and i had decided to create a replica of the same for one of our technical events at our college. Thanks to your help and all the steps you have given here I am succesfully able to complete the polargraph machine and it is drawing well... But I am still not able to understand how it works basically.. I mean how the commands are generated according to the image we load, how it drives the motors in sync with it.. I tried understanding the arduino code but it seems complicated..So can you please just elaborate about it a little in brief?
Euphy (author)  b.sss2 years ago
Hi there, thanks for your note, glad you got it running!

Right, there is a lot of stuff in the code, so I can't go through much of it without writing more than the code.but only a small bit of it does the interesting stuff about converting images.

First part - taking in an image, re-rasterising it using the native coordinates system.

Second part - driving the motors in sync to make straight lines.

First part is mostly in the Machine class in the controller. The Machine class is a model of the actual machine, the size of it, the size of the sprockets and the number of steps per revolution, along with the image that's loaded and the grid size.

There is a sub-class of Machine that is used to model the machine that is displayed on screen - DisplayMachine. This has all the properties of Machine, but also has zoom and colour and position settings.

The image gets loaded into Machine (imageBitmap) is given a position (imageFrame). And because I know the grid size that's being used (gridSize), I can cycle through all the intersections of the grid lines and then look at the coloured pixel that's at that coordinate.

There is a pair of algorithms at the heart of all the polargraph stuff:

public PVector asNativeCoords(float cartX, float cartY)
float distA = dist(0,0,cartX, cartY);
float distB = dist(getWidth(),0,cartX, cartY);
PVector pgCoords = new PVector(distA, distB);
return pgCoords;

public PVector asCartesianCoords(PVector pgCoords)
float calcX = int((pow(getWidth(), 2) - pow(pgCoords.y, 2) + pow(pgCoords.x, 2)) / (getWidth()*2));
float calcY = int(sqrt(pow(pgCoords.x,2)-pow(calcX,2)));
PVector vect = new PVector(calcX, calcY);
return vect;

These two routines convert a cartesian coordinate (x and y) into a native polargraph coordinate (usually a and b), and vice versa. Above is the version from the controller. PVector is a Processing object that has three properties, x, y and z.

The same calculation is done in the arduino code for doing stuff like vector graphics where the machine has to figure out where the gondola is in cartesian terms. This is the arduino version (it doesn't have the same PVectors so they're a bit more long-winded):

float getMachineA(float cX, float cY)
float a = sqrt(sq(cX)+sq(cY));
return a;
float getMachineB(float cX, float cY)
float b = sqrt(sq((pageWidth)-cX)+sq(cY));
return b;

float getCartesianXFP(float aPos, float bPos)
float calcX = (sq(pageWidth) - sq(bPos) + sq(aPos)) / (pageWidth*2);
return calcX;
float getCartesianYFP(float cX, float aPos)
float calcY = sqrt(sq(aPos)-sq(cX));
return calcY;

In the arduino, driving the motors is simple enough, I use changeLength:

void changeLength(float tA, float tB)
// Serial.println("changeLenth-float");
lastOperationTime = millis();


while (motorA.distanceToGo() != 0 || motorB.distanceToGo() != 0)
if (currentlyRunning)
if (usingAcceleration)


This uses the accelstepper library. First I set the position to mode to (motorA.moveTo(...)) and then go into a loop where I run both motors until they're there (motorA.run()).

Drawing straight lines is a bit awkward, uses:

void exec_drawBetweenPoints(float p1a, float p1b, float p2a, float p2b, int maxSegmentLength) { ... }

This basically chops the line into lots of segments (maxSegmentLength), and uses the regular changeLength() method (above) to draw a tiny short line. Then I calculate the pens position in cartesian space, and then begins to plot a new line from that position to the end. Then another short line, and a new positional check and so on. So eventually we end up with a straight-ish line. It's not possible to make a truly straight line - for a polargraph machine, it's cardinal directions are all curves, so it's really hard to get it to do something that looks straight in cartesian.

That might not shed any light on it at all, but maybe it will. If you have a more specific question, I am happy to help - email is a better medium (sandy.noble@gmail.com), or better still leave a note on the polargraph forum!

sandy noble

Euphy (author) 2 years ago
Well you're right, it _is_ off centre - but weirdly the centreline looks entirely straight and the outline of the image is square and regular. I mean, it's not straight down the centre of the board. Normally distortions that go to one side or another are because of mis-homing, that is the home point is too far to one side, but in those cases the centreline is actually curved - it sort of swerves off and the distortion gets worse as the drawing goes on.

This _looks_ like one motor was lower than the other, or the paper was wonky - but I'm assuming that isn't the case, and everything looks square and level to me.

Does this happen with every drawing?
Can you use a belt instead of beaded cord
Euphy (author)  chubchublolly2 years ago
No reason why not, lots of machines do - including Hektor, der kritzler and Harvey Moon's machine.
sweta_rocks2 years ago
are yu sure that libraries folder should be copied into the arduino sketchbook folder ? cos yu mentioned in step 8 that it shud be saved in arduino libraries folder !

Also i am finding a gr8 difficulty in finding the components yu hav listed !
can you tell me wat NEMA 16 signifies about the motor ?
n what shud be the torque required to be handled by the motor if i am supposing to make this project on a A3 size paper ?
the reason for asking dis is that in the markets here i am gettin 1.8 degree stepper motors but their torque values are different for different models n i dunno wich one to go for ?
Euphy (author)  sweta_rocks2 years ago
Arduino sketchbook folder has a libraries folder in it (usually), and the main arduino application folder also has one - it doesn't actually matter which one you use. Originally I used the application one, but now I tend to just use the one in the sketchbook folder. It only might get to be a problem if you had different versions of the same library in two different places - I'm not sure which version it would use first.

NEMA 16 just describes the physical size of the casing of the motor. NEMA 16 seems pretty rare actually, I've only really seen them from that one supplier I've got them from. NEMA 17 is slightly larger, but a lot more common. The current and voltage is more important. Torque required isn't related to size - that is, you don't need more torque for a bigger machine. I also don't really know the torque that's required. If I've lacked torque I've always been able to fix it by turning up the voltage on the power supply, or by adding more weight to the counterweight. So it's not that critical, but if you have a choice, go for higher (bulkier) rather than lower (slimline or compact).

sweta_rocks2 years ago
hey sandy i am a bit confused with the files yu hav added in yur recent polargraph code repository -polargraph1.2.4 !
i hav unzipped it and hav 4 folders out of wich application.windows32/application.macosx contains the polargraph controller. Polargraph Arduino code contains d code to be frst saved in the arduino sketch folder as yu hav said above n libraries to be saved in arduino library.
am i correct with this ?
also i aint able to understand the use of Processing libraries ?
what is to b done with this folder ?
Euphy (author)  sweta_rocks2 years ago
Forgot to mention - the new download is http://code.google.com/p/polargraph/downloads/detail?name=Polargraph1.2.5.zip
Euphy (author)  sweta_rocks2 years ago
Hi Sweta, I've actually just uploaded a new zip file that includes a couple of fixes.

The folders called "application. ..." are the ones that have the precompiled controller app inside them - different version for different operating systems. Use the version that matches the kind of computer you have. You don't need to install any libraries if you are just going to use the precompiled applications.

Inside the arduino-source folder is all the source code that you'd open up in the Arduino IDE and upload to your arduino board. There is a libraries folder inside that that should be copied into your arduino sketchbook folder.

Inside the polargraph-source folder is all the source code for the controller app. If you want to run this you will need to add the two libraries that are in the libraries folder there too. Just put them in your libraries folder in your processing sketchbook folder.

Good luck!
sweta_rocks2 years ago
m sry if my question looked silly to yu ! :P
but can d same mechanism work wen yu place the board horizontal ?
n also can yu tell me mre about yur polargraph SD prototype ?
Euphy (author)  sweta_rocks2 years ago
If you mean having a board landscape (short and wide) rather than portrait (tall and thin), yes there's no reason why the same mechanism won't work. It's just like only using the top half of my own machine. The only problem might be with the counterweighting system then the weights will eventually hit the ground because it is wider than it is tall.

The solution to that is to use plain bobbins instead of sprockets and gather up the thread instead of hanging it over and using a counterweight. Unless you have a really heavy gondola, there's no real problem with that except homing (calibration) is a bit more of a pain.

The PolargraphSD prototype - not much more to say about it other than what you see in the pics on [url=http://www.polargraph.co.uk/2012/04/polargraph-sd-prototypes/]http://www.polargraph.co.uk/2012/04/polargraph-sd-prototypes/[/url]. It uses an arduino mega loaded with the firmware at [url=http://code.google.com/p/polargraph/source/browse/#svn%2Fembedded%2Fbranch%2Fpolargraph_server_mega]Polargraph_server_mega[/url] and allows you to read a load of commands off an SD card rather than having to have the PC connected. It doesn't really change the speed of the drawing much.

sweta_rocks2 years ago
hey sandy,

i am an engineering student studying in India and i am truly inspired by yur work !
i decided to make your work as a project fr an exhibition to b held in my college but d problem with it is that it is too big n also it requires a long time to complete the picture. No i am not criticizing your work but den it'l be difficult fr me to demo its working at the exhibition !

i saw the prototype link yu posted in the comments but dunno how to go bout it cos yu haven't provided any guidelines on that page.

so as a request i was wondering if yu can help me build a smaller version of your main project providing me wid the guidelines as you've mentioned above fr yur main work ! also if only yu can provide me a solution to demo the working of this machine in a short time period !

thanking in advance,
Euphy (author)  sweta_rocks2 years ago
Hi thanks Sweta, not quite clear what it is you're looking for - a smaller version is just the same as the one you see here, but .. er, smaller. Just mount the motors on a smaller board?
MrStein2 years ago
That not work with the AFmotor exemples,that make a step at right and a step at left but no rotation..
Euphy (author)  MrStein2 years ago
Ok, if the examples aren't working either then there might be a fault in your wiring / assembly - check that your ICs (chips) are in the right way around, and that your resistor network is in the right way around too. I've put them in wrong before. You should probably direct any questions to the adafruit forum though - they're the experts on diagnosing motorshield issues!
MrStein2 years ago
I don't know why that don't work, my adafruit driver become hot (the ship in the center not the l293D) and my motors shaking as if they were powerless (it's 7.5v 0.2a motors and i use a variable power supply 1a )
Euphy (author)  MrStein2 years ago
Does the shield work ok otherwise? With the other AFMotor examples in Arduino?
hilukasz2 years ago
ok so been at it for a few hours, new to stepper motors. would something like this work: http://store.kysanelectronics.com/servlet/-strse-71072/20BYGH33/Detail voltage rating is a bit lower, but correct amps.
Euphy (author)  hilukasz2 years ago
Hi they look good, voltage doesn't matter so much, but amperage is the most important. They are fairly dinky by the looks of thing though, so you might find they aren't very strong - I don't really know how to read and compare the torque specs. Probably ok though - the machine doesn't need an awful lot of power.
MrStein2 years ago
Hello, great project :D
I would like make it with a arduino duemilanove, can it work? And i have two bipolars motors (1.8degres, 0.2a) I think it's good?

Thank you!
Euphy (author)  MrStein2 years ago
No reason why not!
JoeMurphy2 years ago
what sort of power supply do you need to drive the stepper directly. Wall wart 12v 1amp, too much?
hilukasz2 years ago
doesn't look like they have those stepper motors anymore. any suggestions for alternative places? Google each lead to dead ends for those specs :/
Euphy (author)  hilukasz2 years ago
Hello, the only thing that really matters is the current limit of the stepper motor - so any motors which can handle around 600mA (0.6A) will probably be ok. Search for other projects that use the adafruit motorshield to see what other folks have been using. Good luck!
hilukasz Euphy2 years ago
ok, right on. thanks.
P.Intern2 years ago
Hee Euphy,

Your project looks awesome! I'm a student mechanical engineering for design and doing my internship at the moment. My project is to redesign a drawbot and first thing I want to do is build yours as a prototype to go from there on.

The results are looking amazing so i'm already all excited. I've already builded most of the parts and got the motors as well.

Only thing is that I am truly new to the world of electronics and I do not really have an idea how to figure out what kind of a motorshield i need! I have an arduino atmega 1280 gotten by my company where i'm doing the internship. They said this part should be able to do the work as well. Could this give me any issues during the way or is it as easy as they say haha?

Thanks already!

Euphy (author)  P.Intern2 years ago
Thanks Peter! An atmega1280-based machine will work just fine. The standard adafruit motorshield will plug in and work the same as on a regular arduino, nothing needs to change.

The extra memory and and pins that you have available to you mean that you can also integrate an SD card pretty easily, and I have a version of the firmware that uses that too - http://www.polargraph.co.uk/2012/04/polargraph-sd-prototypes/ has some details. This lets you do standalone drawings.

I'll be excited to see what you develop - will you keep me updated, do you have a blog or anything? Cheers! Sandy Noble
P.Intern Euphy2 years ago
Hee Sandy!

Sorry for the late respons, ofcourse I will keep you updated! I didn't had a lot of time to work on the polargraph. Today I've made the first drawing with some succes. The only thing is that the polargraph sometimes skips a line! It just moves down as you can see in the pic I added. Do you have any idea what this could be so I can fix it?

Eventually i used a arduino Uno with the adafruit motorshield ;) works like a charm. Maybe later I will extend the options :)

Greetings Peter
Euphy (author)  P.Intern2 years ago
Cool! Good work - I don't think there's anything missed exactly, but the right-hand motor is certainly slipping. Either the cord slipping on the spool, or the spool slipping on the motor shaft, or the motor isn't getting enough power to hold its position.

I would guess its the last one, but that's also the hardest to fix, and you really need to catch it in the act to be sure.

The solution to it is to increase the voltage that you supply to the motors. I tend to use adjustable voltage power supplies for this reason.

Other solutions: Decrease the speed of your motors, decrease the weight of your gondola, if you use a counterweight, increase it's weight slightly.

Good luck!
luki_czwa2 years ago
Hi, I've problem with Arduino Duemilanove (Atmega328). I am trying to print a
file SVG. I've done the instructions guide but my printer is not working as
it should. I'm sending a link to the youtube page where it shows my
problem. Thanks for your help, sorry if my English is not perfect ;-).

Euphy (author)  luki_czwa2 years ago
Hi Luki, I've recently fixed a couple of bugs in that firmware, unless you've got the version from last night, could you give it another go? You can get the files from http://code.google.com/p/polargraph/source/browse/#svn%2Fembedded%2Ftrunk%2Fpolargraph_server_a1. There's multiple files now, so it's a little trickier.

The other thing to try is to avoid using your own proprties.txt - try using default.properties.txt instead. There is an issue with the way the files get loaded that causes a problem like this - it's one of the values not getting loaded properly, I can't quite remember which...

Step multiplier is something that's fairly new - it should be set to 1.

good luck!
luki_czwa Euphy2 years ago
Thank you for your reply. I've polargraph1.2.4 version.
I noticed that my polargraph C17 does not support the command. C14 and C13 is working. Greetings from Poland
wanste2 years ago
Hi, great instructable! Can you please help me with one question about stepper motors:
- is it matter if they are unipolar or bipolar?

I was looking at one of these:
- 12V, 0.4A, 36oz-in, Unipolar Stepper Motor (Soyo SY42STH38-0406A) or
- 10V, 0.5A, 13oz-in, Bipolar Stepper Motor (Soyo SY35ST28-0504A)

Thank you very much,
Euphy (author)  wanste2 years ago
Thank you! They need to be bipolar motors to work with the adafruit motorshield. Unipolar motors won't work.

good luck!
Sandy Noble
wanste Euphy2 years ago
Thank you so much for quick reply!
Now that has really narrowed my search ;)
unigamer3 years ago

Wonderful work and instructable :) I am trying to make a whiteboard plotter and the part that I can't figure out is how to convert an image to instructions stepper motors can plot.

Just now I am using desired a list of desired x and desired y coordinates to move my (simulated) plotter. I was playing around with your software and generated a list of commands for plotting an image. Is there any way to extract that from the software as x and y values?

Thanks very much,

Euphy (author)  unigamer3 years ago
Hi Jonathan, thanks! At the moment the polargraph controller only uses the native coordinates system when sending commands. There's a few problems with that approach, translation and transformation is the main one, so I'm going to be changing a few of the commands to communicate using a x/y cartesian coordinates system instead.

As for now, it's just the native system though. Might add that feature shortly, but have a few more things to fix first.
unigamer Euphy3 years ago
If your software could convert an image to an x-y line and then output to a CSV file I pretty sure it would be unique (I certainly can't find anyone else who has released software with such functionality). Not hat I need such a conversion right now, I'm waiting for stepper drivers because my L293Ds ran extremely hot and now just make the stepper's jiggle.

I love your implementation, the software is incredibly polished and slick. I chose to go down the route of making it from scratch myself because I wanted to understand what was going on all the way through the process. Also, I am using PICAXE instead of Arduino and I couldn't be bothered trying to port the software.

I'm definitely keeping my eye on this project, I think it has a lot of potential.

I drew a quick spiral for the first time today on my machine... it was pretty rough! But I estimated some of the lengths (off by 1.5cm at least probably).

Do you find the results quite sensitive to accurate measurements of lengths? You did mention the need to prepare well for good results. I knocked up my test rig in 15 so wasn't expecting perfect results. Actually, I'm pleasantly surprised it's pretty much working (wit lots of obvious improvements that can be made).

The more I've got into mine I appreciate what you've done with your kit(s). £80 is such a good price for a near complete set up... I need to persuade one of my friends to buy one so I can play with it.

I can't remember seeing your Polargraph in Make magazine, it would be right up their street and would be a good audience.

Euphy (author)  unigamer2 years ago
Thanks Jonathan! Do you know, I've never actually tried measuring the output and comparing it to the input. I've always focussed on geometric accuracy, and assumed that if it's coming out square, or circular, and lines are straight then it _must_ be accurate. Ha!

The most important things are good measurements and an accurately specified home point. With a design like this, where the sprockets (the top corners of the two triangles) are quite large, then machine width will never be able to be completely accurate. And the smaller the machine is, the greater the distortion that comes from that will be. Quite what it'll look like is another matter. All the distortion I've seen has been quite attractive.

lanthan3 years ago
Very nice, outstanding instructable!
At this point, ControlP5 and geomerative libraries installed, code downloaded from svn today, I am stuck (Processing 1.5.1, current Ubuntu release) when trying to run the sketch:
error in line 140 of Panel.pde c.setSize((int)cSize.x, (int)cSize.y);
error msg: "The function setSize(int,int) does not exist"
If I comment this line out, the next error is in line 182 of the same file
"the function getBackground() does not exist"
then line 189 of the same "The function setLock(boolean) does not exist"

if I comment the last one, the controller runs (still signals a RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2
but this is not fatal.
So it is like a library or set of functions might be missing. Any hints? Thank you!
lanthan lanthan3 years ago
Never mind, solved it: was a mismatch of versions of the ControlP5 libraries. It is very important to use the one from the link provided by the polargraph instructions, dated from october 5, 2010.
Euphy (author)  lanthan3 years ago
Good stuff, I hoped it was that. The ControlP5 library has seen a lot of development up to now, but there hasn't been an official release for years. I'll add a note to make it clearer that you need that version from 2010.

sleepybrett3 years ago
It might be nice if you had a photograph or a diagram that shows which parts go where on the gondola. From photograph #1 it seems like it the order is:
* plate
* empty bearing
* bearing with 'short arm facing up'
* acrylic spacer x 2
* bearing with 'long arm facing down'
* acrylic spacer
* wooden cap

Is this correct? If so I'm having a problem with non flat hanging on a vertical surface. Suggestions?
Euphy (author)  sleepybrett3 years ago
Hi Brett, sorry it wasn't clear, you've got it right except there's a spacer between the empty bearing and the bearing with the short arm, and only one spacer where you've got a double.

The wooden cap is purely decorative. I usually glue the last spacer on the top so I've got something reliable to push against when I'm handling it.

I guess it is hanging tilted so that the pen is pointed downwards, and only the top-edge of the stabiliser is against the surface? I would fix this by installing the pen, and sticking some more blu-tack on the end of the pen until it balances. Alternatively, you could move the cord hangers onto the next bearing down - so the empty bearing was the top-most one. This will have the effect of moving the gondola away from the surface (which is why I haven't done it), but you might be ok.

sleepybrett3 years ago
I've been using 3m 'Command' poster hanging strips to hang my steppers 'front-style'. The kind you remove buy stretching. It takes just a couple of strips to hang the motors securely to a whiteboard type surface. They are very secure and leave no noticeable residue.
SnyperBob3 years ago
I want to get your stuff made up via Ponoko (gondola, sprockets), but I need to figure out what setting to input on their site for the sprockets.

When I upload this file to their site, it then wants me to select units. Options are mm, cm, or inches. Do you know which I need to select?

I don't know anything about 3D modeling, so I don't know what the units even mean, or what it applies to.
Euphy (author)  SnyperBob3 years ago
The STLs (the sprocket files) use mm. Note that the gondola and the brackets are made to be cut from 3mm material because that's what I have locally here in the UK - I think the US materials are very slightly different. It might be so small that it makes no difference, but just be aware.
SnyperBob Euphy3 years ago
Thanks for clarifying this. I ordered the sprockets and gondola thru Ponoko now. I have everything ordered, I'll let you know how it turns out once I receive everything. Probably will be 2-3 weeks, since the Steppers are coming from your side of the pond

Have a great weekend
SnyperBob3 years ago
I'm using the compiled binaries (polargraphcontroller_zoom.exe
When I open the program and select Load Image File on the input screen, I try to open a JPG and nothing shows up on the screen.

What are the limitations for this program? ie....the directions in this Instructable say to open a bitmap. When I click on Load Image File, the open dialog box shows that it wants either a JPG or a PNG file. I tried opening a bitmap 256 color, as well as 24 bit too....nothing shows.

Also, I have Show Image checked in bottom left hand corner of the program, still nothing.
Euphy (author)  SnyperBob3 years ago
Does "move image" show you anything?
SnyperBob Euphy3 years ago
OK, just so we're on the same level.....now I'm talking about the new version of your program.

Both ways I run it (manually via Processing or thru the binary) I can not load an image file into the program.

I mentioned it in another comment, but I CAN load images into your Old Version of the program. So it's either a config problem, or a software problem, I don't know.

I tried loading same image I loaded into Old Version, into new version and it does not display. Looking at the console in Processing and it says loading from filename: .....
There are no error messages in the Processing console
Euphy (author)  SnyperBob3 years ago
The image loading routines are similar in both versions, but the new version deals with resizing a bit differently. I think you're right that the image is loading ok, but not displaying for some reason. The only thing that the new software does that the old doesn't is the vector drawing, and the zooming, so it's still very usable for machines that aren't gigantic.

I'm hoping to get some work done on the controller over the weekend.
PS - Move image doesn't show me anything in the newer version.

In the Old Version, I get a box the size of the image. When I move that box and click, the image moves to that new location
Maybe I need to try to get the 'Old Version' up and running first to maybe help understand things better.

Is the old version on your Google Code page under trunk? polargraphcontroller.pde, is that the file for the old version?

I'll still want to get the newer version running, and will probably need a little guidance on that, but I just want to see this in action! I'm going to start ordering stuff to build this today.

I'll probably actually import some stepper motors to the United States from the eBay seller you linked. They have them cheaper than I can get here in the States, and I would like to order quite a few of them for use with other projects in the future.
SnyperBob3 years ago

I have another question about this step (11). With the newest updates you made to your code, do I now have to copy ALL 11 of the files from your code site, branch polargraphcontroller_zoom, into the sketch folder for Processing?

Thank you
More information in regards to what I'm asking...

I downloaded from your site: polargraphcontroller1.0.2.windows32.zip
I'm running WinXP

I installed Processing, latest version, and see folder here: My Documents/Processing

I created a new folder in that folder called polargraphcontroller.

So, my question is, what files do I need to copy into: My Documents/Processing/polargraphcontroller
from your zip file? Do I need to copy the source folder from your zip file, there are 11 files in that folder.
I copied those 11 files into: My Documents/Processing/polargraphcontroller

but nothing shows up when I run Processing and click on File->Sketchbook . I have closed Processing and tried reopening, but nothing is displayed
Euphy (author)  SnyperBob3 years ago
SnyperBob, the instructions here are really only good for the older version, the one called processingcontroller.pde. That is a simpler installation.

The reason the files aren't showing up inside processing is that the name of the pde has to match the name of the folder it's in. So if you've downloaded polargraphcontroller_zoom, then it needs to be in a folder called /polargraphcontroller_zoom/. And yes, all the polargraph files would need to be in that same folder.

That said, you also need to get the controlP5 library and the geomerative library too, so I'd recommend using the precompiled binaries. And you've already got that (polargraphcontroller1.0.2.windows32.zip), so wherever you unpack it, just run the executable file that's in the root of wherever you unpacked it to. It'll be called polargraphcontroller_zoom.exe. You still need to change the serial port in the configuration file, but other than that, it's simple - don't even need processing installed for it.

You may find that the new software is not quite ready for primetime, and in particular I think it struggles with some image resizing issues.

Good luck!
SnyperBob Euphy3 years ago
Thanks for the tip! Sorry for all the newbie questions on getting this up and running. I'm new to Arduino and really like this project!

Ok, so based on what you told me, I just extracted the polargraphcontroller.1.0.2.windows32.zip file

I ran polargraphcontroller_zoom.exe and it opens up fine. I closed out of the program and then updated polargraph.properties.txt file with my correct serial port for my Arduino UNO.

When I open polargraphcontroller_zoom.exe again, it just says No Serial Connection at the top of the screen.

My next question is.....do I need to load a sketch onto my Arduino in order to get it to talk to polargraphcontroller_zoom.exe?

Right now, the last sketch loaded onto my Arduino is Blink. Do I need to clear off that sketch or something in order for my Arduino to talk to the computer?

I read this Instructable many times and I just seem to be missing something here. I'm guessing it's like you said, these directions are for the older version of your software. I'm looking for any more tips to get the software talking to the Arduino.

Thank you
Euphy (author)  SnyperBob3 years ago
Yep Snyper, you need to upload the server code onto the arduino itself - step 8 has the instructions for that.

Also, the value you need to put into the properties.txt is not the same number as your COM port - like, if you have COM14, then you wouldn't enter "14".

What it actually needs is the position of the com port in a list of all com ports on your system. So you would enter "0" if you wanted to connect to the first COM port, "1" if you wanted to connect to the second, etc.

On all my windows machines the arduino pops up in the second com port, so I always have "1" as my COM port in the file. The actual name of the port varies, depending on which arduino I have plugged in, so it can be COM14, COM31, COM5 etc. This is the bit that doesn't really work yet in the new controller software.
SnyperBob Euphy3 years ago
Oh, thanks for explaining this. I am now going to try to get the older version of your software up and running, until I know a little bit more about how it all works and get more comfortable with it all.

Running the older version, with the COM port setting that you explained, after manually installing all the libraries, loading the server onto the Arduino, I am now able to run the program!

It comes up, says it's connected via the COM port, and I can load an image into the program. I'll re read all of the other steps again and try to learn more about how to use the polargraphcontroller program.

Thanks again for all you've done!
SnyperBob3 years ago
Hi! I really like your project and am planning on building my own using your Instructable. I'm only in the planning stage now to try to figure out how much this will cost and whatnot. Do you have any stepper motors still for sale?

Can you update this step as well with more recent info about what code is needed? Step 8 of this Instructable. The link for 'polargraph code repository' is broken.

Is this the main sketch for your machine: polargraphcontroller_zoom.pde ??

I'm going to try to hammer out all the software details before I jump in and start buying all the bits to make this work. I really appreciate how much time and effort you have put into refining this project. Thanks for sharing it with us!

I have a cheap/generic motor shield I got thru eBay, I wonder if AdaFruit's libraries will still work with it. I'll have to try it out I suppose, unless you know if it will work?

There's a lot to digest here, and especially with all of the code files

How do I use all of the PDE files? I thought you can only upload one PDE to the Arduino at a time. Looking at the code, most of them say that they are part of the Polargraph Controller, and have classes and all kinds of other stuff in them. Can you give any quick tips to help me understand how all these files work in the big picture?

Thanks again!
Hi Sandy ,
Quick question,
To get more detail in the drawing but not more lines across, do I use the inc sample size button?
Thanks a bunch,
Euphy (author)  matt.e.jenkins3 years ago
Inc / Dec sample size controls how many pixels from your image are looked at, when the app decides what density to draw that little block. A low value will lead to more contrast but can sometimes look harsh, especially in places like eyes and teeth where nuance is quite important. Vampire teeth are common!

It sometimes gives the impression of more detail though, because it looks a bit more bold, a bit sharper in the preview, but the only real way to get more detail from the image is to decrease the row size and add more rows.
Thanks Sandy
These are some pictures my first few tries. I started the drawing of my boys last night and took a picture of it when I got up in the morning. I started using the sticky tack to hold the pen but I found it hard to get it just right and it was moving just a little. So i added a picture of the cloths pins. There are two popsicle sticks pieces cut and used as a small spacer between them and glued between one side of the pins. One pin is clamping the pipe and the other the pen. I found this to work very well and it gives me a bit more control. I built this a few days ago and I'm loving it. It's the gift that keeps on giving.

If you like, I have video with description of it on my youtube channel at www.youtube.com/geekguymj

Euphy (author)  matt.e.jenkins3 years ago
Looks good Matt, cracking results. I like the look of those clothes pegs too - great solution!
Hi Euphy,
My wife bought me your kit for Christmas. It should be in soon and I can't wait to get it set up. It looks amazing. Thanks,
Euphy (author)  matt.e.jenkins3 years ago
Matt, brilliant, so glad you like it! If you've got any questions, or would like a hand, just give me a shout.
Hi Sandy,
I have been building this and troubleshooting a problem i had for most of the day. i was about to ask you about it when I noticed your conversation with cbradford1 in this forum. I had the same problem. So thankfully you guys figured that out for me. I changed the "," in the code and that made all the difference. I have been looking forward to this for a while. Thanks for the great software and support you give. What a cool machine.
Much thanks,
Euphy (author)  matt.e.jenkins3 years ago
You should note that I've just updated the arduino step (step 8) to say that Arduino 1.0 is now officially the target environment that the code works on, and that older ones won't work without poking and levering.

It's straightforward - the AFMotor libraries are already compatible with Arduino 1.0, but the AccelStepper ones aren't yet - you'll need to use a slightly modified versions that I've got on the site - http://code.google.com/p/polargraph/source/browse/#svn%2FAccelStepper%2Fbranches%2FAccelStepperArduino1.0

rory3323 years ago
Euphy ! this is pure genius.. Its actually got me excited about designing/building. which has been on the downward for a while now..

I look forward to the New Year to start building and experimenting..

Merry Christmas
Euphy (author)  rory3323 years ago
Brilliant! Hope you have fun with it - keep an eye on www.polargraph.co.uk or drop me a line if you need a hand.

cbradford13 years ago
Hi Sandy

First of all, great work on your project - it's truly inspiring.

I've got my hardware all setup, and I've had the steppers responding to a number of tests so I know the shield and motors work, but I can't get a response when I "set home". All the appropriate lights are on, the server appears to have loaded properly to my board, but... nothing.

Any ideas?

Euphy (author)  cbradford13 years ago
Hi, thanks, glad you like it! Ok, is the controller in contact with the board? That is, on the left hand side of the controller screen, in the summary text overlay, does it say "READY" somewhere? (Between "Steps Length B .." and "waiting for a click".)

You should be seeing a regular transmission of "READY" coming from the board too, every two seconds or so - should be able to check that if you use the serial monitor in the arduino environment, or see it coming up in the console portion of the processing environment.

If that's all running, then make sure your queue is running (top right - "command queue RUNNING" or "command queue - STOPPED" or something like that).

If that's running too, then issuing a command should result in either an acknowledgement in the console, and some action, or a message in the console saying that it didn't recognise the command. Remember that set home will only result in the motors locking, but otherwise no movement.

Let me know how you get on!
Thanks for the quick reply!

Yes, the controller is in contact with the board. It says it's ready in the top left corner and repeatedly in the console. When I set home the steppers still spin free.

It looks on the console that the machine is happily running away, but it's not.
Euphy (author)  cbradford13 years ago
Is the command queue running (F4)? It is paused by default when the controller is started.

If the board is happy, and saying "READY", the the commands in the queue should be being issued as a response, the board will usually output a load of stuff that describes what it's doing with each command too (SYNC messages, MEMORY messages etc).

Is it getting that far?

If that's all running, then I'm a bit stumped, I would have said it's a hardware problem, except that you've tested that bit already.

You could perhaps try issuing the commands manually from the serial monitor in arduino - enter "C09,3163,3163,END" and it should reply with "ACK,C09,3163,3163,END", and when you reply with "EXEC" it'll execute the command.

The RXTX version mismatch thing seems to be normal - I have read an explanation somewhere about what the problem is, but it's not critical. I get it every time and it doesn't stop anything from working.

Good luck
When I run the controller program in processing the commands are different than in your screen shot. Load image isn't there at all. I'm in input, I switched modes and pressed F1 again to be sure. I have the most recent code from your website. Do you know what might be wrong?
Euphy (author)  PaulMakesThings3 years ago
Not sure there Paul, not a problem I've come across.  Which buttons are visible? The most recent code is r109, that's the code linked to on the previous page.  Do any of the buttons do anything?  Are there any errors in the console?
I had used the code linked to in step 1, history. Now that I pasted in the code in the page before this one it worked, it's different code.
Euphy (author)  PaulMakesThings3 years ago
ah, you've downloaded the zipped bundle? Right I'm actually going to remove that bundle - it'll almost never be up to date.
Hey, me again.
Ok. So I downloaded Processing just fine and found the folder on my computer and created the polargraphcontroller folder within, but how exactly do I download the source code. I opened it up and was able to look at it but didnt know where to go from there. This is probably a really lame question, but I am completely new at this stuff.
Thanks for the help thus far,
Euphy (author)  thejuddernaut3 years ago
No problem, you've opened it up in your browser, or in Processing?

To get it from your browser into Processing, you can either right-click on the link and do "save target as.." and save it into your polargraphcontroller.pde folder, or you can follow the link, then file-> save as.. But just make sure you get to save it as a *.pde rather than an html, or whatever weird format your browser (internet explorer being daft) wants to impose on it.

You could even copy the contents of the file into the clipboard and create a new file and just paste it in.

If you've got it into Processing already, you should just click the "play" button in the top left of the toolbar - that'll run the application. Note I have added a couple of extra things into the code since writing this ible, so I'll be updating a couple of steps here shortly. Basically, the stuff about setting up your drawing area and things, and choosing serial ports.

Good luck!
I decided to try and build this amazing device of yours, but I am a novice. I am looking for the stepper motors you specified and am having trouble finding the right ones. I am finding a lot more options in the NEMA size 17 rather than 16 does this matter as long as the other technical specs match? And, could you suggest some online resources for purchasing these motors that I may not know about? Thank you very much.
Euphy (author)  thejuddernaut3 years ago
Yep, the physical size of the motors doesn't make any difference to the mechanism at all, only thing it'll affect is the brackets and things, and the shaft size will affect which sprockets you can fit on. I'm no expert in stepper motors either, so I can't give you great recommendations about the subtle differences between motors. However, I found http://www.schmalzhaus.com/EasyDriver/ to be very useful.

Current is the significant value you need to be looking for though, rather than voltage. Voltage is pretty irrelevant in fact. I use these motors because they draw 600mA, and that nicely matches the maximum that the motorshield can handle. I run them at 6v, but I could go higher for more torque (and more heat), but they have 4.2v marked on them.

The very first motors I got were NEMA17 motors that I bought because they were labelled 4v, and I figured I wanted to be safe and work with low voltages if I could, and because I didn't know what to look for, I didn't notice they were rated to draw 2 amps. So it kind of worked, but I also destroyed a couple of power supplies and motorshields before I figured out what was going on.

Hope that's some help!
pourcirm3 years ago
First off I have to say this is an awesome project and I really like your build. I'm thinking of building one myself now as this is something I've never come across and it has such a cool drawing style I have to build one.

What I'm curious about is this: I have some stepper motors laying around already, but they're 1.8 degree per step. I'm wondering if you could venture a guess or might know what this would do to my final image results?

I've looked through the documentation for the Adafruit motor shield and also the AFMotor documentation and it talks about the combination of the two being able to do some different step types that I thought I could use half-steps to get the same 0.9 degree per step resolution from my 1.8 degree steppers.

So thinking in those terms I was reading through your Arduino based code trying to see how hard it would be to adjust the stepping and ran across a few things that sparked my questions. You've done two things that I'm specifically looking at. First defining motorStepsPerRev as 800 when it is 400 for your steppers and secondly using the interleave step type. I understand the interleave step type creates the half step I was considering using, but what does the motorStepsPerRev being double do? Does that effectively microstep it again so you're getting an even smaller resolution of almost 0.22 degrees?

Logically that seems to make sense, but I just wanted to find out as I was hoping to use what I had right now on hand to build my own version.
Euphy (author)  pourcirm3 years ago
Hi there, thanks! 1.8 degree steppers are fine - there's no reason why you can't use them, you'll have a little less resolution with fine pens and narrow rows.

The settings for motorStepPerRev defines the the number of AFMotor steps per revolution, rather than the physical hardware number of steps. So if I was using the simple (non interleaved, I can't remember what it's called) step type, then AFMotor steps will be equal to the physical steps, but when we start using the fancy-dan step styles it'll change. So I get 800 INTERLEAVEd steps, or 6400 MICROSTEP steps per rev. They all translate to 400 physical steps.

So with yours, if you're using the interleaved step style, you'd set motorStepsPerRev to be 400, even though your motors only have 200 physical steps.

The physical size of the pen movements per step is a product of step size and sprocket size. If you have a coarser motor (1.8 degree or more), then you can get back your physical resolution by having a smaller sprocket.

So 1.8 degree is ok, you might not even notice the difference, depending on the thickness of the pen you use (and to be honest, there isn't a "wrong" way, just a different shading effect), for example:

If you want to draw a square 2cm across with a pen that has a 2mm tip, with a 400step motor (0.9degree) it might be 100 steps across, and the pen tip is 10 steps across, then the code will draw 10 lines into the pixel to get it to maximum density, each line is 10 steps away from the next.

If you only had half as many steps to play with (a 200 step, 1.8 degree motor), then the pixel would still be 2cm wide, and then pen would still be 2mm wide, but it'd only be 50 steps across, and the pen tip would be 5 steps across and each line would be 5 steps away from the previous one. So if that was your maximum density, you can see there'd be no difference.

BUT if I decided to use a pen that was a tenth of the size (lets say, it was 0.2mm fineliner) instead of a big fat marker, then it'd be different. The 400 step motor version will have a pen that is 1 step wide, and will fill the pixel by drawing 100 lines, each line 1 step away from the rest.

Now, the 200 step motor version only has 50 places it can move to within the 2cm box, so the most it could possibly draw would be 50 lines with a 0.2mm pen, and that would only half-shade the square. In fact, the smallest pen it could correctly describe is one that's 1 step across, or 0.4mm. Smaller than that, it'll start behaving oddly.

Hope that's some help,
i am working on one too
(vvvv-arduino-adafruit shield)
great work !


Euphy (author)  mietteincarna3 years ago
Oh, that stuff is brilliant! I thought I'd seen all the drawbots on the internet already, thanks!
I'm trying to work out where and how to set the pins for my motor driver. I actually have some L293D chips, which is what your adafruit driver uses anyway. Looking at AFMotor.h and AccelStepper.h it looks like it can be set for pretty much any control mode I could want to use. If you have any ideas about where to look to set the output pins, or just see what they are set to, it could help me out. Thanks.
Euphy (author)  PaulMakesThings3 years ago
Hey Paul, if you aren't using the motorshield, then the AFMotor library isn't used, you can use the AccelStepper library on it's own. Means you won't get the interleaved step style that adafruit provide, but depending on the motor you're using you might find yourself with enough resolution without it.

It's been a while since I used the accelstepper drivers on their own, but if I remember right you declare it something like

AccelStepper motorA = new AccelStepper(4, 4,5,6,7);

to specify that you're controlling your stepper hardware with four wires, on arduino pins 4,5,6 and 7.

I did this with another project (http://www.flickr.com/photos/euphy/5942249105/in/set-72157625241383012 - my linear clock that is also on instructables) so it can't be hard if I could figure it out :) The circuit in that picture is two instances of Tom Igoe's stepper driver circuit (http://www.tigoe.net/pcomp/code/circuits/motors/stepper-motors). He uses SN754410s in his diagram, but the pinout is the same on L293Ds. It's not that important which arduino pins you use. The motorshield uses the PWM pins, but that's just for the clever microstepping. If you aren't microstepping, you can use any pin.
It appears that the shield just has a shift register, two L293D driver chips and the appropriate resistors and caps to support it. What I find a bit odd is that the code seems to be outputting the combination of pins needed to go straight to the chips, but using a shift register seems to imply they are using serial communication and that shift register should be what outputs the paired on/off signals to control the H bridges.

Anyway, it seems like the code for the adafruit motor driver doesn't add much, still, if I wanted to take advantage of it, I think I can make my device work the same way.
Actually they have a schematic so I could probably just wire it exactly the same way since I have the chips. It's more a matter of not wanting to wait for the order than cheapness:
Euphy (author)  PaulMakesThings3 years ago
Wiring the L293s directly uses up 8 arduino pins, but using the shift register saves a couple. Which might be useful if you need them, but might make no difference. In the case of this project, i don't have any other use for the other pins anyway, so the saving is pretty moot. But the motorshield is rad, and the interleaved step type is a nice way of doubling precision, that i am grateful for. I'm working on making a custom PCB for this at the moment, so I'd be interested to see what kind of circuit you eventually end up using.
While it might be worth the trouble for mass production to design a driver, and in fact you could integrate the Atmel chips on the board too, I found that this just wasn't worth the effort. I have more Lab tech work than I can keep up with if I'm not studying or grading, and in the time this would take me I could earn about $90. So, wondering what I was thinking trying to make a driver when I can buy one for $20 I just ordered the adafruit one. I have to remember that just because you can build everything from scratch doesn't mean you should.
This looks awesome, I really think I will build one.
Euphy (author)  PaulMakesThings3 years ago
It was actually dead easy to make - particularly if you already have a stock of bits and pices. Finding a big flat board was the hardest part! Thanks!
I've gathered the parts, I already have an arduino, many steppers and I can make a simple stepper driver. I'll probably just look by the dumpster for doors and table tops that people have tossed for the flat surface.
rimar20003 years ago
Euphy (author)  rimar20003 years ago
Thanks very much for the patch!
rimar2000 Euphy3 years ago
It was an honor for me.
Great concept but I love your writing style...very flowery...
Euphy (author)  WhateverForever3 years ago
Thank you, I think!

I like it.
I have never seen anything like this. It looks very fun. About how much would all the parts cost in US$? On average how long does it take to finish a drawing? This was a great Instructable, Thanks.
Euphy (author)  matt.e.jenkins3 years ago
Cheers Matt, the cost depends on how lucky you end up being with finding the right bits. About $140 odd I think, if you bought everything from scratch, but power supplies, cables, things like that you might find you already have.

It doesn't draw fast, it takes about 6 hours to draw a full A2 or A1 drawing, but it all depends on the settings you use. The longest ones took a couple of days, these are full A1 pages, with small pixels, and very dense. If you use a bigger pixel, fatter pens, it'll do something in just an hour.
Thank you, I'll look into it. i'll have to give it a try.
Wesley6663 years ago
It is said that 1000 monkeys give typewriters and infinite time would eventually type the entire works of Shakespeare, unlike most of my writing, which would take 10 monkeys 10 mins! Haha! I love that saying though, and great job on the 'Ible!
Euphy (author)  Wesley6663 years ago
Thanks, it's the problem with mistaking activity for creativity. Part of the attraction for this, for me anyway, is that it is so slow, and the variability in it. If a drawing is going to take a day to complete there's a strong encouragement to treat it with a bit more respect :)
jquiring3 years ago
Could you get this to work with 4 colors (CMYK)? You could probably create some unique artwork and make some money (You could probably sell some monochrome artwork as well).
Euphy (author)  jquiring3 years ago
Probably could jquiring, I've done some multi coloured, multi layered stuff, but never bitten the bullet and attempted proper CMYK seps. Ends up taking so long, and the tension ratchets up as each layer goes on, and I'm just waiting for the pen to run out half way through the last layer, or the power to fail or something! One mistake and it's got to be started all over again!