$25 Recycled Polargraph

by ShaynaTheMaker in Circuits > Art

4285 Views, 17 Favorites, 0 Comments

$25 Recycled Polargraph

IMG_4332.JPG
IMG_4565.JPG

For my sophomore year English teacher's Transcendentalism project (c. early 2017) , I decided to take the project prompt of "developing and nurturing one's self" as "learn what an Arduino is to make things that make me happy/are useful". While it may be an ambitious beginner project especially with limited materials, I wanted to improve on previous polargraph designs by making it 1. portable, 2. low-cost with recycled materials, and 3. better documented for beginners. Arduino sample sketches can get boring, but seeing a machine draw things before your eyes sparks curiosity about Arduino's capabilities in everyone I've shown this too. I hope this tutorial is helpful, please leave a comment if anything was unclear!

Acquire Materials

elegoo.jpg
28byj-48.jpg
jumper wires.jpg
breadboard.jpg
cable.jpg
invisthread.jpg
binder clip.jpeg
waterbottle.jpg
long box.jpg

Parts needed:

  • 1x Arduino (or Arduino clone board)
  • 2x 5V Stepper motors.
    • I used 28byj-48 stepper motors that came with a ULN2003 Driver board. Don’t worry if you don’t understand the specifications. Just make sure that it has
      • Stepping angle: 5.625 x 1/64.
      • Reduction ratio: ⅙. This is about the number of steps it takes to make a rotation.
    • I bought 6 sets from a seller on Amazon ($13, so about $4 for two motors) https://www.amazon.com/gp/product/B01EWOE0UU/
  • Jumper wires
    • You’ll need an unspecified amount in various male-female, male-male, female-female configurations. I bought a pack of 40 of each type to use on future projects from Amazon. I only ended up using about 10 of each, but the whole set cost $7. https://www.amazon.com/gp/product/B01EWOE0UU/
  • A solderless breadboard
    • This is basically a board with holes in it that you will only be using to connect the power and ground of the Arduino to two motors. Nothing scary. Any breadboard half or full size. It should be about $2-4 for a full size, and half sizes come in multipacks.
  • A long USB-A compatible cable
    • This is good not only for loading the programming onto your Arduino but also connecting the power supply (wall outlet) along with a USB wall adapter.
  • Some string
    • You can use clear thread like I did for that element of magic seeing the pen suspended in midair, or most types of thin thread/string. Fishing line works well. Just don’t use yarn.
  • Binder clips or something to hold the pen.
    • Not everyone has access to a 3D printer, but if you do there's several designs out there for better, more stable pen holders too.
  • Two empty disposable plastic water bottles
    • These will be cut and used as the spools.
  • Lots of Cardboard, especially long pieces.

Tools: Hot glue gun, tape, scalpel/exacto knife, and scissors.

Be Familiar With Basic Arduino Programming

lasers...more lasers

(If not, go do a few beginner projects with LEDs like here: http://www.ladyada.net/learn/arduino/

I made a laser turret using this tutorial https://www.makeuseof.com/tag/pew-pew-how-to-build-a-laser-turret-with-an-arduino/ to understand motor wiring

At least familiarize yourself with stepper motors by following the tutorial here: https://arduino-info.wikispaces.com/SmallSteppers... )

Creating the Spools

cutofftop.png

Let me be perfectly honest, this solution came to me when all other tutorials suggested sewing bobbins and I just didn’t have any. This is a more inexpensive solution.

Cut at the point indicated in the picture. It doesn't really matter which water bottle brand it it, as you could really use any plastic bottle with a cap, a neck, and a bell shaped top region so the string doesn't slip off.

Using the scalpel, bore a hole approximately 5mm into the center of the water bottle cap. This is so it can fit on the motor shaft. Find the end of your thread, attach a piece of tape to it and stick the tape on the bottle neck to secure your thread, then wind to fill the spool until it is well covered (a few yards). Cut off the thread, place a piece of tape on that end just so you know where the end is. Repeat for a second spool, winding in the opposite direction.

Configuring and Setting the Spools

leftspoolrightspool.png
IMG-1645.JPG

Make sure the strings are wrapped around the spools as shown in the picture. It's the whole over/under toilet paper thing all over again, but it's necessary

Heat up your hot glue gun, then put the motor shaft through the bottle cap hole. Hot glue the end of the motor shaft to the spool so it doesn’t fall off.

Assemble Your Circuit.

polargraph_bb.png

  • First, connect the 5V and GND of the Arduino to the + and - rails of the breadboard, respectively.
  • Plug the stepper motor cables into the white port on each driver.
  • Connections
    • Left Motor
      • IN1 to 4
      • IN2 to 5
      • IN3 to 6
      • IN4 to 7
      • 5V to any spot on the + rail that the Arduino is connected to
      • GND to the spot on the - rail next to the 5V
    • Right Motor
      • IN1 to 8
      • IN2 to 9
      • IN3 to 10
      • IN4 to 11
      • 5V to any spot on the + rail that the Arduino is connected to
      • GND to the spot on the - rail next to the 5V

Mounting Time!

IMG_4239.JPG
IMG_4331.JPG
IMG_1646.jpg

Now find a way to adhere the whole setup to a long strip of material. You could use wood or something, but I used a 32” strip of cardboard. Mark the exact middle.

The Arduino and breadboard are in the middle and the left and right motors are to the extreme right and left, respectively. Stick the drivers on somewhere in between. I had an overhead rack mounted on my wall, which was helpful to hang the whole device strip from. I used pants hangers and gorilla tape for walls with no overhead rack. More possible mounting solutions to try could include suction cups.

To make the motor housing (so it would not slip), I cut six 3-inch squares of cardboard (since my mounting strip was also 3 inches wide) and cut 1.5 inch squares out of the center. Hot glue 3 of these pieces on top of each other, then on to the end of the cardboard where the motor should do. Then you can proceed to wire tie the motor in place. (see third image)

The first image is my early prototype that used temporary duct tape to stick parts on. The second image is when I finalized my layout. I used some 22 gauge floral wire as a wire tie using the holes in the corners of the Arduino board, driver board, and sides of the motor and punched through the cardboard in its position. After being twisted and fastened, I put duct tape over the back to hold the wire ends down.

Making Your Pen Holder (Gondola)

IMG_1647.jpg

There is an assortment of ways to mount your pen onto something to hold to the strings.

I used a binder clip, tied the strings to the “wings” of the clip and held the pen in the clip itself, then experimented with the distance I needed for it to contact the paper. This worked decently even if the pen got knocked off occasionally and was sometimes wobbly. I made a counterweight out of some old dead batteries. There are so many better designs online to be 3D-printed but this was a cheap solution that worked well.

(Note: the picture above is my second iteration. using more battery counterweights. The pen holders in the original pictures was the first iteration, much simpler (binder clip and a battery) and more effective but very finicky and tended to snag. More tweaking to come.)

First Test: Spirograph

Polargraph Spirograph Test

Copy this code (https://pastebin.com/HD3H0Qac) into a blank sketch using the Arduino software. Then save and upload it to your Arduino. Here’s where the long cable comes in handy.

Credit where credit is due, I borrowed the code from here: http://pappmaskin.no/2016/08/pen-plotter-1/ Let this run for about 45-60 minutes, should result in an image like this http://pappmaskin.no/2016/08/pen-plotter-1/ except repeated many times to the point where it looks like a rectangular spirograph.

See video above.

Also my GitHub hosts the code in .txt form if you'd like to copypaste from there. It assumes you already installed the AccelStepper library covered in the stepper motor tutorial I told you to do in Step 3. https://github.com/ahtecka/CardboardPolargraph/bl...

Downloading Polargraph Software

Download the most recent release of the polargraph software from here: https://www.instructables.com/id/Polargraph-Drawi...

I recommend compiling using Processor. It’s a bit more complicated and might be confusing but it works better. This is written at the bottom of this tutorial. Once the code packages are downloaded, in order for the machine to work we must set up the code configuration to be uploaded to the board. In order to do this, download the most recent bundle from the polargraph code repository. Download the file called Polargraph.___.zip. Unzip the bundle. Inside it is a folder called arduino-source which contains the source code for the Arduino part of the project.

Uploading the Code to the Board

  • Copy the contents of arduino-source/libraries into your Arduino/libraries/ folder.
  • Copy arduino-source/polargraph_server_a1 into your Arduino/ folder.
  • Start Arduino IDE.
  • Go to File->Sketchbook->polargraph_server_a1
  • Fourteen files will open up and be displayed as tabs in the IDE. This is the source code of the firmware.
  • Go to the configuration file, select all code, and paste this (https://pastebin.com/LJPVdPS1) over it. These are the proper configuration settings for the ULN2003 drivers.
  • In the polargraph_server_a1 file, uncomment the line for the uno board by deleting the two slashes in front of the line, and uncomment in 3.iv that you are using ULN2003 drivers.
  • Press the "verify" button in the toolbar to try and compile it. If it compiles, press the "upload" button in the toolbar to upload it, and the code will upload to the connected Arduino, allowing for the framework for the machine to run and interpret instructions from the software. It won’t actually do anything yet.

Configuring the Software

With the program compiled from processing, adjust the settings in the setup tab.

Follow the measurement guidelines here https://www.instructables.com/id/Polargraph-Drawin... for adjusting the size of the canvas and workspace.

The mm per rev is 80, with 4076 steps per rev, and a step multiplier of 1. All the other settings depend on the size of your machine and the size of your pen, so it’s best to play around with the settings until it works.

Don’t forget to save frequently and restart the controller once the configurations are done. Also upload the specs to the machine by using the button there. It’s supplementary code so that the Arduino understands how large the canvas is.

Starting to Draw!

mona lisa.jpg

Move your pen to the home point as corresponding on the controller. Set the home.

Load an image and work with it, as with the settings defined here, https://www.instructables.com/id/Polargraph-Drawin...

Sit back and let the machine run (likely for several hours depending on the complexity of the drawing.

Credits

https://www.instructables.com/id/Polargraph-Drawing...

The Original Polargraph by Sandy Noble (Euphy) The greatest and most logged one by far

http://pappmaskin.no/2016/08/pen-plotter-1/ This Norwegian? guy proved that you can use this kind of stepper motor and not a NEMA17. His tutorial just isn’t incredibly in depth.

Also, owing to my own frustrations and troubleshooting:

Huge thanks to the Polargraph forum for being helpful. http://www.polargraph.co.uk/forum/

If one of your motors is going backwards to the direction that you think it should be, check your wiring. Figuring out that two jumper cables were backwards saved me a rage quit.

Future studies?

I guess I want to try experimenting with Inkscape and vector line drawing, when I have the time to. Also fixing the gondola to a more stable design would help. Making this project actually helped me understand the principles behind 3D printers (stepper motors, precise motions, depositing ink like filament, etc) and I eventually managed to build and tinker with my own Anet A8. So 3D printing new parts is in question, but I like how this low-cost project produced something viable and portable.

You can see me here in this video bringing in this project to my school's MakerSpace.

My project appears at 3:12, and I am the student the lovely Mrs. MacConnell is speaking of :)