Mini CNC Machine

by naveedaamir484 in Circuits > Arduino

425 Views, 6 Favorites, 0 Comments

Mini CNC Machine

finalll.png

Hello guys!

Wellcome in this instructable, here you gonna learn, how you can build your own mini CNC machine. I am gonna cover everything from basic dimensional design, circuits, software, to code. And will surely end up with a beautifully workable CNC machine all you gotta do is follow the steps .....

On the way up you gonna learn a lot of different kinds of stuff and its application. This project is divided into hardware and software parts. In hardware, I am gonna cover all about its fabrication, and don't worry about software configuration, It's a piece of cake for you now. I have attached a youtube video link, so feel free to watch it, and let's dive into this!

Watch my Complete youtube video: https://youtu.be/3mRB0fQsUkw


Downloads

Supplies

112.png

let us discuss first what are the components you have gotta need to full. Here are a few components that you can either buy or you can create your own, I better prefer to create my own. Further, I have divided components into two categories primary and secondary;

Primary Components

  • Arduino UNO
  • Moter Driver
  • Old DVD writers
  • Servo motor

Secondary Components (these are optional ones)

  • Switch
  • Cooling fan
  • Fuse
  • LEDs

and other components which are needed for assistance to make the structure such as wire, cardboard, PCB plate, header pins, etc.

Design & 3D-Model

222.png

I created this 3D model using Solid Works, It has two moving parts, in either x and y-direction. Arduino and Motor driver ICs and other components are inside the BOX fitted with a cooling fan to maintain temperature. This model is a hypothetical one, so our final prototype may look a little different to you.

Circuit Diagram

one.png

As you can see in the circuit diagram, there is an Arduino and somehow every other component connected to it. There are two servo motors each govern the movement of one axis such as the x-axis and y-axis. The stepper motor we are using is bi-polar so has only four terminals. Each motor driver takes 4 input pins from Arduino and gives 4 outputs pins that go to each stepper motor.

Arduino board works on a 5V supply so this is directly getting power from the adapter. To provide power either use a 12V-5V adaptor or create your own using basic hardware. Later I will explain you briefly. You might have observed I stress out on the word "Create your own" many times. this is because when you built yourself, you pretty much understand everything, and the outcome results are very compact and you can easily replace the faulty components.

In a diagram, there is an alphanumeric LCD, But in this project, I didn't use that.. so not discussing that.

The last component is the Servo motor with 180 degrees of freedom. is basically used for lifting the pen up and pen down. This servomotor could run on Arduino board power, so doesn’t require any motor driver for this, So that’s all about the circuit diagram... Let's build!

Fabrication - Circuit

two.png

In the above, I have shared two diagrams one for the motor driver and one for the voltage regulator. Following this, I have soldered one voltage regulator and two motor drivers on one small PCB plate. And maintained the necessary connection of voltage regulator with motor driver internally. As you can see the wiring part is so complex in the diagram so, we came up with a solution to put all electronic components together on the PCB board and solder them, So after by doing this, it will be a lot easier for us to change any component during its failure.

Motor-driver which is in Red color is one of the most important components but also has a short life, due to its excessive heating of motor-driver it blows up, so to solve this problem we needed to add the heat sink and the IC-bed system so we could replace the IC (L293D) without buying a new one, So it could only be possible if we make our own set of motor-drivers by soldering it on PCB using IC-bed along without electronic components.

Just because of this, 90% percent of the wiring part is done.it makes your circuit clean and free of short-circuiting problems. If you watch carefully at back there is a plus sign of soldering wire, that actually works as a heat sink and IC doesn't get heated up. If the above circuit is very depressing to you then just buy them online. And circuit connection remain same;

If you get this far Congratulation all your circuit is done... leave rest on me. In the next section, we are going to add Arduino on top of it.

Adding Arduino

dsd.png

IGNORE other components in this project, like dimmer, Ignition Coil, capacitor, etc. These don't serve any purpose here. That was just a part of my Final Year Project.

Here I have added the Arduino to complete the circuit. black-white wire supplies the power to Arduino and two pairs, each having 4 wires are going from Arduino to motor driver and output from the Motor driver is coming out from twisted pairs of wires and further feeding into stepper motor.

I also added the beeping system to make the interaction of the CNC machine with the user even better like, when the task is going to start it will beep twice along with green LED blinking and when the job will be done it will beep 6 times, to make the user aware that the job has finished successfully. After completing the soldering part it’s going to look as shown which is quite compact.

There are still extra pins where you can add LCD, LED light for indication or Bluetooth wireless system, etc. As per personal requirement. And in the next section, I am going to cover the Assembly.

Structure & Process of Assembly

Picture8.png

In this, we are going to set up the X and Y axis platform. In above-shown diagram will help you to understand how the structure of the 2D plotter is created step-wise. First, we are going to take two DVD writers and open them and then we extracted the main component that is lens pick-up assembly. This lens pickup assembly is inbuilt with one brushless motor and one stepper motor, so we don’t need a brushless motor, so remove it, and then it looks like in the 3rd slide-in diagram. Then we will put each on X and Y plane with structural support, Now we have four-wire from each stepper motor, all four wires are connected with plotter hardware inside the interior and then the wiring is done successfully.

Finishing

new.png

When X and Y motion platforms are ready, then place them having an angle of 90 Degree between them, and both planes should be uniform. And finally, add the pen lifting mechanism connected with the servo motor you can follow any design as per your wish. In the beginning, the lifting mechanism was not very successful as shown in the picture, because it was vibrating a lot so I removed it and create another one that is much better.

After putting everything together and we are ready to perform a test on it. In the next section, we gonna work on the software part.

Software Configuration

randddddppp.png

In software configuration, there are a lot of things from programming the Arduino to the software used and their configuration. The list of Software’s we used are

  • Arduino
  • Ink-Scape
  • G-code Sender
  • 3D-fox

Arduino Software is used to program the microcontroller. I have attached 3 files on purpose. The first file helps you to check the working of all components before sending the main code. When all the components are working fine then send the main code and before burning any code to the Microcontroller cross-check the pin no and make sure all components are pointing to the right pin.

There is one more file to check for Bluetooth connection. In case if you want to send the g-code file wirelessly, this is optional to you but the benefit of this is, your CNC machine will be pretty handy. To access the Bluetooth configuration all you have to do is to add the Bluetooth module HC05 as shown in the circuit diagram, you hardly need to add 4 wires so be cool. I want to remind you that there will be no change in the main code even after adding Bluetooth.

Testing

ddddd.png

After burning the main code successfully our machine is ready to test finally but questions, how are we gonna test right? as you know our CNC machine understands only g-code so we need to feed some g-code to make it work. For this, I have added some sample g-code files. Download anyone and follow my next steps.

  • I hope you have downloaded any g-code file as per your preference. Now
  • Go to chrome and type "online G-code sender" extension.
  • Click on the first link and add the Extension to your browser.
  • Now open the g-code sender extension.
  • Now load the file which you have downloaded earlier.
  • Go to connect and set the configuration and then add select COM port.
  • After setting up the connection with Arduino click on the "send to machine" button.

After this, your CNC machine should be able to communicate and perform the function.

Fox-3D is an android app, you can use this app to send the g-code file right from your phone to Microcontroller wirelessly... it's like Magic. This eliminates the use of cord and laptop plus the Android app is more interactive than an online g-code sender extension. Mostly I prefer this app rather than using a laptop, I will attach a working youtube video link of this project.

Ink-scape: Till now we know how to send the g-code but we don't know how to convert any type of image or figure into g-code, so to accomplish this we use Ink-scape. All the g-code files I provided in the previous section, were being generated using this software. To learn to work with this software, I will attach a youtube link here.

Video link- https://youtu.be/0kUwjBmWdvI

Sample Result & Output

Picture6.png

All the 40X40 mm of drawing or figures are drawn by CNC machine. Achieving this level of accuracy is Incredible. I got a wonderful experience working on this project and I hope, you got it too as well. On the way up you gonna learn a lot of things so keep going, and have fun around with different things. It has no limits for its application.

Watch my Complete youtube video: https://youtu.be/3mRB0fQsUkw

Feel free to ask any question: naveedamir488@gmail.com

Hopefully, in the next instructable, I will show, how you can create your tesla coil very cheaply using an ignition coil. If you are interested check out the tesla coil video link- https://youtu.be/zAFFAu6N3i4