Introduction: A Simple DIY Arduino Controlled CNC Machine Pen Plotter or PCB Mill for Under US$50.
This instructable is an attempt to show that a simple CNC machine can be built
quite easily and quickly and that too for under US $50.
The idea was to put it together as quickly, and as simply as possible, but without compromising on the accuracy of the machine. So, even though the materials used are very inexpensive and easily available, I am happy to note that the machine is still very accurate. (The wood used was actually from pieces of scrap that were lying around from previous furniture builds. Similarly the yoga mat and the bits of rexine used to drape the plywood, were also discarded materials lying around the house).
As will be evident, it is a simple machine, built using :-
- Plywood, 18mm thick.
- 4 steel rods of 10mm Dia also called M10 smooth drill rods, of the desired length.
- Two pieces of M10 threaded rods (which I have used as lead screws) 10mm Dia and of the desired length.
- Two long nuts to mount the bed of the Y-Axis and X-axis.
- 4 simple radial ball bearings to which the Lead screws are attached end to end, to facilitate their smooth rotation.
- 8 Linear bearings (LM10UU).
- 8 pieces of two hole pipe clamps which hold the Linear bearings in place, all mounted on a wooden plywood frame.
- A green color yoga mat and some black leftover pieces of rexine are used as skin, to drape the machine.
- An arduino uno(clone)
- 2 Easy Drivers.
- 1 Servo Motor. SG90
- 2 Stepper Motors of type MINEBEA PJJQ196ZA type A 23LM-C263-G1V.
- 12 Volts 2 ampere SMPS (Power Supply)
To see how to build a similar machine do check out the video links which are attached at the end of this instructable.
For the electronics, I have used an Arduino Uno(clone) with Easy drivers to control the stepper motors. One SG90 Servo has been used to lift and drop the pen onto the writing bed.
All of the above hardware was sourced either from my local hardware store(Mumbai, Lamington Road) or from Ebay here in India.
The plywood was what I had lying around the house as scrap, from previous furniture projects.
Even the Stepper Motors were picked out of scrap from the streets of Mumbai, Lamington Road for Rs.150 each.They are of the TYPE 23LM series.
For the Software to control the machine I have flashed the Arduino uno with GRBL version 0.9i from Github. Here is the link to the repositories of GRBL https://github.com/grbl/grbl
For my CNC machine I needed a tweaked version of GRBL by Robottini, the link to which is given in the next step below, as I needed to run two Stepper motors, i.e. one for the X-axis and one for the Y-Axis, and then the pen on the Z-axis which was controlled by a Servo motor.
For the GUI (Graphical user interface), which streams the GCODE to the machine, I have used grblControl_0.8.4.zip from here https://github.com/Denvi/Candle
I have used the free software, InkScape, along with the Laser plugin from https://jtechphotonics.com/?page_id=1980 for generating the GCODE to draw or etch TEXT or GRAPHICS on the CNC machine.
In this video the machine can be seen writing(Plotting) out some text.
The GRBL settings which were tweaked by me to control this machine, are scrolled through, at the end of the video.
In the video below, which is sped up quite a bit(time lapse), the machine is seen drawing a cat. In real time it took about 4 and a half minutes to draw the cat.
The inspiration to build my CNC machine came from a series of video tutorials by Splatspacedurham.
Do note that Splatspacedurham uses bushings as glides for the X and Y axis, whereas I decided to use Linear bearings(LM10uu). The Linear bearings in my build give a smoother motion than the bushings he uses in his build. It is basically a personal choice so decide what you would want to use in your own builds. Also note that he glues the bushings to the sleds of the X and the Y axis, whereas I found that clamping them to the sleds, using two hole pipe clamps, was easier & better.
The link to part 1 of Splatspacedurham tutorial is below :-
Cheap DIY CNC Mill Part 1 of 7 by Splatspacedurham.
Now let's move on to the next Step............ where I show you the wiring of my machine.
Step 1: The Wiring Diagram of My Machine and Some Pen Drawings Which It Made.
This is how I wired up my machine. The diagram was made in Fritzing, a very nice and easy to use software to make and model small circuits.
Ignore the dotted lines in the image.
The drawings of the Peacock and the Muscleman are made using a Ballpoint pen as the plotting tool on the Z-Axis servo. As can be seen the drawings are very detailed and can be made even finer, by using a fine tip pen like the Artline 0.4 mm Fine Nib Drawing Pen available online for approx Rs.80 INR.
I modified the pen barrel in such a way that the Refill is being pushed down onto the writing bed by a small spring which is mounted between the end-cap of the pen barrel and the refill itself. I have explained it in the diagram which is attached.This helps the refill to remain in contact with the writing bed even if there are minor undulations on the bed surface.(The spring pushes the refill down to stay in contact with the paper even if there is a slight depression in the bed, and also allows the refill to retract into the chamber if there is a bump on the bed, so that minor unevenness of the bed is no longer an issue, and the writing or drawing remains very smooth.
For the Power Supply, I used a 12 Volts 2 ampere SMPS.
The arduino uno was connected via USB port to the computer and flashed with the GRBL library from Github
An important point to be remembered is that you should first do all the connections on the bread board, then connect the arduino to the PC using the USB cable, and then lastly switch on the Power to the 12 volts SMPS.
The source for the GRBL library which I used for my machine is given below :-
I needed this version of GRBL as I needed to control 2 Steppers and one Servo.
Use the PIN D11 to drive the servo. Use the commands M03 Sxxx where xxx is any value between 0 and 255 to rotate the servo between 0 -180 degrees. For my build I use M03S00 to raise the pen and M03S45 to drop it onto the writing bed.
Check out this link by Alessandro G. to see the servo being controlled:-
All in all the cost of the machine came to approx US $48 i.e Rs.3340 INR.The breakup is given below:-
- Plywood, 18mm thick.Scrap from previous furniture builds, so free.
- 4 steel rods of 10mm Dia also called M10 smooth drill rods, of the desired length. Rs.500 per metre.
- Two pieces of M10 threaded rods (which I have used as lead screws) 10mm Dia and of the desired length.Rs.50 per metre.
- Two long nuts to mount the bed of the Y-Axis and X-axis.Rs.20 each.
- 4 simple radial ball bearings to which the Lead screws are attached end to end, to facilitate their smooth rotation.Rs.80 each.
- 8 Linear bearings (LM10UU). Rs.100 each.
- 8 pieces of two hole pipe clamps which hold the Linear bearings in place.Rs.5 each
- A green color yoga mat used as skin, to drape the machine. Scrap, so free.
- Some black leftover pieces of rexine are used as skin, to drape the machine.Scrap, so free.
- An Arduino Uno (clone). Rs.400.
- Two Stepper Motors of type MINEBEA PJJQ196ZA type A 23LM-C263-G1V. Rs.150 each.
- One Servo motor of type SG90.Rs.100
- Two Easy Drivers. Rs.250 each.
- 12 volts 2 amps SMPS to power the stepper motors. Rs.320.
- TOTAL cost Rs.3340 INR, minimum. i.e. US $48 approx.
The aim eventually is to build a bigger CNC machine which would be able to LASER etch onto paper, or be used as a PCB milling machine, or as a router to cut or engrave wood, by simply changing the tool on the Z-Axis.
I do hope you found my Instructable useful. If you did, then Please VOTE for me.
Thanks for stopping by.
(Please do remember to VOTE for my instructable. Thank You and God Bless.)
We have a be nice policy.
Please be positive and constructive.