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 ads by
Signing UpStep 1: History
physical. For me, it's all too easy to produce digital things which are interesting - programming or mash-ups or virtual experiments are devalued because they are intangible, you can run a hundred, a thousand, a million variations in a day - it's the proverbial roomful of monkeys with typewriters. The output becomes disposable, it get's hard to see the value, the craft.
So 3D printers and other desktop manufacturing tools and technologies (laser cutters etc) have got more and more popular, it's hard to overestimate how much hunger there is for a tangible, physical, touchable, smellable product of all this clever-clever digital work.
So this isn't wholly original, check out this prior art for more inspiration:
Hektor - the daddy of all hanging drawing machines
Der Kritzler - the smartest one yet
AS220 Drawbot - the basis for mine
SADBot - Instructable for an automatic drawing machine on the same pattern by Dustyn Roberts
Or have a look at what I've been doing with mine
Polargraph website
Polargraph project code and wiki
Flickr stuff



























































Visit Our Store »
Go Pro Today »




Thanks in advance :)
sn
http://www.circuitspecialists.com/nema_16_step_motor_39byg407.html
http://www.circuitspecialists.com/nema_16_step_motor_39byg407.html
http://www.circuitspecialists.com/nema_16_step_motor_39byg302.html
So it doesn't anything under 0.6A will work doesn't mater what type of nema it is eg(34,21,17,16)
http://www.circuitspecialists.com/nema_17_stepper_motor_42byg228.html
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?
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();
transform(tA,tB);
motorA.moveTo(tA);
motorB.moveTo(tB);
while (motorA.distanceToGo() != 0 || motorB.distanceToGo() != 0)
{
impl_runBackgroundProcesses();
if (currentlyRunning)
{
if (usingAcceleration)
{
motorA.run();
motorB.run();
}
else
{
motorA.runSpeedToPosition();
motorB.runSpeedToPosition();
}
}
}
reportPosition();
}
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
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?
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..
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 ?
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).
sn
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 ?
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!
but can d same mechanism work wen yu place the board horizontal ?
n also can yu tell me mre about yur polargraph SD prototype ?
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.
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,
Sweta
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!