Instructables
Picture of Control a RepStrap with Processing
DSCF3954-2.JPG
IMG_5600.JPG
IMG_5605.JPG
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.
Setup:
Hardware:
1 - RepStrap McWire Carestion Bot
2 - Stepper drivers with firmware from RepRap
3 - PC power supply
4 - Arduino Duemilanove

Software:
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
 
Remove these adsRemove these ads by Signing Up

Step 1: The Setup

Picture of 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.

RepStrap
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 (http://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).

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

http://dev.www.reprap.org/bin/view/Main/PCPowerSupply

"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.

http://www.arduino.cc/
http://processing.org/

marc.cryan (author) 3 years ago

If anybody wants to buy this, let me know.

-Marc

dombeef3 years ago
For how much?
marc.cryan (author)  dombeef3 years ago
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.

You may be better off with something from Makerbot, it debends what you have planned.
OuZo4 years ago
Excellent work and progress!!! I think I read your instuctable a year ago, and you just add your progress to the same instructable?

I just want to clarify something... You have ONE arduino with a ATMega168 controlling 3 steppers and the extruder? 
marc.cryan (author)  OuZo4 years ago
 You have ONE arduino with a ATMega168 controlling 3 steppers and the extruder?

Nope - I tried that, but I ended up using two  Arduinos.  One to control the X,Y,Z steppers and the other to control the 4th stepper on the extruder.

Thanks for your kind comments!

-Marc
OuZo marc.cryan4 years ago
Thanks that helps a lot!
Which firmware did you use? I am using this: 
http://sourceforge.net/projects/reprap/files/Arduino%20Firmware/v1.3

Thanks
marc.cryan (author)  OuZo4 years ago
Which firmware did you use? I am using this: http://sourceforge.net/projects/reprap/files/Arduino%20Firmware/v1.3

Hi OuZo - 

I've been offline for a bit, so I am replying almost 2 months late!

I do believe that is the firmware I used, I found it necessary to disable all the end-stops. 

Also - 
For the extruder I used a stepper motor controlled by it's own Arduino.  The RepRap code was meant for a DC motor controlled by a PWM driver.  I simply wired the PWM output from the Master Arduino an input on the Slave Arduino.  Whenever the slave saw anything on this input it would turn on the stepper motor.  I did not adjust the speed at all, but you certainly could.

If the code would be useful for you, I could dig it up.  It is not on the machine I am currently using.

I hope you are having great success!

-Thanks,
Marc


marc.cryan (author) 4 years ago
There is a book coming out from the creators of Processing -

Getting started with Procssing ~ Casey Reas (Author), Ben Fry (Author)

http://www.amazon.com/Getting-Started-Processing-Casey-Reas/dp/144937980X/ref=sr_1_7?ie=UTF8&s=books&qid=1273194179&sr=8-7


noik4 years ago
 How does a processing code works?
marc.cryan (author) 4 years ago
If you want to write code to make stuff - check out

http://openscad.org/

marc.cryan (author) 4 years ago
PLA filament is available here:

https://ultimachine.com/

conrad24684 years ago
MAKERBOT FTW!
marc.cryan (author)  conrad24684 years ago
Yes - I should have included a makerbot link

http://www.makerbot.com/

-Marc
marc.cryan (author) 4 years ago
need  processing-arduino library for this step to work

http://www.arduino.cc/playground/Interfacing/Processing
Kaiven4 years ago
It draws things! (?) Good job!
marc.cryan (author)  Kaiven4 years ago
Yup!
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!!!.......
davidbuzz4 years ago
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!.   see http://objects.reprap.org/wiki/Getting_Started_with_the_Arduino_GCode_Firmware  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.  
marc.cryan (author)  davidbuzz4 years ago
Good point!   
The RepRap project is inspirational and fantastic.  But I have been having some trouble running their Firmware and Host Software.   I decided that in the short term, I would rather work on some basic functionality then wrangle with the complete RepRap toolchain.

Also  -
Drawing on a piece of paper with a marker doesn't serve much of a purpose.  But it shows that the system is working. 

So what is next?
I haven't decided if I will move forward with the development I've documented in this Instructable, or go back to using existing RepRap code.  I am not an experienced programmer, so I may continue on this path to gain some understanding.

Also -
I think there is a tremendous potential for crossover between the RepRap project and Instructables.  I'm hoping that this will draw more people to the RepRap webpage http://reprap.org/ .  Imagine if there were 50,000 hobbyists working on this?

Thanks again -
Your question made me think!
-Marc
Hi, I'm watching your instructable with much interest. Is very good for learning the principles. Look also here:
Motori the plotter - maybe you will find good ideas there.

Vasi
marc.cryan (author)  funlw654 years ago
Thanks Vasi - I am glad you have found this useful!
-Marc
marc.cryan (author) 4 years ago
A friend of mine is working with the XMEGA.  This would be an awsome micro for projects like this.  His dev board is here: http://cgi.ebay.com/Atmel-AVR-XMEGA-ATXMEGA-Development-Evaluation-Board_W0QQitemZ260488815978QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item3ca657e56a

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 as all of yours. ;-)
marc.cryan (author)  wandererwolf4 years ago
No problem - although it might not help much.

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).   http://www.bostonandroid.com/ 

Also - Congrats on the new baby!!!