loading

this a mini CNC 2D plotter made from old DVD drive and L293D motor shield very cheap but intresting

let see how to make in

Step 1: Video

Step 2: Material Need for This Project

1) 2 X SCRAP DVD DRIVE

2) 1 X ARDUINO

3) 1 X L293D MOTOR SHIELD

4) 1 X SERVO MOTOR (TOWER PRO 9G)

5) JUMPER WIRES

6) SOME HARDWARE NUT BOTS ETC

7) DOUBLE SIDE 3M TAPE

You can buy this material from below links of Amazon

Simple Lab's L293D Motor Shield for Arduino

Arduino Uno R3 ATmega328P ATMEGA16U2 Compatible with USB Cable

REES52 Tower Pro SG90 9g Servo Motor For Arduino ARM Raspberry AND Other MCU

Librairy For Adafruit Shield Driver Motors

extract the file and past them to

arduino/libraries

Step 3: Assembling the Machine

Open the scrap DVD Drive and rremove internal moving tray..

This tray having stepper mechanism on it this will act as our X-axis & Y-axis.

Go through the attached pictures for understanding how to assemble your machine.

make hole on empty DVD drive case mount our X-axis and Y-axis on respective DVD case with the help of

nut bolts.

Now place them perpendicular

Step 4: Wiring Details

watch the picture carefully and wire components accordingly

Step 5: CNC Code for Arduino

upload the code to arduino using arduino IDE

Step 6: G Code

To make gcode files that are compatible with this cnc machine you have to use the Inkscape.

Inkscape is professional quality vector graphics software which runs on Windows, Mac OS X and Linux. It is used by design professionals and hobbyists worldwide, for creating a wide variety of graphics such as illustrations, icons, logos, diagrams, maps and web graphics. Inkscape uses the W3C open standard SVG (Scalable Vector Graphics) as its native format, and is free and open-source software. Download and install Inkscape from

https://inkscape.org/en/download/windows/

(Important: download 0.48.5 version)
Now you need to install an Add-on that enables the export images to gcode files. This add on can be found here with installation notes.

https://github.com/martymcguire/inkscape-unicorn

please follow the video on you tube how to create G-code file

some ready made G-code files

Step 7: Processing IDE Program (GCTRL)

Upload the gctrl file to processing IDE

and click on PLAY button in processing window.

first press 'p' to select you com port

if you want you can set jog speed by pressing 1,2, or 3 button from keyboard

press 'g' to load G-code file

your machine is ready to plot as soon as you hit enter by selecting g code file

now you have done your plotter is ready

thanks for your attention

Step 8: How to Connect Stepper Motor With L293D Shield

<p>mr.innovative,pls ans my comments posted 2days before,.Again my project of mini is stuck .no further going.pls let me know how to align pen in centre and rectify error message M18 (drives off)</p><p>At first it plott on may be 2or3 line correctly then printing every thing in one corner.and at last when it stopped and give message M 18 (drives off)pls give solution.l am tottaly newbie in software</p>
<p>sir,when I run g code in processing p 3 at the end of run the plotting is all jumble up,and message shows : M18 ( drives off ) </p><p>Command not recognise : M18</p><p>Pls give the solution to correct the error.</p>
Hello, sir i am getting m18 drives off error in processing ide. Then it all stops and the drawing so formed its any good,
<p>i have downloaded the af library but still there is error in &lt;afmotor.h&gt;</p><p>please help me out in removing this </p>
<p>I am using 2 DVD stepper motors, but still, the output is not what I expected it to be.. but the motors which I am using have different pin-out for wires..? does that means they do have different steps/rev..?</p><p>The output for STAR is in the picture.</p><p>The Gcode for star and elliptical are</p><p>config i am using in the code are-</p><p>steps/rev = 20; steps/mm(x&amp;y)=360; x=(0:40) y=(0:40)</p><p>Help me out !!</p>
<p>Hi! So I have successfully uploaded the CNC Code and have processed the GTRL interface using Processor; however, when I attempt the jog the axes using the arrows keys of my PC, nothing moves. I hear a high-pitched hum (hums when I move up and right keys, but stops when I press the down and left keys) and I can feel the stepper motors trying to work, but the leadscrews won't budge! Also, when I try to move the x and y sleds by hand while this is happening, the leadscrews resist my hand. It's like the motors are preventing movement rather than creating it.... What do I do??? (stepper motors did work when I tested them)</p>
<p>yea i have exactly same problem with mine. and when i test with the one revolution code it works perfectly but when i tried streaming a g code nothing moves, and i made my own motor shield on a bread board using l293d and am not sure whereto connect the input pins on the ardiuno board please i need help on this.</p>
<p>thanks for your proyect</p><p>i do the machine. prove the axis with your programs and the axis are good</p><p>i donwload the file &quot;gctrl.pde&quot; but download a file &quot;FLTW2G9IRXTABCW.pde&quot;</p><p>i open arduino program and transfer this file. i dont have error.</p><p>now.... where i select the file to print?</p><p>i dont understan the step 7 of your proyect. thanks</p>
<p>i got this error: ;(</p><p>the method showinputdialog(object) in the type joptionpane is not applicable for the arguments ()</p>
<p>i think you did not set your PORT right. 1 choose your arduino board</p><p>2 choose your PORT</p><p>then test run the code before uploading it. or you mis the ADMotor shield library</p><p>WannaDuino!!!</p>
<p>i got this error: ;(</p><p>the method showinputdialog(object) in the type joptionpane is not applicable for the arguments ()</p>
<p>what is your operation system is it other than windows ?</p>
<p>I'm getting the same error .. Running Windows 10 with Processing 3.2.3 </p>
<p>That is not OS problem. I solved the problem. That problem's in Code line 31: </p><p>String result = (String) JOptionPane.showInputDialog(this,</p><p>-&gt; change &quot;this&quot; to &quot;frame&quot;, then the code will be ok</p>
<p>Hi there, </p><p>I have tried to upload the arduino code but i got this error message when verifying the code:</p>
<p>In his code it includes the library for the L293D Motor Shield, but you have not downloaded that library onto your own computer. That's why it says &quot;AFMotor.h: No such file or directory #include &lt;AFMotor.h&gt;&quot;. If you go to step 2, he has the file for the motor shield library that you download. Once you download it, it should be able to compile. :)</p>
<p>And I have the same problem.</p><p>drawings do not come out right.</p><p>how to define the origin?</p><p>Pressing keys 1, 2, 3 or pg up, pg down, nothing happens, although the board Arduino LED indicates that receives data.</p><p>Here are you Hisoka files.</p>
<p>Hi, trying to find what is wrong with my setup, a simple horizontal line of 40 mm is printed as only 4 mm (same thing with a vertical line). Also, checking at the gcode there are M01, M17, and M18 command not recognized and marked as errors. Using CAMbotics everything is fine.</p><p>Any suggestion, please?</p>
<p>HI I need wiring diagrams of motors . its amazing instructables</p>
<p>please seen the pic for wiring details</p>
please tell Mr that, doesn't it needs to be calibrated ??<br>
<p>Hello</p><p>when I want to upload gctrl.pde, I receive this error:</p><p>********************</p><p>Arduino: 1.6.11 (Windows 10), Board: &quot;Arduino/Genuino Uno&quot;</p><p>C:\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Arduino\hardware -hardware C:\Users\cparaschiv\AppData\Local\Arduino15\packages -tools C:\Arduino\tools-builder -tools C:\Arduino\hardware\tools\avr -tools C:\Users\cparaschiv\AppData\Local\Arduino15\packages -built-in-libraries C:\Arduino\libraries -libraries C:\Users\cparaschiv\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10611 -build-path C:\Users\CPARAS~1\AppData\Local\Temp\build3a8a9971c0e1ebf5b423349760755e06.tmp -warnings=default -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino6 -prefs=runtime.tools.avr-gcc.path=C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2 -verbose C:\Arduino\gctrl\gctrl.ino</p><p>C:\Arduino\arduino-builder -compile -logger=machine -hardware C:\Arduino\hardware -hardware C:\Users\cparaschiv\AppData\Local\Arduino15\packages -tools C:\Arduino\tools-builder -tools C:\Arduino\hardware\tools\avr -tools C:\Users\cparaschiv\AppData\Local\Arduino15\packages -built-in-libraries C:\Arduino\libraries -libraries C:\Users\cparaschiv\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10611 -build-path C:\Users\CPARAS~1\AppData\Local\Temp\build3a8a9971c0e1ebf5b423349760755e06.tmp -warnings=default -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino6 -prefs=runtime.tools.avr-gcc.path=C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2 -verbose C:\Arduino\gctrl\gctrl.ino</p><p>Using board 'uno' from platform in folder: C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14</p><p>Using core 'arduino' from platform in folder: C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14</p><p>Detecting libraries used...</p><p>&quot;C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino&quot; &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\variants\standard&quot; &quot;C:\Users\CPARAS~1\AppData\Local\Temp\build3a8a9971c0e1ebf5b423349760755e06.tmp\sketch\gctrl.ino.cpp&quot; -o &quot;nul&quot;</p><p>&quot;C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino&quot; &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\variants\standard&quot; &quot;-IC:\Arduino\libraries\Servo\src&quot; &quot;C:\Users\CPARAS~1\AppData\Local\Temp\build3a8a9971c0e1ebf5b423349760755e06.tmp\sketch\gctrl.ino.cpp&quot; -o &quot;nul&quot;</p><p>&quot;C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino&quot; &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\variants\standard&quot; &quot;-IC:\Arduino\libraries\Servo\src&quot; &quot;-IC:\Arduino\libraries\Adafruit-Motor-Shield-library-master&quot; &quot;C:\Users\CPARAS~1\AppData\Local\Temp\build3a8a9971c0e1ebf5b423349760755e06.tmp\sketch\gctrl.ino.cpp&quot; -o &quot;nul&quot;</p><p>&quot;C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino&quot; &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\variants\standard&quot; &quot;-IC:\Arduino\libraries\Servo\src&quot; &quot;-IC:\Arduino\libraries\Adafruit-Motor-Shield-library-master&quot; &quot;C:\Arduino\libraries\Servo\src\avr\Servo.cpp&quot; -o &quot;nul&quot;</p><p>&quot;C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino&quot; &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\variants\standard&quot; &quot;-IC:\Arduino\libraries\Servo\src&quot; &quot;-IC:\Arduino\libraries\Adafruit-Motor-Shield-library-master&quot; &quot;C:\Arduino\libraries\Servo\src\sam\Servo.cpp&quot; -o &quot;nul&quot;</p><p>&quot;C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino&quot; &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\variants\standard&quot; &quot;-IC:\Arduino\libraries\Servo\src&quot; &quot;-IC:\Arduino\libraries\Adafruit-Motor-Shield-library-master&quot; &quot;C:\Arduino\libraries\Servo\src\samd\Servo.cpp&quot; -o &quot;nul&quot;</p><p>&quot;C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino&quot; &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\variants\standard&quot; &quot;-IC:\Arduino\libraries\Servo\src&quot; &quot;-IC:\Arduino\libraries\Adafruit-Motor-Shield-library-master&quot; &quot;C:\Arduino\libraries\Adafruit-Motor-Shield-library-master\AFMotor.cpp&quot; -o &quot;nul&quot;</p><p>&quot;C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino&quot; &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\variants\standard&quot; &quot;-IC:\Arduino\libraries\Servo\src&quot; &quot;-IC:\Arduino\libraries\Adafruit-Motor-Shield-library-master&quot; &quot;C:\Users\CPARAS~1\AppData\Local\Temp\build3a8a9971c0e1ebf5b423349760755e06.tmp\sketch\gctrl.ino.cpp&quot; -o &quot;nul&quot;</p><p>Generating function prototypes...</p><p>&quot;C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino&quot; &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\variants\standard&quot; &quot;-IC:\Arduino\libraries\Adafruit-Motor-Shield-library-master&quot; &quot;-IC:\Arduino\libraries\Servo\src&quot; &quot;C:\Users\CPARAS~1\AppData\Local\Temp\build3a8a9971c0e1ebf5b423349760755e06.tmp\sketch\gctrl.ino.cpp&quot; -o &quot;C:\Users\CPARAS~1\AppData\Local\Temp\build3a8a9971c0e1ebf5b423349760755e06.tmp\preproc\ctags_target_for_gcc_minus_e.cpp&quot;</p><p>&quot;C:\Arduino\tools-builder\ctags\5.8-arduino10/ctags&quot; -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives &quot;C:\Users\CPARAS~1\AppData\Local\Temp\build3a8a9971c0e1ebf5b423349760755e06.tmp\preproc\ctags_target_for_gcc_minus_e.cpp&quot;</p><p>Compiling sketch...</p><p>&quot;C:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-g++&quot; -c -g -Os -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10611 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\cores\arduino&quot; &quot;-IC:\Users\cparaschiv\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.14\variants\standard&quot; &quot;-IC:\Arduino\libraries\Adafruit-Motor-Shield-library-master&quot; &quot;-IC:\Arduino\libraries\Servo\src&quot; &quot;C:\Users\CPARAS~1\AppData\Local\Temp\build3a8a9971c0e1ebf5b423349760755e06.tmp\sketch\gctrl.ino.cpp&quot; -o &quot;C:\Users\CPARAS~1\AppData\Local\Temp\build3a8a9971c0e1ebf5b423349760755e06.tmp\sketch\gctrl.ino.cpp.o&quot;</p><p>gctrl:107: error: variable or field 'fileSelected' declared void</p><p> void fileSelected(File selection) {</p><p> ^</p><p>gctrl:107: error: 'File' was not declared in this scope</p><p>gctrl:138: error: variable or field 'serialEvent' declared void</p><p> void serialEvent(Serial p)</p><p> ^</p><p>gctrl:138: error: expected ')' before 'p'</p><p> void serialEvent(Serial p)</p><p> ^</p><p>gctrl:1: error: 'import' does not name a type</p><p> import java.awt.event.KeyEvent;</p><p> ^</p><p>gctrl:2: error: 'import' does not name a type</p><p> import javax.swing.JOptionPane;</p><p> ^</p><p>gctrl:3: error: 'import' does not name a type</p><p> import processing.serial.*;</p><p> ^</p><p>gctrl:5: error: 'Serial' does not name a type</p><p> Serial port = null;</p><p> ^</p><p>gctrl:9: error: 'null' was not declared in this scope</p><p> String portname = null;</p><p> ^</p><p>gctrl:16: error: expected unqualified-id before '[' token</p><p> String[] gcode;</p><p> ^</p><p>C:\Arduino\gctrl\gctrl.pde: In function 'void openSerialPort()':</p><p>gctrl:21: error: 'null' was not declared in this scope</p><p> if (portname == null) return;</p><p> ^</p><p>gctrl:22: error: 'port' was not declared in this scope</p><p> if (port != null) port.stop();</p><p> ^</p><p>gctrl:22: error: 'null' was not declared in this scope</p><p> if (port != null) port.stop();</p><p> ^</p><p>gctrl:24: error: 'port' was not declared in this scope</p><p> port = new Serial(this, portname, 9600);</p><p> ^</p><p>gctrl:24: error: expected type-specifier before 'Serial'</p><p> port = new Serial(this, portname, 9600);</p><p> ^</p><p>C:\Arduino\gctrl\gctrl.pde: In function 'void selectSerialPort()':</p><p>gctrl:31: error: 'JOptionPane' was not declared in this scope</p><p> String result = (String) JOptionPane.showInputDialog(this,</p><p> ^</p><p>gctrl:31: error: invalid use of 'this' in non-member function</p><p> String result = (String) JOptionPane.showInputDialog(this,</p><p> ^</p><p>gctrl:35: error: 'null' was not declared in this scope</p><p> null,</p><p> ^</p><p>gctrl:36: error: 'class HardwareSerial' has no member named 'list'</p><p> Serial.list(),</p><p> ^</p><p>C:\Arduino\gctrl\gctrl.pde: In function 'void setup()':</p><p>gctrl:45: error: redefinition of 'void setup()'</p><p> void setup()</p><p> ^</p><p>C:\Arduino\gctrl\gctrl.ino:83:6: note: 'void setup()' previously defined here</p><p> void setup() {</p><p> ^</p><p>gctrl:47: error: 'size' was not declared in this scope</p><p> size(500, 250);</p><p> ^</p><p>C:\Arduino\gctrl\gctrl.pde: In function 'void draw()':</p><p>gctrl:53: error: 'background' was not declared in this scope</p><p> background(0); </p><p> ^</p><p>gctrl:54: error: 'fill' was not declared in this scope</p><p> fill(255);</p><p> ^</p><p>gctrl:56: error: 'text' was not declared in this scope</p><p> text(&quot;INSTRUCTIONS&quot;, 12, y); y += dy;</p><p> ^</p><p>gctrl:68: error: 'height' was not declared in this scope</p><p> y = height - dy;</p><p> ^</p><p>gctrl:69: error: invalid operands of types 'const char [20]' and 'float' to binary 'operator+'</p><p> text(&quot;current jog speed: &quot; + speed + &quot; inches per step&quot;, 12, y); y -= dy;</p><p> ^</p><p>C:\Arduino\gctrl\gctrl.pde: In function 'void keyPressed()':</p><p>gctrl:75: error: 'key' was not declared in this scope</p><p> if (key == '1') speed = 0.001;</p><p> ^</p><p>gctrl:76: error: 'key' was not declared in this scope</p><p> if (key == '2') speed = 0.01;</p><p> ^</p><p>gctrl:77: error: 'key' was not declared in this scope</p><p> if (key == '3') speed = 0.1;</p><p> ^</p><p>gctrl:80: error: 'keyCode' was not declared in this scope</p><p> if (keyCode == LEFT) port.write(&quot;G91\nG20\nG00 X-&quot; + speed + &quot; Y0.000 Z0.000\n&quot;);</p><p> ^</p><p>gctrl:80: error: 'LEFT' was not declared in this scope</p><p> if (keyCode == LEFT) port.write(&quot;G91\nG20\nG00 X-&quot; + speed + &quot; Y0.000 Z0.000\n&quot;);</p><p> ^</p><p>gctrl:80: error: 'port' was not declared in this scope</p><p> if (keyCode == LEFT) port.write(&quot;G91\nG20\nG00 X-&quot; + speed + &quot; Y0.000 Z0.000\n&quot;);</p><p> ^</p><p>gctrl:80: error: invalid operands of types 'const char [15]' and 'float' to binary 'operator+'</p><p> if (keyCode == LEFT) port.write(&quot;G91\nG20\nG00 X-&quot; + speed + &quot; Y0.000 Z0.000\n&quot;);</p><p> ^</p><p>gctrl:81: error: 'keyCode' was not declared in this scope</p><p> if (keyCode == RIGHT) port.write(&quot;G91\nG20\nG00 X&quot; + speed + &quot; Y0.000 Z0.000\n&quot;);</p><p> ^</p><p>gctrl:81: error: 'RIGHT' was not declared in this scope</p><p> if (keyCode == RIGHT) port.write(&quot;G91\nG20\nG00 X&quot; + speed + &quot; Y0.000 Z0.000\n&quot;);</p><p> ^</p><p>gctrl:81: error: 'port' was not declared in this scope</p><p> if (keyCode == RIGHT) port.write(&quot;G91\nG20\nG00 X&quot; + speed + &quot; Y0.000 Z0.000\n&quot;);</p><p> ^</p><p>gctrl:81: error: invalid operands of types 'const char [14]' and 'float' to binary 'operator+'</p><p> if (keyCode == RIGHT) port.write(&quot;G91\nG20\nG00 X&quot; + speed + &quot; Y0.000 Z0.000\n&quot;);</p><p> ^</p><p>gctrl:82: error: 'keyCode' was not declared in this scope</p><p> if (keyCode == UP) port.write(&quot;G91\nG20\nG00 X0.000 Y&quot; + speed + &quot; Z0.000\n&quot;);</p><p> ^</p><p>gctrl:82: error: 'UP' was not declared in this scope</p><p> if (keyCode == UP) port.write(&quot;G91\nG20\nG00 X0.000 Y&quot; + speed + &quot; Z0.000\n&quot;);</p><p> ^</p><p>gctrl:82: error: 'port' was not declared in this scope</p><p> if (keyCode == UP) port.write(&quot;G91\nG20\nG00 X0.000 Y&quot; + speed + &quot; Z0.000\n&quot;);</p><p> ^</p><p>gctrl:82: error: invalid operands of types 'const char [21]' and 'float' to binary 'operator+'</p><p> if (keyCode == UP) port.write(&quot;G91\nG20\nG00 X0.000 Y&quot; + speed + &quot; Z0.000\n&quot;);</p><p> ^</p><p>gctrl:83: error: 'keyCode' was not declared in this scope</p><p> if (keyCode == DOWN) port.write(&quot;G91\nG20\nG00 X0.000 Y-&quot; + speed + &quot; Z0.000\n&quot;);</p><p> ^</p><p>gctrl:83: error: 'DOWN' was not declared in this scope</p><p> if (keyCode == DOWN) port.write(&quot;G91\nG20\nG00 X0.000 Y-&quot; + speed + &quot; Z0.000\n&quot;);</p><p> ^</p><p>gctrl:83: error: 'port' was not declared in this scope</p><p> if (keyCode == DOWN) port.write(&quot;G91\nG20\nG00 X0.000 Y-&quot; + speed + &quot; Z0.000\n&quot;);</p><p> ^</p><p>gctrl:83: error: invalid operands of types 'const char [22]' and 'float' to binary 'operator+'</p><p> if (keyCode == DOWN) port.write(&quot;G91\nG20\nG00 X0.000 Y-&quot; + speed + &quot; Z0.000\n&quot;);</p><p> ^</p><p>gctrl:84: error: 'keyCode' was not declared in this scope</p><p> if (keyCode == KeyEvent.VK_PAGE_UP) port.write(&quot;G91\nG20\nG00 X0.000 Y0.000 Z&quot; + speed + &quot;\n&quot;);</p><p> ^</p><p>gctrl:84: error: 'KeyEvent' was not declared in this scope</p><p> if (keyCode == KeyEvent.VK_PAGE_UP) port.write(&quot;G91\nG20\nG00 X0.000 Y0.000 Z&quot; + speed + &quot;\n&quot;);</p><p> ^</p><p>gctrl:84: error: 'port' was not declared in this scope</p><p> if (keyCode == KeyEvent.VK_PAGE_UP) port.write(&quot;G91\nG20\nG00 X0.000 Y0.000 Z&quot; + speed + &quot;\n&quot;);</p><p> ^</p><p>gctrl:84: error: invalid operands of types 'const char [28]' and 'float' to binary 'operator+'</p><p> if (keyCode == KeyEvent.VK_PAGE_UP) port.write(&quot;G91\nG20\nG00 X0.000 Y0.000 Z&quot; + speed + &quot;\n&quot;);</p><p> ^</p><p>gctrl:85: error: 'keyCode' was not declared in this scope</p><p> if (keyCode == KeyEvent.VK_PAGE_DOWN) port.write(&quot;G91\nG20\nG00 X0.000 Y0.000 Z-&quot; + speed + &quot;\n&quot;);</p><p> ^</p><p>gctrl:85: error: 'KeyEvent' was not declared in this scope</p><p> if (keyCode == KeyEvent.VK_PAGE_DOWN) port.write(&quot;G91\nG20\nG00 X0.000 Y0.000 Z-&quot; + speed + &quot;\n&quot;);</p><p> ^</p><p>gctrl:85: error: 'port' was not declared in this scope</p><p> if (keyCode == KeyEvent.VK_PAGE_DOWN) port.write(&quot;G91\nG20\nG00 X0.000 Y0.000 Z-&quot; + speed + &quot;\n&quot;);</p><p> ^</p><p>gctrl:85: error: invalid operands of types 'const char [29]' and 'float' to binary 'operator+'</p><p> if (keyCode == KeyEvent.VK_PAGE_DOWN) port.write(&quot;G91\nG20\nG00 X0.000 Y0.000 Z-&quot; + speed + &quot;\n&quot;);</p><p> ^</p><p>gctrl:86: error: 'key' was not declared in this scope</p><p> if (key == 'h') port.write(&quot;G90\nG20\nG00 X0.000 Y0.000 Z0.000\n&quot;);</p><p> ^</p><p>gctrl:86: error: 'port' was not declared in this scope</p><p> if (key == 'h') port.write(&quot;G90\nG20\nG00 X0.000 Y0.000 Z0.000\n&quot;);</p><p> ^</p><p>gctrl:87: error: 'key' was not declared in this scope</p><p> if (key == 'v') port.write(&quot;$0=75\n$1=74\n$2=75\n&quot;);</p><p> ^</p><p>gctrl:87: error: 'port' was not declared in this scope</p><p> if (key == 'v') port.write(&quot;$0=75\n$1=74\n$2=75\n&quot;);</p><p> ^</p><p>gctrl:89: error: 'key' was not declared in this scope</p><p> if (key == 's') port.write(&quot;$3=10\n&quot;);</p><p> ^</p><p>gctrl:89: error: 'port' was not declared in this scope</p><p> if (key == 's') port.write(&quot;$3=10\n&quot;);</p><p> ^</p><p>gctrl:90: error: 'key' was not declared in this scope</p><p> if (key == 'e') port.write(&quot;$16=1\n&quot;);</p><p> ^</p><p>gctrl:90: error: 'port' was not declared in this scope</p><p> if (key == 'e') port.write(&quot;$16=1\n&quot;);</p><p> ^</p><p>gctrl:91: error: 'key' was not declared in this scope</p><p> if (key == 'd') port.write(&quot;$16=0\n&quot;);</p><p> ^</p><p>gctrl:91: error: 'port' was not declared in this scope</p><p> if (key == 'd') port.write(&quot;$16=0\n&quot;);</p><p> ^</p><p>gctrl:92: error: 'key' was not declared in this scope</p><p> if (key == '0') openSerialPort();</p><p> ^</p><p>gctrl:93: error: 'key' was not declared in this scope</p><p> if (key == 'p') selectSerialPort();</p><p> ^</p><p>gctrl:94: error: 'key' was not declared in this scope</p><p> if (key == '$') port.write(&quot;$$\n&quot;);</p><p> ^</p><p>gctrl:94: error: 'port' was not declared in this scope</p><p> if (key == '$') port.write(&quot;$$\n&quot;);</p><p> ^</p><p>gctrl:97: error: 'key' was not declared in this scope</p><p> if (!streaming &amp;&amp; key == 'g') {</p><p> ^</p><p>gctrl:98: error: 'gcode' was not declared in this scope</p><p> gcode = null; i = 0;</p><p> ^</p><p>gctrl:98: error: 'null' was not declared in this scope</p><p> gcode = null; i = 0;</p><p> ^</p><p>gctrl:99: error: 'File' was not declared in this scope</p><p> File file = null; </p><p> ^</p><p>gctrl:100: error: 'println' was not declared in this scope</p><p> println(&quot;Loading file...&quot;);</p><p> ^</p><p>gctrl:101: error: 'file' was not declared in this scope</p><p> selectInput(&quot;Select a file to process:&quot;, &quot;fileSelected&quot;, file);</p><p> ^</p><p>gctrl:101: error: 'selectInput' was not declared in this scope</p><p> selectInput(&quot;Select a file to process:&quot;, &quot;fileSelected&quot;, file);</p><p> ^</p><p>gctrl:104: error: 'key' was not declared in this scope</p><p> if (key == 'x') streaming = false;</p><p> ^</p><p>C:\Arduino\gctrl\gctrl.pde: At global scope:</p><p>gctrl:107: error: variable or field 'fileSelected' declared void</p><p> void fileSelected(File selection) {</p><p> ^</p><p>gctrl:107: error: 'File' was not declared in this scope</p><p>Multiple libraries were found for &quot;Servo.h&quot;</p><p> Used: C:\Arduino\libraries\Servo</p><p> Not used: C:\Users\cparaschiv\Documents\Arduino\libraries\Servo2</p><p>Using library Servo at version 1.1.2 in folder: C:\Arduino\libraries\Servo </p><p>Using library Adafruit-Motor-Shield-library-master at version 1.0.0 in folder: C:\Arduino\libraries\Adafruit-Motor-Shield-library-master </p><p>exit status 1</p><p>variable or field 'fileSelected' declared void</p><p>**********************</p><p>Do you know why?</p>
<p>it looks you try to run GCTRL processing code in arduino.</p><p>You have to run GCTRL.PDE in processing softwear</p>
<p>Ol&aacute; amigo, gostaria de Dizer Que o Seu Projeto, apesar de simples, ficou muito bom e Chamou Minha Aten&ccedil;&atilde;o Entre Tantos Outros postados aqui. Apesar de ter sido feito com produtos simples, a qualidade do desenho apresentado no v&iacute;deo, ficou bem legal. Parab&eacute;ns e muito sucesso em seus projetos e quero dizer que pessoas assim igual a voc&ecirc;, fazem a diferen&ccedil;a neste mundo de hooje.</p><p>Eu tamb&eacute;m j&aacute; fiz uma CNC, com caracter&iacute;sticas pr&oacute;prias; por&eacute;m moro em outro pa&iacute;s e por quest&otilde;es financeiras n&atilde;o &eacute; poss&iacute;vel adquirir uma conta premium no momento. </p><p>Mas mesmo assim desejo sucesso para voc&ecirc; e todos os outros membros do &quot;Instructables&quot; que todos continuem fazendo a vida de todos um pouco melhor...</p><p><br></p>
<p>your CNC is very impressive friend, but i don't understand a single word what you said :)</p>
<p>Translated:</p><p>Hello friend, I would like to say that your project, although simple, was very good and called my attention among so many others posted here. Although it was made with simple products, the quality of the design presented in the video, was very cool. Congratulations and a lot of success in your projects and I want to say that people like you, make a difference in this world of hooje.<br><br>I have also done a CNC, with its own characteristics; But I live in another country and for financial reasons it is not possible to buy a premium account at the moment.<br><br>But I still wish success for you and all the other members of the &quot;Instructables&quot; to continue to make everyone's life a little better ...</p>
<p>you peoples are so nice, thanks for translate it <a href="https://www.instructables.com/member/JetMechanic" style="">JetMechanic</a> this type of efforts are highly appreciable. </p>
<p>hi bro can you helpe to make that one or send me document that i could use it </p>
<p>does this work on win 10</p>
<p>yes</p>
​i want to write my own code , can you simple with keywords explain ideas of program ?
<p>hi gctrl not run with win10</p>
<p>Might be, as i have not tried on win 10 i am working on win 7.</p><p>I think some library may missing in your processing, if you share what error message is coming it will help me to help you.....</p>
<p>Hi, nice instructables! Is this cnc code designed by you only for this plotter, or is it universal? I am new to all this.</p>
<p>G codes are use in many CNC, main reason of using G codes are its software &quot;InkScape&quot; is open source and easily available to download thats the reason you find G codes in many CNC projects, But in commercial level CNC machine they prefer .NC type files may be they are more accurate and relaible. but at this prototype level Gcodes are best.</p>
<p>Thanks! Is it possible to build a plotter with 2 different cd drives (I have two different scrap drives, the motors are probably different)?</p>
<p>Yes you can build a plotter CD Drives are best, motors may different but basically they are Stepper motors with four terminals you can connect them directly to L293D motor shield. </p>
<p>hello my friend, i have one doubt from L293D motor shield,I put the cables from motor A + A-, B + B- or A + B +, A- B-?</p>
<p>A+ A- , B+ B- is right way to connect stepper with shield</p>
<p>where are the instructions.</p><p>Many pics but no details to manufacture the mechanisms.</p><p>Not much about how to control the electronics.</p>
<p>There is wiring detail in Step 4</p><p>There is material details in Step 2,</p><p>there is no need to manufacture any of mechanisms, all are ready made available with DVD drives just required some basic skill of understanding how to use parts, just be creative, </p><p>very much interested to help you if you stuck in between on any point or step.</p>
<p>please tell us wath is </p><p>&quot;instructABDO&quot;. I did find nothing about</p>
<p>&quot;instructABDO&quot; is the person's user name on instructable, from whom i was inspire regarding Gcodes..</p>
<p>I wonder if this could be adapted to lay down etch resisting ink onto the copper of small pcb's? If it could it would be very handy for laying out boards without using a transfer or other system.</p>
<p>I used to use an Artline permanent marking pens , many times, to make PCBs, I still have samples made from the 1970s. First clean the PCB with AJAX and a green scouring pad. wipe down the PCB with methylated spirits and let dry. Do not touch the PCB with (oil) fingers.</p><p>PCB is now ready for marking with pen. Use a brand new, juicy, pen.</p>
I have seen quite a few guys using Sharpy brand or Stadatelar brand black or red felt pens with good results. I haven't tried this myself but for the price of a pair of used drives and a felt pen it would be a cheap experiment to try!
yes it would be, I would like to bring something like that in future
<p>It appears that the micro-tipped marker would be enough for etch resisting, I have used this type pen to touch up a board before etching. If not I think using another pen it can be disassembled, using rubber gloves and some care, remove the absorbent medium wash out the ink and reload it with the etch resisting ink. Replace the cap when not in use to prevent drying thus prolonging its life. Once done it should take right off. This would be excellent for rapid prototyping of PCBs . </p>
<p>here i use 5v dc this is enough, whichever axis's servo is not working test it separatly weather stepper may be faulty this happens to me also,, attache stepper at pin </p><p>8, 9, 10, 11 and upload the code '' Stepper_one revolution '' this code is available at.</p><p>open arduino IDE--FILE---EXAMPLES---STEPPER--STEPPER_ONEREVOLUTION</p><p>upload the code and check if your stepper move its Ok, either you stepper is faulty</p>
Hey could you please tell me how much power, you provided to the motors?? Because I have managed to build up the complete plotter but it's x axis is not working when I used to mount the pen on it... I think it is a power issue.... So would you please tell me?

About This Instructable

52,773views

481favorites

License:

Bio: Electrical engineer by profession
More by Mr innovative:How to Make Arduino Based Digital Tachometer Simple DIY Tutorial How to Make GRBL + CNC V3 Shield Based Mini CNC Machine From Scrap DVD Drive How to make Arduino Based Mini CNC Machine A complete tutorial 
Add instructable to: