Professional Documents
Culture Documents
step 1: parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
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)
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.
step 1: parts
You'll need:
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
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.
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.
Double check you didn't wire the board power to the stepper power. That would be bad.
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?!"
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;
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.
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!
http://www.instructables.com/id/How-to-wire-an-arduino-based-3-axis-CNC-machine/
Image Notes
1. Congratulations! You earned it.
Related Instructables
Advertisements
Comments
48 comments Add Comment
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?
#define DIR3_PIN 8
#define STEP3_PIN 9
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
"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.
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!
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!
GRBL is an almost complete implementation of the G-Code (only 3 axis) standards specifically written in C for the *duino atmega platforms.
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.
http://www.instructables.com/id/How-to-wire-an-arduino-based-3-axis-CNC-machine/