This instructable shows how you can use many openly available projects together to build an interesting and complex system. It draws on several community projects including: RepRap, Arduino, Processing, Linux and, of course, Instructables!

More specifically this intructable shows how to draw the path of a bouncing ball with a CNC machine. But this is primarly an example of this open source toolchain.

The first few steps of this intstructable describe the basic setup I am using and includes links to additional information. This is followed by more specific intructions and code to creaste the drawings.

Here is a breif outline of the setup I am using.
1 - RepStrap McWire Carestion Bot
2 - Stepper drivers with firmware from RepRap
3 - PC power supply
4 - Arduino Duemilanove

1 - Arduino IDE on a computer
2 - Processing software on a computer

Here are some good books on Arduino and Processing:

Programming Arduino Getting Started with Sketches

Processing: A Programming Handbook for Visual Designers and Artists

**NOTE** 7/2013 -- 3D printing is now pretty popular -- there is now an amazon 3D printing store here Amazon 3D printing store

Step 1: The Setup

Here is the setup in detail. All the pieces were built following directions from community projects. In this step I've included descriptions and links for all the hardware and software components for this project. If you follow all the instructions on all these links you will have a setup identical to mine. You can use whatever X-Y CNC platform you can get your hands on. I've listed some alternatives in one of the final steps.

From left to right.

This is "McWire Cartesian Bot v1.2" - It is a version of Tom McGuire's CNC machine which has been adapted by The RepRap group for 3D printing. For simplicity, this Instructable is only using the X-Y axis. You should be able to use any X-Y stage that is driven with stepper motors.

If you would like to build this exact machine, detailed instructions can be found here (http://reprap.org/bin/view/Main/McWire_Cartesian_Bot_1_2) I believe these were posted by Zach Smith of the RepRap team.

Tom McGurie's original instructable is here (https://www.instructables.com/id/Easy-to-Build-Desk-Top-3-Axis-CNC-Milling-Machine/)

"Stepper Drivers"
These driver boards are also the work of the RepRap team. They are "Stepper Motor Driver V1.2" Designed by Zach Hoeken. Full instructions can be found at http://reprap.org/bin/view/Main/Stepper_Motor_Driver_1_2. These include ports for optical endstops. This is a very nice feature, but I am not using it here.

They have new version - Stepper Motor Driver v2.3 which is availble here (http://store.makerbot.com/featured-products/stepper-motor-driver-v2-3-kit.html).

SparkFun is stocking a good looking driver as well (http://www.sparkfun.com/commerce/product_info.php?products_id=9402).

The power to the drivers is from a desktop computer power supply. RepRap will also tell you how to do this!


"Arduino with breakout"
This setup is using an Arduino Duemilanove with an Atmega 168 chip. Everything should work with other Arduino's and clones.

This breakout is also from RepRap. It is "Arduino Breakout v1.4" also Designed by Zach Hoeken. And available here. http://store.makerbot.com/electronics/pcbs/arduino-breakout-v1-4-pcb.html

Spark fun is stocking a nice screw sheild as well (http://www.sparkfun.com/commerce/product_info.php?products_id=9282)

"USB cable to PC"
The Arduino is connected to a desktop computer with a USB cable.

"Software on the PC"

I'm running an Ubunto distribution of Linux on my PC, the operating system shouldn't really matter since this project using Arduino and Processing software which is designed to run on most platforms (Linux, Mac, Windows).
If you don't already have them, You will need to load the Arduino and Processing software packages.


<br>If anybody wants to buy this, let me know. <br> <br>-Marc <br> <br>
<p>You're a genius! Very nicely done!</p>
For how much?
I'd have to say $200 for the mechanical structure - Or $600 for the full set- up, there is quite a bit of hardware involved. <br> <br>You may be better off with something from Makerbot, it debends what you have planned.
Excellent work and progress!!! I&nbsp;think I&nbsp;read your instuctable a year ago, and you just add your progress to the same instructable?<br /> <br /> I&nbsp;just want to clarify something... You have ONE arduino with a ATMega168 controlling 3 steppers and the extruder?&nbsp;<br />
<em>&nbsp;You have ONE arduino with a ATMega168 controlling 3 steppers and the extruder?</em><br /> <br /> Nope - I tried that, but I ended up using two &nbsp;Arduinos. &nbsp;One to control the X,Y,Z steppers and the other to control the 4th stepper on the extruder.<br /> <br /> Thanks for your kind comments!<br /> <br /> -Marc<br />
Thanks that helps a lot! <br /> Which firmware did you use?&nbsp;I am using this:&nbsp;<br /> http://sourceforge.net/projects/reprap/files/Arduino%20Firmware/v1.3<br /> <br /> Thanks
<em>Which firmware did you use? I am using this: http://sourceforge.net/projects/reprap/files/Arduino%20Firmware/v1.3</em><br> <br> Hi OuZo -&nbsp;<br> <br> I've been offline for a bit, so I am replying almost 2 months late!<br> <br> I do&nbsp;believe&nbsp;that is the firmware I used, I found it&nbsp;necessary&nbsp;to&nbsp;disable&nbsp;all the&nbsp;end-stops.&nbsp;<br> <br> Also -&nbsp;<br> For the extruder I used a stepper motor controlled by it's own Arduino. &nbsp;The RepRap code was meant for a DC motor controlled by a PWM driver. &nbsp;I simply wired the PWM output from the Master Arduino an input on the Slave Arduino. &nbsp;Whenever the slave saw anything on this input it would turn on the stepper motor. &nbsp;I did not adjust the speed at all, but you certainly could.<br> <br> If the code would be useful for you, I could dig it up. &nbsp;It is not on the machine I am currently using.<br> <br> I hope you are having great success!<br> <br> -Thanks,<br> Marc<br> <br> <br>
There is a book coming out from the creators of Processing - <br /> <br /> Getting started with Procssing<small><big> <span> ~ </span></big></small><span><span class="contributorNameTrigger"><a href="http://www.amazon.com/Casey-Reas/e/B001JRWKOC/ref=ntt_athr_dp_pel_1" rel="nofollow"><small><big>Casey Reas</big></small></a></span><small><span class="contributorNameTrigger" /><big> </big></small> <div class="buying" id="contributorContainer1" style="margin: 0.0pt;padding: 0.0pt;display: none;"> <div style="float: left;"> <div><small><big><b class="h3color">Casey Reas</b> (Author) </big></small></div> <div><small><big><b class="h3color">&rsaquo;</b> </big></small><a href="http://www.amazon.com/Casey-Reas/e/B001JRWKOC/ref=ntt_athr_dp_pel_pop_1" rel="nofollow"><small><big> Visit Amazon's Casey Reas Page</big></small></a></div> <div style="margin: 1.0px 0.0pt 0.0pt 1.0em;"><small><big><span>Find all the books, read about the author, and more.</span></big></small></div> <div class="tiny" style="margin: 10.0px 0.0pt 0.0pt;"><small><big> See </big></small><a href="http://www.amazon.com/s/ref=ntt_athr_dp_sr_pop_1?_encoding=UTF8&amp;sort=relevancerank&amp;search-alias=books&amp;field-author=Casey%20Reas" rel="nofollow"><small><big>search results</big></small></a><small><big> for this author </big></small></div> <div class="tiny" style="margin: 2.0px 0.0pt 0.0pt;"><small><big>Are you an author? </big></small><a href="http://authorcentral.amazon.com/gp/landing/ref=ntt_atc_dp_pel_1" rel="nofollow"><small><big> Learn about Author Central</big></small></a></div> </div> </div> <small><big> (Author), </big></small><a href="http://www.amazon.com/s/ref=ntt_athr_dp_sr_2?_encoding=UTF8&amp;sort=relevancerank&amp;search-alias=books&amp;field-author=Ben%20Fry" rel="nofollow"><small><big>Ben Fry</big></small></a></span><small><big><span> (Author) </span></big></small><br /> <br /> http://www.amazon.com/Getting-Started-Processing-Casey-Reas/dp/144937980X/ref=sr_1_7?ie=UTF8&amp;s=books&amp;qid=1273194179&amp;sr=8-7<br /> <br /> <br />
&nbsp;How does a processing code works?
If you want to write code to make stuff - check out<br /> <br /> <a href="http://openscad.org/" rel="nofollow">http://openscad.org/</a><br /> <br />
PLA filament is available here:<br /> <br /> <a href="https://ultimachine.com/" rel="nofollow">https://ultimachine.com/</a><br /> <br />
MAKERBOT&nbsp;FTW!<br />
Yes - I should have included a makerbot link<br /> <br /> <a href="http://www.makerbot.com/" rel="nofollow">http://www.makerbot.com/</a><br /> <br /> -Marc
need&nbsp; processing-arduino library for this step to work<br /> <br /> <a href="http://www.arduino.cc/playground/Interfacing/Processing" rel="nofollow">http://www.arduino.cc/playground/Interfacing/Processing</a>
It draws things! (?) Good job!
Yup!<br />
congratulations, this is an authentic science homemade lab!, the great innovations starts on sites like yours, go ahead, and we will follow closely your advances, great work!!!.......<br />
I'm not sure why you are going to all the trouble of writing such basic firmware and/or processing code when you can use the tried-and-tested firmware from the reprap project, with full support for G-Codes!.&nbsp;&nbsp; see http://objects.reprap.org/wiki/Getting_Started_with_the_Arduino_GCode_Firmware&nbsp; you can then have your repstrap draw anything that you want with a STL file, or any format that can be converted to GCode instructions.&nbsp;&nbsp; <br />
<em> <div><span style="font-size: 9.0pt;">Good point!&nbsp;&nbsp;&nbsp;</span></div> <div><span style="font-size: 9.0pt;">The RepRap project is inspirational and fantastic.&nbsp; But I have been having some&nbsp;trouble running their Firmware and Host Software.&nbsp; &nbsp;I&nbsp;decided that in the short term, I would&nbsp;rather work&nbsp;on some basic functionality then wrangle with the complete RepRap toolchain.<br /> <br /> Also &nbsp;-</span></div> <div><span style="font-size: 9.0pt;">Drawing on a piece of paper with a marker doesn't serve much of a purpose.&nbsp; But it shows that the system is working.&nbsp; <br /> <br /> So what is next? <br /> I haven't decided if&nbsp;I will move forward with the development I've documented in this Instructable, or go back to using existing RepRap code.&nbsp; I am not an experienced programmer, so I may continue on this path to gain some understanding.<br /> <br /> Also - <br /> I think there is a tremendous potential for crossover between the RepRap project and Instructables.&nbsp; I'm hoping that this will draw more people to the RepRap webpage <a href="http://reprap.org/bin/view/Main/WebHome"><font color="#800080">http://reprap.org/</font></a>&nbsp;.&nbsp; Imagine if there were 50,000 hobbyists working on this?<br /> <br /> Thanks again - <br /> Your question made me&nbsp;think!<br /> -Marc</span></div> </em>
Hi, I'm watching your instructable with much interest. Is very good for learning the principles. Look also here:<br /> <a href="http://www.sensi.org/~svo/motori/" rel="nofollow">Motori the plotter</a> - maybe you will find good ideas there.<br /> <br /> Vasi<br />
Thanks Vasi - I&nbsp;am glad you have found this useful!<br /> -Marc
A friend of mine is working with the XMEGA.&nbsp; This would be an awsome micro for projects like this.&nbsp; His dev board is here: http://cgi.ebay.com/Atmel-AVR-XMEGA-ATXMEGA-Development-Evaluation-Board_W0QQitemZ260488815978QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item3ca657e56a<br /><br />
Thanks for mentioning my humble little board! I'm working on an instructable for it. I'll probably need your help navigating the site and making it as AWESOME&nbsp;as all of yours. ;-)<br />
No problem - although it might not help much.<br /> <br /> Your webpage suggests you are planning to build a girl robot to take to the prom (although I didn't read any of the text).&nbsp; &nbsp;<a href="http://www.bostonandroid.com/">http://www.bostonandroid.com/</a>&nbsp;<br /> <br /> Also - Congrats on the new baby!!!<br /> <br />

About This Instructable




Bio: Married to Domestic_Engineer (but I call her Meghan).
More by marc.cryan:How to by a cell phone for an 11 year old girl Cheapest, Bestest computer around, in beginning of 2015 Cryan Family Gothic Green House 
Add instructable to: