Anda di halaman 1dari 10

Home Sign Up!

Browse Community Submit


All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Photo Ride Science Tech
How to wire an arduino-based 3-axis CNC machine
by aggrav8d on June 15, 2010
Table of Contents

License: Attribution Non-commercial Share Alike (by-nc-sa) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Intro: How to wire an arduino-based 3-axis CNC machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

step 1: parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

step 2: Wire the stepper motor to the EasyDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 3: Soldering and wiring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 4: Sample arduino code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

step 5: In conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

http://www.instructables.com/id/How-to-wire-an-arduino-based-3-axis-CNC-machine/
License: Attribution Non-commercial Share Alike (by-nc-sa)

Intro: How to wire an arduino-based 3-axis CNC machine

I've seen a number of tutorials about how to build the platform for a 3-axis CNC milling machine. I have not seen anyone tackle the tricky subject of the electronics.

Here now is my attempt to do so.

step 1: parts
You'll need:

- an arduino (I chose duemilanova) (depends on the board you get)


- 3 stepper motors (I chose NEMA 17s , though mine didn't come with molex on the end) ($15/ea)
- 3 EasyDrivers from Sparkfun . ($15/ea)
- some Cat5 ($2?)
- a 5V power supply for the steppers ($5?)
- a soldering iron
- some electrical tape
- an optional female plug is not would be a bad idea (<$1)
TIP: Don't get a 6ft or 10ft Cat5 cable. Those wires are made of hundreds of little fibers and they're a huge pain to work with. Buy your cat5 by the foot from any
computer or electronics store. That stuff has one wire inside

http://www.instructables.com/id/How-to-wire-an-arduino-based-3-axis-CNC-machine/
step 2: Wire the stepper motor to the EasyDriver
Now we'll wire up each of the EasyDrivers.

Remove some of the interior wire from the Cat5 and strip the ends. For each servo you will need two normal pairs of white/colored and one oddball of a white and two
colored. In all, you'll have to strip 14 ends.

PCB soldering is easy, once you get used to it. There are many other tutorials that cover the subjct. Follow the image as indicated. Your color combinations for the
servo may be different. I had to google for a long time to find this page with the color codes for my model.

TIP: "Do NOT connect or disconnect a motor while the driver is energized. This will cause permanent damage." -- Sparkfun

Next we'll wire the power sources and the arduino.

Image Notes
1. NEMA-17 order is red, green, blue, yellow. I was not easy to google that info!
2. These power the servos. That's separate from the power for the board logic.
3. These connect to the arduino. The arduino tells the board which way to go and how far.
4. These power the board logic. That's separate from the servo power.

step 3: Soldering and wiring.


I've done this all in one step, but feel free to wire each EasyDriver one at a time, check that it works, and then unplug it from the power and do the next one.

All 9 GND wires from the EasyDrivers are soldered to a single line, which goes to GND on the arduino.

All 3 +5V from the EasyDrivers are soldered to a single line, which goes to +5V on the arduino.

All the positive leads from the stepper power are soldered to a single line, which is then soldered to the female plug.

All the negative leads from the stepper power are soldered to a single line, which is then soldered to the female plug.
TIP: Remember to put the plug cover on the wire BEFORE you solder everything together. Then slide the cover down and over the soldering.

TIP: Don't forget to have everything disconnected while you solder!

Double check you didn't wire the board power to the stepper power. That would be bad.

Now the wiring is done, time to test it with some code.

http://www.instructables.com/id/How-to-wire-an-arduino-based-3-axis-CNC-machine/
Image Notes
1. This stepper is controlled on pins 4 and 5.
2. This stepper is controlled on pins 6 and 7.
3. This stepper is controlled on pins 8 and 9.
4. All the positive leads from the stepper power are soldered to a single line, which is then soldered to the female plug. Repeat for all negative leads from the stepper
power.
5. Remember to put the cover on the wire BEFORE you solder everything together. Then slide the cover down and over the soldering.
6. All 6 GND wires from the EasyDrivers are soldered to a single line, which goes to GND on the arduino. The three from the stepper power go to the plug.
7. Arduino Duemilanova Atmega328 with an ethernet shield on top. You don't need an ethernet shield. I'm just telling you so you don't wonder why the picture looks
different from your Duemilanova.
8. 9DOF IMU. Not part of this CNC project. Inb4 "what's that?!"

step 4: Sample arduino code


// for duemilanove atmega328 arduino board + easydriver stepper controller
// dan@marginallyclever.com 2010-06-15
#define SENSOR_X_PIN 1
#define SENSOR_Y_PIN 2
#define SENSOR_Z_PIN 3
#define DIR1_PIN 4
#define STEP1_PIN 5
#define DIR2_PIN 6
#define STEP2_PIN 7
#define DIR3_PIN 8
#define STEP3_PIN 9
#define DELAY 150

void setup() {
Serial.begin(9600);
pinMode(SENSOR_X_PIN,INPUT);
pinMode(SENSOR_Y_PIN,INPUT);
pinMode(SENSOR_Z_PIN,INPUT);

pinMode(DIR1_PIN,OUTPUT);
pinMode(STEP1_PIN,OUTPUT);
pinMode(DIR2_PIN,OUTPUT);
pinMode(STEP2_PIN,OUTPUT);
pinMode(DIR3_PIN,OUTPUT);
pinMode(STEP3_PIN,OUTPUT);
}

void loop() {
int i;

digitalWrite(DIR1_PIN, LOW); // Set the direction.


digitalWrite(DIR2_PIN, LOW); // Set the direction.
digitalWrite(DIR3_PIN, LOW); // Set the direction.
delay(DELAY);
Serial.println(">>");

for (i = 0; i<6800; i++) // Iterate for 4000 microsteps.


{
digitalWrite(STEP1_PIN, LOW); // This LOW to HIGH change is what creates the
digitalWrite(STEP1_PIN, HIGH); // "Rising Edge" so the easydriver knows to when to step.
if((i%2)==0) {
digitalWrite(STEP2_PIN, LOW); // This LOW to HIGH change is what creates the
digitalWrite(STEP2_PIN, HIGH); // "Rising Edge" so the easydriver knows to when to step.
}

http://www.instructables.com/id/How-to-wire-an-arduino-based-3-axis-CNC-machine/
if((i%4)==0) {
digitalWrite(STEP3_PIN, LOW); // This LOW to HIGH change is what creates the
digitalWrite(STEP3_PIN, HIGH); // "Rising Edge" so the easydriver knows to when to step.
}
delayMicroseconds(DELAY); // This delay time is close to top speed for this
} // particular motor. Any faster the motor stalls.

digitalWrite(DIR1_PIN, HIGH); // Change direction.


digitalWrite(DIR2_PIN, HIGH); // Change direction.
digitalWrite(DIR3_PIN, HIGH); // Change direction.
delay(DELAY);
Serial.println("<<");

for (i = 0; i<6800; i++) // Iterate for 4000 microsteps


{
digitalWrite(STEP1_PIN, LOW); // This LOW to HIGH change is what creates the
digitalWrite(STEP1_PIN, HIGH); // "Rising Edge" so the easydriver knows to when to step.
if((i%2)==0) {
digitalWrite(STEP2_PIN, LOW); // This LOW to HIGH change is what creates the
digitalWrite(STEP2_PIN, HIGH); // "Rising Edge" so the easydriver knows to when to step.
}
if((i%4)==0) {
digitalWrite(STEP3_PIN, LOW); // This LOW to HIGH change is what creates the
digitalWrite(STEP3_PIN, HIGH); // "Rising Edge" so the easydriver knows to when to step.
}
delayMicroseconds(DELAY); // This delay time is close to top speed for this
} // particular motor. Any faster the motor stalls.
}

step 5: In conclusion
If everything worked right, you should have three steppers each moving at different speeds back and forth. There should be a light on each EasyDriver showing that it
has power. If you have a light and no movement, You might not have a good connection to your arduino.

So what next?
Now that you have three motors working through the arduino you can use the serial interface to tell the arduino what you want the steppers to do. By changing the
different motors in the right pattern you can interpret G-CODE and start cutting patterns. The biggest choice you face is what to cut!

Thanks for reading!


Dan

http://www.instructables.com/id/How-to-wire-an-arduino-based-3-axis-CNC-machine/
Image Notes
1. Congratulations! You earned it.

Related Instructables

Hobby cnc by Easy to Build Make your own


mraspotcnc Desk Top 3 Axis cnc controller
Build a CNC Mostly self- CNC Milling by charcoal999 How to make a
Router from reproducing 3- Machine by Tom mini milling
Scratch (Part 2): axis CNC McWire machine-
Complete Video milling manual or CNC!
Tutorial by machine(SHELVED by Honus
phooddaniel PROJECT) by
ebidk

Advertisements
Comments
48 comments Add Comment

burwuro says: Oct 12, 2010. 8:46 PM REPLY


First of all, great Instructable! Though i was wondering how hard it would be to add a 4th controler, and would theese stepper motors work instead of the
ones you have shown? http://www.alltronics.com/cgi-bin/item/94M005/55/Airpax-82227-B82359 Thanks!

G00 says: Aug 14, 2010. 4:28 PM REPLY


Thanks for the tutorial aggrav8d. I am proactive with CNC but not too much with Arduino. Your tutorial is pointing me to the right direction for one of my
projects. I really want to get rid of CNC software and make an stand alone application for a very specific project that shouldn't need G-Code at all. Although I
want to see the way the rep-rap application interpreter works, good tip }{itch. I think that there is a critical mass on hobby CNC and Arduino, so the mix is
going to be interesting. My Open Source project by the way, is an Arduino controlled CNC Coil Winder. If someone is interested or had been working on that
let me know. Cheers!~

aggrav8d says: Aug 25, 2010. 5:58 PM REPLY


If you can make a robot that can create motors, steppers, or servos, then you have my undivided attention :)

http://www.instructables.com/id/How-to-wire-an-arduino-based-3-axis-CNC-machine/
Robot Lover says: Aug 11, 2010. 7:29 PM REPLY
My dad is going to make this and I was just wondering if the ethernet shield is needed for this project?

aggrav8d says: Aug 12, 2010. 7:17 AM REPLY


Oh, I meant to ask: What material will he use for the frame? Plastic or metal would be better than wood.

Robot Lover says: Aug 12, 2010. 9:02 AM REPLY


He has not built it yet but I'm thinking that he will probably use a combination of both. Thanks for your help. I would give you a patch but i'm fresh out!
Thanks again 5*

aggrav8d says: Aug 11, 2010. 11:24 PM REPLY


Nope! I only got it because I was trying something with WIFI and it happened to be in the photo. I was trying to avoid those "what is THAT?!" questions. I
bet you *could* use it instead of serial USB to send gcode instructions. It will probably make things more complicated.

diluded000 says: Aug 9, 2010. 10:13 PM REPLY


I built a system that runs G-code output from variety of applications, using the parallel port on a old Pentium 100, input to a CNC controller board, that runs
some 90 oz/in Nema 23 steppers on my Sherline milling machine. Originally I hand built an L297/298 based circuit, but it wasn't stable enough to run for
hours on end. I designed an Arduino based control of temp on an annealing oven, but the DOS based TurboCNC does the trick for me on the milling
machine. My controller was $85 from www.lightobject.com. Y'all should check out the forums on CNCzone, I think it is the best resource out there for CNC.
They have a long list of G-code generating and interpreting utilities from various sources (many free). While there are lots of machine specific tweaks, G-
code is common denominator among most CAD/CAM setups. And this system would look lots better with some corrugated wire covers that they sell at the
auto parts store. Get some cable ties the same color as the Flexon, it looks much more badass.

rwehner11190 says: Aug 1, 2010. 6:37 AM REPLY


Rather than using a female plug, I cut and stripped the wire from the 5V supply. There are two wires, red and blue, inside. I'm not sure which of the two is
live, but I can check with a multimeter. Do you know which of the two wires hooks up to the positive or negative leads from the stepper power leads? Does it
even matter? Also, the signal leads from one of the easy drivers attach to pins 8 and 9. There are 'step' and 'dir' outputs on the easy driver, but which of
these outputs connect to pins 8 and 9 respectively? Thanks for your help!

aggrav8d says: Aug 1, 2010. 8:34 AM REPLY


I prefer to not cut up a perfectly good power supply because I might want to reuse it on another project later. YMMV. Look at the outside of the wiring -
one side should have markings of some kind to indicate it is the positive lead - white stripes, perhaps. If you aren't sure which is positive, use a meter to
check. It's cheaper than destroying your hardware. :)

The first few lines of Arduino code say

#define DIR3_PIN 8
#define STEP3_PIN 9

You can alter these values as needed.

alvairone200 says: Jul 29, 2010. 5:21 PM REPLY


help lol I been reading you comments and be for that I thought of trying to find a kit to build a 4 x 4 cnc plasma machine but I think I would need a lot of help.I
have time and a little bit of money any suggestion as to the best kit to buy or could someone help me with a kit

cliffyd says: Jun 29, 2010. 12:48 PM REPLY


Nice work but I take it we can't use a program like mach 3 for instance to run the steppers as a cnc mill? You're saying we have to write seperate codes for
everything we wanna cut. I like the idea of using the arduino I'm just not the greatest "code jockey" so it would be a huge pain in the @#* to re-write a code
for any project! Good work though!

dylanwinn says: Jul 20, 2010. 6:05 PM REPLY


You don't have to use an Arduino. You can wire 3 of the EasyDrivers up to a parallel port and use Mach3 or no problem.

aggrav8d says: Jun 29, 2010. 1:16 PM REPLY


Some people have written instructables about how to build a CNC. This instructable shows you how to wire up a (crude) CNC. From there you still need
to create an interface between the arduino that drives the steppers and the software on your computer that generates the paths (aka g-code). You might
want to look at GRBL (http://github.com/simen/grbl) which claims to be the missing link. I have yet to try it myself.

dylanwinn says: Jul 21, 2010. 12:20 AM REPLY


I do not currently have a functional CNC mill, but I have installed GRBL on my Arduino and tested it as best as I could. It is by far the best Arduino
Gcode interpreter I have found, though it does not support extruders for 3D printing. Just remember to change the AVRdude command line to 57600
baud when you flash the .HEX, and set your serial terminal (I recommend Termite) to 115200 baud.

http://www.instructables.com/id/How-to-wire-an-arduino-based-3-axis-CNC-machine/
maxpower49 says: Jun 15, 2010. 6:30 PM REPLY
do you have to figure this out every time you want to cut something or is there a program that will do this for you

aggrav8d says: Jun 15, 2010. 10:02 PM REPLY


There are a few open source programs now that will convert a DXF file to G-CODE. Unfortunately the standard for G-CODE is effectively junk. From
what I read, nobody sticks to it. What needs to happen is someone needs to write a standard interface between mill software and mill hardware - just like
drivers for any other peripheral on your computer. Hmm... Anyone want to pay me to do this? I could dedicate a few months to the problem and bang out
a pretty good solution.

alfredhenriksen says: Jun 19, 2010. 5:54 AM REPLY


What is wrong with G-Code? Or are you talking about M-Code who are different from each machine. The G-Code is already a standard, see "RS-
274D is the recommended standard for numerically controlled machines developed by the Electronic Industry Association in the early 1960's. The
RS-274D revision was approved in February, 1980. These standards provide a basis for the writing of numeric control programs. " Please elobrate
that how you mean that the standard is junk as it have be around for a long time and have gone many interations. Sure, there is limits but all
programming languange have limits! :) http://www.linuxcnc.org/handbook/gcode/g-code.html http://en.wikipedia.org/wiki/G-code In my world it's a
wording I follow: "shut up and hack" Why are you asking for money, are you motivated by money or by programming something new and beautiful? :)
Either way, I love this tutorial. Thank you! Finally I got a way to do simple operations on my cnc machine without EMC.

aggrav8d says: Jun 19, 2010. 7:30 AM REPLY


I think you are confused on a number of issues.

"Due to the lack of further development, the immense variety of machine tool configurations, and little demand for interoperability, few machine
tool controllers (CNCs) adhere to this standard. Extensions and variations have been added independently by manufacturers, and operators of a
specific controller must be aware of differences of each manufacturers' product." -- the wikipedia entry for g-code

Maybe you have the freedom to spend all day writing code and not worrying about paying your bills. Are you rich? Do you still live in your parent's
basement? Either way, I don't live in your world. Please post some instructables of your own before you tell me to shut up.

alfredhenriksen says: Jun 20, 2010. 4:26 AM REPLY


Please be more concrete than a quote from wikipedia. Which specific extensions and variations don't work? ................."EXTENSIONS AND
VARIATONS" is not even talking about the essensial G-Code, as the machine would not comply the RS-274D standard, and who will buy it?
.....I suspect that these manufactures make the new G-Godes to partly lock their customs to their product, to custom fit their product
(=faster?), getting a competion edge and they've documented the proprietary g-code so it's nothing more than looking in the manual, and
thinking about them when porting to other machines, or make a new G-Code from a CAD/CAM-program. A problem can always be solved! :)
Most of these codes disappered when a company disappered. It's really not a problem as long one KNOW S the limits of the
software/hardware and take care to avoid these bad apples. :) It could be a problem several years ago, but it's a classic evolution of
something old and beautiful. .............................................................................................................. How was Linux created? How was
Microsoft created? How was Apple created? They wrote/bought/made code before they could earn money. It's called dedication and risk-
taking in a business world. They all took a chance, hoping making money. (Linux was created by a strong personal NEED) I have been
around people like you and I don't need to prove anything for you. Have a nice day.

aggrav8d says: Jun 20, 2010. 10:41 AM REPLY


If you don't need to prove anything then why did you start this debate? Isn't your point to prove that G-CODE is OK? I don't believe that G-
CODE is really all that great as a standard. Think about it: you have to convert a DXF file to g-code before it will run on a machine once
for each type of machine. That doesn't sound like a proper standard to me. "But!" you say "No two machines have the same envelope,
tools, or extra features!" So? No two computer monitors have the same resolution but they still make it work. What I should have is a
standard driver API that lets me query device properties, tool types, and send it comletely standard instructions while receiving real-time
feedback. That way the job of calculating the best path for the tools is abstracted in software that could be written by anyone with access
to the API, which would lead to more developers being able to invest better at improving the software. That's economical and benefits
everyone. No secret knowledge of bad apples required. No writing custom control software for every hardware platform. You analogy is
junk. I would create the code but I don't have the time UNLESS someone can free me from my obligations to rent and bills. Apple has the
time to write - they had capital at the start to make an investment. Linux has time to write - they're all volunteers who work other jobs. I am
not in either of these situations. Also, it's called "Return On Investment". What, exactly, are "people like [me]"? People who make you
explain yourself? People who don't agree with you? People who punctuate and capitalize appropriately?

ziggalo says: Jul 20, 2010. 1:10 AM REPLY


actually any kind of interface that will convert g-code to arduino-friendly code that'll work with this machine.

ziggalo says: Jul 20, 2010. 12:56 AM REPLY


I have a question. Would you be capable of making this machine work with say, Mach 3? If you are able to create some software that
would make this possible, How much money are we looking at? I really love this arduino driven CNC, and it would be even more
perfect if it was able to work with existing post-processors/g-code generators.

aggrav8d says: Jul 20, 2010. 12:44 PM REPLY


GRBL probably bridges the gap for you. If not, I'd be willing to take a look and give you an estimate. I'm still working on perfecting
my CNC, at which time I will need to tackle this step (and having a little financing would make it a lot easier)

http://www.instructables.com/id/How-to-wire-an-arduino-based-3-axis-CNC-machine/
cmchapman says: Jun 16, 2010. 5:08 AM REPLY
I'd give you some money over on kickstarter.com if you really want to write an open standard interface for milling hardware and software. I'm sure
other people would too!

aggrav8d says: Jul 14, 2010. 5:32 PM REPLY


and I'd love to take your money to do that! Unfortunately kickstarter doesn't seem to support canadian projects yet because their payment
processor is wonky.

aggrav8d says: Jun 15, 2010. 10:04 PM REPLY


Since no standard currently exists, you'll need to write your own translator between the g-code they offer and the limits of your system. You'll still
need software to drive the CNC, too.

}{itch says: Jun 16, 2010. 5:10 AM REPLY


The folks at rep-rap have written an arduino based G-Code interpreter. You can just send the g-code commands via serial and the arduino will
calculate the required stepper motor movements. I haven't used it myself yet but have had a look at it for a CNC machine i have in the works.
Here's the link .

dylanwinn says: Jul 20, 2010. 5:59 PM REPLY


FYI: I have had NO luck getting that to compile, but I'll continue working on it and post here with any progress.

rwehner11190 says: Jul 9, 2010. 10:48 AM REPLY


Is it possible to control 4 stepper motors with a single arduino duemilanove? i.e. are there enough I/O ports on the chip? I assume that I would just need to
buy a fourth motor controller?

aggrav8d says: Jul 9, 2010. 1:53 PM REPLY


Good question! You need two digital pins for each stepper - one for direction, one for step timing. since the Due has 13 pins you should be able to run up
to 6 servos. I recommend using the extra pins to add trigger switches so that the machine can automatically recalibrate itself in the event of a power
failure. You need only one switch at the near end of each axis, for a total of 3. 4 servos * 2 pins + 3 pins = 11 pins, so everything works. You'll even have
a few pins left over in case you need to add extra sensors.

aggrav8d says: Jul 2, 2010. 8:39 PM REPLY


Very informative! Thank you.

MaddMann says: Jul 2, 2010. 6:52 PM REPLY


This site is all about sharing knowlwdge and I intend to use your knowledge to build my CNC so I thought I would repay your knowledge with some of mine
as a guy that's been in the wire and cable manufacturing industry for , well, let's just leave it at a long while ;-) The 6ft or 10ft cat5 cable with "hundreds of
little fibers" are actually Patch Cords (these are the ones that go from your PC to the wall jack). Each of the 8 insulated singles is made of stranded copper
conductor; typically 7 strands) as opposed to "regular" Riser and Plenum Cat5, Cat5e, Cat6, & Cat7 (these are the ones in your walls and ceilings) where
each of the 8 insulated singles is made of a single solid copper conductor in sizes Cat5 & 5e 24 AWG, Cat6 23AWG, & Cat7 22 AWG. Cat5. 5e, & 6 are
widely available by the foot at your local Lowes or Home Depot - just make sure the print on the cable doesn't say "Patchcord"

cdxanti says: Jul 1, 2010. 4:51 PM REPLY


Correct me if I'm wrong but I can run my 3v 4amp stepper motor using this board without blowing the arduino or the chip?

aggrav8d says: Jul 2, 2010. 9:19 AM REPLY


The power to run the stepper is separate from the power to run the chip & the arduino. The stepper power runs THROUGH the chip because the chip
controls the pulses. I do not know how high your amperage can go before you burn out the chip. I've seen people attach cooling systems to their chips. I
know that at 12v/2a the chip is hot to the touch. Ask on the Sparkfun product page for more information, or try their forums. Post back here when you find
out - I'd like to know what the upper limit is.

tech_monkee says: Jun 21, 2010. 4:30 AM REPLY


i have a few motors that where stripped from old printers and such. the motors where obtained $0.00 :) so no complaints. my only problem is that each motor
has like 6 wires. are all six wires needed or is there a combination i can look for that will just trigger a step of movement? i don't have a camera currently to
take a pic but i will post one up later if needed. this driver configuration looks to the most simple i've come across so far, as soon as i can figure out the
wiring on my motor i will definately be building this.

AndyHope says: Jun 25, 2010. 10:34 PM REPLY


You can place an ohm meter across the windings, if you have six wires that means you have two windings and a power for each. by measuring the
resistance of the coils you can find out which wires are which I.E. (made up values but the theory is the same) you measure from wire 1 and wire 2 and
get 27 ohms from 2 to 3 and get 27 ohms then from 1 to 3 and get 54 ohms you now know that wire 2 is power. also that 1 and 3 are the opposite sides
of you coil.

http://www.instructables.com/id/How-to-wire-an-arduino-based-3-axis-CNC-machine/
aggrav8d says: Jun 21, 2010. 9:44 AM REPLY
http://www.schmalzhaus.com/EasyDriver/ look about halfway down, there's instructions on how to connect a 6-wire. http://reprap.org/wiki/StepperMotor
Might give you some hints about what colors go where. Good luck!

sammyBoy says: Jun 16, 2010. 7:53 AM REPLY


Nice instructable.

GRBL is an almost complete implementation of the G-Code (only 3 axis) standards specifically written in C for the *duino atmega platforms.

mycroftxxx says: Jun 20, 2010. 4:31 PM REPLY


Augh, you beat me to it!

aggrav8d says: Jun 20, 2010. 6:26 PM REPLY


Thanks for the tip!

tatagatha says: Jun 17, 2010. 9:43 AM REPLY


I've got a pet project of yet another plotter...inspired by Motöri The Plotter... dubbed "Inky". I looked at the arduino G-Code interpretter from the first versions
of the reprap project. I decided against doing the conversion inside the arduino and instead to have a computer handle the real conversion work. The 3g
version of the rep rap software sends commands (usually via replicator-g) that get stacked up in the arduino. These commands are interpretted versions of
the g-code(things like, move x 10 steps). What is nice about this, is that you can theoretically interpret other things like HPGL. I'm currently working on a
driver for replicator-g and a stripped version of the RepRap 3g firmware that will allow you to use the adafruit motorshield. While I'm only implementing this
for a plotter, and so I only need 2 steppers (which is all the motorshield can provide) you could do a similar things and forgo the motorshield in favor of
interacting with the easydriver. Just some food for thought.

aggrav8d says: Jun 17, 2010. 10:06 AM REPLY


How do you make a plotter with only two steppers? Don't you need to lift the pen?

tatagatha says: Jun 17, 2010. 11:07 AM REPLY


Yeah, the motorshield still can control a servo while controlling the two steppers. the pen only needs up or down, so I don't have to worry about the
distance. If I was getting fancy, and I eventually would like to get fancy, I'd have some height aspect to the pen, so I could control thickness when
using a marker or brush. For now though, up and down is enough.

aggrav8d says: Jun 17, 2010. 12:22 PM REPLY


Unless you're slamming the stepper from full off to full on, there's no reason you can't have fine grain control.

Alternately, you could add a set of pens with different nib sizes and build an automatic tool changer. Maybe a second servo to hold the pen in a
clamp grip, and some code to know how to go to the tool holder, drop off the old pen, pick up the new pen, and keep going.

Bonus: if you get this working then you'll get multicolor drawing, free.

tatagatha says: Jun 17, 2010. 1:27 PM REPLY


Do you mean slamming the servo? I could have some fine grain control on the servo, but a little less precise. However, for iteration 1. I'm
aiming for draw and not draw. I'm trying to string together as much existing projects as I can, so it can be a starter project for someone else. It
is as much an exercise of learning the stack below as it is to make a plotter: G-Code interpreter : replicator-g Handling commands : rep-rap 3g
firmware to interact, using their protocol Controlling the steppers : Adafruit's motorshield, which comes with a nice stepper library, but only
controls a 2 steppers at a time. Another goal is to make this with only two old epson printers. My general plan has a gantry for the x axis, but
only pulled on one side. I don't want to put to much weight on it so it can move the pen fast and not lag on the off side. I thought about doing
the suggestion in the motori write up, which is to do the etch-a-sketch set up to pull both sides with a single motor. However, one feature I
want is an open bottom, so this can write onto any surface directly. I've thought about the multi-pen approach, but I'll probably go lo-tech and
just draw one color at a time. I've got a registration system set up to use the rep-rap's edge detection code. This way, I can always zero my
printer and draw again. Its all just a bunch of steppers and rods in a box right now. And a semi working firmware for the rep rap. I still have to
make the actual build, and then the driver.

dwmcdougall says: Jun 16, 2010. 6:59 AM REPLY


Most CNC machines use a computers parallel port for out put as opposed to serial. There have been some solutions out there that use USB, but they are
few and far between. I have two machines in my garage and am currently building a third dedicated only to PCB making. As for software to run your Gcode,
try Mach 3 (windows) or EMC2 (linux). Both are relativly easy to use and have a great user base, and lots of support can be foun for HW and SW over at
CNCzone.com. Great project BTW, my third (smallest) CNC is currently running the steppers with the older version of the Easydriver circuit and they work
pretty good. Nice writeup, hope to see more as your machine gets set up good luck!

aggrav8d says: Jun 16, 2010. 11:28 AM REPLY


I'm not actually trying to build a CNC machine, as much as I want to. I wired all this up because I'm building a gyro stabilizer for a standard size
consumer-grade camera and I realized the same system could be used for a CNC. ...so why not post an Instructable about it?

http://www.instructables.com/id/How-to-wire-an-arduino-based-3-axis-CNC-machine/

Anda mungkin juga menyukai