loading

Step 11: Controller software - install

The setup is ready to test! The software you use to control it is a little application written in Processing. You can run this from the source code, but it's probably easier to use one of the pre-compiled binaries that I've made. The most recent code bundle has the latest versions for Mac, Windows or linux. Download the file called Polargraph.*.zip (rather than the "source code" files).

(That bundle also includes all the source for the controller, and the firmware, and all the Processing and Arduino libraries you need to run from source.)

Download it, unzip it, and run the executable in the controller folder. It'll open up very small, but maximise the window to see more. It will automatically create a default configuration file in the same folder as it runs in, and you should then click "save properties" in the top-left corner to save the new window size as the default.

Compile from source

If you're curious about Processing, you're right to be: It's ace. There are useful tutorials on processing.org, and of course here on Instructables too. It's basically java, but optimised to run little stand alone programs with graphics. If you're interested in keeping on the leading edge of the controller development, you might like to check out the code directly from the repository and compile it yourself. Another reason: The precompiled binaries that I distribute are a little idiosyncratic, and sometimes refuse to work on some people's machines. If you compile from source, then it'll work at least.

Couple of notes - The controller is getting a bit long-in-the-tooth now, and I haven't updated it to use Processing 3 yet. So in the meantime, it will only compile in Processing 2.x. Additionally, the libraries have also since moved on since it was written, and it'll only work with the versions in the zip file (referred to above). I'm working on an update, but it's not ready yet.

  1. Install Processing 2.2.1 (From https://processing.org/download/?processing)
  2. Run Processing, find where your sketchbook folder is: (File->Preferences, sketchbook location).
  3. Install libaries: Unzip the code bundle, and copy the contents of the processing-source/Processing libraries into sketchbook/libraries.
  4. Install project: In the code bundle, copy the whole processing-source/polargraphcontroller folder into your sketchbook folder.
  5. Restart Processing, and open the controller with File->Sketchbook->polargraphcontroller.
  6. Run: When some files have opened up and you can see some code, hit the play button in the toolbar (or use Ctrl-R) and you should see the controller spring into live.


It'll only be a small window, so go ahead and stretch it so you can see everything. If it worked, then well done. NEXT!

<p>Hello euphy!</p><p>i loved this proyect!</p><p>i have one problem though... in my &quot;powerfull&quot; laptop it works great, everything</p><p>then i try a netbook or basically any other computer and it stays in busy (when trying to upload sizes to the machine) for over one second, even though, if i SET HOME , it doesnt compute, and it doesnt change place, i tried changing the cable, reinstalling arduino, reinstalling java, (i need to try picking another serial library for processing, though my powerfull laptop doesnt have it and still works), i need to check if the arduino co processor requires diferent drivers, great job BTW</p>
<p>Hey Euphy,</p><p>I've build my own polargrpah using Arduino Uno and two steppers( Nema 17) but it seems that something is off. I have checked my measurements and configurations 5 times (step by step with this tutorial) and it all seems correctnut for some reason the machine is still off (doesn't go to where it suppose to, doesn't come back to where it was suppose to and goes off the page).<br>When I upload the machine specs I get this error message:<br>E14:15:00 C25, PGXXABCD,END not recognized.</p><p>this happens every time I try to upload and I couldn't find the reason or meaning of it, could you help me?</p>
The error is nothing to worry about - just an old command that doesn't do anything any more.
<p>The machine is still off. What else can be the problem??</p>
<p>Euphy,</p><p>New Problem. Well two actaully.</p><p>First, when I so a pen tip test it prints out super small not matter how much I change the setting.</p><p>Second, I am assuming also pen size related is that the lines it draws in the on pixel areas are really close together. When is gets to detail areas it just ends up filling in solid because I have not been able to figure out what the right setting are.</p>
Show me a pic of what you mean by super small. Small pixel, or small lines, or small spaces - you need to consider how you might expect me to be able to help based on what you state as the problem.<br><br>&quot;No matter How much you change the setting&quot; - which setting? Does the pixel density (the number of lines) change at all?<br><br>Are you using a very small grid size?<br><br>
<p>Euphy,</p><p>Here it what it looks like when I try to do a pen tip test and my settings. Not sure what I have done wrong.</p>
<p>i have the same problem... if you found the solution can you help?</p>
<p>Did you read my reply below?</p>
<p>yes i made those changes, but it wont work also my machine drawing things horizontally, instead of virtically </p>
<p>https://github.com/euphy/polargraph/wiki/It's-going-the-wrong-way!</p>
<p>yes and this is one sample !</p>
<p>this is the drawing of that picture, it just drawing lines of it</p>
<p>http://www.instructables.com/id/Polargraph-Drawing-Machine/step18/Finish-configuring-your-controller/</p><p>Is the step with the machine settings in it.</p>
<p>thanks Euphy all things working fine... </p>
<p>The messages up the right-hand-side of your screen: they mean something. &quot;You probably won't get any detail ...&quot; means that with your pen size (which is huge, 4.12mm tip), you can't fit any waves into your grid. Your pen tip is potentially larger than your grid size.</p><p><a href="https://github.com/euphy/polargraph/wiki/Empty-pixels" rel="nofollow">https://github.com/euphy/polargraph/wiki/Empty-pix...</a></p><p>I seem to have lost the step that shows the settings though .. that's weird.</p><p>For Adafruit motorshield v1:</p><p>STEPS PER REV is 2x your motor steps per rev. So if you have 200 step motors, then set STEPS PER REV to 400.</p><p>STEP MULTIPLIER is 1.</p><p>Remember to do a &quot;upload machine spec&quot; too.</p><p>It looks like you've got a slightly sloppy gondola too, perhaps the pen is sticking too far out of the holder, so it doesn't cleanly translate the cord movement into pen movement.</p><p>sn</p>
<p>I almost did every thing correct, re-measurement and all but it still drawing lines of any picture, can you share configuration file or .svg file if you have of any picture!</p>
<p>How will an SVG help?</p><p>You've made all the adjustments suggested in </p><p><a href="https://github.com/euphy/polargraph/wiki/Empty-pixels#solution" rel="nofollow">https://github.com/euphy/polargraph/wiki/Empty-pix...</a></p><p>Small pen, large pixels?</p><p>Does drawing vector art work?</p><p>Does &quot;draw box outline&quot; work? </p><p>What error messages are you seeing next to the command queue?</p>
<p>SVG wont help, i need configuration file to configure my machine according to which i m gonna rebuilt it if it doesn't work</p><p>ye i almost made all the adjustments</p><p>no, vector art work do not working</p><p>neither draw box outline working</p><p>E02:14:04 C25,PGXXABCD,END not recorg.</p><p>for vector E02 :13:50 this point falls outside the machine, skipping it</p><p>for box outline E02:17:24 line not on the page skipping it</p>
<p>Ok, &quot;this point falls outside the machine&quot; and &quot;line not on the page skipping it&quot;.</p><p>These both mean either:</p><p>Machine is not set up (do this with &quot;upload machine spec&quot;)</p><p>or</p><p>Home point is not set (do this with &quot;set home&quot;)</p><p>or both.</p><br><p>Every time you change the machine size, or motor settings you must &quot;upload machine spec&quot;.</p><p>Every time you turn the machine on, you must &quot;set home&quot;.</p><p>When you say you &quot;almost made all the adjustments&quot;, which ones did you _not_ make?</p><p>Someone else's configuration file would have their machine size and their motor settings in - how would it be useful to you?</p>
<p>i will design my machine according to those parameters, kinda reverse enginering </p>
<p>Euphy,</p><p>Here it what it looks like when I try to do a pen tip test and my settings. Not sure what I have done wrong.</p>
<p>Nothing wrong as such, but:</p><p>- Grid size is very very small. There is no effective way to express any differences in shade in a pixel that small, because of the thickness of the pen.</p><p>- Gondola is a bit wobbly by the looks of things. Even small details should have sharp corners and regularly curved edges.</p><p>You could try one (or all of):</p><p>- Put your grid size up to 50 and try again. </p><p>- Make sure your pen is not sticking too far out of the gondola, so the tip doesn't trail behind the movement of the gondola. Ideally you want the pen tip barely protruding.</p><p>- Knock your pen acceleration speed down (or up) to try and get some better control in the corners.</p><p>- Add a bit of weight to the gondola to pull the pen more taut</p><p>Pen width test is a great way of testing this though.</p>
<p>Hey Euphy,<br>I've build my own polargrpah using Uno and two steppers but it seems that something is off. I have checked my measurements and configurations 5 times (step by step with this tutorial) and it all seems correct but for some reason the machine is still off (doesn't go to where it suppose to, doesn't come back to where it was suppose to and goes off the page).<br>When I upload the machine specs I get this error message:<br><strong>E14:15:00 C25, PGXXABCD,END not recognized.</strong><br>this happens every time I try to upload and I couldn't find the reason or meaning of it, could you help me?</p>
<p>When trying to test pen widths this is what I got.</p>
<p>Hello, can you help me with this step?</p><ol><li><strong>Install project: </strong>In the code bundle, copy the whole <em><strong>processing-source/polargraphcontroller</strong></em> folder into . </ol><p>Into where? Having problems with the software and I have no idea where you intended to tell us where to put this file.</p>
<p>Aha, I don't know why I'd removed that key part of the sentence, sorry... I've fixed the step.</p><p>The polargraphcontroller folder should be moved into your Processing sketchbook folder.</p>
<p>hey do you think I can built this project using labVIEW and my dec ?? It's really cool </p>
<p>I also plan to use this free standing with a raspberry pi zero and a display, to remove the need for a host PC in outdoor or mobile settings. The controller box is going to be very exciting since I am building it to support up to 4 stepper motors (Connected over a 5-pin MIDI cable, Supports both bipolar and unipolar steppers without wasting pins. MIDI Cables are perfect for this), as well as allow for on-board image processing, and real-time status info on the display.</p>
Controller doesn't really work on raspberry pi, but something lighterweight will run fine. Once the command queue is generated, the load to deliver it is very low.<br><br>https://github.com/euphy/polargraph/wiki/Standalone-command-queue-runner describes a low-cpu method.
<p>Awesome tutorial! I really love the design you used for the gondola, however, I have a question. How do you keep the drawing utensil tightly locked inside the brass tube? I recently started assembling and noticed that there is a bit of movement room even with a full-sized sharpie marker. I thought of possibly using some foam wrap or possibly making the tube longer to add some locking screws in the back. Thanks!</p>
I use this (https://github.com/euphy/polargraph_models/blob/master/Gondola_mod_v4_cutout.STL), which is very like this http://www.thingiverse.com/thing:31973.<br><br>But I used to just use a blob of blu-tack, worked fine!<br><br>sn
<p>In advance thank you very much for your great work ...</p><div><p>I do not know much about programming, but why Processing v.3 gives many errors when running the driver source ?</p></div>
There's lots of changes in Processing 3, so there's lots of work to adapt the code. I haven't done the work.
<p>I'm trying to verify polargraph_server_a1 to push it to my Arduino UNO, but I keep getting this error: polargraph_server_a1:157: error: 'multiplier' was not declared in this scope</p><p>The multiplier function is clearly defined in util.ino, but polargraph_server_a1.ino can't seem to see it. Am I making a basic mistake here?</p>
Nope not a mistake here, but there was a change brought in in the Arduino IDE v1.6.6 and later that broke some things, and this is one of them. There is a fix for it in the main repository (https://github.com/euphy/polargraph_server_a1), but it's not been bundled up for a official release yet. There's no reason not to use it though, if you can get it downloaded.<br><br>Workaround is just to use ARduino v1.6.5 for a bit longer.<br><br>sn
Can I use a Arduino uni R3?
<p>The Polargraph firmware works on an Arduino UNO.</p>
Can you send a circuit diagram of the polargraph
<p>Please don't spam the comments section. I would recommend you start with a more simple project to introduce you to Arduino, I can't help you with such basic questions.</p><p><a href="http://www.instructables.com/id/Arduino-Beginner-and-Basic-Electronics-Kit-Primer/," rel="nofollow">http://www.instructables.com/id/Arduino-Beginner-a...</a> or </p><p><a href="https://learn.adafruit.com/adafruit-motor-shield" rel="nofollow">https://learn.adafruit.com/adafruit-motor-shield</a></p>
Can you send a circuit diagram of the polargraph
How do you convert 220v(power socket) into 12v
How much should the voltage be
How much should the voltage be
Thank you for the answer.How can I connect everything to the power supply. Is the micro controller wireless?
Does the Arduino uno need to be connected to the computer at one end and the motor driver at the other end? Can I use a 9v battery to power everything or can I use my computer
Arduino needs a power supply. It can usually use USB power, but the pen lift servo sometimes causes it to reset.<br><br>The motor shield itself needs a power supply to drive the motors. It needs a proper mains power supply. A battery will not do. <br><br>This instructable contains links to Adafruit's descriptions about the motorshield https://learn.adafruit.com/adafruit-motor-shield/use-it.<br><br>sn
How should I connect the power source to the polargraph
<p>Hi, I am not sure how to upload the files into the arduino. I keep getting multiple errors every time I try to verify the code. I opened the files from the source code and opened them separately into one sketch. How could I fix this?</p>
http://www.instructables.com/id/Polargraph-Drawing-Machine/step8/Electronics-Arduino/ is the step that discusses this part.

About This Instructable

347,242views

954favorites

License:

Bio: Like everyone, I like making things. I'm currently a computer programmer by trade, which I adore, but I like building physical things when I ... More »
More by Euphy:Polargraph Drawing Machine Linear Clock Mechanical expanding cardboard lamp - This way up! 
Add instructable to: