3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Polargraph Drawing Machine

Step 8Electronics - Arduino

Electronics - Arduino
You need an ATMEGA328-based arduino compatible board, I used a Seeeduino v2.21 here - it does the job very nicely.

Upload the source code to the arduino.  Look at this fine guide courtesy of Adafruit for help.

The code now requires version 1.0 of the Arduino software. If you already use another version of Arduino, go get the new one but install it alongside your existing installation in a separate folder.  They are happy to live together.  But Arduino 1.0 breaks all your old libraries, so if you want things still to work, keep your old Arduino too.

Because it changes regularly, I have not attached a copy of the code itself to this step, but the very most recent version can be downloaded from the polargraph code repository.

You should save the code file into a new folder inside your arduino sketch folder.  Give the new folder the same name as the source code file.  So if the file is called polargraph_server_a1.ino, you should create a new folder called polargraph_server_a1 and save the file into it.

It also uses Adafruit's AFMotor library and Mike McCauley's Accelstepper libraries.

The AFMotor library files should be put into a folder called AFMotor inside your Arduino/libraries/ folder.

The Accelstepper library files should be put into a folder called AccelStepper inside your Arduino/libraries/ folder.

Once they are moved, your arduino installation directory should look something like the second image on this page.

Once you do that, you should confirm that it is working properly - use the serial monitor on the board, set to 57600 baud to make sure that it is issuing "READY" every couple of seconds (see the third image).
« Previous StepDownload PDFView All StepsNext Step »
6 comments
Jan 18, 2012. 1:45 PMSnyperBob says:
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!
Nov 16, 2011. 10:22 PMPaulMakesThings says:
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.
Nov 17, 2011. 9:36 AMPaulMakesThings says:
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.
Nov 17, 2011. 1:15 PMPaulMakesThings says:
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:
http://www.ladyada.net/images/mshield/mshieldv1-schem.png
Nov 18, 2011. 11:06 PMPaulMakesThings says:
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.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
64
Followers
3
Author:Euphy
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 can. I like pottery and lino cutting and photography, and...
more »