loading

In this project I will show you how to turn two old DVD-drives into a mini plotter.this project is simple and easy to do and makes a good practice if you want to make a real CNC machine(this is why i started this project to prepare my self for a bigger CNC),you get to drive stepper motors and convert vector files to gcode..

this plotter is diffrent from the others because i used the cd tray mechnism for the z axis instead of a servo motor to lower the cost of the project hope you like it

let's get started :

Parts and tools:

2 - DVD-drives

3 - L293 H-bridges IC

1- Arduino uno

1 - Breadboard

- Some wires

- hot glue or something similar

- small pieces of plastic

- USB cable (i power the circuit from the pc)

1 - screw driver

i filmed all the steps on my youtube channel so check them out for more information :

Tunisian Maker : https://www.youtube.com/channel/UCsFmFKMpUdyIiE55W3KsTzw

Step 1: Gathering the Parts We Need From the DVD-drives

in this step we will begin by disassembling the DVD-drives to get the stepper motors and the carriages of the laser that reads the disk it's simple grab a screwdriver open the metal case and keep it it'll be the main body of our plotter also we will need the plastic mechanism of the DVD tray for our Z-axis this is how it looks :

this video is for step 2 and 3 also :

Step 2: Wiring the Stepper Motors

This is a tricky part cause the stepper motors are tiny and you need to take your time and be careful not to damage the motor cause i did and this is why:(IMPORTANT)

the stepper motor wires are attached in place with the plastic connector itself so if you remove the old connector the wire get loose and its hard to recover them after so you need to wire the new ones on top of the old one

each stepper motor needs 4 wires cut the four wires to the same length put a tip of solder on top then solder them to the stepper motor.

Step 3: Assembling the Plotter

the base of our plotter is the metal case itself i attached it with screws and bolts but you can use hot glue.

i mounted the X and Y axis perpendicular to each other with hot glue i didn't measure anything but it worked fine

for the Z axis i glued a piece of plastic to its back and glued it to the carriage of the Y axis

Step 4: Wiring the Circuit

get your breadboard put the 3 L293 IC first and wire the wires around them the last step would be wiring the motors

the drawings show it all.now before wiring the motors we need to find out the two pairs of coils i used my multimeter to find out the connected wires and connected each pair on a side of the IC

For the z axis it has a built in dc motor wich connects on a side of the third IC.

connect the arduino:

X axis 2,3,4,5

Y axis 6, 7,8,9

Z axis 10 11 but you can change it in the code if you want

this is the video :

Step 5: Testing the Connections and the Stepper Motors

its a simple arduino sketch using the fuctions of the stepper library like so:

For the X axis

#include <Stepper.h>

const int stepsPerRevolution = 20; //Connection pins: Stepper myStepperX(stepsPerRevolution, 8,9,10,11); void setup() { //Set speed: myStepperX.setSpeed(100); //max 250 steps for dvd/cd stepper motors myStepperX.step(160); delay(100); } void loop() {

}

For the Y axis

#include <Stepper.h>

const int stepsPerRevolution = 20; //Connection pins: Stepper myStepperX(stepsPerRevolution, 6,7,8,9); void setup() { //Set speed: myStepperX.setSpeed(100); //max 250 steps for dvd/cd stepper motors myStepperX.step(160); delay(100); } void loop() {

}

For the Z axis :

void setup() {
// Setup Serial.begin( 9600 ); pinMode(10, OUTPUT); pinMode(11, OUTPUT); delay(200);}

// Raises pen
void penUp() { digitalWrite(I1 , LOW);

digitalWrite(I2 , HIGH);

delay(200);

digitalWrite(I2 , LOW);

digitalWrite(I1 , LOW);

Serial.println("Pen up!"); }

// Lowers pen void penDown() {

digitalWrite(I2 , LOW);

digitalWrite(I1 , HIGH);

delay(200);

digitalWrite(I2 , LOW);

digitalWrite(I1 , LOW);

Serial.println("Pen down."); }

void loop() {

penUp();

penDown();

}

Step 6: Make G-code and Start Plotting

you need inkscape version 0.48.5 or it wont work and the plugin unicorn gcode plugin and the rest of the software with all the links is included are ready download

<p>Hi, very nice instructable! I had an idea for a variation on this. Has anyone tried using the geared drive open/close mechanism in an xy plotter like this one? Maybe replace the dc motor that has the small pulley for the belt on it with the stepper motor from the laser slide? Could give you a little bit bigger drawing area. Just a thought.... Thanks!</p>
Hello sir I have seen the wiring video I noted a voltage regulator Ic and two capacitors please tell us which capacitors and which is the voltage regulator Ic
<p>sir, can u upload the code for testing the circuit..im a bigginner with arduino and stepper... </p>
<p>check step 5 for testing the steppers individualy and the up and down movement </p>
<p>my z axis is not working thats y i askd u...thanks alot :)</p>
<p>sir,i tested it with 2cd drive stepper motors,it works...bt i want to make a cnc machine with dimensions 31x50cm and i had 2- mitsumi m35sp-8nb steppers+1 cd drive motor for z axis..what all changes i have to do in the coding?..</p><p>http://www.mitsumi.co.jp/latest/Catalog/pdf/motor_m35sp_8_e.pdf</p>
<p>for x and y i think the circuit can handle it and no code change is needed for z axis you want to replace it with a stepper motor th code you need i already wrote in the comments below =) </p>
<p>sir,it is not working, the stepper is not rotates smoothly...it turns a around20-30degree and stops then takes a next 20-30degree step then stops in an blink of eye...</p><p>can u helpme?</p>
<p>for x and y i think the circuit can handle it and no code change is needed for z axis you want to replace it with a stepper motor th code you need i already wrote in the comments below =) </p>
<p>I need help.can i used the Dc motor in place of stepper...!</p>
<p>of course not you need 2 stepper motors and 1 dc motor</p>
<p>Hey TunMaker, I was wondering if you could do the same thing but having 3 stepper motors. Instead of having a DC Motor on the Z-Axis, you would have another stepper motor. Do you think it would work? and would the Arduino have enough ports to utilize the 3 Stepper motors?</p>
<p>Definitely it works ...i made it using the code Mr.Tunmaker provided </p>
<p>thank you =D</p>
<p>as he told you the code is below in the comments try it and tell me how it works</p>
<p>yes the comments just below were about that the code we used for 3 stepper motors did not test it but it should work the others told me it did here try it nad read the comments below you'll know what am talking about </p><p>[code]</p><p>/*</p><p>Send GCODE to this Sketch using gctrl.pde https://github.com/damellis/gctrl</p><p>Convert SVG to GCODE with MakerBot Unicorn plugin for Inkscape available here https://github.com/martymcguire/inkscape-unicorn</p><p>More information about the Mini Arduino Plotter at tunisian maker youtube channel</p><p>https://www.youtube.com/channel/UCsFmFKMpUdyIiE55W3KsTzw</p><p>*/</p><p>#include &lt;Stepper.h&gt;</p><p>#define LINE_BUFFER_LENGTH 512</p><p>// Should be right for DVD steppers, but is not too important here</p><p>const int stepsPerRevolution = 20;</p><p>// create servo object to control a servo</p><p>// Initialize steppers for X- and Y-axis using this Arduino pins for the L293D H-bridge</p><p>Stepper myStepperY(stepsPerRevolution, 2,3,4,5);</p><p>Stepper myStepperX(stepsPerRevolution, 6,7,8,9);</p><p>Stepper myStepperZ(stepsPerRevolution, 10,11,12,13);</p><p>/* Structures, global variables */</p><p>struct point {</p><p>float x;</p><p>float y;</p><p>float z;</p><p>};</p><p>// Current position of plothead</p><p>struct point actuatorPos;</p><p>// Drawing settings, should be OK</p><p>float StepInc = 1;</p><p>int StepDelay = 0;</p><p>int LineDelay = 50;</p><p>int penDelay = 50;</p><p>// Motor steps to go 1 millimeter.</p><p>// Use test sketch to go 100 steps. Measure the length of line.</p><p>// Calculate steps per mm. Enter here.</p><p>float StepsPerMillimeterX = 6;</p><p>float StepsPerMillimeterY = 6;</p><p>// Drawing robot limits, in mm</p><p>// OK to start with. Could go up to 50 mm if calibrated well.</p><p>float Xmin = 0;</p><p>float Xmax = 40;</p><p>float Ymin = 0;</p><p>float Ymax = 40;</p><p>float Zmin = 0;</p><p>float Zmax = 30;</p><p>float Xpos = Xmin;</p><p>float Ypos = Ymin;</p><p>float Zpos = Zmax;</p><p>// Set to true to get debug output.</p><p>boolean verbose = false;</p><p>// Needs to interpret</p><p>// G1 for moving</p><p>// G4 P300 (wait 150ms)</p><p>// M300 S30 (pen down)</p><p>// M300 S50 (pen up)</p><p>// Discard anything with a (</p><p>// Discard any other command!</p><p>/**********************</p><p>* void setup() - Initialisations</p><p>***********************/</p><p>void setup() {</p><p>// Setup</p><p>Serial.begin( 9600 );</p><p>// Decrease if necessary</p><p>myStepperX.setSpeed(60);</p><p>myStepperY.setSpeed(60);</p><p>myStepperZ.setSpeed(50);</p><p>// Set &amp; move to initial default position</p><p>// TBD</p><p>// Notifications!!!</p><p>Serial.println(&quot;Mini CNC Plotter alive and kicking!&quot;);</p><p>Serial.print(&quot;X range is from &quot;);</p><p>Serial.print(Xmin);</p><p>Serial.print(&quot; to &quot;);</p><p>Serial.print(Xmax);</p><p>Serial.println(&quot; mm.&quot;);</p><p>Serial.print(&quot;Y range is from &quot;);</p><p>Serial.print(Ymin);</p><p>Serial.print(&quot; to &quot;);</p><p>Serial.print(Ymax);</p><p>Serial.println(&quot; mm.&quot;);</p><p>}</p><p>/**********************</p><p>* void loop() - Main loop</p><p>***********************/</p><p>void loop()</p><p>{</p><p>delay(200);</p><p>char line[ LINE_BUFFER_LENGTH ];</p><p>char c;</p><p>int lineIndex;</p><p>bool lineIsComment, lineSemiColon;</p><p>lineIndex = 0;</p><p>lineSemiColon = false;</p><p>lineIsComment = false;</p><p>while (1) {</p><p>// Serial reception - Mostly from Grbl, added semicolon support</p><p>while ( Serial.available()&gt;0 ) {</p><p>c = Serial.read();</p><p>if (( c == '\n') || (c == '\r') ) { // End of line reached</p><p>if ( lineIndex &gt; 0 ) { // Line is complete. Then execute!</p><p>line[ lineIndex ] = '\0'; // Terminate string</p><p>if (verbose) {</p><p>Serial.print( &quot;Received : &quot;);</p><p>Serial.println( line );</p><p>}</p><p>processIncomingLine( line, lineIndex );</p><p>lineIndex = 0;</p><p>}</p><p>else {</p><p>// Empty or comment line. Skip block.</p><p>}</p><p>lineIsComment = false;</p><p>lineSemiColon = false;</p><p>Serial.println(&quot;ok&quot;);</p><p>}</p><p>else {</p><p>if ( (lineIsComment) || (lineSemiColon) ) { // Throw away all comment characters</p><p>if ( c == ')' ) lineIsComment = false; // End of comment. Resume line.</p><p>}</p><p>else {</p><p>if ( c &lt;= ' ' ) { // Throw away whitepace and control characters</p><p>}</p><p>else if ( c == '/' ) { // Block delete not supported. Ignore character.</p><p>}</p><p>else if ( c == '(' ) { // Enable comments flag and ignore all characters until ')' or EOL.</p><p>lineIsComment = true;</p><p>}</p><p>else if ( c == ';' ) {</p><p>lineSemiColon = true;</p><p>}</p><p>else if ( lineIndex &gt;= LINE_BUFFER_LENGTH-1 ) {</p><p>Serial.println( &quot;ERROR - lineBuffer overflow&quot; );</p><p>lineIsComment = false;</p><p>lineSemiColon = false;</p><p>}</p><p>else if ( c &gt;= 'a' &amp;&amp; c &lt;= 'z' ) { // Upcase lowercase</p><p>line[ lineIndex++ ] = c-'a'+'A';</p><p>}</p><p>else {</p><p>line[ lineIndex++ ] = c;</p><p>}</p><p>}</p><p>}</p><p>}</p><p>}</p><p>}</p><p>void processIncomingLine( char* line, int charNB ) {</p><p>int currentIndex = 0;</p><p>char buffer[ 64 ]; // Hope that 64 is enough for 1 parameter</p><p>struct point newPos;</p><p>newPos.x = 0.0;</p><p>newPos.y = 0.0;</p><p>// Needs to interpret</p><p>// G1 for moving</p><p>// G4 P300 (wait 150ms)</p><p>// G1 X60 Y30</p><p>// G1 X30 Y50</p><p>// M300 S30 (pen down)</p><p>// M300 S50 (pen up)</p><p>// Discard anything with a (</p><p>// Discard any other command!</p><p>while( currentIndex &lt; charNB ) {</p><p>switch ( line[ currentIndex++ ] ) { // Select command, if any</p><p>case 'U':</p><p>penUp();</p><p>break;</p><p>case 'D':</p><p>penDown();</p><p>break;</p><p>case 'G':</p><p>buffer[0] = line[ currentIndex++ ]; // /!\ Dirty - Only works with 2 digit commands</p><p>// buffer[1] = line[ currentIndex++ ];</p><p>// buffer[2] = '\0';</p><p>buffer[1] = '\0';</p><p>switch ( atoi( buffer ) ){ // Select G command</p><p>case 0: // G00 &amp; G01 - Movement or fast movement. Same here</p><p>case 1:</p><p>// /!\ Dirty - Suppose that X is before Y</p><p>char* indexX = strchr( line+currentIndex, 'X' ); // Get X/Y position in the string (if any)</p><p>char* indexY = strchr( line+currentIndex, 'Y' );</p><p>if ( indexY &lt;= 0 ) {</p><p>newPos.x = atof( indexX + 1);</p><p>newPos.y = actuatorPos.y;</p><p>}</p><p>else if ( indexX &lt;= 0 ) {</p><p>newPos.y = atof( indexY + 1);</p><p>newPos.x = actuatorPos.x;</p><p>}</p><p>else {</p><p>newPos.y = atof( indexY + 1);</p><p>indexY = '\0';</p><p>newPos.x = atof( indexX + 1);</p><p>}</p><p>drawLine(newPos.x, newPos.y );</p><p>// Serial.println(&quot;ok&quot;);</p><p>actuatorPos.x = newPos.x;</p><p>actuatorPos.y = newPos.y;</p><p>break;</p><p>}</p><p>break;</p><p>case 'M':</p><p>buffer[0] = line[ currentIndex++ ]; // /!\ Dirty - Only works with 3 digit commands</p><p>buffer[1] = line[ currentIndex++ ];</p><p>buffer[2] = line[ currentIndex++ ];</p><p>buffer[3] = '\0';</p><p>switch ( atoi( buffer ) ){</p><p>case 300:</p><p>{</p><p>char* indexS = strchr( line+currentIndex, 'S' );</p><p>float Spos = atof( indexS + 1);</p><p>// Serial.println(&quot;ok&quot;);</p><p>if (Spos == 30) {</p><p>penDown();</p><p>}</p><p>if (Spos == 50) {</p><p>penUp();</p><p>}</p><p>break;</p><p>}</p><p>case 114: // M114 - Repport position</p><p>Serial.print( &quot;Absolute position : X = &quot; );</p><p>Serial.print( actuatorPos.x );</p><p>Serial.print( &quot; - Y = &quot; );</p><p>Serial.println( actuatorPos.y );</p><p>break;</p><p>default:</p><p>Serial.print( &quot;Command not recognized : M&quot;);</p><p>Serial.println( buffer );</p><p>}</p><p>}</p><p>}</p><p>}</p><p>/*********************************</p><p>* Draw a line from (x0;y0) to (x1;y1).</p><p>* Bresenham algo from https://www.marginallyclever.com/blog/2013/08/how-to-build-an-2-axis-arduino-cnc-gcode-interpreter/</p><p>* int (x1;y1) : Starting coordinates</p><p>* int (x2;y2) : Ending coordinates</p><p>**********************************/</p><p>void drawLine(float x1, float y1) {</p><p>if (verbose)</p><p>{</p><p>Serial.print(&quot;fx1, fy1: &quot;);</p><p>Serial.print(x1);</p><p>Serial.print(&quot;,&quot;);</p><p>Serial.print(y1);</p><p>Serial.println(&quot;&quot;);</p><p>}</p><p>// Bring instructions within limits</p><p>if (x1 &gt;= Xmax) {</p><p>x1 = Xmax;</p><p>}</p><p>if (x1 &lt;= Xmin) {</p><p>x1 = Xmin;</p><p>}</p><p>if (y1 &gt;= Ymax) {</p><p>y1 = Ymax;</p><p>}</p><p>if (y1 &lt;= Ymin) {</p><p>y1 = Ymin;</p><p>}</p><p>if (verbose)</p><p>{</p><p>Serial.print(&quot;Xpos, Ypos: &quot;);</p><p>Serial.print(Xpos);</p><p>Serial.print(&quot;,&quot;);</p><p>Serial.print(Ypos);</p><p>Serial.println(&quot;&quot;);</p><p>}</p><p>if (verbose)</p><p>{</p><p>Serial.print(&quot;x1, y1: &quot;);</p><p>Serial.print(x1);</p><p>Serial.print(&quot;,&quot;);</p><p>Serial.print(y1);</p><p>Serial.println(&quot;&quot;);</p><p>}</p><p>// Convert coordinates to steps</p><p>x1 = (int)(x1*StepsPerMillimeterX);</p><p>y1 = (int)(y1*StepsPerMillimeterY);</p><p>float x0 = Xpos;</p><p>float y0 = Ypos;</p><p>// Let's find out the change for the coordinates</p><p>long dx = abs(x1-x0);</p><p>long dy = abs(y1-y0);</p><p>int sx = x0&lt;x1 ? StepInc : -StepInc;</p><p>int sy = y0&lt;y1 ? StepInc : -StepInc;</p><p>long i;</p><p>long over = 0;</p><p>if (dx &gt; dy) {</p><p>for (i=0; i&lt;dx; ++i) {</p><p>myStepperX.step(sx);</p><p>over+=dy;</p><p>if (over&gt;=dx) {</p><p>over-=dx;</p><p>myStepperY.step(sy);</p><p>}</p><p>delay(StepDelay);</p><p>}</p><p>}</p><p>else {</p><p>for (i=0; i&lt;dy; ++i) {</p><p>myStepperY.step(sy);</p><p>over+=dx;</p><p>if (over&gt;=dy) {</p><p>over-=dy;</p><p>myStepperX.step(sx);</p><p>}</p><p>delay(StepDelay);</p><p>}</p><p>}</p><p>if (verbose)</p><p>{</p><p>Serial.print(&quot;dx, dy:&quot;);</p><p>Serial.print(dx);</p><p>Serial.print(&quot;,&quot;);</p><p>Serial.print(dy);</p><p>Serial.println(&quot;&quot;);</p><p>}</p><p>if (verbose)</p><p>{</p><p>Serial.print(&quot;Going to (&quot;);</p><p>Serial.print(x0);</p><p>Serial.print(&quot;,&quot;);</p><p>Serial.print(y0);</p><p>Serial.println(&quot;)&quot;);</p><p>}</p><p>// Delay before any next lines are submitted</p><p>delay(LineDelay);</p><p>// Update the positions</p><p>Xpos = x1;</p><p>Ypos = y1;</p><p>}</p><p>// Raises pen</p><p>void penUp() {</p><p>myStepperZ.step(stepsPerRevolution);</p><p>Zpos=Zmax;</p><p>if (verbose) {</p><p>Serial.println(&quot;Pen up!&quot;);</p><p>}</p><p>}</p><p>// Lowers pen</p><p>void penDown() {</p><p>myStepperZ.step(-stepsPerRevolution);</p><p>Zpos=Zmin;</p><p>if (verbose) {</p><p>Serial.println(&quot;Pen down.&quot;);</p><p>}</p><p>}</p><p>[/code</p>
<p>Tyvm I will try this setup out. And report back if it works. :D</p>
<p>Sorry for the trouble .... I did solve the problem .. current was less so motors were not getting proper voltage ...just attached a parallel supply to arduino and noweverything working well andgood .Thanks for your support and help ...I hope i can come up again in future for any other coding or hardware problem.</p>
<p>happy it works mate =) i have a youtube channel <a href="https://www.youtube.com/c/tunmaker">https://www.youtube.com/c/tunmaker</a> follow me there and am happy to help anytime =)</p>
<p>it would be nice if u can just text me ur mail so that i can send u the video of it for more clarification</p>
<p>yeah i did see that and z axis is also working. The problem's like ......</p><p>Firstly , when i uploaded the program as given in the tutorial . My robot was making the drawing's 3/4th part correct (i.e; until pen up is reqd.)</p><p>But , now when i uploaded this program my robot is not moving just taking steps at its own place. I did change steps per revolution and rpm too but still no success.</p>
<p>thanks for the code sir but it's not working well .. movements are not as expected ........... pen is not moving as per gcode ... it starts well , reaches corner and then it just keeps on vibrating at its own place</p>
<p>did you watch the third video about g-code?.the pen is trying to move from it's limit bacause the letters your trying to write aren't in a 4cm*4cm square or in the settings of the unicorn plugin that exports the gcode your starting from the centre and you should be starting from the front left corner of the plotter but is the z axis working ?</p>
Thanks for replying . Here's the code i edited <br><br>#include <br><br>#define LINE_BUFFER_LENGTH 512<br><br>const int stepsPerRevolution = 180;<br>//Initializing steppers for x,y and z axes<br><br>Stepper myStepperX(stepsPerRevolution,2,3,4,5);<br>Stepper myStepperY(stepsPerRevolution,6,7,8,9);<br>Stepper myStepperZ(stepsPerRevolution,10,11,12,13);<br> struct point {<br> float x;<br> float y;<br> float z;<br> };<br> //Current position of plothead<br>struct point actuatorPos;<br><br><br>//Drawing settings should be ok<br>float StepInc = 1;<br>int StepDelay = 0;<br>int LineDelay = 50;<br>int penDelay = 50;<br><br>//Motor steps to go 1 millimeter.<br>//Use test sketch to go 100 steps.Measure the length of line.<br>// Calculate steps per mm.<br> float StepsPerMillimeterX = 6;<br> float StepsPerMillimeterY = 6;<br> float StepsPerMillimeterZ = 4;<br><br> // Drawing robot limits, in mm<br> //OK to start with . Could go up to 50mm if calibrated well.<br> float Xmin = 0;<br> float Xmax = 40;<br> float Ymin = 0;<br> float Ymax = 40;<br> float Zmin = 0;<br> float Zmax = 10;<br><br> float Xpos = Xmin;<br> float Ypos = Ymin;<br> float Zpos = Zmax;<br> <br>//set to true to get debug output.<br> boolean verbose = false ;<br> // Needs to interpret <br>// G1 for moving<br>// G4 P300 (wait 150ms)<br>// M300 S30 (pen down)<br>// M300 S50 (pen up)<br>// Discard anything with a (<br>// Discard any other command!<br><br><br> <br>void setup() {<br> Serial.begin(9600);<br> myStepperZ.setSpeed(60);<br> delay(200);<br><br> myStepperX.setSpeed(60);<br> myStepperY.setSpeed(60);<br><br> // Set &amp; move to initial default position<br> // TBD<br> // Notifications!!!<br> Serial.println(&quot;Mini CNC Plotter alive and kicking!&quot;);<br> Serial.print(&quot;X range is from &quot;); <br> Serial.print(Xmin); <br> Serial.print(&quot; to &quot;); <br> Serial.print(Xmax); <br> Serial.println(&quot; mm.&quot;); <br> Serial.print(&quot;Y range is from &quot;); <br> Serial.print(Ymin); <br> Serial.print(&quot; to &quot;); <br> Serial.print(Ymax); <br> Serial.println(&quot; mm.&quot;); <br><br> }<br><br><br><br>void loop() {<br> delay(200);<br> char line[ LINE_BUFFER_LENGTH ];<br> char c;<br> int lineIndex;<br> bool lineIsComment, lineSemiColon;<br><br> lineIndex = 0;<br> lineSemiColon = false;<br> lineIsComment = false;<br><br> while (1) {<br><br> // Serial reception - Mostly from Grbl, added semicolon support<br> while ( Serial.available()&gt;0 ) {<br> c = Serial.read();<br> if (( c == '\n') || (c == '\r') ) { // End of line reached<br> if ( lineIndex &gt; 0 ) { // Line is complete. Then execute!<br> line[ lineIndex ] = '\0'; // Terminate string<br> if (verbose) { <br> Serial.print( &quot;Received : &quot;); <br> Serial.println( line ); <br> }<br> processIncomingLine( line, lineIndex );<br> lineIndex = 0;<br> } <br> else { <br> // Empty or comment line. Skip block.<br> }<br> lineIsComment = false;<br> lineSemiColon = false;<br> Serial.println(&quot;ok&quot;); <br> } <br> else {<br> if ( (lineIsComment) || (lineSemiColon) ) { // Throw away all comment characters<br> if ( c == ')' ) lineIsComment = false; // End of comment. Resume line.<br> } <br> else {<br> if ( c &lt;= ' ' ) { // Throw away whitepace and control characters<br> } <br> else if ( c == '/' ) { // Block delete not supported. Ignore character.<br> } <br> else if ( c == '(' ) { // Enable comments flag and ignore all characters until ')' or EOL.<br> lineIsComment = true;<br> } <br> else if ( c == ';' ) {<br> lineSemiColon = true;<br> } <br> else if ( lineIndex &gt;= LINE_BUFFER_LENGTH-1 ) {<br> Serial.println( &quot;ERROR - lineBuffer overflow&quot; );<br> lineIsComment = false;<br> lineSemiColon = false;<br> } <br> else if ( c &gt;= 'a' &amp;&amp; c &lt;= 'z' ) { // Upcase lowercase<br> line[ lineIndex++ ] = c-'a'+'A';<br> } <br> else {<br> line[ lineIndex++ ] = c;<br> }<br> }<br> }<br> }<br> }<br>}<br><br>void processIncomingLine( char* line, int charNB ) {<br> int currentIndex = 0;<br> char buffer[ 64 ]; // Hope that 64 is enough for 1 parameter<br> struct point newPos;<br><br> newPos.x = 0.0;<br> newPos.y = 0.0;<br><br> // Needs to interpret <br> // G1 for moving<br> // G4 P300 (wait 150ms)<br> // G1 X60 Y30<br> // G1 X30 Y50<br> // M300 S30 (pen down)<br> // M300 S50 (pen up)<br> // Discard anything with a (<br> // Discard any other command!<br><br> while( currentIndex &lt; charNB ) {<br> switch ( line[ currentIndex++ ] ) { // Select command, if any<br> case 'U':<br> penUp();<br> break;<br> case 'D':<br> penDown(); <br> break;<br> case 'G':<br> buffer[0] = line[ currentIndex++ ]; // /!\ Dirty - Only works with 2 digit commands<br> // buffer[1] = line[ currentIndex++ ];<br> // buffer[2] = '\0';<br> buffer[1] = '\0';<br><br> switch ( atoi( buffer ) ){ // Select G command<br> case 0: // G00 &amp; G01 - Movement or fast movement. Same here<br> case 1:<br> // /!\ Dirty - Suppose that X is before Y<br> char* indexX = strchr( line+currentIndex, 'X' ); // Get X/Y position in the string (if any)<br> char* indexY = strchr( line+currentIndex, 'Y' );<br> if ( indexY &lt;= 0 ) {<br> newPos.x = atof( indexX + 1); <br> newPos.y = actuatorPos.y;<br> } <br> else if ( indexX &lt;= 0 ) {<br> newPos.y = atof( indexY + 1);<br> newPos.x = actuatorPos.x;<br> } <br> else {<br> newPos.y = atof( indexY + 1);<br> indexY = '\0';<br> newPos.x = atof( indexX + 1);<br> }<br> drawLine(newPos.x, newPos.y );<br> // Serial.println(&quot;ok&quot;);<br> actuatorPos.x = newPos.x;<br> actuatorPos.y = newPos.y;<br> break;<br> }<br> break;<br> case 'M':<br> buffer[0] = line[ currentIndex++ ]; // /!\ Dirty - Only works with 3 digit commands<br> buffer[1] = line[ currentIndex++ ];<br> buffer[2] = line[ currentIndex++ ];<br> buffer[3] = '\0';<br> switch ( atoi( buffer ) ){<br> case 300:<br> {<br> char* indexS = strchr( line+currentIndex, 'S' );<br> float Spos = atof( indexS + 1);<br> // Serial.println(&quot;ok&quot;);<br> if (Spos == 30) { <br> penDown(); <br> }<br> if (Spos == 50) { <br> penUp(); <br> }<br> break;<br> }<br> case 114: // M114 - Repport position<br> Serial.print( &quot;Absolute position : X = &quot; );<br> Serial.print( actuatorPos.x );<br> Serial.print( &quot; - Y = &quot; );<br> Serial.println( actuatorPos.y );<br> break;<br> default:<br> Serial.print( &quot;Command not recognized : M&quot;);<br> Serial.println( buffer );<br> }<br> }<br> }<br><br><br><br>}<br> /************************************************<br> * Bresenham algo from https://www.marginallyclever.com/blog/2013/08/how-to-build-an-2-axis-arduino-cnc-gcode-interpreter/<br> * int (x1;y1) : Starting coordinates<br> * int (x2;y2) : Ending coordinates<br> **********************************/<br> void drawLine(float x1, float y1) {<br><br> if (verbose)<br> {<br> Serial.print(&quot;fx1, fy1: &quot;);<br> Serial.print(x1);<br> Serial.print(&quot;,&quot;);<br> Serial.print(y1);<br> Serial.println(&quot;&quot;);<br> } <br><br> // Bring instructions within limits<br> if (x1 &gt;= Xmax) { <br> x1 = Xmax; <br> }<br> if (x1 &lt;= Xmin) { <br> x1 = Xmin; <br> }<br> if (y1 &gt;= Ymax) { <br> y1 = Ymax; <br> }<br> if (y1 &lt;= Ymin) { <br> y1 = Ymin; <br> }<br><br> if (verbose)<br> {<br> Serial.print(&quot;Xpos, Ypos: &quot;);<br> Serial.print(Xpos);<br> Serial.print(&quot;,&quot;);<br> Serial.print(Ypos);<br> Serial.println(&quot;&quot;);<br> }<br><br> if (verbose)<br> {<br> Serial.print(&quot;x1, y1: &quot;);<br> Serial.print(x1);<br> Serial.print(&quot;,&quot;);<br> Serial.print(y1);<br> Serial.println(&quot;&quot;);<br> }<br><br> // Convert coordinates to steps<br> x1 = (int)(x1*StepsPerMillimeterX);<br> y1 = (int)(y1*StepsPerMillimeterY);<br> float x0 = Xpos;<br> float y0 = Ypos;<br><br> // Let's find out the change for the coordinates<br> long dx = abs(x1-x0);<br> long dy = abs(y1-y0);<br> int sx = x0 int sy = y0<br> long i;<br> long over = 0;<br><br> if (dx &gt; dy) {<br> for (i=0; i myStepperX.step(sx);<br> over+=dy;<br> if (over&gt;=dx) {<br> over-=dx;<br> myStepperY.step(sy);<br> }<br> delay(StepDelay);<br> }<br> }<br> else {<br> for (i=0; i myStepperY.step(sy);<br> over+=dx;<br> if (over&gt;=dy) {<br> over-=dy;<br> myStepperX.step(sx);<br> }<br> delay(StepDelay);<br> } <br> }<br><br> if (verbose)<br> {<br> Serial.print(&quot;dx, dy:&quot;);<br> Serial.print(dx);<br> Serial.print(&quot;,&quot;);<br> Serial.print(dy);<br> Serial.println(&quot;&quot;);<br> }<br><br> if (verbose)<br> {<br> Serial.print(&quot;Going to (&quot;);<br> Serial.print(x0);<br> Serial.print(&quot;,&quot;);<br> Serial.print(y0);<br> Serial.println(&quot;)&quot;);<br> }<br><br> // Delay before any next lines are submitted<br> delay(LineDelay);<br> // Update the positions<br> Xpos = x1;<br> Ypos = y1;<br>}<br>// Raises pen<br>void penUP()<br>{<br> myStepper.step(stepsPerRevolution);<br> delay(200);<br> Zpos=Zmax;<br> if(verbose)<br> {<br> Serial.printIn(&quot;Pen up!&quot;);<br> <br> }<br> }<br> //Lowers pen <br><br> void penDown()<br> {<br> myStepper.step(-stepsPerRevolution);<br> delay(200);<br> Zpos=Zmim;<br> if(verbose)<br> {<br> Serial.printIn(&quot;Pen down.&quot;);<br> }<br> <br> }<br> <br> <br> <br><br> <br>}
<p>[code]</p><p>/* </p><p> Send GCODE to this Sketch using gctrl.pde https://github.com/damellis/gctrl</p><p> Convert SVG to GCODE with MakerBot Unicorn plugin for Inkscape available here https://github.com/martymcguire/inkscape-unicorn</p><p> More information about the Mini Arduino Plotter at tunisian maker youtube channel</p><p> https://www.youtube.com/channel/UCsFmFKMpUdyIiE55W3KsTzw</p><p> */</p><p>#include &lt;Stepper.h&gt;</p><p>#define LINE_BUFFER_LENGTH 512</p><p>// Should be right for DVD steppers, but is not too important here</p><p>const int stepsPerRevolution = 20; </p><p>// create servo object to control a servo </p><p>// Initialize steppers for X- and Y-axis using this Arduino pins for the L293D H-bridge</p><p>Stepper myStepperY(stepsPerRevolution, 2,3,4,5); </p><p>Stepper myStepperX(stepsPerRevolution, 6,7,8,9); </p><p>Stepper myStepperZ(stepsPerRevolution, 10,11,12,13);</p><p>/* Structures, global variables */</p><p>struct point { </p><p> float x; </p><p> float y; </p><p> float z; </p><p>};</p><p>// Current position of plothead</p><p>struct point actuatorPos;</p><p>// Drawing settings, should be OK</p><p>float StepInc = 1;</p><p>int StepDelay = 0;</p><p>int LineDelay = 50;</p><p>int penDelay = 50;</p><p>// Motor steps to go 1 millimeter.</p><p>// Use test sketch to go 100 steps. Measure the length of line. </p><p>// Calculate steps per mm. Enter here.</p><p>float StepsPerMillimeterX = 6;</p><p>float StepsPerMillimeterY = 6;</p><p>// Drawing robot limits, in mm</p><p>// OK to start with. Could go up to 50 mm if calibrated well. </p><p>float Xmin = 0;</p><p>float Xmax = 40;</p><p>float Ymin = 0;</p><p>float Ymax = 40;</p><p>float Zmin = 0;</p><p>float Zmax = 30;</p><p>float Xpos = Xmin;</p><p>float Ypos = Ymin;</p><p>float Zpos = Zmax; </p><p>// Set to true to get debug output.</p><p>boolean verbose = false;</p><p>// Needs to interpret </p><p>// G1 for moving</p><p>// G4 P300 (wait 150ms)</p><p>// M300 S30 (pen down)</p><p>// M300 S50 (pen up)</p><p>// Discard anything with a (</p><p>// Discard any other command!</p><p>/**********************</p><p> * void setup() - Initialisations</p><p> ***********************/</p><p>void setup() {</p><p> // Setup</p><p> Serial.begin( 9600 );</p><p> // Decrease if necessary</p><p> myStepperX.setSpeed(60);</p><p> myStepperY.setSpeed(60);</p><p> myStepperZ.setSpeed(50); </p><p> // Set &amp; move to initial default position</p><p> // TBD</p><p> // Notifications!!!</p><p> Serial.println(&quot;Mini CNC Plotter alive and kicking!&quot;);</p><p> Serial.print(&quot;X range is from &quot;); </p><p> Serial.print(Xmin); </p><p> Serial.print(&quot; to &quot;); </p><p> Serial.print(Xmax); </p><p> Serial.println(&quot; mm.&quot;); </p><p> Serial.print(&quot;Y range is from &quot;); </p><p> Serial.print(Ymin); </p><p> Serial.print(&quot; to &quot;); </p><p> Serial.print(Ymax); </p><p> Serial.println(&quot; mm.&quot;); </p><p>}</p><p>/**********************</p><p> * void loop() - Main loop</p><p> ***********************/</p><p>void loop() </p><p>{</p><p> delay(200);</p><p> char line[ LINE_BUFFER_LENGTH ];</p><p> char c;</p><p> int lineIndex;</p><p> bool lineIsComment, lineSemiColon;</p><p> lineIndex = 0;</p><p> lineSemiColon = false;</p><p> lineIsComment = false;</p><p> while (1) {</p><p> // Serial reception - Mostly from Grbl, added semicolon support</p><p> while ( Serial.available()&gt;0 ) {</p><p> c = Serial.read();</p><p> if (( c == '\n') || (c == '\r') ) { // End of line reached</p><p> if ( lineIndex &gt; 0 ) { // Line is complete. Then execute!</p><p> line[ lineIndex ] = '\0'; // Terminate string</p><p> if (verbose) { </p><p> Serial.print( &quot;Received : &quot;); </p><p> Serial.println( line ); </p><p> }</p><p> processIncomingLine( line, lineIndex );</p><p> lineIndex = 0;</p><p> } </p><p> else { </p><p> // Empty or comment line. Skip block.</p><p> }</p><p> lineIsComment = false;</p><p> lineSemiColon = false;</p><p> Serial.println(&quot;ok&quot;); </p><p> } </p><p> else {</p><p> if ( (lineIsComment) || (lineSemiColon) ) { // Throw away all comment characters</p><p> if ( c == ')' ) lineIsComment = false; // End of comment. Resume line.</p><p> } </p><p> else {</p><p> if ( c &lt;= ' ' ) { // Throw away whitepace and control characters</p><p> } </p><p> else if ( c == '/' ) { // Block delete not supported. Ignore character.</p><p> } </p><p> else if ( c == '(' ) { // Enable comments flag and ignore all characters until ')' or EOL.</p><p> lineIsComment = true;</p><p> } </p><p> else if ( c == ';' ) {</p><p> lineSemiColon = true;</p><p> } </p><p> else if ( lineIndex &gt;= LINE_BUFFER_LENGTH-1 ) {</p><p> Serial.println( &quot;ERROR - lineBuffer overflow&quot; );</p><p> lineIsComment = false;</p><p> lineSemiColon = false;</p><p> } </p><p> else if ( c &gt;= 'a' &amp;&amp; c &lt;= 'z' ) { // Upcase lowercase</p><p> line[ lineIndex++ ] = c-'a'+'A';</p><p> } </p><p> else {</p><p> line[ lineIndex++ ] = c;</p><p> }</p><p> }</p><p> }</p><p> }</p><p> }</p><p>}</p><p>void processIncomingLine( char* line, int charNB ) {</p><p> int currentIndex = 0;</p><p> char buffer[ 64 ]; // Hope that 64 is enough for 1 parameter</p><p> struct point newPos;</p><p> newPos.x = 0.0;</p><p> newPos.y = 0.0;</p><p> // Needs to interpret </p><p> // G1 for moving</p><p> // G4 P300 (wait 150ms)</p><p> // G1 X60 Y30</p><p> // G1 X30 Y50</p><p> // M300 S30 (pen down)</p><p> // M300 S50 (pen up)</p><p> // Discard anything with a (</p><p> // Discard any other command!</p><p> while( currentIndex &lt; charNB ) {</p><p> switch ( line[ currentIndex++ ] ) { // Select command, if any</p><p> case 'U':</p><p> penUp(); </p><p> break;</p><p> case 'D':</p><p> penDown(); </p><p> break;</p><p> case 'G':</p><p> buffer[0] = line[ currentIndex++ ]; // /!\ Dirty - Only works with 2 digit commands</p><p> // buffer[1] = line[ currentIndex++ ];</p><p> // buffer[2] = '\0';</p><p> buffer[1] = '\0';</p><p> switch ( atoi( buffer ) ){ // Select G command</p><p> case 0: // G00 &amp; G01 - Movement or fast movement. Same here</p><p> case 1:</p><p> // /!\ Dirty - Suppose that X is before Y</p><p> char* indexX = strchr( line+currentIndex, 'X' ); // Get X/Y position in the string (if any)</p><p> char* indexY = strchr( line+currentIndex, 'Y' );</p><p> if ( indexY &lt;= 0 ) {</p><p> newPos.x = atof( indexX + 1); </p><p> newPos.y = actuatorPos.y;</p><p> } </p><p> else if ( indexX &lt;= 0 ) {</p><p> newPos.y = atof( indexY + 1);</p><p> newPos.x = actuatorPos.x;</p><p> } </p><p> else {</p><p> newPos.y = atof( indexY + 1);</p><p> indexY = '\0';</p><p> newPos.x = atof( indexX + 1);</p><p> }</p><p> drawLine(newPos.x, newPos.y );</p><p> // Serial.println(&quot;ok&quot;);</p><p> actuatorPos.x = newPos.x;</p><p> actuatorPos.y = newPos.y;</p><p> break;</p><p> }</p><p> break;</p><p> case 'M':</p><p> buffer[0] = line[ currentIndex++ ]; // /!\ Dirty - Only works with 3 digit commands</p><p> buffer[1] = line[ currentIndex++ ];</p><p> buffer[2] = line[ currentIndex++ ];</p><p> buffer[3] = '\0';</p><p> switch ( atoi( buffer ) ){</p><p> case 300:</p><p> {</p><p> char* indexS = strchr( line+currentIndex, 'S' );</p><p> float Spos = atof( indexS + 1);</p><p> // Serial.println(&quot;ok&quot;);</p><p> if (Spos == 30) { </p><p> penDown(); </p><p> }</p><p> if (Spos == 50) { </p><p> penUp(); </p><p> }</p><p> break;</p><p> }</p><p> case 114: // M114 - Repport position</p><p> Serial.print( &quot;Absolute position : X = &quot; );</p><p> Serial.print( actuatorPos.x );</p><p> Serial.print( &quot; - Y = &quot; );</p><p> Serial.println( actuatorPos.y );</p><p> break;</p><p> default:</p><p> Serial.print( &quot;Command not recognized : M&quot;);</p><p> Serial.println( buffer );</p><p> }</p><p> }</p><p> }</p><p>}</p><p>/*********************************</p><p> * Draw a line from (x0;y0) to (x1;y1). </p><p> * Bresenham algo from https://www.marginallyclever.com/blog/2013/08/how-to-build-an-2-axis-arduino-cnc-gcode-interpreter/</p><p> * int (x1;y1) : Starting coordinates</p><p> * int (x2;y2) : Ending coordinates</p><p> **********************************/</p><p>void drawLine(float x1, float y1) {</p><p> if (verbose)</p><p> {</p><p> Serial.print(&quot;fx1, fy1: &quot;);</p><p> Serial.print(x1);</p><p> Serial.print(&quot;,&quot;);</p><p> Serial.print(y1);</p><p> Serial.println(&quot;&quot;);</p><p> } </p><p> // Bring instructions within limits</p><p> if (x1 &gt;= Xmax) { </p><p> x1 = Xmax; </p><p> }</p><p> if (x1 &lt;= Xmin) { </p><p> x1 = Xmin; </p><p> }</p><p> if (y1 &gt;= Ymax) { </p><p> y1 = Ymax; </p><p> }</p><p> if (y1 &lt;= Ymin) { </p><p> y1 = Ymin; </p><p> }</p><p> if (verbose)</p><p> {</p><p> Serial.print(&quot;Xpos, Ypos: &quot;);</p><p> Serial.print(Xpos);</p><p> Serial.print(&quot;,&quot;);</p><p> Serial.print(Ypos);</p><p> Serial.println(&quot;&quot;);</p><p> }</p><p> if (verbose)</p><p> {</p><p> Serial.print(&quot;x1, y1: &quot;);</p><p> Serial.print(x1);</p><p> Serial.print(&quot;,&quot;);</p><p> Serial.print(y1);</p><p> Serial.println(&quot;&quot;);</p><p> }</p><p> // Convert coordinates to steps</p><p> x1 = (int)(x1*StepsPerMillimeterX);</p><p> y1 = (int)(y1*StepsPerMillimeterY);</p><p> float x0 = Xpos;</p><p> float y0 = Ypos;</p><p> // Let's find out the change for the coordinates</p><p> long dx = abs(x1-x0);</p><p> long dy = abs(y1-y0);</p><p> int sx = x0&lt;x1 ? StepInc : -StepInc;</p><p> int sy = y0&lt;y1 ? StepInc : -StepInc;</p><p> long i;</p><p> long over = 0;</p><p> if (dx &gt; dy) {</p><p> for (i=0; i&lt;dx; ++i) {</p><p> myStepperX.step(sx);</p><p> over+=dy;</p><p> if (over&gt;=dx) {</p><p> over-=dx;</p><p> myStepperY.step(sy);</p><p> }</p><p> delay(StepDelay);</p><p> }</p><p> }</p><p> else {</p><p> for (i=0; i&lt;dy; ++i) {</p><p> myStepperY.step(sy);</p><p> over+=dx;</p><p> if (over&gt;=dy) {</p><p> over-=dy;</p><p> myStepperX.step(sx);</p><p> }</p><p> delay(StepDelay);</p><p> } </p><p> }</p><p> if (verbose)</p><p> {</p><p> Serial.print(&quot;dx, dy:&quot;);</p><p> Serial.print(dx);</p><p> Serial.print(&quot;,&quot;);</p><p> Serial.print(dy);</p><p> Serial.println(&quot;&quot;);</p><p> }</p><p> if (verbose)</p><p> {</p><p> Serial.print(&quot;Going to (&quot;);</p><p> Serial.print(x0);</p><p> Serial.print(&quot;,&quot;);</p><p> Serial.print(y0);</p><p> Serial.println(&quot;)&quot;);</p><p> }</p><p> // Delay before any next lines are submitted</p><p> delay(LineDelay);</p><p> // Update the positions</p><p> Xpos = x1;</p><p> Ypos = y1;</p><p>}</p><p>// Raises pen</p><p>void penUp() { </p><p> myStepperZ.step(stepsPerRevolution);</p><p> Zpos=Zmax; </p><p> if (verbose) { </p><p> Serial.println(&quot;Pen up!&quot;); </p><p> } </p><p>}</p><p>// Lowers pen</p><p>void penDown() { </p><p> myStepperZ.step(-stepsPerRevolution);</p><p> Zpos=Zmin; </p><p> if (verbose) { </p><p> Serial.println(&quot;Pen down.&quot;); </p><p> } </p><p>}</p><p>[/code]</p>
<p>don't forget to tweak the steps per revoluion and speed of z stepper i can't recommand numbers for floppy drive</p>
<p>i've also started making this but using floppy drive motor instead of dc for pen up and down . Struggling while coding with following problems .It would be nice if u help me out to sort these</p><p> Arduino: 1.6.9 (Windows 8), Board: &quot;Arduino/Genuino Uno&quot;</p><p>C:\Users\MARK-42\Documents\Arduino\testingg1\testingg1.ino: In function 'void processIncomingLine(char*, int)':</p><p>testingg1:175: error: 'penUp' was not declared in this scope</p><p> penUp(); </p><p> ^</p><p>C:\Users\MARK-42\Documents\Arduino\testingg1\testingg1.ino: In function 'void penUP()':</p><p>testingg1:360: error: 'myStepper' was not declared in this scope</p><p> myStepper.step(stepsPerRevolution);</p><p> ^</p><p>testingg1:365: error: 'class HardwareSerial' has no member named 'printIn'</p><p> Serial.printIn(&quot;Pen up!&quot;);</p><p> ^</p><p>C:\Users\MARK-42\Documents\Arduino\testingg1\testingg1.ino: In function 'void penDown()':</p><p>testingg1:373: error: 'myStepper' was not declared in this scope</p><p> myStepper.step(-stepsPerRevolution);</p><p> ^</p><p>testingg1:378: error: 'class HardwareSerial' has no member named 'printIn'</p><p> Serial.printIn(&quot;Pen down.&quot;);</p><p> ^</p><p>C:\Users\MARK-42\Documents\Arduino\testingg1\testingg1.ino: At global scope:</p><p>testingg1:387: error: expected declaration before '}' token</p><p> }</p><p> ^</p><p>exit status 1</p><p>'penUp' was not declared in this scope</p><p>This report would have more information with</p><p>&quot;Show verbose output during compilation&quot;</p><p>option enabled in File -&gt; Preferences.</p>
<p>hi,sorry about the delay of my answer so as i understood you you won't to swap the dc motor with a stepper motor of a floppy drive some changes of the code will be necessary so don't send me the error message send me your code and i'll repair it's easier that way ok ?</p>
<p>which pen did you use</p>
<p>i dont know pen types but using a hair pen will work except it doesn't draw very good because it needs to be flexible so i used a drawing pen like this one.this kind worked for me very good also check how plane is your working surface that may cause a problem</p>
<p>i made it but first i used sketch pen and pencil then a ball point pen my brother suggested to use a gel pen so going to place a gel pen in the place of sketch pen</p>
<p>this is my plotter.how did you find + and - sign with voltmeter . and my motors did not moving</p>
<p>i wasnt looking for positive and negative side i was looking for connected leads of the stepper motors watch the video you ll understand</p>
<p>hello! thank you for the advise i did get the z axis. but my x axis joint with motor is stucking in the middle of it.if push a little it moves again please send a reply what to do?</p>
<p>the board is suuplied from where</p>
<p>hey can you give me the measurements between the surface and the tip of the pen please</p>
<p>the pen is loose before i start the plotter i adjust it so that the pen is barely touching the surface</p>
<p>when the pen is low of course i tighten that position then i move it up again</p>
<p>hello your project is awesome but can i make it only with 2 l293d motor drives </p><p>sorry for my ban english :D</p>
Then you'll need to replace the third one with two transistor basicly you need an another H bridge for the dc motor of the z axis
Hey I have modified my previous design with yours DC motor design but struggling with the same glitches :-( <br>My x axis and y axis are not responding well... Even without a pen... And I followed all your suggestions <br>Please help me in this regard :-(<br>If u would ask I will also share the video with you... But please suggest something...
Have you tried the motors individually just testing. ?
Yes it worked at that time... But after that they are just giving the glitches as if they are stucked in between... They are only vibrating at one point.... But it worked with the test codes of individual axis...
<p>i think it's the gcode. it happend to me when i used the wrong version of inkscape and the correct version is 0.48.5 anyway try this gcode file and tell me what happend and start the plotter in the front left.</p><p>https://drive.google.com/file/d/0B3LrxyvfzQHHQ0Z0cnlDdWlrYlE/view?usp=sharing</p>
Sir this code is also not running.. I think I m getting stucked due to the power supply... As when I puts a very little pressure with my finger tip it moves easily... So would please tell me how did you powered your machine, with how much voltage and amperes...
<p>i used 5v usb from my pc</p>
what a good tutor,I'll built it tomorrow
<p>thanks if you need anything just ask</p>
Hey I am also building the same project but my y or x axis sometimes gets stucked in between the operation... I am not being able to figure out why it's happening so could you help in this regard?? Here it is the result in the image <br>Please help if you can
<p>you didnt give much information and my plotter tuto is without a servo but</p><p>the problem can be either the g-code your using isn't good you should check it try this visualizer or it can most probably the pen has too much friction with the paper so it gets stuck because either the pen is pushed against the paper too hard or the paper isn't plane enough if this is the situation try to make holder your using more loose so that the pen can move on the paper easily hope i helped watch my pen holder it s pushed against the paper with a loose elastic so i barely touches the paper but writes very good </p>

About This Instructable

15,723views

261favorites

More by TunMaker:Hand Made SpeedBall Mini Drilling Station Mini arduino Plotter without a servo motor 
Add instructable to: