Vous êtes sur la page 1sur 72

Design &Manufacturing of PCB Milling Machine

Under supervision of Dr. Mahmoud Abdelnaby Sayed


Asst.prof at Qena Faculty of Engineering South Valley University

TEAM MEMBERS
1. Abd Elrahman Hamam 2. Ali Ahmed Mohammed 3. Hassan Ayoub Hassan 4. Mohammed Ahmed Anwar 5. Mohammed Ahmed Alsayed 6. Mohammed Ahmed Khodari 7. Mohammed Foud Alsayed 8. Mohammed Soliman Mohamed 9. Mahmoud Mohammed Abdel latif 10. Ziad Khaled Abd Almaged
Aswan, Egypt June, 2012

Acknowledgment
It is impossible to remember or acknowledge all the people who have helped us in our education at Faculty of Energy Engineering .Gave us good theoretical training .all people we have dealt within our project have helped us to achieve our goals and launch our project. We would also like to express our gratitude and appreciation to Dr. Mahmoud Abdelnaby for all the help and guidance he provided throughout graduation year, and to the other members of our instructors. We would like to thank our families, especially our parents, for their encouragement, patience, and assistance over the years. We are forever indebted to our parents, who have always kept us in their prayers.

Team members would like to dedicate this project to January 25 Martyrs.

Abstract
As we approached our final year, we have a lot of ideas on how our project would look like, after a lot of searching us finally gathered on this one. We have designed and manufactured a working machine that solves a lot of problems and take us a step forward in the technology race. This project is about mailing machine that is capable of manufacturing and producing printed circuit boards. From A to Z, we will discuss every part in this project field, designing the machine, and collecting its parts, passing with searching for data on every possible way. Than moving to electrical field, on making the driving system and choosing suitable motor type between a lot of selections. After that, paying attention to the programming field and making the right combination of series programs, finally testing our machine and having its characteristics evaluated and recording all this away.

II

Contents
Chapter1 Introduction
1.1 Introduction 1.1.1 CNC application 1.2 Printed circuit board (PCB) 1.2.1 PCB definition 1.2.2 History of PCB 1.3 Manufacturing PCB using CNC 1.3.1 Field of the Invention 1.3.2 Description of the Prior Art 1.4 Objectives 1.5 Project contents

Page no.
1 1 1 1 2 3 3 4 5 5

Chapter 2: Stepper Motor and Drive Circuit


2.1 Introduction 2.2 Types of PCB motors 2.2.1 Dc motors 2.2.2 Stepper motors 2.2.2.1 Principle operation of stepper motor 2.2.2.2 Driving modes 2.2.2.3 Types of stepper motors 2.3 DC Servo Motors VS. Stepper Motors 2.4 Stepper Motor Driver Circuit 2.4.1 Brief explanation of the driver circuit 2.4.1.1 Brief list of the circuit components 2.4.1.2 Operation of drive 2.4.2 The interface board 2.4.2.1 Brief list of interface board component 2.4.2.2 Operation of inter face circuit 2.5 Limit switches 2.5.1 Definition 2.5.2 Limit Switch operation 2.5.3 Limit Switch circuit 2.6 The spindle relay circuit 2.7 Emergency stop 7 7 7 9 9 9 9 14 17 18 18 20 21 21 22 23 23 23 24 24 25

Chapter 3 Machine design


3.1 Introduction 3.2 Mechanical Design 3.2.1 Choosing anatomy of motion and design 3.2.2 Our machine design 3.3 linear motion system and bearings 3.3.1 Types of bearings 3.3.2 Used bearing type in our PCB machine 3.4 power screw
III

26 27 27 29 32 32 34 35

3.4.1 Introduction 3.4.2 Machine calculation 3.5 Manufacturing material 3.5.1 Suitable material for PCB machine 3.6 Spindle and component box fixing 3.6.1 The router spindle 3.6.2 Components box 3.7 Fixing the copper board (PCB) 3.7.1 Description 3.7.2 Available methods to fix the PCB 3.8 Fixing stepper motor

35 36 37 37 39 39 40 41 41 41 43

Chapter 4: programming (Mach 3)


4.1 Introduction 4.2 Eagle, PCB G-code and control software 4.3 The Mach3 control software 4.4 Downloading and Installing Mach3 4.5 Parallel port 4.5.1 Function of parallel port 4.5.2 Parallel port installing 4.6 Configuring Mach3 4.6.1 Motor Outputs 4.6.2 Limit switches 4.6.3 Spindle 4.6.4 Emergency Stop 4.6.5 Motor tuning and setup 4.7 Testing the machine 44 44 45 45 46 46 47 47 47 48 49 50 50 51

Chapter 5: experimental results & conclusions


5.1 Why this project 5.2 Conclusions 5.3 Budget 5.4 Experimental results 5.5 Project in 4 steps 5.6 Example of machine product 5.7 Problems of our machine 5.8 Future work and improvements References Appendix 53 54 55 56 57 57 58 60 61

IV

List of figure
Figure 1.1 The translucent paper and the board Figure 1.2 PCB manufactured with Acid Figure 1.3 The photo-resist board Figure 2.1 Construction of permanent magnet DC motor Figure 2.2 Construction of dc servo motor Figure 2.3 DC servo motor Figure 2.4 Stepper motor Figure 2.5 Basic design of stepper motor Figure 2.6 Single-coil excitation Figure 2.7 Full step drives Figure 2.8 Half stepping Figure 2.9 Different shapes of signals Figure 2.10 Basic unipolar stepper motor Figure 2.11 Conceptual model of unipolar stepper motor Figure 2.12 Basic bipolar and conceptual model of bipolar stepper motor Figure 2.13 Stepper motor driver circuit drawn with proteus program Figure 2.14 Interface circuit diagram using proteus Figure 2.15 Limit switch construction Figure 2.16 Limit switch circuit Figure 2.17 Spindle switch circuit Figure 2.18 Emargancy stop Figure 3.1 General model of the PCB machine 2 3 3 7 8 8 9 10 10 10 11 11 12 13 13 19 22 23 24 24 25 26

Figure 3.2Fixed table type Figure 3.3 Fixed table with power screw in the middle Figure 3.4 Fixed table with sliding tower Figure 3.5 Movable table Figure 3.6 Sketch for X direction module Figure 3.7 Sketch for Y& Z-Direction module Figure 3.8 General view for X & Y & Z-axis module Figure 3.9 Show parts mentioned in table (3.1) Figure 3.10 Drawing show the individual three axis sketches on AutoCAD. Figure 3.11 Various shapes of the sliding rods bearing. Figure 3.12 linear guide. Figure 3.13 The internal component of ball bearings Figure 3.14 Single-Row Deep-Groove ball bearing Figure 3.15 The bearings of our machine. Figure 3.16 Illustrating calculation of the power screw. Figure 3.17 Power screw diagram Figure 3.18 PCB machine made of MDF Figure 3.19 PCB machines made of plastic and PVC Figure 3.20 PCB machine made of aluminum Figure 3.21 The spindle motor. Figure 3.22 View of the component box Figure 3.23 sketch of the component box Figure 3.24 PCB fixed with metal stripe angle Figure 3.25 PCB fixed with nails. Figure 3.26 PCB fixed with plastic stripes Figure 3.27 PCB fixed with four nails on flat surface Figure 3.28 Stepper Motor before and after fixing
VI

27 28 28 28 29 29 29 31 31 32 33 33 34 34 35 36 37 38 38 39 40 40 41 41 42 42 43

Figure 4.1 Main screen of PCB-G-code Figure 4.2 The main screen of Mach3 Figure 4.3 Installing Mach3 Figure 4.4 Parallel port pins Figure 4.5 Parallel port installing Figure 4.6 Verify that the three axes are all enabled Figure 4.7 Limit switches Configuring Figure 4.8 Spindle setup Figure 4.9 Spindle Configuring Figure 4.10 Emergency Stop Configuring Figure 4.11 Single screen is used to easily configure all three motor settings Figure 4.12 Test PCB machine using the MDI tab Figure 4.13 use the input field to manually enter G-Code for testing Figure5.1 Engineering science implementation in PCB machine Figure 5.2 The driver circuit (front view) Figure 5.3 The Driver circuit (back view) Figure 5.4 Schematic design of our example Figure 5.4 Board design of our example Figure 5.6 The machine product

44 45 46 46 47 48 48 49 49 50 50 51 52 53 56 56 58 58 59

VII

List of Tables
Table 2.1 Obtain compare between DC servo motor and stepper motor Table 2.2 List the motor used in the machine Table 2.3 Show the drive circuit componant Table 2.4 Obtain brief list of interface board componant Table 3.1 Parts of mechanical design Table 3.2 Spindle data Table3.3 Dimensions of component box Table 5.1 Obtain all cost of our project Table 5.2 Obtain motor currents 15 18 18 21 30 39 40 55 56

VIII

Ch.1 Introduction

EDT 2012

Chapter (1) Introduction


1.1 Introduction
Computer numerical control (CNC) is one in which the function and motions of a machine tool are controlled by the means of a prepared program containing coded alphanumeric data. CNC can control motions of work piece or tool, the input parameters such as feed, depth of cut, speed, and the function such as turning spindle on-off and Turing coolant on-off.

1.1.1 CNC application The application of CNC includes both machine tool as well as non-machine tool areas. In the machines tool category, CNC is widely used for lathe, drill press, milling machine, grinding unit, laser, sheet metal press working machine, tube bending machine etc. In the non-machine tool category, CNC applications include welding machines (arc and resistance), coordinate measuring machine, electronic assembly, tape laying and filament winding machines for composites etc. The function of this project is to use the CNC application in making printed circuit board (PCB).

1.2 Printed Circuit Board (PCB)


1.2.1 PCB definition A PCB is a printed circuit board, also known as a printed wiring board. It is used in electronics to build accurate electronic circuits. A PCB serves two purposes in the construction of an electronic device; it is a place to mount the components and it provides the means of electrical connection between the components.

Ch.1 Introduction

EDT 2012

1.2.2 History of PCB Back in the pre-computed aided design ( CAD) days, PCBs were designed and laid out by hand. A PCB starts out as a thin, nonconducting sheet of material. The most common material used is a glass fiber epoxy laminate material. A thin layer of copper is then chemically deposited on each side of this material, which allows double layer circuit design. The next step is to "print" the connection diagram onto the PCB. The connection diagram is the wiring required to connect the components. In the very early days of electronics, these connections were in fact done with wires. This is the reason PCBs are also sometimes referred to as printed wiring boards. The "printing" is usually done by photographically transferring the image to the PCB. This image is "printed" with an acid resistant material.

Figure 1.1: The translucent paper and the board. Then, the PCB is put into an acid bath (Ferric Chloride Acid). The acid bath removes the copper from the board, excepting the areas protected by the resistant material ink. This process leaves the connections or wiring "printed" on the PCB. After that, holes are drilled in the board to allow the components to be mounted to the PCB and the PCB itself to be mounted on the case protecting the electronics. Finally, a protective coating is applied to the board to prevent corrosion of the copper traces.

Ch.1 Introduction

EDT 2012

Figure 1.2: PCB manufactured with Acid. Also there is the PHOTO-RESIST BOARD which is a piece of glass reinforces plastic. One of the sides is copper clad and this copper has a photosensitive coating. When the plastic film is peeled back this sensitive coating is revealed leaving the desired circuit.

. Figure1.3: The photo-resist board.

1.3 Manufacturing PCB using CNC

1.3.1 Field of the project This project relates to a working machine for trial construction of a printed circuit board (here in after called a PCB) by effecting some kinds of working, such as making a circuit pattern on a copper-foiled substrate, making holes in lands, and so on, in accordance with geometrical data made by a CAD.
3

Ch.1 Introduction

EDT 2012

1.3.2 Description of the prior Art


In order to develop electronic devices and to fabricate such devices that are small in amount of production and hence not suitable for mass production, there is an increasing need for constructing PCB substrates with appropriate electronic circuits on a trial basis, precisely, quickly, and at a low cost. However, since trial construction of PCBs needs steps of photographic Chemical and other treatments, circuit patterns must be made even for fabricating a small amount of trial PCBs, and most of planners, designers and other engineers have been compelled to order such work to specialists. In order to improve the situation, there has been proposed a PCB working machine for making a circuit pattern by cutting a copper-foiled substrate in which a copper layer is provided on an insulating substrate. More specifically, such PCB working machines are configured such that a cutting tool is fixed to a spindle moveable in X-axis and Y-axis directions under a control, and it is moved, in accordance with a predetermined pattern, on a PCB substrate which is held in place on a work table with a suction force, to cut the copper layer and the insulating substrate on the PCB to make a target circuit. In the working machines having the foregoing construction, after the cutting tool is fixed to the chuck at the distal end of the spindle, the cutting edge of the cutting tool is brought into contact with the surface of the PCB substrate to detect the position of the surface of the PCB substrate. After that, the spindle is driven to move down by a necessary amount by a stepping motor for Z-axis movements such that the cutting edge of the cutting tool cuts into the surface of the PCB substrate by-a precise depth. That is, the widths of cuts are controlled in the foregoing process. This method, however, is likely to cause errors in level of the cutting edge of the cutting tool relative to the level of the surface of the PCB substrate, because of a microscopic unevenness of the surface of the PCB substrate or displacement of the spindle caused by heat. This is a serious problem in making a circuit pattern with microscopically distant lines. The aforementioned method also involves a problem such that shavings may remain on the worked surface. Such shavings, if remaining on the worked surface, may cause a short-circuit between lines or cut and break the circuit pattern. In addition, Cutting tools are subject to breakage. When such breakage occurs during automatic driving of the machine, it results in defective cuts. Moreover, the cutting tool is likely to stick to the chuck, and it has been difficult to automate replacement of the tool with another.
4

Ch.1 Introduction

EDT 2012

1.4 Objectives
It is therefore an object of the project to overcome the problems involved in the existing PCB manufacturing methods, and these can be summarized by: 1- Provide a PCB working machine that makes it possible to easily mill. 2- Provide a PCB working machine that has high Speed and high accuracy. 3- Provide a PCB working machine that is easy and simple to deal with. 4- Provide a PCB working machine that has the ability to produce a double layer PCB. 5- Provide a PCB working machine that has less operation time than conventional Methods.

1.5 Project contents


The following project contains five chapters that describe the whole work done in designing, calculating, programming and manufacturing the machine. Here is quick preview of what are coming. Chapter 1: Introduction Chapter 2: Stepper motor and its Driver circuit In this chapter we will discuss the principal operation of the stepper motor and its working theory. Also we will have a close look on the driver circuit of the stepper motor, its operation and the electrical connections of the electronics parts. Chapter 3: Machine Design In this chapter we are going to discuss the mechanical design of the machine which includes all steps of designing and manufacturing the body of the machine. Also we will mention the ways to fix, support, and combine all the mechanical parts, cutting tool, and the stepper motors. Chapter 4: Programming software In this chapter we will discuss the program used in controlling the machine. The function of the program is to design the PCB as schematic, then converting the schematic file in to the G-code that can be transferred from the computer to the machine through the parallel port. Also its operation and cooperating with the stepper motors and the machine are discussed.

Ch.1 Introduction Chapter 5: experimental results & conclusions

EDT 2012

In the last chapter we are going to discuss the last results of the machine and the measurements that we have approached and achieved. Also the conclusion of the whole work and the final product. Finally a few suggestions on the future improvements.

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

Chapter (2) Stepper Motor and Drive Circuit


2.1 Introduction
Motors are the heart of any PCB machine. The size and type of motor can define a PCB routers precision, speed, and accuracy. There are two primary classes of motors used on PCB machines, stepper motors and servo motors. This chapter gives a brief introduction about the stepper motor used in the project. Two types of stepper motor have been explained. These types are unipolar and bipolar stepper motors. The operation theory is explained in details of both motors.

2.2 Types of PCB motors


In this section will show primary type of motors used in PCB machine and feature which lead us to use stepper motors in our machine.

2.2.1 Dc motors
Fig 2.1 shows the construction of a permanent magnet DC motor consisting of a stator, a rotor, and a commutation mechanism. The stator consists of permanent magnet, creating a magnetic field in the air gap between rotor and stator. Rotor has several windings arranged symmetrically around the motor shaft. An electric current applied to the motor is delivered to individual windings through the brush-commutation mechanism as shown in the fig 2.1. As the rotor rotates the polarity of the current flowing to the individual windings is altered. This allows the rotor to rotate continually.

Figure 2.1: Construction of permanent magnets DC motor.


6

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

DC servo motor is considered one of the most commonly type of DC motor used in PCB machine. The servo motor is actually an assembly of four things; a normal DC motor, a gear reduction unit, a position-sensing device (usually a potentiometer), and a control circuit as shown in fig 2.2.

Figure 2.2: Construction of dc servo motor.

The function of the servo is to receive a control signal that represents a desired output position of the servo shaft, and apply power to its DC motor until its shaft turns to that position. It uses the position-sensing device to determine the rotational position of the shaft, so it knows which way the motor must turn to move the shaft to the commanded position. The shaft typically does not rotate freely round and round like a DC motor, but rather can only turn 200 degrees or so back and forth. The servo has a 3 wire connection: power, ground, and control. The power source must be constantly applied; the servo has its own drive electronics that draw current from the power that lead to drive the motor. The control signal is pulse width modulated (PWM), but here the duration of the positive-going pulse determines the position of the servo shaft.

Figure 2.3: Dc servo motor.


7

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

2.2.2 Stepper motors


Stepper motors is one of the most important actuators used in devices need high accuracy such as PCB machines, printers, copy machines,etc. Stepper motor is an electromagnetic actuator that converts electrical power into mechanical power. The main difference between them and all the other motors is the way they revolve. Unlike other motors, stepper motors does not continuously rotate they rotate in steps. Each step is a fraction of a full circle. This fraction depends mostly from the mechanical parts of the motor, and from the driving method. The stepper motors also differs in the way they are powered. Instead of an AC or a DC voltage, they are driven (usually) with pulses.

Figure 2.4: Stepper motor. 2.2.2.1 Principle operation of stepper motor The stepper motors consists of a stator and a rotor. The rotor carries a set of permanent magnets, and the stator has the coils. The very basic design of a stepper motor would be as follows. There are 4 coils with 90o angle between each other fixed on the stator as show in fig 2.5. The way that the coils are interconnected, will finally characterize the type of stepper motor connection. In the below drawing, the coils are not connected together. The below motor has 90o rotation step. The coils are activated in a cyclic order, one by one. The rotation direction of the shaft is determined by the order that the coils are activated. The coils are energized in series, with about 1sec interval. The shaft rotates 90o each time the next coil is activated. 2.2.2.2 Driving modes In this section, will explain the various ways that the coils are energized, and the results on the motors shaft.

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

Figure 2.5: Basic design of stepper motor. 1. Single-Coil Excitation The first way is called Single-Coil Excitation, and means that only one coil is energized each time. This method is rarely used, generally when power saving is necessary. It provides less than half of the nominal torque of the motor; therefore the motor load cannot be high.

Figure 2.6: Single-coil excitation. 2. Full step drive The second and most often used method is the Full step drive. According to this method, the coils are energized in pairs. According to the connection of the coils (series or parallel) the motor will require double the voltage or double the current to operate that needs when driving with Single-Coil Excitation. Yet, it produces 100% the nominal torque of the motor.

Figure 2.7: Full step drive.


01

Ch.2 Stepper Motor and Drive Circuit


3. Half stepping

EDT 2012

This is a very interesting way to achieve double the accuracy of a positioning system, without changing anything from the hardware. According to this method, all coil pairs can be energized simultaneously, causing the rotor to rotate half the way as a normal step. This method can be single-coil or two-coil excitation as well.

Figure 2.8: Half stepping. 4. Micro stepping Micro stepping is the most common method to control stepper motors nowadays. The idea of micro stepping is to power the coils of the motor not with pulses, but with a waveform similar to a sin waveform. This way, the positioning from one step to the other is smoother, making the stepper motor suitable to be used for high accuracy applications such as PCB positioning systems. Also, the stress of the parts connected on the Motor, as well as the stress on the motor itself is significantly decreased. With micro stepping, a stepper motor can rotate almost continuous, like simple DC motors. The waveform that the coils are powered with is similar to an AC waveform; Digital waveforms can also be used. Here are some examples

Sin wave signal

Digital signal

High resolution digital signal

Figure 2.9: Different shapes of signals.

00

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

The micro stepping method is actually a power supply method, rather than coil driving methods, therefore the micro stepping can be applied with single-coil excitation and full step drive. 2.2.2.3 Types of stepper motors Stepper Motors come in a variety of sizes, and strengths, There are two basic types of steppers. Bipolar and unipolar. The bipolar stepper has 4 wires. Unipolar steppers have 5, 6 or 8 wires. In the next sections will discuss the bipolar, unipolar stepper motors.

1. Unipolar stepper motor Basic construction of motor The Unipolar Stepper motor has 2 coils, simple lengths of wound wire. The coils are identical and are not electrically connected. Each coil has a center tap Wire coming out from the coil that is midway in length between its two terminals. You can identify the separate coils by touching the terminal wires together. If the terminals of a coil are connected, the shaft becomes harder to turn. Because of the long length of the wound wire. Also you can identify the center tap by measuring resistance with a suitable ohm-meter. The resistance from a terminal to the center tap is half the resistance from the two terminals of a coil.

Figure2.10: Basic unipolar stepper motor.

Conceptual Model of unipolar Stepper Motor

With center taps of the windings wired to the positive supply, the terminals of each winding are grounded, in sequence, to attract the rotor, which is indicated by the arrow in the picture, this conceptual diagram depicts a 90 degree step per phase as shown in fig 2.11. Unipolar Stepper Motor Ratings

Manufacturers rate stepper motors with at least two of the familiar electrical terms: voltage, current, resistance. When one of these terms is missing it can be derived using the formula: Voltage = Current x Resistance. If only the current
01

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

rating is known, the resistance rating can be found by carefully measuring a half coil (center-tap to either terminal) with an ohmmeter. In the rating nomenclature, a phase refers to the minimum operational coil, which is a half-coil for unipolar motors.

Figure2.11: Conceptual model of unipolar stepper motor.

2. Bipolar stepper motor Bipolar just means there are 2 undivided coils with only 2 wires present for each phase. So a 2 phase bipolar motor has 4 wires (2 coils). An equivalent unipolar motor will have the same 4 wires plus 2 or 4 additional wires coming from the coil center. Most unipolar motors can function as bipolar, but a bipolar motor cannot function as a unipolar because it lacks the additional wires.

Figure2.12: Basic bipolar and conceptual model of bipolar stepper motor.

02

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

3. Features of stepper motor Stepper Motors have several features which distinguish them from AC Motors, and DC Servo Motors. Brushless: Steppers are brushless. Motors with contact brushes create sparks, undesirable in certain environments. Holding Torque: Steppers have very good low speed and holding torque. Steppers are usually rated in terms of their holding force (oz/in) and can even hold a position without power applied, using magnetic 'detent' torque.

Open loop positioning: Perhaps the most valuable and interesting feature of a stepper is the ability to position the shaft in fine predictable increments, without need to query the motor as to its position. Steppers can run 'openloop' without the need for any kind of encoder to determine the shaft position.

Load Independent: The rotation speed of a stepper is independent of load, provided it has sufficient torque to overcome slipping. The higher rpm a stepper motor is driven, the more torque it needs, so all steppers eventually poop out at some rpm and start slipping.

2.3 DC Servo Motors VS. Stepper Motors


The following will attempt to justly compare stepper vs. servo motors assuming the following -The motors are of equal rated power -Both motors we are comparing are of same quality -Servo is equipped with an encoder -Stepper is not equipped with an encoder -The driver is assumed to provide the same features excluding feedback.

03

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

Characteristics

Servo Motor (DC Brushed) The cost for a servo motor and servo motor system is higher than that of a stepper motor system with equal power rating.

Stepper Motor This feature would have to go to stepper motors. Steppers are generally cheaper than servo motors that have the same power rating.

Cost

Versatility

Stepper motors are also very versatile in their use for automation and CNC Servo motors are very versatile in their applications. Because of use for automation and CNC their simplicity stepper applications. motors may be found on anything from printers to clocks. This is a tossup because it depends on the environment and how well the motor is protected. The stepper takes this category only because it does not require an encoder which may fail. Stepper motors do not have as many size selections as servo motors in the large sizes. However stepper motors may still be found in a variety of NEMA frame sizes. Stepper motors are almost plug-and-play. They require only the motor wires to be wired to the stepper motor driver.

Reliability

Frame Sizes

Servo motors are available in a wide variety of frame sizes, from small to large motors capable of running huge machines. Many of the motors come in NEMA standard sized.

Setup Complexity

Servo motors require tuning of the proportionalintegralderivative (PID) closed loop variable circuit to obtain correct motor function.

Motor Life

The brushes on servo motors must be replaced every 2000 hours of operation. Also encoders may need replacing. Servo motors will do fine with low speed applications given low friction and the correct gear ratio

The bearing on stepper motors is the only wearing parts. That gives stepper motors a slight edge on life. Stepper motors provide most torque at low speed (RPM).

Low Speed High Torque

04

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

High speed High Torque

Servo motors maintain their rated torque to about 90% of their no load RPM. Servo motors can have very good repeatability if setup correctly. The encoder quality can also play into repeatability. Servo motors may malfunction if overloaded mechanically.

Stepper motors lose up to 80% of their maximum torque at 90% of their maximum RPM. Because of the way stepper motors are constructed and operate they have very good repeatability with little or no tuning required. Stepper motors are unlikely to be damages by mechanical overload. Stepper motors are less efficient than servo motors which usually mean a smaller power to weight/size ratio.

Repeatability

Overload Safety

Power to Weight/Size ratio

Servo motors have an excellent power to weight ratio given their efficiency.

Efficiency

Stepper motors consume a lot of power given their output, much of which is Servo motors are very efficient. converted to heat. Stepper Yielding 80-90% efficiency given light motors are usually about loads. 70% efficient but this has some to do with the stepper driver. Stepper motors usually have 1.8 or 0.9 degree Since the encoder on a servo motor resolution. However determines the motor resolution servos thanks to micro-stepping have a wide range of resolutions steppers can obtain higher available. resolutions. This is up to the driver and not the motor.

Flexibility in motor resolution

Torque to Inertia Ratio

Servo motors are very capable of accelerating loads.

Stepper motors are also capable of accelerating loads but not as well as servo motors. Stepper motors draw excess current regardless of load. The excess power is dissipated as heat.

Least Heat production

Since the current draw of a servo motor is proportional to the load applied, heat production is very low.

05

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

A servo motor can supply about 200% Reserve Power of the continuous power for short and Torque periods.

Stepper motors do not have reserve power. However stepper motors can brake very well.

Noise

Stepper motors produce a slight hum due to the Servo motors produce very little noise. control process. However a high quality driver will decrease the noise level. Stepper motors vibrate slightly and have some resonance issues because of how the stepper motor operates. Stepper motors are far easier to find than quality servo motors. Stepper motors are very simple in design with no designed consumable parts.

Resonance and Servo motors do not vibrate or have resonance issues. Vibration

Availability

Servo motors are not as readily available to the masses as are stepper motors. Servo motors are more mechanically complex due to their internal parts and the external encoders.

Motor Simplicity

Direct Drive Capability

Stepper motors will work fine in direct drive mode. Servo motors usually require more Many people simple use a gearing ratios due to their high RPM. It motor couple and attach is very rare to see a direct drive servo the motor shaft directly to motor setup. the lead screw or ball screw. Because servo motors are available in DC and AC servo motors have a very wide power availability range. The power availability range for stepper motors is not that of servo.

Power Range

Table 2.1: Obtain compare between DC servo motor and stepper motor. The shaded selections in the comparison chart in the previous page are the selected category winner as designated by" CNCRoutersource.com". It's always up for debate depending on the motor and usage of the motor.

2.4 Stepper motor driver circuit


Driver circuit of the stepper motor is the skeleton of the PCB machine. It receives signals from the computer which determine in the direction of movement (angle) and the distance. Also because at any time it receives step and direction signals from the computer it translates the information to certain values of voltage and current to be sent to the stepper motors.
06

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

The power Sent to the stepper motor windings is distributed to the windings in a sequence which moves the stepper motor in the desired direction by the number of steps equivalent to the distance to be made in the direction of this axis. Three driver circuit are used, one for each axis direction of movement. The board is designed using a set of integrated circuit of type L297 and L298 as show in figure2.5.1 The advantage of using these integrated circuits (ICs) ease and simplicity of design of the bored as it requires the least number of components, another feature is that this could create a driver circuit with high-capacity capable of handling up to 36 volts voltage and current up to 2 amperes per channel. Many of stepper motors are bipolar or unipolar can be used at these rates of voltage and current. The stepper motors data used here in the PCB machine as follow in the next table. Axis X Y Z Type Asyton Vexta vexta Modal --------Ph 268 C679 step 1.8 degree 1.8 degree 1.8 degree Volatge 5 volt 5.4 volt 4.5 volt Curent 1.5 amp 1.5 amp 1 amp

Table 2.2 List the motor used in the machine. 2.4.1 Brief explanation of the driver circuit 2.4.1.1 Brief list of the circuit components Part U1 U2 D1-D8 C1 C2,C3 C4 C5,C6 R1,R2 R3 R4 R5 R6 R7,R8 JP1-JP6 Heat S ink Description L298 Dual full-bridge driver L297 stepper motor controller FR 304 fast recovery diode 3.3 NF capactitor 0.1 UF capacitor 470 UF capacitor 1 NF capacitor 0.5 ohm power resistor 1k ohm resistor 22k ohm resistor 2k2 ohm resistor 10k ohm resistor 4.7 ohm resistor Cut to size from header material 1 Heat sink must be installed on the L298 Table 2.3: Show the drive circuit componant.
07

Quantity 1 1 8 1 2 1 2 2 1 1 1 1 2 3-3 pin , 2-4 pin

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

Figure 2.13: Stepper motor driver circuit drawn with proteus program.
08

Ch.2 Stepper Motor and Drive Circuit 2.4.1.2 Operation of drive circuit

EDT 2012

This circuit operates by receiving signals from the parallel port on the pin 17 of the integrated circuit L297 to control the direction of stepper motor. Pin 18 of chip L297 is used to control the number of steps that will take the stepper motor in this direction. Then the L297 send the signals to the L298 on the sequence and the appropriate order, which must feed the stepper motor windings to do the job required. It will be noticed that the stepper motor capacity is provided only for the integrated circuit for this purpose. But both L297 and L298 integrated circuits need to +5 V to do their function. The Eight diodes ( FR304) cut or clamp the voltage between the stepper motor windings and the ground. Diodes used for this purpose should be of a property fast recovery, but can be another number depending on the rate of voltage and current required to drive the used stepper motor. These diodes protect the L298 from the high induction voltages generated by the stepper motor during winding disconnection. pin 1 and 15 of the L298 connected to the ground through power resistors of half 0.5 . Resistance connected to leg 1 is for drawing current from two windings of field , while the resistance connected to leg15 draws power from the other two windings. These resistors give the the L297 chip the control means for measuring current generated inside the stepper motor. The L297 chip measuring voltage drop between the two sides of the resistors to control the chopper circuit with pulse width modulation system ( PWM chopper), which is used in controlling the current flowing through the stepper motor windings. 2.2K and 10K resistors connected to leg 15 (Vref) of the L297 chip used as voltage divider. The output and applied voltage ( Vref ) on the leg 15 used to determine the set point voltage with the mesured voltage coming from the field windings. When reach to a set point, contral sgnial is disconnected from the L298 chip (separate the windings) and allows the diodes FR304 to dicharge the field windings.

11

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

Field windings in case of separation remains OFF until the end time of the internal oscillator of the L297 chip and then the field windings is connected ON again. 22K resistance and capacitor 3.3 nF connected to leg 16 of L297 chip determines the time rate of the oscillator. Capacitors C2, C3, C4 that filter power source for electronics and motors. JP1 link is for the supply of power and Ground to the circuit and motors. JP2 link is a bridge to connect the circuit connected to leg 1 to leg16 of the L297 chip to one driver circuit , while other panels are plug the leg16 for L297 to the ground. In JP3 link, pin 1 recive step signals, while pin 2 recive direction signals, pin 3 used to connect all boards to be synchronized and pin 4 is the ground. JP4 link dedicated to making thepin 19 of the L297 chip in case the logical high by pin 1 to provide the motor driving the maximum step, or in the logical low state by pin 3 for half a step. JP5 link is used to makmakelag 11 of the L297 chip in case of high, through pin 1 to use phase driving or in the case low through pin 3 to prevent the inhibit drive.

2.4.2 The interface board This board is the only gate (entrance) which allows the computer to send and receive signals to the panel drivers and the limit switches. Do not have much a link cable with parallel port and some links to connect the driver boardsand limit switches fig 2.13 show Interface board componant.

2.4.2.1 Brief list of interface board component Part Conn 1 R1-17 JP1-5 Quantity 1 17 1-17 Pin , 5-2 Pin Description DB 25 connector 4.7 ohm resistor Header material

Table 2.4: Obtain brief list of interface board componant.

10

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

Figure 2.14: Interface circuit diagram using proteus. 2.4.2.2 Operation of interface circuit 4.7K resistors determine the current for circuit protection and parallel port. The best way to protect the parallel port is to use optical isolation circuit or the use of a dedicated card connected to the parallel port.

Pins Connections of Panel Pin1-17 in theJP1 link are connected to the 1-17pins of the parallel port of the computer. Link JP2: pin 1 connected to pin 10 of the JP1 link and pin 2 connected to the groud. Link JP3: pin 1 connected to pin 11of the JP1 link and pin 2 connected to the groud. Link JP4: : pin 1 connected to pin 12of the JP1 link and pin 2 connected to the groud. Link JP5:pin 1 connected to pin 13of the JP1 link and pin 2 connected to the groud.

11

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

Pins 10,11,12,13 of JP1 link have been made independent so to connect the limit switches easily. Link JP6: pin 1 connected to the positive voltage 5V and pin 2 with the ground.

The next step is to manufacture the printed circuit boards of the stepper drivers circuit and the inter phase circuit.

2.5 Limit switches


2.5.1 Definition A limit switch is a switch operated by the motion of a machine part or presence of an object. They are used for control of a machine, as safety interlocks, or to count objects passing a point.Here they are used to indicte the end of the path for eachof the three axis of the PCB machine.

Figure 2.15: Limit switch construction. 2.5.2 Limit Switch operation In most cases, a limit switch begins operating when a moving machine or a moving component of a machine makes contact with an actuator or operating lever that activates the switch. The limit switch then regulates the electrical circuit that controls the machine and its moving parts. These switches can be used as pilot devices for magnetic starter control circuits, allowing them to start, stop, slow down, or accelerate the functions of an electric motor. Limit switches can be installed into machinery as control instruments for standard operations or as emergency devices to prevent machinery malfunction. Most switches are either maintained contact or momentary contact models.

12

Ch.2 Stepper Motor and Drive Circuit 2.5.3 Limt switch circuit

EDT 2012

The limit switches are connected to external circuit show in fig 2.16 and this circuit switches off the drives when the limit is reached. The separate reference switches are connected inputs to mach3 one pin can share all the inputs for an axis and mach3 is responsible for controlling both limits and detecting home. The switches can be interfaced by a keyboard emulator.

Figure 2.16: Limit switch circuit.

2.6 The spindle relay circuit


Spindle contraled by simple circuit consist of relay , diode , and mosft . Relay conecting with mosft which recive its sgnial from any output pin of the interface board.

Figure 2.16: Spindle switch circuit.


13

Ch.2 Stepper Motor and Drive Circuit

EDT 2012

2.7 Emergency stop


The emergency stop, often called an estop.An estop is a useful button for quickly shutting down PCB machine. It's not the same as the PCB machines power button, which may be located under the machine or otherwise not easily reachable, In the event of an emergency such as our PCB machine hitting a knot of table or a motor getting locked up, we want to be able to quickly shut off our machine, imagine trying to find the power button on a power strip thats under the table or out of reach, and well begin to understand the value of putting an estop on our machine in an easy-to-reach location. The emergency stop circuit is same as limit switch circuit show in fig2.16.

Figure 2.18: Emergency stop.

14

Ch.3 Machine Design

EDT 2012

Chapter (3) Machine Design


3.1 Introduction
Mechanical design of PCB machine is very important and must be taking into consideration the entire dimension, size and weight of all parts. Well designed machine mean high accuracy because the accuracy of the machine depends mainly on the mechanical design of all parts. Also vibration of movable parts should be considered while designing the machine. Supporters and Screw should be fixed and supported to prevent machine errors. Fig 3.1 show the principal construct of 3dimention PCB machine, the spindle has three axes to move on (X, Y and Z axis). Moving simultaneously in the three dimensions is necessary when making Holes. There are three kinds of holes on PCBs; Holes for device insertion, via holes, and fringe holes for board fixing. Each hole has two parameters: Position and size (diameter). Hole quality is also important. Hole position consists of X-Y coordinates measured from monitor screen upper left corner. These parameters are used to position the drilling bit, whereas size parameter is used to choose bit size (usually 0.7mm, 0.8mm).

Figure 3.1: General model of the PCB machine.


62

Ch.3 Machine Design

EDT 2012

Hole data file supplied by the electronic software is for controlling the drilling machine. The drill (comprising motor, chuck, and bit) is moved horizontally to X-Y coordinates of a hole, then moved down in Z direction to make the hole, then withdrawn and translated to another place. The electro-mechanical system is responsible for the 3D motion to position the drill, and should be of real industry standard to guarantee the force, torque, precision, and robustness. The idea was to choose stepper motors and linear axes for the mechanical system.

3.2 Mechanical design


3.2.1 Choosing anatomy of motion and design The design and the shape of the project is determined by choosing a suitable type that do the job at the best way and to fit the required need specifically, and here is some of the designs and different types of machines available. 1. Fixed table type Here the table where the printed circuit is attached to be fixed to the base and the three axis is moved in the three dimensions to do the job.

Figure3.2: Fixed table type.

62

Ch.3 Machine Design

EDT 2012

a- Fixed table with power screw in the middle

Figure 3.3: Fixed table with power screw in the middle. b. Fixed table with sliding tower

Figure 3.4: Fixed table with sliding tower. 2. Movable table type Here the table is free to move in one or two dimensions and the spindle could be movable only in the Z dimension or Z&Y dimensions.

Figure 3.5: Movable table type.


62

Ch.3 Machine Design 3.2.2 Our machine design

EDT 2012

Figure 3.6: Sketch for X direction module.

Figure 3.7: Sketch for Y& Z-Direction module.

Figure 3.8: General view for X & Y & Z-axis module.


62

Ch.3 Machine Design

EDT 2012

Table show the parts of the design with dimension (Depth of MDF is 24 mm). Part name X axis Parts number 2 Description Connected to each other with rods (2 plates) vertical (1plate) horizontal (1plate) Vertical (2plate) horizontal Dimension 95 cm* 20 cm Part
symbol

Y axis

45 cm*20 cm 76 cm*20 cm 35 cm *20 cm Upper plate:15 cm *20 cm Lower plate :7.5cm *20 cm 20 cm *25 cm 75 cm *60 cm

Z axis

Z axis Base table

1 1

Spindle holder The base where the PCB is fixed to. Rod and Bushing Couple the stepper motor to the power screw X axis Y axis Z axis Connecting MDF Connecting the motors

D E

Bearing

12

Coupling

2cm diameter X:75 cm , Y:75 cm Z:35 cm 4 cm*4 cm 3 cm Inner diameter 1 cm Outer diameter 1.5 cm 75 cm ,diameter 1 cm 75 cm ,diameter 1 cm 35 cm, diameter 1cm 10 cm, diameter 0.5 cm 15 cm ,diameter 0.4 cm

Power screw

connecting Screws

20 12

I J

Table 3.1: Parts of mechanical design.

03

Ch.3 Machine Design

EDT 2012

Figure3.9: Show parts mentioned in table (3.1).

Figure3.10: Drawing show the individual three axis sketches on AutoCAD.

03

Ch.3 Machine Design

EDT 2012

3.3 Linear motion system and Bearings


A complete linear motion system is a combination of a drive system and linear bearing system. The linear motion system is responsible for three primary tasks. 1) Support Machine Components 2) Guide the machine in a precise linear motion with minimal friction 3) Support secondary loads (Torque, Lateral Loads, etc) A bearing is any of various machine elements that constrain the relative motion between two or more parts to only the desired type of motion. 3.3.1 Types of bearings 1. Rods and Bushings Linear slides are key to the design of a functional machine. These slides are a half successful experiment. Using steel rod from the hardware store and some brass and steel bushings. The brass material slides easier, but ultimately is though the smaller size and unfinished rod is too prone to binding. Alignment is critical in long travel.

Figure 3.11: Various shapes of the sliding rods bearing.

06

Ch.3 Machine Design 2. Linear Guides

EDT 2012

Rails and guide blocks, also often referred to as simply linear guides, are high end linear motion systems. Linear guide blocks and rail systems are, as the name suggests, composed of two primary components. The linear rail, which guides the guide blocks and provides a smooth and durable surface for linear motion, and the Guide Block which rides on the rail and supports the load that is to be moved.

Figure 3.12: linear guide. 3. V-Groove Wheels and Track Rollers There are five basic types of anti-friction bearings: tapered, needle, ball, spherical and cylindrical. Each is named for the type of rolling element it employs. A single-row deep-groove ball bearing, it is the most popular rolling bearing. The inner and outer raceway grooves have curvature radii between 51.5 and 53% of the ball diameter for most commercial bearings. To assemble these bearings, the balls are inserted between the inner and outer rings.

Figure 3.13: The internal component of ball bearings.

00

Ch.3 Machine Design

EDT 2012

Figure 3.14: Single-Row Deep-Groove ball bearing. 3.3.2 Used bearing type in our PCB machine Here in this project the sliding rods and bushing are the used type. Cause of more cheap and with good lubrication is smooth and suitable for the job.

Figure 3.15: The bearings of our machine.

03

Ch.3 Machine Design

EDT 2012

3.4 power screw


3.4.1 Introduction Screw threads are used extensively in mechanical systems to convert a rotational motion into a translational motion. The screw thread is basically a wedge that has been wrapped around a cylindrical rod. In these simple machines, the wedge is called the driver and the object that is lifted is called the follower. The helix angle of the wedge is called the pitch angle. The pitch of the screw is defined to be the axial distance P between corresponding points on adjacent threads. The lead is the distance that the nut travels parallel to the screw axis when the nut is given a 360 rotation. For a single-threaded screw, the lead is the same as the pitch. A double threaded screw has a lead twice the pitch, and a triple-threaded screw has a lead three times the pitch, and so on. We consider only single-threaded screws. If a single-threaded screw has n threads per unit length of the screw. The pitch is P = 1/n.

Figure3.16: Illustrating calculation of the power screw. A schematic representation of the application of power screws to a power driven press is shown in fig 3.16. In use, a torque T is applied to the ends of the screws through a set of gears, thus driving the head of the press downward against the load. A square-threaded power screw with single thread having a mean diameter dm , a pitch p , a lead angle , and a helix angle is loaded by the axial compression force F. we wish to find an expression for them torque required to raise this load.

03

Ch.3 Machine Design 3.4.2 Machine calculation


Calculating the steps per mm

EDT 2012

1- Thread per mm (TPM) 42 thread for 6 cm 7 thread for 1 cm TPM=7:10 = 0.7 2- The pitch = 1: TPM = 1:0.7 = 1.43 3-The effective screw pitch: is the distance the axis moves for one revaluation of the screw 1 revaluation = 1.667 mm 4- Screw revaluation per mm = 1: effective screw pitch = 1:1.667 = 0.6 rev-mm Calculating motor step per revaluation from the motor name plate
It have (1.8 degree per step), so number of motor steps = 360:1.8= 200step Mach 3 step per mm = mach3 step * motor rev per mm = 0.6 (rev per mm) * 200 (step per rev) = 120 step-mm For inch it will be = 120 * 25.4=30485 inch - setting the maximum motor speed At use frequency =25000 Hz Maximum velocity = (frequency *60): step per mm = (25000*60):120 = 12500 mm- min or by inch = 492.126 inch- min

Figure3.17: Power screw diagram.


02

Ch.3 Machine Design

EDT 2012

3.5 Manufacturing material


PCB machines are manufactured from group of materials with a physical characteristics and mechanical considerations. There are several factors to consider when choosing the material of which we design the machine parts.
3.5.1

Suitable material for PCB machine

Wood (solid woods, plywood) and Medium-density fiberboard (MDF) the machine has no problems with these, and MDF (though cheap & IKEAlike) cuts especially well. One issue with wood can be warping, larger sheets of plywood are rarely completely flat, so if the design involves cleanouts (more on these later) add extra depth to compensate.

Figure3.18: PCB machine made of MDF.

PVC Plastics such as Sinatra / Komatex lay flat, machine great provide good strength and can be hand-tooled easily. Also that PVC plastics are used in most of prototypes

02

Ch.3 Machine Design

EDT 2012

Figure 3.19: PCB machines made of plastic and PVC. Metals the machine can be used with aluminum. Thin sheets of metal also available .but in that case a good bearing system should be considered.

Figure3.20: PCB machine made of aluminum.

Used material in our project is the MDF wood, cause of it is cheap, available, and easy handled in the manufacturing process.

02

Ch.3 Machine Design

EDT 2012

3.6 Spindle and component box fixing


3.6.1 The router spindle The spindle is a simple actual motor doing the cutting, with the help of a cutting tool of course. In other words its the actual router of the PCB machine. Like most everything else involving PCB machines, there are a variety of spindle types out there. As usual there are many factors involved when choosing a spindle for either pre-build machine, or homemade PCB machine. It should be well informed as to the capabilities of the spindle before deciding to buy it. There are many important considerations. Such as, RPM, load ratings, power requirements, and size.

Figure3.21: The spindle motor.

Our Spindle data


Rated voltage Rated frequency Rated power input No-load speed 220 v 50-60 HZ 115 W 8000-33000 r-min

Table 3.2: Spindle data.

02

Ch.3 Machine Design 3.6.2 Component box

EDT 2012

Figure 3.22: View of the component box. Table of box dimensions: Part Name Parts Number Dimensions Wood parts (front and back) 2 71 cm * 20 cm Cooling Fans (sides) 2 20 cm *17 cm Wood parts (shelf) 1 66.2 cm *17 cm Metal Hinges 2 6 cm Table3.3: Dimensions of component box.

Figure3.23: Sketch of the component box.


33

Ch.3 Machine Design 3.7 Fixing the copper board (PCB) 3.7.1 Description

EDT 2012

It must be determined how to fix the PCB to the base table, tightly linked, without the presence of any mistakes so as not to affect the manufacturing process of the PCB, here the methods of fixing the PCB is shown. 3.7.2 Available methods to fix the PCB 1- Fixing with metal angle stripe. The board is fixed by Installation by sealing between two slices of metal that form an acute angle.

Figure 3.24: PCB fixed with metal stripe angle. 2- Fixing with Connecting bolts and A wooden ledge The board is fixed between two pieces of wood using screw nails.

Figure3.25: PCB fixed with nails.


33

Ch.3 Machine Design 3-Fixing with plastic strips The board is fixed using plastic stripes on the edges.

EDT 2012

Figure3.26: PCB fixed with plastic stripes. 3- Fixing with four screw nails The board is fixed to the flat table using 4 screw nails (Rose nail).

Figure3.27: PCB fixed with four nails on flat surface.

In Our PCB machine we used the forth type, because of suitable for our spindle, minimize errors, and provide distributed stress on the PCB.

36

Ch.3 Machine Design

EDT 2012

3.8 Fixing stepper motor


The stepper motor is fixed to the machine using four of Screw nut, Tied tightly to prevent movement or vibration during operation. Also to ensure high efficiency and not to oppose the power screw during rotation. The stepper motor is coupled with the power screw through a coupler that has two inner diameters, one for the stepper motor shaft and the other for the power screw.

Figure3.28: Stepper Motor before and after fixing.

30

Ch.4 Programming Software

EDT 2012

Chapter (4) Programming Software


4.1 Introductions
Now we have our steppers motors attached to our PCB machine, its time to test. Well start by the required software that is needed to control the PCB machine. Next, well show how to properly configure each software. Finally, well give some simple tests that can perform to verify weve wired up everything properly and that our PCB machine is ready for bigger and better things.

4.2 Eagle, PCB G-code and control software


There are three types of software that well be using with our PCB machine. The first is eagle this is specialized software that allows to design printed circuit boards. The second lazycam software takes the design we created with the eagle software and converts it into a language called G-Code or we can use another method to convert direct by eagle file to G-code using features of eagle program where it promoted installed PCB G-code inside it the main program screen shown in figure 4-1.This G-Code is then used by mach3 of software that send the Gcode to the PCB machine through the parallel port. Mash 3 is the actual application that talks to PCB machine; it takes the G-Code from PCB G-code software and uses it to send the proper electrical signals (via the drive circuits see Chapter 2) to the three motors.

44

Ch.4 Programming Software

EDT 2012

Figure 4.1: Main screen of PCB-G-code.

4.3 The Mach3 control software


The Control application were going to be referencing in this chapter is Mach3. Its from ArtSoft USA and is available in a free version and a commercial version. Both versions are identical, but the free version is going to limit you to 500 lines of G-Code; the version that can purchase removes this limitation (although it does have an upper limit of 10,000,000 lines of G-Code).

Figure 4.2: The main screen of Mach3. The first time we view the main screen of Mach3, there are a lot of buttons, readouts, and other elements crowding the screen, and none of it is likely to be familiar to anyone
45

Ch.4 Programming Software

EDT 2012

interested. But fortunately, there are only a handful of things needed to configure in the software to get machine up and running.

4.4 Downloading and Installing Mach3


Before us showing how we configure the software, though, we needed to present where we download a copy and install it. So, we visited www.machsupport.com, and clicked the Downloads menu, selected mach and lazycam, and followed the instructions on the page that opens to download the installation file. After downloading the installation file, doubled-click it and followed the instructions to install it. When we get to the screen for creating a profile shown in Fig 4.3, we just clicked the next button to skip it. The installation will also allow installing lazycam, a CAM application that can work hand in hand with mach3 once we have an eagle file that needs converting to G-Code. its available to choose install it or not; we recommend going ahead and installing it as it doesnt take much hard drive space and we may find it useful for generating G-Code.

Figure 4.3: Installing Mach3.

4.5 Parallel port


46

Ch.4 Programming Software

EDT 2012

4.5.1 Function of parallel port


When IBM designed the original PC they provided an interface for connecting printers using a 25 conductor cable. This is the foundation of the Parallel port we have on most PCs today. As it is a Very simple way of transferring data it has been used for many things other than connecting printers. We can transfer files between PC, connect peripherals like scanners and of course control machine tools using it.

Figure 4.4: Parallel port pins. The connector on the PC is a 25 way female connector. Its sockets seen from the back Of the PC are shown in fig 4.4. The arrows give the direction of information flow relative To the PC. Thus, for example, pin 15 is an input to the PCB. 4.5.2 Parallel port installing At some point in the installation, mach3 will want to install a parallel port driver, as shown in Fig 4.5. This is normal, so click the next button and follow the instructions to allow mach3 to install this driver.

Figure 4.5: Parallel port installing.


47

Ch.4 Programming Software

EDT 2012

4.6 Configuring Mach3


Were anxious to take our PCB machine for a spin, so well get straight to the key configurations. By the way if mach3 didnt open yet, double-click the mach3 mill icon on desktop. Itll show a screen similar to Fig 4.2 appears. The reset button will be flashing, and itll show a large collection of readouts. There arent that many configurations will need to perform, and well walk through each of them. 4.6.1 Motor Outputs Click the Motor Outputs tab, as shown in Fig 4.6. Verify that the X Axis, Y Axis, and Z Axis row all have a green check mark in the Enabled column. Next we change the values under Step Pin# and Dir Pin# as follows: For X Axis Step Pin#: 2 Dir Pin#: 3 For Y axis Step Pin#: 4 Dir Pin#: 5 For Z axis Step Pin#: 6 Dir Pin#: 7

Figure 4.6: Verify that the three axes are all enabled. 4.6.2 Limit switches

48

Ch.4 Programming Software

EDT 2012

Click the input signal tap as shown in Figure 4.7 and Verify that the X home, ++X and X also Y and Z to have a green check mark in the enabled column. Next define the Port/Pin to
which each is connected as shown.

Figure 4.7: Limit switches Configuring. 4.6.3 Spindle The next tab on config Ports & Pins is spindle setup. This is used to define the way in which Your spindle is to be controlled. You may allow mach3 to do nothing with it, to turn the spindle on and off or to have total control of its speed by using a Pulse width modulated (PWM) signal or a step and direction signal. The dialog is shown in Figure 4.8 and fig 4.9 obtain that spindle has 17 as output pin.

49

Ch.4 Programming Software

EDT 2012

Figure 4.8: Spindle setup.

Figure 4.9: Spindle Configuring. 4.6.4 Emergency Stop Click the Input Signals tab than Scroll down the list until find the eStop listing, as shown in Figure 4-9. We defined estop at pin 13
50

Ch.4 Programming Software

EDT 2012

Figure 4.10: Emergency Stop Configuring. 4.6.5 Motor tuning and setup Click the config menu in Mach3 and select Motor Tuning. Well see a window like the one in Fig 4.11 open.

Figure 4.11: Single screen is used to easily configure all three motor settings. There are three buttons of importance on this window: X Axis, Y Axis, and Z Axis. We must click a button (e.g., Z Axis) to set specific values for that motor. After setting any values, we must always click the Save Axis Settings button in the lower-right corner.
51

Ch.4 Programming Software

EDT 2012

Then well configure the following fields for the X, Y, and Z-axis motors as follows: Steps per X Axis Y Axis Z Axis 2000 2000 2000 Velocity 21.75 21.75 21.75 Acceleration 36 36 36

4.7 Testing the machine


Now its time to test our machine. We want to test that the motors can move the spindle along the three axes left/right. Connect our computer to the inter face board using a male-to-male 25-pin cable. Well attach one end to the inter face board and the other end to our computers parallel port. Now plug in the power to the interface board and the power supply. Open mach3 and click the MDI (Alt-2) tab, as shown in Figure 4.12.Were going to tell various motors to move by actually typing in G-Code on this screen.

Figure 4.12: Test PCB machine using the MDI tab.

52

Ch.4 Programming Software

EDT 2012

The first thing we need to do is click the Zero X, Zero Y, and zero Z buttons to reset the initial values for our motors to zero. Now if the big Reset button is blinking Fig 4.13 show that, click it; it should stop blinking. Just above the Reset button is the Input box. Click inside the text field and type in G00 X1. This is a simple bit of G-Code. When it is executed, Mach3 will instruct the x-axis motor to spin. Press the Enter key to execute the command. Run a similar command-G00 X-1 and press enter. The axis motor spin in the opposite direction.

Figure 4.13: Use the input field to manually enter G-Code for testing.

53

Ch.5 Experimental Results and Conclusion

EDT 2012

Chapter (5)
Experimental Results and Conclusion
5.1 Why this project
This project combines three separated fields, every field handle a main part of the PCB machine The mechanical field appears in the mechanical design that hold all the stresses and choosing a suitable linear motion system. The electrical field appears in the electrical design based on the torque requirements calculated and the designing of the driving system also choosing the stepper motor in the machine. The programming field appears in the control design as deciding what control system will be used from various types of control systems to fulfill our requirements with good reliability.

Figure5.1: Engineering science implementation in PCB machine. Here in Egypt the PCB machine cost about 1400$ to 45000$ and some PCB machine with a special option its value can be over than 500, 000$ that which give an impression to know how this project will be important. The first benefit offered by all forms of PCB machine tools is improved

35

Ch.5 Experimental Results and Conclusion

EDT 2012

Automation. The operator intervention related to producing work pieces can be reduced or eliminated. Many PCB machines can run unattended during their entire machining cycle, freeing the operator to do other tasks. This gives the PCB user several side benefits including reduced operator fatigue. Fewer mistakes caused by human error, and consistent and predictable machining time for each work piece. Since the machine will be running under program control, the skill level required of the PCB machine operator (related to basic machining practice) is also reduced as compared to a machinist producing work pieces with conventional machine tools. The second major benefit of PCB technology is consistent and accurate work Pieces. Today's PCB machines boast almost unbelievable accuracy and Repeatability specifications. This means that once a program is verified, two, Ten or one thousand identical work pieces can be easily produced with Precision and consistency. The third benefit offered by the PCB machine tools is flexibility.Since these machines are run from programs, running a different work piece is almost as easy as loading a different program. It can be easily recalled the next time the work piece is to be run. This leads to yet another benefit, fast change-over. Since these machines are very easy to setup and run, and since programs can be easily loaded, they allow very short setup time. This is imperative with Today's Just-in-time product requirements.

5.2 Conclusions
The object of the invention was to overcome the problems involved in the existing PCB manufacturing methods, and these can be summarized by: 1- Provide a PCB milling machine that makes it possible to easily mill a PCB by the desired circuit pattern. 2- Provide a PCB working machine have a Speed and high accuracy operation. 3- Provide a PCB working machine easy and simple to deal with. 4- Provide a PCB working machine have ability to produce a two layer PCB. 5- Provide a PCB working machine less in operation time than conventional method. We have achieved almost of the objective been mentioned in chapter (1) and here the conclusion: 1- The PCB machine have worked so well and achieved the desired requirements in producing an acceptable circuit board. 2- Our PCB machine has achieved a good speed and an acceptable degree in accuracy. 3- Our PCB machine programming provided Avery easy and flexible way in dealing with the machine and producing any circuit required beginning from designing it and ending with the final product .
35

Ch.5 Experimental Results and Conclusion

EDT 2012

4- Our PCB machine is able to produce a two layer printed circuit board with minimum steps required. 5- Finally our PCB machine have achieved a good operation time depending on the details on the produced circuit comparing to the conventional methods in producing the printed circuit boards.

5.3 Budget
Part name No. of parts 1 1 1 60 30 20 2 2 1 15 3 100 10 42 8 8 6 1 4 4 6 12 2 10 3 3 ----- 12 2 6 ---Cost of one part (L.E) 1250 170 50 .5 .5 1.25 30 10 145 1 6 .15 ---1 18 15 1.5 80 50 40 10 2 12 5 30 10 ---------3 10 60 ---Total cost (L.E) 1500 170 50 30 15 125 60 20 145 15 18 15 30 42 144 120 9 80 200 160 60 14 24 50 90 30 70 50 70 36 20 360 3821 1000

Frame power supply (10A-12V) power supply (2A 5V:12V) ph13 wire 4 wire female ph spacer cupper 25mf 220 V fan Fan v24 Dermal Spindle bit Bit hosting Different resistance Different capacitor diode fr307 L297 L298n voltage reg. 7805 double fr-4pcb18 50*60 stepper motor 3.25A stepper motor 1 A coupling motor Fixing nails parallel port interface ) 1- 2-3(mm End mill End mill Lubrication oil Parties welding Cables Jumpers heat sink relay 24 v Final project report Total PCB milling machine cost Miscellaneous components ---------(damaged , extra ,etc ) Table 5.1: Obtain all cost of our project.
33

Ch.5 Experimental Results and Conclusion

EDT 2012

5.4 Experimental results


stepper motor

This is a final data taken from our drive circuit after fixed it in the machines.
Motor X-axis Y-axis Z-axis Holding current 2 amp 2 amp 1.2 amp Operation current .3 amp .22 amp .19 amp

Table 5.2 Obtain motor currents. Driver circuit

Figure 5.2: The driver circuit (front view).

Figure 5.3: The Driver circuit (back view).


35

Ch.5 Experimental Results and Conclusion

EDT 2012

5.5 Project in 4 steps


The first challenge we faced in our project is choosing the machine design as obtain in chapter (3), there are many design available. After many discussion we decided to choose the fixed table with center power screw for these reason: 1- Fixed table provide suitable position for our board, this reduce any possibility for error. 2- Using Center power screw this mean we have only one motor at each axis, this increase tuning in motion of our machine. Another problem is choosing the suitable bearing for our steel supports as shown in chapter( 3), there are many type of bearing, we choose sliding rods type because of it is cheaper and with good lubrication could be smooth and suitable for PCB machines. After we finished the mechanical part, we thinking what about electrical wiring and motor selection? We do a lot of search in web sites, books, and discussing about the project with many persons who dealing with PCB machines searching for stable drive circuit for our machine. Finally we choose drive consist of two main components L297 chip and L298 chip which allow us to drawn voltage up to 36 volt and currant up to 2 amp, this values suitable for motor we selected which explained in chapter(2).

The last point is programming, at beginning in our project we decided to do our own software ,but as we have little experience in programming we bushed to used familiar open source program( mash 3), which is explained in chapter (4).

5.6 Example of machine product


Now we will show how we can manufacture a PCB from our own machine, and calculate the accuracy of machine by measuring different paths in eagle software photo file and comparing between these values and the actual values. Firstly, we open eagle program and create simple PCB design like this shown in fig 5.4 this schematic design must be converted to board one like shown in fig 5.5 and previously we show this only three steps to have a G-code file, eagle file converted by PCB G-code program to G-code file, open with mash3 program that convert our design to signals send via parallel port to drive circuit that feeding the stepper motors by pulses, which make the stepper motors rotate in desired direction. Now after this

35

Ch.5 Experimental Results and Conclusion

EDT 2012

process, we can say finally we have a PCB produced by own machine, fig 5.6 show the board after finishing the manufacturing process.

Figure 5.4: Schematic design of our example.

Figure 5.4: Board design of our example.

35

Ch.5 Experimental Results and Conclusion

EDT 2012

Figure 5.6: The machine product. Now we will calculate the accuracy of our machine as explain previously, we will compare between three different distances and take the average, first distance between main source point and resistance we found it( 3.5) cm in eagle and( 3.3) cm in actual and the second one between resistance and capacitor calculated is( 4.5) cm in eagle and( 4.2) cm in produced PCB, the last one between capacitor and coil calculated is (2.5) cm in eagle and( 2.3) cm in produced PCB. By take the average percentage of the different values between these distances, we can calculate the machine accuracy that will be approximately 90%, this good accuracy for trail type which our design able to do. Notice that G-code of this example will attach to appendix.

5.7 problems of our machine


1- Motor selection and choosing the suitable bearing system. 2-Heat generated in L298 integrated circuit. 3-Fixing of the copper boared without leaving any field of mistake. These problems have been over comed as we shown in the previous chapters. But, there are still some problems in the machine: 1-There are little defection on the mechanical design (on the X axis) Which lead to incorrect results on the produced PCB. 2- The end mill (the spindle bit) when work for a long time or forced to make more than one PCB, it break down (we conclude that this problem is due to mistaking in the mechanical calculation of the stress on the spidle).
Due to these problems, our machine could not reach to 100% efficiency, but these problems could be avoided in the for coming contributions of this project.

35

Ch.5 Experimental Results and Conclusion

EDT 2012

5.8 Future work and improvements


A first aspect of the invention is a PCB working machine which includes a work table for supporting a PCB substrate in place with a suction force. A second aspect of the invention is characterized in that the air blowing holes are in an annular arrangement in a central portion of the end plate of the floating head and that the floating head has evacuation apertures at radically inner and outer portions of the air blowing holes. A third aspect of the invention is characterized in the use of automatic tool replacing means located at a lower location of the working machine to replace a cutting machine with another. A fourth aspect of the invention is a method for adjusting the amount of extension of the cutting edge in the PCB working machine is characterized in a step of fixing the cutting tool to the chuck of the spindle, a step of detecting the position of the cutting edge of the cutting tool, a step of detecting the position of the floating surface of the floating head. A fifth aspect of the invention is a method for driving the PCB working is characterized in a step of dividing a working program into a plurality of sequential steps and detecting the position of the cutting edge of the cutting tool in predetermined time intervals.

56

Reference
1. How to make your own CNC machine book 2. www.sayedsaad.com 3. www.bearings.machinedesign.com 4. Marcel Dekker, Bearing Design in Machinery 5. www.electronics-lab.com/projects 6. www.robotics.com 7. www.shinano.com 8. www.techlib.com 9. www.doc.ic.ac.uk/~ih/doc/stepper/ 10. www.discovercircuits.com/S/stepper.htm 11. hades.mech.northwestern.edu 12. www.metacafe.com 13. www.redcircuits.com 14. www.abcsofcnc.com/ 15. www.futurlec.com 16. www. Heavens of PCB .com

61

Appendix
Data sheets