Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 32

INDEX

Sr Title Page
no. no.
1. Abstract
2-3
2. Project Objective
2-3
3. Methodology
4-5
4. G CODE From PC
5-6
5. Atmega 328 Controller
6-7
6. Arduino Uno
8-14
7. CNC V3.0 Shield
15-16
8. Stepper Motor
17
9. GRBL Control Software/Firmware For Arduino 17-20
10. Various Parts Of CNC Machine
21-23
11. Process Of CNC MACHINE
24-26
12. Process Discription
27-28
13. Power System
28-29
14. Conclusion
32-33
15. References
33-34

1
Abstract
Due to the rapid growth of technology the usage & utilization of CNC
machine in industries are increased. The fabrication of low cost CNC
machine is used to reduce cost and complexity of machine. This paper
deals with the design of automatic mini CNC machine for PCB drawing
and drilling. The Idea behind our project is to design and drill PCB
based on low cost CNC system the lower cost is achieved by
incorporating features of PC with ATMEGA 328 controller in an
arduino. We have use an G code for whole system operation G code is
nothing but a language in which people tell computerized machine tools
‘How to make something’. The How is defined by instructions on where
to move & how fast to move. Key Words: CNC, Arduino controller, G
code, CNC SHIELD V3.0, A3967

2
2.Project Objective

To develop a low cost automatic mini CNC machine for PCB drawing
and drilling. This system reduces the cost of machine and increases
the flexibility.

2.1MEANING OF ‘CNC’
CNC means Computer Numerical Control. This means a computer
converts the design into numbers which the computer uses to
control the cutting and shaping of the material.

2.2USE OF TYPICAL CNC MACHINE

The design is loaded into the computer which is attached to the CNC
machine. The computer changes the design into a special code
(numerical) that controls the way the CNC cuts and shapes the
material

3
3.Methodology

The G code is interfaced with ARDUINO CNC based controller by CNC


SHIELD V3.0 module which is used to convert the code in convenient
controller code i.e serial to USB converter. Hence it acts like interfacing
module between PC to Controller. This code is further passed to
stepper motor by easy drivers which converts the code and as per
instructions the stepper motor moves. We need three axises X,Y,Z
which operates as follows X stepper motor move left and right Y
stepper motor moves front and back and Z stepper motor up and
down as per given dimensions these axis’s will move on..

3.1 BLOCK DIAGRAM

In this idea of project, Arduino microcontroller platform with


ATMEGA 328 core is used. It can be easily interfaced
with PC using CNC SHIELD V3.0 module where as also with the easy
drivers and stepper motors to.
The basic block diagram is as shown in FIG.1 The explanation is given
as follows:

4
ARDUINO
UNO &
CNC
SHIELD
V3.0

4.G code from PC


G code is nothing but a language in which people tell computerized
machine tools ‘How to make something’. The How is defined by
instructions on where to move, how fast to move, & through what path
to move.
2.2 Serial to USB converter
It is used for making the communication between USB based computers
and serial devices. We use here, CNC SHIELD V3.0 (Future Tech
Devices International) serial to USB converter is used. FT232RL IC is

5
used. It is bidirectional converter. This converter is used to load the data
which is coming from the PC system into the controller. This converter
converts human interpretation language into its ASCIIvalue which is
understandable by the controller.
FT232RL is 28 pin IC. It has internal clock generator so that no external
crystal is required. It works on FIFO i.e. First In First Out technique.

6
5.ATMEGA 328 Controller
This system uses Arduino controller platform with ATMEGA 328 core.
The ATMEGA 328 is a single chip controller which is created by Atmel
and it belongs to MEGA AVR series.
It is 28 pin IC and it is of 8 bit. It is based on RISC (Reduced
Instruction Set Computer) architecture. It has 26 I/O pins, 32 working
registers, 32Kb of flash memory, 2Kb RAM and 1Kb EEPROM.

: Pin out of ATmega328

7
The maximum operating frequency of ATMEGA 328 is 20 MHz It has
external and internal interrupts. Each pin of microcontroller provides 5
Volts, 40mA current. It has 16 digital and 8 analog channels. If we want
more than 16 digital channels then we can convert the analog channels
to digital channels by using in build ADC (Analog to Digital Converter)
by writing the proper code.

6.ARDUINO UNO

The Arduino Uno R3 is a


microcontroller board based
on the ATmega328 (datasheet). It has 14 digital input/output pins (of
which 6 can be used as PWM outputs), 6 analog inputs, a
16 MHz crystal oscillator, a USB connection, a power jack, an ICSP

8
header, and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or
power it with a AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the
FTDI USB-to-serial driver chip. Instead, it features
the Atmega16U2 (Atmega8U2 up to version R2) programmed as a
USB-to-serial converter.
Revision 2 of the Uno board has a resistor pulling the 8U2 HWB line to
ground, making it easier to put into DFU mode.
Revision 3 of the board has the following new features:

 1.0 pinout: added SDA and SCL pins that are near to the AREF pin
and two other new pins placed near to the RESET pin, the IOREF
that allow the shields to adapt to the voltage provided from the
board. In future, shields will be compatible both with the board
that use the AVR, which operate with 5V and with the Arduino
Due that operate with 3.3V. The second one is a not connected pin,
that is reserved for future purposes.
 Stronger RESET circuit.
 Atmega 16U2 replace the 8U2.
"Uno" means one in Italian and is named to mark the upcoming release
of Arduino 1.0. The Uno and version 1.0 will be the reference versions
of Arduino, moving forward. The Uno is the latest in a series of USB
Arduino boards, and the reference model for the Arduino platform; for a
comparison with previous versions
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage 7-12V
(recommended)
9
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328) of which 0.5 KB used
by bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MHz

6.1 Power
The Arduino Uno can be powered via the USB connection or with an
external power supply. The power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter
(wall-wart) or battery. The adapter can be connected by plugging a
2.1mm center-positive plug into the board's power jack. Leads from a
battery can be inserted in the Gnd and Vin pin headers of the POWER
connector.
The board can operate on an external supply of 6 to 20 volts. If supplied
with less than 7V, however, the 5V pin may supply less than five volts
and the board may be unstable. If using more than 12V, the voltage
regulator may overheat and damage the board. The recommended range
is 7 to 12 volts.
The power pins are as follows:

 VIN. The input voltage to the Arduino board when it's using an


external power source (as opposed to 5 volts from the USB

10
connection or other regulated power source). You can supply
voltage through this pin, or, if supplying voltage via the power
jack, access it through this pin.
 5V. The regulated power supply used to power the microcontroller
and other components on the board. This can come either from
VIN via an on-board regulator, or be supplied by USB or another
regulated 5V supply.
 3V3. A 3.3 volt supply generated by the on-board regulator.
Maximum current draw is 50 mA.
 GND. Ground pins.

6.2 Memory
The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It
also has 2 KB of SRAM and 1 KB of EEPROM (which can be read and
written with the EEPROM library).

6.3 Input and Output


Each of the 14 digital pins on the Uno can be used as an input or output,
using pinMode(), digitalWrite(), and digitalRead()functions. They
operate at 5 volts. Each pin can provide or receive a maximum of 40
mA and has an internal pull-up resistor (disconnected by default) of 20-
50 kOhms. In addition, some pins have specialized functions:

 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit


(TX) TTL serial data. These pins are connected to the
corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.
 External Interrupts: 2 and 3. These pins can be configured to
trigger an interrupt on a low value, a rising or falling edge, or a
change in value. See the attachInterrupt() function for details.

11
 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with
the analogWrite() function.
 SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins
support SPI communication using the SPI library.
 LED: 13. There is a built-in LED connected to digital pin 13.
When the pin is HIGH value, the LED is on, when the pin is LOW,
it's off.
The Uno has 6 analog inputs, labeled A0 through A5, each of which
provide 10 bits of resolution (i.e. 1024 different values). By default they
measure from ground to 5 volts, though is it possible to change the
upper end of their range using the AREF pin and the analogReference()
function. Additionally, some pins have specialized functionality:

 TWI: A4 or SDA pin and A5 or SCL pin. Support TWI


communication using the Wire library.
There are a couple of other pins on the board:

 AREF. Reference voltage for the analog inputs. Used


with analogReference().
 Reset. Bring this line LOW to reset the microcontroller. Typically
used to add a reset button to shields which block the one on the
board.
See also the mapping between Arduino pins and ATmega328 ports. The
mapping for the Atmega8, 168, and 328 is identical.

6.4 Communication

12
The Arduino Uno has a number of facilities for communicating with a
computer, another Arduino, or other microcontrollers.
The ATmega328 provides UART TTL (5V) serial communication,
which is available on digital pins 0 (RX) and 1 (TX).
An ATmega16U2 on the board channels this serial communication over
USB and appears as a virtual com port to software on the computer. The
'16U2 firmware uses the standard USB COM drivers, and no external
driver is needed. However, on Windows, a .inf file is required. The
Arduino software includes a serial monitor which allows simple textual
data to be sent to and from the Arduino board. The RX and
TX LEDs on the board will flash when data is being transmitted via the
USB-to-serial chip and USB connection to the computer (but not for
serial communication on pins 0 and 1).
A SoftwareSerial library allows for serial communication on any of the
Uno's digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The
Arduino software includes a Wire library to simplify use of the I2C bus;
see the documentation for details. For SPI communication, use the SPI
library.

6.5 Programming
The Arduino Uno can be programmed with the Arduino software
(download). Select "Arduino Uno from the Tools > Board menu
(according to the microcontroller on your board). For details, see
the reference and tutorials.
The ATmega328 on the Arduino Uno comes preburned with
a bootloader that allows you to upload new code to it without the use of
13
an external hardware programmer. It communicates using the
original STK500 protocol (reference, C header files).
You can also bypass the bootloader and program the microcontroller
through the ICSP (In-Circuit Serial Programming) header; see these
instructions for details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware
source code is available . The ATmega16U2/8U2 is loaded with a DFU
bootloader, which can be activated by:
 On Rev1 boards: connecting the solder jumper on the back of the
board (near the map of Italy) and then resetting the 8U2.
 On Rev2 or later boards: there is a resistor that pulling the
8U2/16U2 HWB line to ground, making it easier to put into DFU
mode.
You can then use Atmel's FLIP software (Windows) or the DFU
programmer (Mac OS X and Linux) to load a new firmware. Or you can
use the ISP header with an external programmer (overwriting the DFU
bootloader). See this user-contributed tutorial for more information

14
7.CNC SHIELD V3.0

GRBL 0.9 compatible. (Open source firmware that runs on an Arduino UNO that turns G-code

15
Brief Data:
• 4-Axis support (X, Y, Z , A-Can duplicate X,Y,Z or do a full 4th axis
with custom firmware using
pins D12 and D13)
• 2 x End stops for each axis (6 in total)
• Coolant enable
• Uses removable A4988 compatible stepper drivers. (A4988,
DRV8825 and others)(Not Included)
• Jumpers to set the Micro-Stepping for the stepper drivers. (Some
drivers like the DRV8825 can do
up to 1/32 micro-stepping )
• Compact design.
• Stepper Motors can be connected with 4-pin Molex connectors or
soldered in place.

16
• Runs on 12-36VDC. (At the moment only the DRV8825 drivers can
handle up to 36V so please
consider the operation voltage when powering the board.

8. Stepper motor

A stepper motor is a brushless, synchronous electric motor that converts


digital pulses into mechanical shaft rotation in a number of equal steps.
The motor's position can then be commanded to move and hold at one
of these steps without any feedback sensor (an open-loop controller)
.ANEMA 23 stepper motor is a stepper
motor with a 2.3 x 2.3 inch size is chosen to drive the motion of the
axes. NEMA 23 stepper motors are high torque about 19KG-Cm
holding torque .NEMA 23 stepper motors have 1.8 degree step angle
with 2.5A rated current. The speed of rotation is directly proportional to
the pulse frequency .The higher the output voltage from the driver, the
higher the level of torque drive.

9.GRBL Control Software/Firmware for Arduino


Before you can use this CNC shield with Arduino, a control firmware
need to be downloaded into Arduino

17
board. We are going to use ‘GRBL’ to accomplish our job. GRBL is
open-source software that runs on an
Arduino Uno that takes G-Code commands via Serial and turns the
commands into motor signals. Grbl is a
no-compromise, high performance, low cost alternative to parallel-port-
based motion control for CNC
machine. It accepts standards-compliant g-code and has been tested
with the output of several CAM tools
with no problems. Arcs, circles and helical motion are fully supported,
as well as, all other primary g-code
commands. Macro functions, variables, and most canned cycles are not
supported, but we think GUIs can do
a much better job at translating them into straight g-code anyhow

9.1 Steps to load GRBL code into ARDUINO

1. Do a visual check of all soldered points on the new board


2. Plug the shield into an Arduino board and load the GRBL
Firmware following the steps bellow:
 Download the grbl-master.zip
GRBL source code.
 Load GRBL into the Arduino IDE as a
Library. (Click the "Sketch" drop-down
menu, then navigate to "Include Library",
and select "Add .ZIP Library")
 IMPORTANT: Select the "Grbl"
folder inside the "grbl-master"
folder, which only contains the source
files and an example directory. (If you

18
accidently select the .zip file or the wrong
folder, you will need to navigate to your
Arduino library, delete the mistake, and re-
do this step.)
 Open the "GrblUpload" Arduino example.
(Click the "file" down-down menu,
navigate to "Examples->Grbl", and select
"GrblUpload")
 Compile and upload GRBL to your
Arduino. (1. Connect your Arduino Uno to
your computer. 2. Make sure your board is
set to the Arduino Uno in the "Tool-
>Board" menu and the serial port is
selected correctly in "Tool->Serial Port".
3. Click the "Upload" and GRBL should
compile and flash to your
Arduino! Note: flashing with a programmer
also works by using the "Upload Using
Programmer" menu command.)
3. Open up a serial connection to the Arduino board and check
if GRBL is running. (We use Universal G-code sender to connect
to GRBL)
4. A4988 stepper drivers need adjustment for reference voltage.
We will cover that in detail later.
5. Testing each stepper controller socket individually is
critical.
 Make sure the external high voltage power is not powered-
up or connected

19
 Connect a stepper motor to the stepper controller socket you
want to test. This is very important because the Pololu Stepper
drivers are designed to ramp up the current until it reaches the
needed current to run. Without a stepper motor connected
there will be nothing to consume the current and you can
end up damaging the stepper driver if it over-heats in the
process.
 Next, install the stepper motor driver ensuring that
the enable pin on the driver aligns with the enable pin on the
shield.
 Connect the external power to the shield, making sure you
connect the power up the right way. If not connected
correctly you can cause damage to the shield, stepper
motor drivers and Arduino board.
 Send a g-Code to the Axis you are testing. The stepper
motor should move if everything is working. (GCode
Example : “G1 X5? or “G1 X0? or “G1 Y5?)
 Repeat the above process with each axis using the same
stepper driver.(Testing with one driver reduces the risk of
damaging multiple stepper drivers at the same time.)
6. After all the above have been checked connect all the drivers
and power up the system.

20
10. VARIOUS PARTS USED IN CNC MACHINE:
Bush
A bush is a mechanical fixing between two, possibly moving, parts, or a
strengthened fixing point where one mechanical assembly is attached to
another. In a car or other vehicle's suspension, bushes are used to
connect the various moving arms and pivot points to the chassis and
other parts of the suspension. In machines bush provide mechanical
strength to the rotor.

10.1 CNC Machine Rod


At Accurate Threaded Products, we specialize in precision CNC
machining services. A customer in the power generation industry
contracted us to produce this alloy steel tie rod used in an industrial gas
turbine engine. Due to our quality work and reliability, we are the only
approved manufacturer of this part.

21
10.2 Timing Belt
A timing belt, timing chain or cambelt is a part of an internal
combustion engine that synchronizes the rotation of the crankshaft and
the camshaft(s) so that the engine's valves open and close at the proper
times during each cylinder's intake and exhaust strokes. In an
interference engine the timing belt or chain is also critical to preventing
the piston from striking the valves. A timing belt is usually a toothed
belt -- a drive belt with teeth on the inside surface. A timing chain is a
roller chain.Most modern production automobile engines use a timing
belt or chain to synchronize crankshaft and camshaft rotation; some
engines instead use gears to directly drive the camshafts.

22
10.3 Pulley
A pulley is a wheel on an axle or shaft that is designed to support
movement and change of direction of a taut cable or belt, or transfer of
power between the shaft and cable or belt. In the case of a pulley
supported by a frame or shell that does not transfer power to a shaft, but
is used to guide the cable or exert a force, the supporting shell is called
a block, and the pulley may be called a sheave.
A pulley may have a groove or grooves between flanges around its
circumference to locate the cable or belt. The drive element of a pulley
system can be a rope, cable, belt, or chain.

23
14.PROCESS OF MAKING MINI CNC MACHINE

24
25
15.PROCESS DESCRIPTION
Main blocks of this system consists of power supply, CNC SHIELD
V3.0 module, ARDUINO UNO, 3 Easy drivers each connected to
stepper motors X, Y, Z. From power supply we get two voltages i.e.
+5volt and +12 volt. 5volt which is required to ARDUINO UNO, Easy
drivers whereas +12volt supply is required to stepper motors. RESET is
connected to5v supply through 10k ohms resistors to pull up the voltage
thus it act as a pull up resistors. We have used here16MHz crystal
oscillator connected to ATMEGA with two capacitors of 22pF.
The GRBL code from computer is interface with controller using CNC
SHIELD V3.0 232 module i.e. serial to USB converter. The output of
CNC SHIELD V3.0 is given to pin no.2 and 3 i.e. RXD and TXD pins
of ARDUINO UNO. The output of ARDUINO UNO is given to three
Easy Drivers.

26
Easy Driver consists of 16 pins from which we are using in our project
only 9 pins. Four pins are used for two stepper motor coil i.e. coil A and
coil B. Two pins for input 5volt supply i.e. VCC and GND. Three pins
are used for STEP,

16.POWER SYSTEM

The power circuits using starting with an ac voltage, then ng a steady


de voltage is obtained by rectifying
de voltage. Filtering to a dc band finally, which takes a de The
regulation is ally obtained to attain sired and provides as from same
even if the input voltage varies or the output voltage, remains conected
which an a lower do The block dig of power is shown supply in fig
below.

16.1 Transformer
Rectifier

27
16.2 Transformer

The potential transformer will step down the power supply voltage
23v to (0.6v) level. Then the secondary of the potential will connected
to the precision rectifier, which is constructed with the help of op amp,
The advantages of using precision rectifier are it will give peak voltage
output as Dc, rest of the circuits will give only RMS output.
Bridge rectifier

28
Bridge rectifier is used to maintain the proper Dc at the input of
telephone line polarity, it of diodes connected four to entire Ac wave
(both positive and negative sections).form a bridge.
It uses the diode uses 0.7v when conducting 1.4V is used up in the
bridge rectifier because each in fig below.
and there are always two diodes conducting, as shown

16.3 IC Voltage Regulators:

IC- 7805

29
Voltage regulators comprise a class of widely used ics. Regulator lc
units contain the circuitry for reference source, comparator amplifier,
control device, and overload protection all in a single IC. Although the
intemal construction of the lc is somewhat different from that described
for discrete voltage regulator circuits, the external operation is much the
same. Ic units provide regulation of eithet a fixed positive voltage, a
fixed negative voltage, or an adjustably set voltage
voltage regulator ICs are the IC's that are used to regulate wage that
restricts the comes with provision to add heatsink.draws Three terminal
voltage Regulators
Fig basic connections of a three-terminal volt fixed voltage regulator
has an unregulated de input a voltage regulated output de voltage,
waveform second seminal, connected to ground secondary winding

30
17.CONCLUSION
This setup of hardware with a combination of G-code gives better
accuracy and reduces the work load. G code make easy to find the
information of locations of all stepper motor moving, as the status of
our moving motor are directly seen on computer hence we can start or
stop the machine whenever we are needed. Making a small machine
brings an flexibility to do work.

18.REFERENCES
[1] H. Ferdinando, I. N. Sandjaja, G. Sanjaya, “Automatic Drilling
Machine for Printed Circuit Board” Proceedings of The 6th Symposium
on Advanced Intelligent Systems, Surabaya Indonesia 2005, pp. 218-
222.

31
[2] N.Balasubramanyam_and Prof. Smt. G. Prasanthi “Design and
Fabrication of an Automatic PC-Based Drilling Machine”,HCTL Open
International journal of Technology Innovations and Research, Volume
7, January 2014
[3] Shrikant Bhange, Lochana Ahire, Madhuri Gadkari, Asmita
Bhosale, Mansi Shrimali PC CONTROLLED PCB DRILLING
MACHINE” International Journal of Engineering Technology and
Computer Research (IJETCR), Volume 3; Issue 1; Page No. 64-66
[4] D.S. Bernstein, "Setting up and running a control research
laboratory", IEEE Control Systems Magazine, vol. 23, pp. 14-19, 2003.
[5] K. Nagai, "Learning while doing: Practical
robotics education", IEEE Robotics &
Automation Magazine, vol. 8, pp. 38-43, June
2001.
[6] N. Raju, N. Beedu, N. Lakshminarasamma, and V. Ramanarayanan,
"A do-it-yourself (DIY)
switched mode power conversion laboratory",
Proc. India Int. Conf. Power Electronics, Chennai,
pp. 289-292, 2006.

32

You might also like