Instructables
Picture of Polargraph Drawing Machine

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

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

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

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


 
Remove these adsRemove these ads by Signing Up

Step 1: History

Picture of History

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

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

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

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

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

1-40 of 259Next »
IvanB411 days 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

20140920_141039.jpg20140920_141044.jpg20140920_141103.jpg20140920_141108.jpg
Euphy (author)  IvanB411 days 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

stepsPerRev
stepMultiplier

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 Euphy11 days 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!

20140920_235533.jpg
Euphy (author)  IvanB410 days 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!

sn

IvanB4 Euphy10 days 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...

Ivan

20140921_211128.jpg20140921_211135.jpg
Euphy (author)  IvanB410 days 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!

sn

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)  steezygiraffe17 days 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
[code]
*/
// 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"
[/code]

and the top part in polargraph_server_a1.ino should look like

[code]
// Program features
// ================
//#define PIXEL_DRAWING
#define PENLIFT
#define VECTOR_LINES

// 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.
#define ADAFRUIT_MOTORSHIELD_V2
//#define ADAFRUIT_MOTORSHIELD_V1
[/code]


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)  steezygiraffe15 days 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!

Regards

George

Euphy (author)  george.kallarackal.371 month ago
By coincidence, I just updated this last night!
https://github.com/euphy/polargraph/wiki/Polargraph-Server-for-Adafruit-Motorshield-v2
Sembot made it!1 month ago

Hai,

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

DSC01100.JPG
Euphy (author)  Sembot1 month 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!2 months ago

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

http://www.instructables.com/id/Face-Art/

Thanks for the instructions.

FIBEOHLHXDPF7BV.jpg
Euphy (author)  Martin Balák2 months 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!
chenjian4 months 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)  chenjian4 months 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 Euphy3 months 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,

nam20027 months 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 ,

naman

Euphy (author)  nam20025 months 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.

nam2002 Euphy4 months ago
(removed by author or community request)
nam2002 nam20023 months ago

I got a stepper but it has six wires coming from it ??!

nam2002 nam20023 months ago

I got a stepper but it has six wires coming from it ??!

Dean Wilson5 months ago

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?

Dean

Euphy (author)  Dean Wilson5 months 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

Dean Wilson Euphy5 months ago

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

Last
command:C05,896,544,23,226,END:3190364230

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

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.

Dean

Euphy (author)  Dean Wilson5 months 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).

Dean Wilson Euphy5 months ago

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.

D

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

Euphy (author)  Dean Wilson5 months 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!

Dean Wilson Euphy5 months ago

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!5 months 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

pablo.png
Euphy (author)  smalltortoise5 months ago
Looks great, thank you for your message! Really glad that you had a positive experience during the build - good luck at the festival :)
Seeshi_suin5 months ago

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_suin5 months 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.
sn
Seeshi_suin Euphy5 months ago

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_suin5 months 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.

http://www.polargraph.co.uk/2014/04/polargraph-server-for-adafruit-motorshield-v2/

Euphy (author)  Seeshi_suin5 months 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).

1-40 of 259Next »