Home | Difficulty level | Advanced | Make a Mini CNC Plotter with old DVD players Arduino and L293D

Make a Mini CNC Plotter with old DVD players Arduino and L293D

There are many projects to recycle old DVD players into a mini CNC Plotter based on Arduino. It is a nice project and ideal to start with its Arduino. The mechanical construction and more particularly the pencil holder can be difficult. I propose in this article to realize a mini plotter by realizing the mechanical elements by 3D printing. We will use two L293D H bridges to drive the engines of the DVD players. We find it for less than €2 in China. You can develop your mini CNC Plotter directly from this post.

Step 1 : BOM

You can buy all components on internet or DIY store.

Step 2 : Prepare translation systems

Dismantle the old DVD players to get the translation system with the stepper motor.

mini traceur cnc plotter projets diy lecteur dvd
Stepper Motor and DVD player translation system ready to use.

Step 3 : Prepare stepper motors (X and Y axis)

It’s better to sold the wires on the flexible connector. You may have problems if you sold directly on the stepper motor. If you can, try to use 4 different colors, one for each Pin. There is no identification on the engine but the connection is quite simple. The first wire corresponds to the first output of the L293D (usually) and so on.

mini traceur cnc plotter soudure stepper motor projetdisy mini traceur cnc plotter soudure stepper motor gaine thermo projetdisy

Step 4 : Print 3D parts

You can download the STL files of this project onThingiverse or Cults3D.

Part 3D design Number
Mounting brackets (X axis) mini traceur cnc plotter arduino equerres montants axe Y 4x
Spacers mini traceur cnc plotter arduino entretoises supports axex x et y 8x
Breadboard spacers mini traceur cnc plotter arduino equerre breadboard 4x
Z axis basis mini traceur cnc plotter arduino support porte crayon 1x
Pencil case (8mm diam.) mini traceur cnc plotter arduino porte crayon diametre 8mm 1x
Pencil anti-tilt ring mini traceur cnc plotter arduino bague anti basculement 1x

I prefer to use PLA filament because it’s an environmental friendly and non toxic material. If you print all parts, you need about 3 hours. I use the French 3D printer Dagoma discovery200.

elements de structure impression3d mini traceur cnc plotter arduino

Step 5 : Prepare the plywood structure

Just cut the 3 parts (see the BOM for dimensions)

Step 6 : Prepare the circuit

The circuit is really easy as you can see bellow. One L293D for each axis and a servo motor for the Z-axis.

mini traceur cnc plotter arduino schema de cablage breadboard

mini traceur cnc plotter arduino projet diy cablage l293d breadboard
2x L293D motor divers

 

mini traceur cnc plotter arduino projet diy zoom cablage arduino
Arduino Uno

Step 7 : Assembling the Mini CNC Plotter

X and Y Axis

Use 4 spacers and 4 screws M4 x 30mm to assembling the X axis on the playwood (200 x 160mm). Do the same for the Y axis. Use the picture bellow to setup the position of elements. Finally attach the Y axis on the vertical uprights. The height is not important, we just need to adjust the position of the pen in its holder.

Drawing surface

Use a glue gun to fix the drawing surface on the axis. To find the good position move the stepper motor to the max. position and fix it.

mini traceur cnc plotter arduino projet diy zoom plateau dessin
Drawing surface (front vue)

Pencil case (Z-axis)

Follow the drawing to assembly the pencil holder. Fix the servo motor with 2x M2 screws or glue.

mini traceur cnc plotter arduino vue ensemble porte crayon
Pencil holder design
mini traceur cnc plotter arduino projet diy zoom gauche porte crayon
Pencil holder (left vue)
mini traceur cnc plotter arduino projet diy zoom droit porte crayon
Pencil holder (right vue) with the servo motor

Breadboard and Arduino

Use spacers to fix the breadboard.

mini traceur cnc plotter arduino projet diy arriere breadboard
Breadboard and Arduino (rear vue)

Step 8 : Setup X and Y axis

Now, we can start programming ! First, we need to test if the X and Y axis are properly connected. After that, we will calibrate the stepper motors.

X axis test

X-Axis use the pins 8,9,10 and 11 by default. Start this program. If all is correct, the stepper motor must do 100 steps. Measure the distance and divide by 100 to obtain the X-Axis calibration value.

Y axis test

Do the same for the Y axis.

In case of problem

The main problems I encountered during the development of my plotter :

  • The engine does not move: first check the wiring of the L293D. The IN and OUT Pins may be reversed.
  • The direction of movement is reversed. Reverse Pins on the L293D.
  • The engine never stops, do not go to the end or “jump”. There is probably an obstacle in its path. Check if one screw is not too long …

Step 9 : Upload the CNC code into the Arduino

Before uploading the CNC program, maybe you need to update the configuration

  • penZUp : angle of the servo when the pen is Up
  • penZDown : angle when the pen is Down (on the paper sheet)
  • Pins : servo, X and Y axis
  • Calibration values of the X and Y-axis

Warning: do not use the servo motor to press the pencil on the paper sheet. The force exerted by the actuator may be too strong and prevent movement of the axis X. The pen is pressed on the sheet by the spring.

Step 10 : Install Processing or use gctrl.exe

Last step before your first draw. We need to install a program that send gcode file to the Arduino controler.

If you are a Windows user you can directly use the compilated version of gctrl. You can download it here.

For macOS or Linux users, you need to install Processing (here) then run gctrl.pde (download here)

Step 11 : Plot your first draw with gctrl

Before making your first draw :

  • Make sure the plot surface is at the origine.
  • Check that nothing blocks the movement of the axes
  • Place a sheet on the drawing area

gctrl is an efficient but basic program in the sense that it does not check the selected file. The plotter start just after the selection of the gcode file. So, be sure before validate. In case of problem, press “x” !

  • Press “p” to choose the serial port.
  • Press “h” to go at home position
  • Press “g” to chose the gcode file

mini cnc traceur arduino - inkscape gcode gctrl_pde

mini traceur cnc plotter arduino test minion

A short video (in french at the moment…be patient) that explains how to make your Mini CNC plotter.


I hope you find everything you need to make your Mini CNC Plotter. I hope I did not forget anything. Feel free to share your experience or add your tricks. Comments are there for.

  • Itihash

    What i need to do for test X & Y axis?

    • Hi Itihash. Can you tell at what step your are ?

      • Itihash

        I’ll make it so i following you but i didn’t understand the step 8.

        • OK. We want to know how many steps are needed to move the pencil (for example 10mm). So, run X drive with 100 steps, after measure the distance (x) and then divide 100/x mm. Now replace the value of the variable StepsPerMillimeterX (by default, it 6s/mm) . Do the same for the Y axis. After that, the X and Y axis are ready. I hope it’s clear enough now. Have a good day. Christophe

          • Itihash

            I can do it using gctrl or I need another application?

          • No. Use the Arduino IDE. Create a new file (for example TestX.ino) and past the code of the step 8 (X axis step). Start the program and do as indicate before. Do the same for the Y axis (or just change the Pins of the Y stepper motor). I’m sorry i forgot to translate in English the comments… but now, i’m sure you read French very well ;-). Bye

          • Itihash

            Thanks.

  • greg

    Isn’t a little mistake on connection from axis Y , l293d and pin 11 (white path) on breadboard? I guess it should be on oposite pins for l293d ?

    • Hi Greg. You probably right. Depending your drive, you may need to switch pins to find the correct direction. I hope you’ll succeed with your project. See you soon.

  • Itihash

    Step 6
    I haven’t find similarity between drawing and real photo.

  • Mahadi

    I have this error please help…….

    Arduino: 1.8.1 (Windows 7), Board: “Arduino/Genuino Uno”

    cnc_plotter:14: error: #include expects “FILENAME” or

    #include <Servo.h>

    ^

    cnc_plotter:15: error: #include expects “FILENAME” or

    #include <Stepper.h>

    ^

    exit status 1
    #include expects “FILENAME” or

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

    • Hi Mahadi. You need to install the servo library. You just need to install it directly from the library manager (sketch menu). After that, you can download the program. Have a good day.

      • Mahadi

        I add it but the error remain same …why…?

        cnc_plotter:18: error: #include expects “FILENAME” or

        #include <Servo.h>

        ^

        cnc_plotter:19: error: #include expects “FILENAME” or

        #include <Stepper.h>

        ^

        exit status 1
        #include expects “FILENAME” or

        • Sorry Mahadi, it’s totally impossible to help you like that. Could you send me your sketch by using the contact form. Thank’s

          • Mahadi

            I Figure-out the problem and fix it …But now i got a serious problem about G- Code making …Can u Please tell me How can i generate G-Code With out inkscape ?

            Actually i Use inkscape 0.48.5 version and also it’s plugin But i don’t find g code export …option.. So..How can i Generate G- Code .?
            And How you generate G code For Yourself.

          • Hello Mahadi. I’m glad if you found the solution ! To prepare your gcode files, just follow this post https://www.diyprojects.io/prepare-gcode-gctrl-files-inkscape-unicorn-makerbot-extension/
            See you soon

  • Mahadi

    Can u Please tell me How can i generate G-Code With out inkscape ?

    Actually i Use inkscape 0.48.5 version and also it’s plugin But i don’t find g code option.. So..How can i Generate G- Code now..?

  • bujari

    I did all steps like you but the stepper motors are not running. The servo motor is running but the steps not. can you help me please

    • Hi Bujari. Can you tell me how you power the stepper motors? May be that there is not enough power. The problem with recycling stepper motors from older dvd drives is that you do not know pin marking. You have to look for the right wiring. See you soon.

      • bujari

        I tried by stepper test, is running properly.
        Power I tried 12V and 9V the same.

  • kro-nos

    Hi, please help me.
    Have same error as Mahadi….

    Arduino: 1.8.3 (Windows 7), Board: “Arduino/Genuino Uno”
    cnc_plotter:14: error: #include expects “FILENAME” or etc…

    Included servo and stepper libraries as suggested from sketch menu
    but still the same error.
    I am not an expert please may you give me detailed info on how to solve.
    Thanks a lot.

  • Sadanand Kale

    I have problem when I’m trying to execute g code… It’s just showed…. Loading file…. And nothing….. What to do

    • kro-nos

      Solved.
      Thanks

      • Great. Maybe you could explain to everyone how you solved the problem. Thank’s

  • Sadam Lubowa

    hi am called sadam i have got a problem i have used the same wiring and code used but my cd rom stepper motor they dont move at all think the problem it ld293 ic but i have just bought them what can i do now because am stack

  • Eduardo A. Díaz Mesa

    Hi, very, very good project, I see that many people have been successful.

    I have uploaded Test_X_Axis_CNC_Plotter and Y, and my engines have good movement.

    I have a problem with gctrl.pde and gctrl.exe, but I do not know why. My engines have no movement with gctrl. Select the serial port (OK), use the arrows and no movement, load a gcode image with (G) and no movement. I do not know where the problem is.

    You help me? Thank you

    My beta-CNC without Arduino, only router with OpenWRT and L293 driver. Does not interpret GCODE yet:

    • Hello Eduardo. Great project. I’m sorry but I have no skills on openwrt (at the moment ;-))