CNC Plotter : Arduino CNC

0
10995
CNC Plotter arduino project
CNC Plotter arduino project

CNC Plotter

One of out follower made this project. Here below is the content he share with Engineersgallery.

[nextpage title=”Introduction” ]

CNC Plotter arduino project
CNC Plotter arduino project

CNC Plotter arduino project

CNC Plotter arduino project
CNC Plotter arduino project

My passion for robotic constructions led me to develop a plotter cnc machine.

[sam id=”4″ codes=”true”]

What’s this??

This is all about a machine that can draw images which we have loaded before in the software that controlling the motors. The device consists of two bipolar stepper motors- coming from used CD/DVD drives- that directing the canvas to X and Y axis, a mechanism (my own inspiration) fitted with micro servo to move the pen up and down and finally thewooden frame.

To drive the stepper motors i tried mosfets and l293d ic. I prefer the second (l293d) although I noticed that they have more heat at 12v.

 

[/nextpage]

[nextpage title=”Video” ]

[youtube height=”500″ width=”500″]https://www.youtube.com/watch?v=N0PUDsu0Djc[/youtube]

[sam id=”4″ codes=”true”]

[youtube height=”500″ width=”500″]https://m.youtube.com/?#/watch?v=qQh_Zx2ZoTY[/youtube]

[youtube height=”500″ width=”500″] https://www.youtube.com/watch?v=YD1_8CUT03s[/youtube]

 

Arduino CNC : UPDATED WITH G CODE

[youtube height=”500″ width=”500″]https://m.youtube.com/?#/watch?v=qQh_Zx2ZoTY[/youtube]

 

[/nextpage]

[nextpage title=”Code” ]

[visitor]

Click here to view Block Diagram and Code (Free Registration )

 

[/visitor]

 

[member]

[message_box title=”Code” color=”red”]

#include <Stepper.h>
#include <Servo.h>
#define STEPS 400

Stepper stepperX(STEPS, 6, 7, 8, 9);
Stepper stepperY(STEPS, 10, 11, 12, 13);
Servo myservo;

int x_inc = 0;
int y_inc = 0;
int z_pos = 0;

word image[16] = {
0b0000000000000000,
0b0000011111100000,
0b0000011111100000,
0b0001000000001000,
0b0010000000000100,
0b0010000000000100,
0b0100111001110010,
0b0100011001100010,
0b1000000000000001,
0b1000000110000001,
0b0100000000000010,
0b0010010000100100,
0b0001001111001000,
0b0001100000110000,
0b0000011111000000,
0b0000000000000000
};

void setup()
{
stepperX.setSpeed(60);
stepperY.setSpeed(60);
delay(2000);
myservo.attach(2);
}

void loop()
{
for(int row = 0; row < 16; row++) {

penUp();

stepperX.step(-x_inc);
x_inc = 0;

for(int column = 0; column < 16; column++){
boolean pixel = bitRead(image[row],column);
if(pixel == 1){

penDown();

stepperX.step(5);
x_inc = x_inc + 5;
delay(150);
}
else{

penUp();

stepperX.step(5);
x_inc = x_inc + 5;
delay(150);

}
}

penUp();

stepperY.step(5);
y_inc = y_inc + 5;
delay(150);
}

penUp();

stepperX.step(-x_inc);
stepperY.step(-y_inc);

while(1){
}

}

void penDown()
{
myservo.write(50);
delay(150);
}

void penUp()
{
myservo.write(20);
delay(150);

}[/message_box]

[/member]

[sam id=”4″ codes=”true”]

[/nextpage]