• No results found

Development of a Rotary CNC System

N/A
N/A
Protected

Academic year: 2021

Share "Development of a Rotary CNC System"

Copied!
90
0
0

Loading.... (view fulltext now)

Full text

(1)

Development of a Rotary CNC System

BRUNO BOSCO & JIMMY LARSSON

(2)

Development of a Rotary CNC System

BRUNO BOSCO & JIMMY LARSSON

Master’s Degree Project

Stockholm, Sweden February 2014

(3)

Abstract

The Rotary CNC system is a novel way to position a tool in the XY-plane.

The system is meant to be used in areas such as 3D-printing, laser cutting, CNC milling and other rapid prototyping equipment. Benefits include lower production cost, less moving parts and a small physical footprint. This thesis has provided a ”Proof of Concept” prototype of the Rotary CNC system. It has been shown that the system is a viable alternative to current CNC system designs in the field of PCB routing.

(4)

Acknowledgements

The authors would like to recognize the help and support that has been recieved from several parties. ELFA Distrelect has provided a very generous place for us to execute the project at their headquarters in Stockholm. The incubators KTH innovation and Student Inc has provided legal, economical and IP related help and guidance. The authors would like to send a special thanks to Bj¨orn M¨oller, Mark Smith and Staffan Qvarnstr¨om for helping and encouraging us with their know how and experience in the field. Their help has contributed significantly to the progress of the project.

Organization

This thesis has been a collaboration between Jimmy Larsson and Bruno Bosco.

Each having their own specific areas of responsibility but a significant amount of overlap has been present and both parties has contributed significantly to all areas of development. The Rotary CNC project has been funded by the authors along with contributions from KTH innovation. All intellectual and material property that has been developed during the project belongs to Jimmy Larsson and Bruno Bosco according to an external agreement.

The basic division of responsibilities has been as follows:

Jimmy Larsson:

• Electronics design (Section: ”Electronics”, ”Electronics Development”,

”Motor driver Evaluation”)

• Motor research (Sections: ”Motors, transmission and control”, ”Control”,

”Details about stepper motors”)

• Platform research (Section: ”Embedded platform”)

• Initialization routine and feedback (Section: ”Initialization”)

• Acceleration control (Sections: ”Details about stepper motors”, ”Step performance”, ”Acceleration and Maximum step rate”)

• System compatibility (Section: ”System Compatibility”)

• File formats for PCB fabrication (Section: ”System Compatibility”)

• Machine code research (Sections: ”System Compatibility”, ”Gcode con- verters”, ”Code for CNC-systems”)

Bruno Bosco:

• Hardware design (Sections: ”The Rotary Design”, ”Physical construc- tion”, ”Materials”)

• Derivation and implementation of Kinematics (Section: ”Derivation of kinematics”, ”Software”)

• MatLab Simulations (Section: ”Simulation”)

(5)

• AutoDesk CAD modeling

Joint areas of responsibility:

• Arduino software development

• Hardware construction and production

• Evaluation and testing

The Project has been supervised by Bj¨orn M¨oller and Mark Smith. Mark Smith has also served as Examiner for the project.

(6)

Contents

1 Introduction 1

1.1 Problem . . . 1

1.2 Goals . . . 2

1.3 Ethics and Sustainability . . . 2

1.4 Methodology . . . 2

1.5 Delimitations . . . 3

1.6 Outline . . . 3

2 Theoretical Background 4 2.1 Rotary Design . . . 4

2.1.1 Related Work . . . 7

2.1.2 Linear vs Rotary designs . . . 8

3 Research and Design 9 3.1 Derivation of kinematics . . . 9

3.2 Simulation . . . 12

3.3 Materials . . . 14

3.4 Motors, transmissions and control . . . 15

3.4.1 Control . . . 17

3.4.2 Stepper motors . . . 21

3.5 Electronics . . . 27

3.5.1 Motor Drivers . . . 27

3.5.2 Sensors . . . 32

3.5.3 Data management and User interface . . . 34

3.5.4 Embedded platform . . . 35

3.6 System Compatibility . . . 37

3.6.1 PCB-layout to CNC-system . . . 38

3.6.2 Output files from CAM-processors . . . 40

3.6.3 Gcode Converters . . . 43

3.6.4 Code for CNC systems . . . 44

4 System Implementation 48 4.1 Software . . . 48

4.1.1 Interpolation . . . 49

4.1.2 Initialization . . . 51

4.2 Prototyping . . . 53

4.2.1 Physical Construction . . . 54

4.2.2 Electronics development . . . 56

4.3 Test Setup . . . 61

4.3.1 Methodology and Measuring Equipment . . . 61

4.3.2 Step performance and drift . . . 61

4.3.3 Acceleration and Maximum step rate . . . 62

4.3.4 Precision test . . . 62

4.3.5 Repeatability test . . . 63

4.3.6 Power Consumption . . . 63

4.3.7 Motor Driver Evaluation . . . 64

(7)

5 Results 65

5.1 Prototype . . . 65

5.1.1 Cost . . . 66

5.2 Precision & Resolution . . . 69

5.3 Repeatability . . . 71

5.4 G-code Reading Capability . . . 73

5.5 Speed . . . 74

6 Discussion 75 6.1 Future Work . . . 75

7 Conclusion 75

List of Figures

1 Semi-exploded view of the Rotary design (CAD) . . . 4

2 Rotary design with spindle motor (CAD) . . . 5

3 Arm assembly and top plate (CAD) . . . 5

4 Actuator arm (CAD) . . . 6

5 Overview of the physical parts (CAD) . . . 6

6 Schematic drawing of the Rotary Design . . . 10

7 Flowchart over kinematics implementation . . . 11

8 Simulation of 0.1mm spaced parallel lines . . . 13

9 PCB-layout before simulation . . . 13

10 Simulated result of PCB-layout . . . 14

11 Simulated result for LQFP capsule . . . 14

12 Motor assembly . . . 15

13 NEMA 17 stepper motor with planetary gears . . . 16

14 Flowchart of the transmission . . . 17

15 Open-loop control system . . . 18

16 Closed-loop control system . . . 19

17 The working principle a Unipolar stepper motor . . . 22

18 The working principle a Bipolar stepper motor . . . 23

19 Speed-Torque graph . . . 24

20 Linear acceleration graph . . . 26

21 Exponential acceleration graph . . . 27

22 Unipolar driver (four transistors) . . . 28

23 Bipolar driver (two H-brides) . . . 29

24 Excitation methods for Stepper motors . . . 30

25 Schematic of an snap action switch . . . 32

26 Schematic of an Optical Sensor . . . 33

27 Overview of the data management from EDA/ECAD-software to a CNC-system . . . 39

28 Graphical output of a Transfer file . . . 40

29 Graphical output of a trace around an object . . . 40

30 G-code example . . . 45

31 Software Flow chart . . . 49

32 Example without interpolation . . . 50

33 Example with interpolation . . . 51

(8)

34 Initialization flowchart (Calibration routine) . . . 52

35 Example without initialization . . . 53

36 Physical aluminum cross . . . 54

37 Baseplate hub . . . 55

38 Actuator Arm . . . 56

39 Breadboard prototype . . . 57

40 Second iteration of the electronics . . . 57

41 Electronics overview . . . 58

42 Pin configuration . . . 59

43 Schematic for actuators . . . 59

44 Schematic for sensors . . . 60

45 Schematic for SD-card . . . 60

46 Schematic RGB-LED . . . 61

47 Precision test setup . . . 63

48 Prototype front . . . 65

49 Prototype side . . . 65

50 Electronics enclosure. . . 66

51 Prototype Drawing . . . 66

52 Value Comparison . . . 68

53 Price Comparison . . . 68

54 Drawing LQFP BOB . . . 69

55 0.5mm LQFP capsules . . . 70

56 0.5mm lines . . . 71

57 Repeatability test . . . 72

58 Repeatability test close up . . . 73

59 Test Circuit Drawing . . . 74

60 Simulation Circuit Drawing . . . 74

List of Tables

1 Digital logic levels . . . 34

2 Choice of Embedded platform . . . 36

3 Specification of Ardunio DUE . . . 37

4 EDA and ECAD Software table . . . 41

5 Output-files from different EDA/ECAD software . . . 41

6 Gcode converters . . . 44

7 Implemented Gcode commands . . . 46

8 G-Code Execution Order . . . 47

9 Measurement equipment . . . 61

10 Total Cost of the Rotary Machine . . . 67

(9)

Nomenclature

Abbreviations

PCB Printed circuit board CAD Computer Aided Design

CAM Computer Aided Manufacturing NC Numerical Control

CNC Computer Numerical Control SMD Surface-mount devices

ECAD Electronic Computer Aided Design EDA Electronic design automation FAB PCB Fabricator

DIY Do it Yourself (Technique)

(10)

1 Introduction

This Master thesis describes the development and evaluation of a low cost CNC platform which can make PCB prototyping ability available at a price point where it is accessible for smaller companies, universities and amateurs alike.

The platform has also been made compatible with some common ECAD/EDA software tools[1], making it easy to use.

The demand for creating fast and reliable prototype circuit boards has grown significantly during the last few years. Electrical components have been rapidly shrinking in size and we are now seeing a development where SMD:s (Surface Mounted Devices[2]) are cheaper, smaller and more efficient than their through- hole counterparts [3] . SMD:s have the disadvantage of being harder to prototype and test than through-hole components since they can not easily be mounted on solderless breadboards[4], perf boards[5] and other commonly used proto-typing equipment. In fact even simple measurements can sometimes be hard to perform on some SMD:s without creating a prototype circuit board for the component.

Therefore the need for developers to produce their own PCB:s (Printed circuit boards) is a pressing concern.

To reduce mechanical complexity and cost of the CNC system a new and innovative design (”The Rotary Design”) has been developed. The viability of the Rotary design as a low cost PCB router is evaluated in detail in this report.

1.1 Problem

Traditional equipment for producing circuit boards on a small scale has been either expensive, labour heavy and/or bad for the environment. The two main methods for producing prototype PCB:s are chemical etching and CNC routing.

Chemical etching requires quite small economical resources but requires the handling of hazardous chemicals, well ventilated areas and skill. This makes chemical etching unfit for many environments and circumstances. The other main method for prototyping circuit boards is to use a computer controlled mill to engrave the surface of a copper laminate. This process is easy to use, does not require any dangerous chemicals and can produce very reliable results. The drawback of the milling technique has been the high initial investment needed to purchase the machine itself and maintanance. At todays price point (typically 7000-15000 USD) it is often not economically viable for a company to buy a CNC mill specialized in only producing PCB:s.

The Rotary design is intended to keep the mechanical complexity of the ma- chine to a minimum. The decrease in complexity will enable a lower production price and less necessary maintenance than the machines that are currently on the market. The problem in this thesis is to develop, implement and evaluate a first prototype of the machine. The result will be used as a guidance to deter- mine if the design is viable as a starting point for further development of a low cost, PCB milling platform.

(11)

1.2 Goals

The goal of the project is to evaluate the feasibility of creating a low cost CNC machine that is capable of reliably producing prototype circuit boards. In order to conduct the evaluation a prototype implementation of the rotary design will be implemented. The prototype should have full functionality in the XY plane while the implementation of the Z-axis will be subject to future research. Some measurable goals has been set for the final product. The first prototype should be able to either confirm that these goals are reachable or provide arguments as to why they are not. The stated goals for the final product are listed below:

• Have a precision of the end mill position in the XY-plane of less than 0.1mm in any direction

• Be able to interpret and execute some standard G-code commands.

• Have a material cost under 500 USD.

• Be able to repeatably produce circuit boards with footprints of a LQFP capsule with 0.5mm pitch.

1.3 Ethics and Sustainability

With the growing popularity of the DiY, maker, open hardware and crowd founding community trends, the interest and need for low cost development is increasing[6]. By providing low cost platforms which could be accessible to medium income households these trends can take on even bigger importance in the future. Many start up companies has sprung from the new availability of machinery and software such as CAD and 3D printing. The need for starting capital has decreased and the impact of websites such as kickstarter.org[7], a new growing ground has emerged for entrepreneurs of all kinds.

The possibility for home manufacturing comes closer and might be part of an answer on how to lower emissions from logistics and transport. If more products could be sent to the customer as a digital file and produced by the consumer him/herself. This would reduce the need for transport of many small goods.

The authors can see no ethical problems with regards to the development of the rotary CNC system.

1.4 Methodology

In order to evaluate the capability of the Rotary design a prototype has been developed. The operation of the prototype has been simulated in MatLab[8]

in order to easier find errors and visualize the governing kinematic equations.

The simulation also makes it easier to implement and test different software solutions such as G-code interpretation and tool path optimization.

The evaluation of the prototype parameters has been determined empirically by measurement. Extrapolation of the result of the prototype to the capability of a final product has been made with the help of literary studies, simulation and mathematical reasoning.

(12)

1.5 Delimitations

This thesis will focus only on the XY-plane functionality of the Rotary design.

The reason for this is that the Z-axis functionality could be implemented using a traditional linear design which is already a widely adopted solution [9]. However one could imagine that some custom solution could be developed for the final product.

Software will be developed to the point at which an outline of a PCB trace can be drawn on a paper. Therefore support for drilling and cutting has not been implemented in the prototype.

In short, this thesis aims to prove the concept of the Rotary designs operation in the XY-plane.

1.6 Outline

In this report each section begins with a brief summary of its contents. The summary should contain all information needed for the reader to understand which decisions has been made in terms of components and other design issues.

For the interested reader the rest of the section will contain a detailed expla- nation as to why certain decisions has been made and also present alternative solutions that were contemplated.

(13)

2 Theoretical Background

2.1 Rotary Design

The Rotary design is an attempt to reduce the mechanical complexity and cost of a CNC PCB routing machine. Traditional designs predominately uses linear motion in all axis. This results in the need for linear actuators which are expensive and some times mechanically complex. By using a rotating motion for positioning in the XY-plane the Rotary design can reduce the cost and complexity of the CNC system. Figures 1-5 demonstrates different parts in the Rotary design.

Figure 1: Semi-exploded view of the rotary design with a copper laminate on the base plate

(14)

Figure 2: Rotary design with spindle motor (black) and copper laminate (or- ange).

Figure 3: Shows how the actuator arm is assembled with the motor, ball bearing and top plate.

(15)

Figure 4: Close up of the actuator arm

Figure 5: Physical parts needed for the Rotary design.

The Rotary design utilizes two axises of rotation in order to position a tool in the XY-plane inside the circular work envelope. The substrate (copper lam- inate in this case) is placed and fastened on a rotating disk (the base plate) in between the top and the bottom plate as depicted in figure 2. The disk is attached to the shaft of the planetary gear of the bottom stepper motor. A cutting tool is then fastened on the actuator arm, which in turn is fastened on the motor shaft of the top planetary gear as shown in figure 3. The disk and actuator arm can now be rotated in any 2D pattern by individually controlling the motion of each rotating axis. The control method and kinematics behind it are covered in following sections in this report. By placing the actuator arm at

(16)

half the radius from the center of the base plate the forces at the tip of the arm are held at a minimum while maximizing the work area. It also optimizes the arm in terms of resolution since a longer arm means more movement at the tip per step of the motors.

One drawback of the Rotary design is that it does not scale well with an increasing work envelope since the forces on the end of the actuator arm grows with the length of the arm. Traditional linear designs stems from big, heavy duty industry applications[10] and in that context the Rotary design would probably not perform well because of the increasing forces. This is possibly one of the reasons why it has not been developed before and why we have not been able to find any other similar designs of a CNC machine.

For the relatively small work envelopes that are used in desktop and tabletop machines however, the Rotary design offers many advantages over traditional designs. Some of the advantages of the Rotary design are listed below:

• Less maintenance due to reduced mechanical complexity

• Lower cost due to fewer parts and fewer production steps.

• Greater mobility since the construction can be disassembled and reassem- bled in an easy way.

• Smaller footprint due to fewer mechanical parts.

2.1.1 Related Work

In the past some attempts to construct a low cost PCB router has been made.

A few notable examples such as the othermill[11] which was launched via a kickstarter[7] campaign in 2013 are in progress but has not yet been released to the market. In the related field of 3D printing however several projects and companies are currently competing to create the new standard in consumer 3D printing with the stated goal of getting one 3D printer into every home[12][13].

One could speculate that the consumer 3D printing trend will increase the de- mand for home PCB prototyping since it would give the consumer the oppor- tunity to integrate electronics into their creations.

PCB milling machines are currently a niche market and only a handful of com- panies compete for it. T-tech[14] and LPKF[15] being the most predominant competitors. Prices range from about 7000 - 250K USD for T-tech and LPKF systems depending on the model while the othermill is available for pre order at 2199USD. The high end machines are typically equipped with auto tool changing systems, auto leveling systems and other features such as customized software to increase the productivity and ability of the machine. The absolute most high end systems sometimes equip lasers and other systems to further improve the machine.

Performance claims vary between manufacturers. Most manufactures only state the theoretical resolution of their machines and does not take vibrations from the actual milling process etc into account. In a few cases the minimum width of a trace that can actually be milled is stated, typically being 0.1mm for entry

(17)

level machines in the 7000-15000 USD range. The othermill (which is not yet available on the market) claims a minimum trace width of 0,254mm.

During the literary study no attempts to create a PCB mill that does not use a traditional linear design has been found. Other CNC system which uses one or more rotating axises, such as automated lathes and 4 axis CNC mills exist[16].

However none of them uses two rotational axises as a primary way to navigate the XY plane.

Other systems that use rotational motion in similar ways but for non-CNC applications where also investigated. One related example is the well known hard drive which uses a similar design to read and write information to/from a rotating disk[17]. CD-players is another example where a motor in the middle rotates the disk but in this case the optical pickup sensor that reads the infor- mation from the disk uses linear motion to go from the center to the edge of the disk.

2.1.2 Linear vs Rotary designs

A traditional linear system works by using one linear motion in each axis. This way it can navigate the whole 3D space within the work area. The main ad- vantage of a linear design is that it scales very well with size. The resolution of the machine and forces at the tool tip are not dependent on the size of the work area. Linear designs are therefore very suitable in situations where large work areas and forces are needed. One limitation of the linear design is however that it needs to transform a rotating motion from the motors to a linear motion.

Different ways of achieving this exists. The most common approach is probably the use of ball screws and ball nuts. These components add to the mechani- cal complexity and cost of the system. They also increase the need for regular maintenance such as lubrication. By using a Rotary design there is no need to translate from rotary to linear motion and hence these mechanical components can be made obselete.

(18)

3 Research and Design

3.1 Derivation of kinematics

In order to create a simulation of and to control the Rotary Design the inverse kinematics of the end mill position has been derived. Figure 6 shows a schematic configuration of the design.

The position of the end mill is governed only by the two angles α and θ. Where the distance from the center of the base plate is only dependent on α and the position around the edge of the circle with a radius of that distance is only gov- erned by θ. Since the kinematic equations has more than one solution a unique equation for each half plane has been derived. Logic has then been implemented in software to ensure that the control system moves in the shortest distance be- tween quadrants and that the correct equation is used in each half plane. In addition to the detailed flow chart in figure 7 the full software implementation of the kinematics and other logic can be found in Appendix A.

(19)

Figure 6: Schematic drawing of the Rotary Design with The governing equations

(20)
(21)

Equation 1-4 shows the derivation of the inverse kinematics for the upper half plane of the depicted system. The equations for the lower half plane has been analogously derived.

The distance from the origin, N , (center of the base plate) is only dependent on the angle α. This relationship can be expressed as in equation 1 below.

N =q

x2p+ yp2= 2Rarmcos(α

2) (1)

α = acos(

q x2p+ yp2

Ra

) (2)

Where N is the distance from the point (xp, yp) of the origin to the base plate.And α is the angle of the actuator arm. Rarm is the length of the actuator arm.

Using the solution for α a solution to θ can now be derived.

xp= −2Rarmcos(α

2)cos(π − α

2 + θ) (3)

⇒ θ = acos( −xp

2Rarmcos(α2)) −π − α

2 (4)

Where θ is the angle of the base plate.

The system will be powered by 1.8 degrees/step planetary geared stepper mo- tors. The motors are driven by drivers which are capable of micro stepping[18]

down to 161steps (stepRatio = 16). Equations x-y are used to calculate the theoretical resolution of the system across the work envelope.

StepsP erRevolution = 360

1.8 ∗ StepRatio ∗ GearingRatio (5) Inserting the maximum step ratio of 16, the target resolution of 0.1mm and the maximum distance from the center (100mm) we can solve for the minimum gear ratio needed.

Resolution = 2 ∗ π ∗ Radius

StepsP erRevolution (6)

M inimumGearRatio = 5π

8 ≈ 1.9635 (7)

3.2 Simulation

A simulation of the machines operation has been implemented in MatLab[8].

The simulation utilises the kinematic equations of the system (derived above) in order to simulate and visualize the movement of the actuator arm and the base plate. It also traces the tool path and plots the resulting trace. The simulation is capable of reading and executing some standard G-code commands[19]. In the simulation the use of stepper motors with a 1.8 degree stepping angle are

(22)

assumed and a simulated gearing ratio can be set by the user. A higher ratio will enable a finer resolution of the simulation but will also increase the simulation time.

Figure 8 shows a magnified view of a simulation of a tool path creating three parallel lines with 0.1 mm line spacing. The simulation is done using a gear ratio of 1:50 and using full steps on the stepper motors. Hence the machine is near it’s precision limit and you can clearly see the zig-zag pattern that occurs when the machine tries to move in a straight line.

Figure 8: Simulation of parallel lines with 0.1mm separation. Step ratio in- cluding gearing is 1:50. The zig-zag pattern that is produced by the system is clearly visible.

In order to verify the G-code interpreter of the simulation and to test the functionality of the system further, an example circuit board was plotted using the simulation. In figure 9 - 10 the Eagle CAD[20] version of the board as well as the tool path and resulting plot from the simulation are shown.

Figure 9: Screenshot of the original PCB layout in Cadsoft Eagle(Left)[20] and the trace produced by the G-code generator[21].

(23)

Figure 10: Visualisation of the simulated example circuit board (minimum trace width =0.5mm) . The left figure is the path with both cutting path and rapid movements, and the one to the right is only the cutting path.

Figure 11: Visualisation of LQFP (0.5mm pitch) tool path. The white speckles the red trace are an artifact of the simulation which are visible because the trace has been zoomed in on after the simulation.

The simulation shows that it is theoretically possible to produce fine circuit board traces of LQFP capsules with 0.5mm pitch using the rotary design. In- dicating that the limitations will arise from the physical design of the machine as opposed to challenges in the operation itself. The simulation also confirms that a step ratio of 1:34 will provide the 0.1mm precision stated in the goals.

From this result we could confidently choose a common 5 + 112 planetary gear in combination with using 161 step to control the stepper motors.

3.3 Materials

In order to evaluate the different aspects of the design it was decided that the prototype should be made as rigid as possible while still keeping cost and complexity at a minimum. Rigidity is important to reduce disturbances such as vibrations during operation. Less regard was taken into the weight and mobility of the prototype since these properties were not stated within the goals of the project.

To make the machine as rigid as possible the choice of material fell on two 8mm steel plates and 4 M6 rods. The material cost of the machine could by this choice be held down while retaining a good level of rigidity in the design.

The machine consists of a set of different plates. A water jet has been used to cut out the parts and there after the holes on the top and bottom plates has been cut out using a lathe.

(24)

Initial testing indicates that lighter materials such as plastics or wood could be used while retaining the necessary degree of structural rigidity of the ma- chine. However these test was not conducted during actual PCB milling and are therefor inconclusive.

3.4 Motors, transmissions and control

The rotary design requires two rotating motions to navigate the XY-Plane. In order to comply with the stated accuracy demands the base plate of the machine must be controllable to a level of at least 6284 steps per revolution (see Equation 5). The Actuator arm only requires half the number of steps per revolution to achieve the same accuracy but in order to keep complexity and costs down the same motors and transmissions has been applied to both axis.

After exploring several options (discussed in detail in this section), 1.8degrees/step stepper motors with a 112 planetary gear was selected[22]. This design reduced the need for a secondary gearing stage such as a worm gear[23] or belt drive which would induce further mechanical complexity. Stepper motors with inte- grated planetary gearboxes are readily available in standard NEMA sizes[22]

and falls within the stated budget goals of the machine. The base plate and actuator arm are driven directly from the planetary gear shafts. For increased radial stability, ball bearings has been added to each shaft and mounted on the base and top plates of the machine as shown in figure 12.

Figure 12: Shows how the ball bearing and top motor with planetary gears are mounted on the top plate.

(25)

Figure 13: Cad model of a NEMA 17 stepper motor with planetary gears The stepper motors are controlled by Big Easy drivers[24]. The driver allows for switching between full, half 12 ,14 ,18 and 161steps. In combination with the planetary gears this results in a maximum resolution of 16582steps per revo- lution or 0.03789mm/step of the base plate at the edge of the base plate (see Equation 6). Since the actuator is positioned at half the base plate radius it will move with a resolution of 0.01895mm/step using the same set up. Each motor (including the planetary gear) is capable of producing constant torque of up to 2.0N m[22]. Meanwhile a typical force while milling PCB boards is about 2.8N according to accurateCNC[25]. This would make the torques on the edge of the base plate about 0.1 ∗ 2.8 = 0.28N m, thereby giving some head room for the intended use of the motors. This is important since losses in torque might occur during microstepping and transmission[26].

The full datasheet for the motors and planetary gearbox can be found at OMC stepperOnline[22], where the motors full name is 17HS15 − 1684S − P G5[22]. The full datasheet of the Big easy driver can be found at Schmalzhaus[24].

(26)

Figure 14: Flowchart of transmission and motor drivers

At any point inside the work envelope one step of either the arm or the base plate can be approximated as a straight line. This allows for a simple estimate of the theoretical resolution of the machine. Using this approximation we get the result that the system has a theoretical ability to position the actuator inside a rectangle of 0.03789 ∗ 0.01895 = 0.0007mm2or less at any point within the work envelope. The actual resolution however will be constrained by other physical factors such as vibrations and flexing as well as calibration and inaccuracies in gearing, calculations and a host of other factors.

3.4.1 Control

The techniques that are used to control CNC-system can be divided into two distinct approaches. Closed-loop (Servo drive) and open-loop (Stepper drive).

Both approaches have their advantages and disadvantages, which are discussed in the following two sections[27][28][29].

3.4.1.1 Open-loop

In an open-loop system there is no feedback from the system during operation as illustrated in figure 15. This makes it impossible to recover from un-modeled variances imposed on the system from the process. It is therefore necessary that

(27)

all actuators are able to execute the commands from the controller in order for the system to work properly. Open-loop systems are therefore only suitable for applications where the process is repeatable and reliable and has a very low variance in its operation. In essence the model of the system needs to be near perfect in order for the system to perform as expected. If the model is well estimated, an open-loop approach can greatly reduce the complexity and cost of the system since less hardware (sensors and feedback circuitry) is needed[28][30].

Figure 15: Overview of an Open-loop system for stepper motors[28].

Stepper motors are common in Open-loop systems and performs well under the right circumstances and are common in open-loop CNC systems[10][27].

3.4.1.2 Closed-loop

Closed-loop system allows for precise control of angular position, velocity and acceleration. It consists of a suitable actuator that has a feedback-sensor which indicates the state of the system back to the controller, as shown in figure 16). The controller needs to be relatively sophisticated and usually needs some tuning to work properly. A common technique for this is to implement a PID controller [30][18][28].

(28)

Figure 16: This figure illustrates an overview of an Closed loop system suitable for Servo drive[28].

Closed-loop CNC systems, uses typically servo motors[28]. Servo motors have an internal feedback system which makes it possible to adjust for unin- tended deviations from the desired position of the rotor. This ability makes the system less susceptible for un-modeled aspects of the process[18].

3.4.1.3 Servo motors vs stepper motors

Deciding between open-loop (stepper motor), closed-loop (servo motor) or some sort of combination of both is a challenge. Selecting a suitable motor and con- trol strategy for the application is hard. There are some key design criteria’s like cost, positional accuracy requirements, torque requirements and availabil- ity. Which all needs to be concerned wisely[18][29].

Advantages with stepper motors

• Suitable for open-loop systems[31]

• Discrete pulses for every step, implies that digital interfacing is easy and usually more reliable.

• Errors are non-cumulative between steps.[31]

• Different step angles are available, where 0.9degree/step and 1.8degree/step are the most common.[29]

• They are mechanically simple and robust.

• The torque of a stepper motor at low speeds is usually greater than a servo motor of the same size[18].

(29)

• Highly reliable and available for a low cost [29].

• Common in CNC-applictions.[18]

Disadvantages with stepper motors

• Fixed increments of motion, if not using micro-stepping technique.

• Performance is highly dependent on motor drivers[32].

• Low energy efficiency, since the coils are fully energized most of the time even at low speeds.

• Acceleration scheme is needed in order to achieve higher speeds efficiently[33].

• Stepper motors lose a significant amount of their torque as they approach their maximum step frequency. [29]

• Stepper motors are harder to control than servo motors regarding accel- eration of loads[34] [32].

• Poor high speed performance[29].

• Limited torque to handle large inertial loads[10].

• Suffers from vibration and resonance problems[10].

Advantages with Servo motors

• Suitable for applications where high speed and high torque is needed[29].

• Servo motors maintain their torque better than stepper motors at high speeds[18].

• Does not have predefined discrete steps and can therefore achieve a non- discrete position control [18][32].

• Does not vibrate or suffer from resonance issues as much as stepper motors [18].

• Servo motors generally produce less noise than stepper motors[18].

• Better performance in speed, power efficiency and accuracy than stepper motors[29].

• Common in high-end CNC-applications[10].

Disadvantages with Servo motors

• Servo motors often require gear boxes, especially for lower speed operation and to achieve high accuracy[18].

• Needs tuning and require more complex drive circuitry, processing and positional feedback for accurate positioning[30][29].

(30)

• The requirement of a feedback system which increases the complexity of the mechanical design and increases the maintenance of the whole system.

[18].

• Servo motors are usually more expensive than stepper motors with the same torque rating[29].

3.4.1.4 Motivation of control strategy

Servo motors generally performs better regarding speed, power and the abil- ity to compensate for errors. However, high engraving speeds is not a crucial feature for this system at hand. Since a stepper motors will be able to move the engraving tool or pen fast enough in the XY-plane, to prove the concept.

The decision to use a open-loop control approach with stepper motors has been decided for the reasons below:

• The speed involved in the routing process is well within what stepper mo- tors can achieve and examples can be found in existing CNC systems[11][12].

• The required torque of the system is within the specifications of many common stepper motors.

• The physical size of the motor is an standard, (NEMA Standard[22]).

Therefore is it possible to purchase them from any supplier and it will still fit well with the machine.

• The theoretical resolution, is within the stated goals. Where stepper mo- tors can achieved more resolution by using different gearing’s and drivers[27].

• Servo motors are more expensive than stepper motors.

• If needed the stepper motors could be equipped with encoders or rotary potentiometers to provide a closed loop system.

3.4.2 Stepper motors

There are many different stepper motors to choose from. The basic theory about stepper motors is therefore necessary, in order to be able to make a wise choice regarding the specifications of the stepper motors and their performance.

Stepper motors use pulses as input, and converts the pulses into mechani- cal motion which is proportional to the motors step angle[18]. Stepper motors are based on the fact that a rotor has a tendency to align itself to where the magnetic field (stator flux) has it’s maximum, which is the position where the rotor has minimum reluctance[18]. The shaft position is directly determined by the number of poles in the stator through which the driver supplies current.

Depending on the current applied, different torques can be delivered.

Each revolution is divided into a series of discrete states (steps) where each step rotates the shaft a certain number of degrees. Standard (hybrid) stepping motors do have 200 or 400 ”rotor teeth”, called poles. If a motor has 200 poles this means that it will require 200 full steps in order to complete one revolution of the motor shaft. The angle of each step would then be 200steps360o = 1.8o/step

(31)

which is referred to as the motors step angle. Stepper motors are commonly used in applications such as automation, robotics, machinery and common in digital control systems because of the discrete nature of their operation[34].

3.4.2.1 Types of stepper motors

Stepper motors are categorized in three main categories which are based on two different techniques. Permanent magnet(PM), variable reluctance (VR) and hy- brid which is a combination of PM and VR [34][18].

Figure 17: Unipolar stepper motor: The left figure illustrates the signal schedule, where each coil are energized after each others (ch1=coil1,ch2=coil2,ch3=coil3,ch4=coil4) and the right figure shows the motors internal parts.

PM (Permanent Magnet) stepper motors has a rotor with a perma- nent magnetic field (permanent magnet), see figure 17. This magnet aligns to the stators different coil’s (teeth’s). The coils are energized in shifted pattern, where each coil are energized after the other, shown in figure 17. Because of the permanent magnetic forces, the PM stepper motor do have a tendency to stay in position even when the coils are not energized[34][32][18].

(32)

Figure 18: Bipolar stepper motor, this illustrates the signal schedule and the motors internal parts.

VR (Variable Reluctance) stepper motors, which has a soft iron rotor instead of a permanent magnet, see figure 18. The rotor aligns itself against the energized stator coils(teeth’s). The motor tends to minimize the reluctance along the stator which results in different magnetic fields, depending on the direction the current through the coils. The alternation of the current invokes different magnetic fields which creates a rotation of the motor by alternating the magnetic field in a certain way[34][32][18].

Hybrid stepper motors is a combination of both PM(permanent magnet core) and VR(Soft iron core) techniques. This motors are probably the most common today[18].

Another more common distinction between stepper motors are the motor driver, which can be unipolar or bipolar.

Unipolar motors have four or more coils, see figure 17, to rotate the mo- tor. Each coil is individually energized in order to generate the magnetic field needed to turn the rotor. Each coil is connected to ground, and performs steps when each is coil energized individually, as illustrated in signal scheme of figure 17. The simplicity of the concept makes unipolar motors easy to use and build.

The drawback of the method is that it requires a large amount of wiring which reduces the efficiency of the motor.

Bipolar motors only require two coils, and therefore less wiring and better efficiency. In this case both coils are active and the polarity are alternated in order to perform a stepping motion, see figure 18. Bipolar stepper motors can also produce more torque than unipolar[18]. The polarity of the coils in the motor needs to be alternated according to a very precise scheme in order to produce the intended result, which is illustrated in figure 18. This puts high demands on the motor driver and the control software. The drivers are typically a H-bridge[35]. Modules that are specialized for this task are however readily available on the market.

(33)

3.4.2.2 Technical Terms and specifications for stepper motors

Speed-Torque graph: Stepper motor has some characteristic parameters which are illustrated in a speed-torque graph, see figure 19. When the speed of the motor increases the torque will decrease. This is however depending on which driver circuit and what excitation method the driver uses[18][32][34].

Figure 19: Speed/Torque graph, which is a common way of describing the stepper motors performance. Many stepper motors datasheets, do usually have this type of graphs[32][34].

Holding Torque: The maximum torque which the motor can hold the axis (the axis is standing still). The coils are energized to max during this time period, which applies the maximum torque[32] also know as holding torque.

Detent Torque or starting torque: Is the minimum torque needed to turn the shaft when the coils are not energized.

Step rate (stepping frequency): It is the frequency of signal pulses to the motor. Since the motor usually performs a step at each pulse.

Maximum Starting rate: The maximum start frequency which the stepper motor can achieve without losing steps when the motor shaft is unloaded.

Maximum step rate: The maximum frequency which the stepper motor will be able to run at. This is also depending on which excitation method are used. Typically defined with full step when the motor shaft is unloaded[32].

(34)

Pull-out torque: The Pull-out torque is gathered by running the motors at different speeds (with an acceleration) and then increase the torque until the motors misses some steps. This is measured using different velocities, where the result is highly depending on the the motor driver[18][36][32].

Pull-in Torque: Minimal torque to achieve a stop, start or reverse the direc- tion, see figure 19, Without loosing steps. This is defined with a unloaded motor shaft[32][18].

Slewing Region or operational range: This is the area between the Pull- out torque and the Pull-in torque in the Speed-Torque graph, figure 19.

This is the operational area which the motor can run without losing step[18][36][32].

Start-Stop Region The area in which a stepper motor can stop, start or re- verse the direction without losing any steps, see figure 19 [32].

3.4.2.3 How to reduce the risk of losing steps

The disadvantages with an Open-loop system together with stepper motors, is the possibility lose steps. This occurs from mainly two reasons, high frequency (high step rate) or when the motors are over their maximum torque. Here are some guidelines to reduce the risk of losing steps[32][18][10].

Resonance and vibration Problems can occur, since stepper motors works with high frequencies which introduces an increased risk of oscillations, vibra- tions and noise. All stepper motors do have a resonance frequency where the motor will not be able to run. This resonance frequency are depending on the inertia and the stepping frequency.The solution is to perform a frequency sweep in order to investigate where the resonance frequency occurs[18].

Maximum Stepping Rate, motor drivers such asRL-drivers (L=inductance, R=resistance), operates at a fixed output voltage. A increased frequency or

”step rate” will decrease the torque. Because the rise time dIdt =VL of the motor coils are the limiting factor for the current. This means that a higher voltage results in a faster rise time.

Stepper motors are highly dependent on the ratio between inductance and re- sistance (RL). However, the motor resistance determines the maximum current(

I = VR). By increasing the voltage a higher current can be applied, which are needed for high stepping rates. The higher supply voltage applies more current into the motor faster for each step[36].

It is important to use a current limiter if a high supply voltage is used, since it is important to maintain the rated coil current. This is done by using a motor driver that has a current limiter. These drivers are called chopper drives and uses constant current supply instead of constant voltage. Thereby limiting the maximum current instead of the maximum voltage[36]. The chopper drive opens up a possibility to use high voltage without destroying the motors because of the limiting feature of the maximum current. The high voltage increases the rise time[18].

(35)

Acceleration

Stepper motors can achieve higher speeds if a acceleration routine is used. Ac- celeration for a stepper motor is necessary since the starting inertia requires a lot more torque than an inertia which is already moving. There are two main approaches which is linear acceleration, see figure 20, and exponential accelera- tion, see figure21).

The importance of having a smooth and reliable acceleration is important for high step rates [37]. Tuning and testing the motors together with the motor driver is crucial for a correctly developed acceleration routine.

Starting speed: Find safe start step rate (where the motor can start, stop or reverse the direction without any problems). This will be the point where the motor will start accelerate from. A suitable step rate for the acceleration is near the pull-in region (somewhere in the start and stop region), see figure 19.

Maximum acceleration: Investigate how fast the step-rate can be increased each step. The frequency can be increased as a linear or exponential curve, figure 20-20.

Maximum speed: The Maximum step rate, which the motor can accelerate to. This is near the pull-out, see figure19.

Figure 20: This is a example of a linear acceleration curve, where the green parts are acceleration regions.

(36)

Figure 21: Overview of an exponential acceleration curve..

3.5 Electronics

The motor drivers and processing board has been chosen regarding price, avail- ability and ease of use in mind.

By using an Arduino board [38], as the main processor, any costumer could easily purchase and install the board themselves. Big easy drivers[24] are also easy to get a hold of and are easy to use in combination with the Arduino board.

A custom board would reduce the cost and size of the electronics. However it would take time to develop and possibly create difficulties for the end user as they would either have to order a card from us or make their own from a provided design. In addition the use of an Arduino board enables the user to customize the software to suit their needs and also to add extra functionality to the system. A custom board could achieve this software customization but Arduino EDI is simple for beginners and are available all around the world[38].

It allows a manufacturer of the machine to easily publish software updates that the user can then upload to the machine. The following section will discuss the electronics in more detail.

3.5.1 Motor Drivers

Stepper motors are highly dependent on the motor driver. Several driver op- tions are available on the market and choosing the right one might be crucial for the application.

The simplest driver get pulses from a processor to individually energize the motor coils. The processor need to handle the logical switching for the stepper motor. The driver however could build with only four transistors, as illustrated in figure 22, which energize each of the coils individually (full step) or in pair (half step)[18].

(37)

Figure 22: Simple schematic of four transistors together with a Unipolar motor.

Could be used for Unipolar motors(both full-step and half-step). This schematic was created in schemeit[39]

Modern drivers uses H-bridges, illustrated in figure 23, to alternate the cur- rent through the coils in bipolar motors. This type of driver have become common in stepper motor applications and mass production has made them available at a low price[40][29]. However this type of driver requires twice as many transistors.

(38)

Figure 23: Illustration of two H-Bridges that can be used to together to control a Bipolar stepper motor. This is probably the simplest way to alternate the current thought the coils. This schematic was developed with Schemeit[39]

Modern drivers do usually handle the logical switching to the motors. One pin is for the step direction and another pin is for the speed of the stepping, simple by toggle the pin in a suitable frequency.

3.5.1.1 Excitation methods

A stepper motor was invented as a poly-phase AC synchronous motor and it is ideally driven by sinusoidal current[18]. There are some techniques to be able make smaller steps by using a modulated sinusoidal waveforms, which for stepper motors are called microstepping[40][36]. This is used to increase the resolution of the stepper motor. Many stepper motor driver can achieve this, for example Allegro A4988[41]. A simple Example can be seen in figure 24.

(39)

Figure 24: Excitation methods such as Full-step, Half-step (1/2 step) and Quarter-step (1/4 step) produced by Stepper drivers. For example the Alle- gro A4988 stepper driver which could achieve down to sixteenth step (1/16 step) which is a more like sinusoidal curve. These figures illustrates the current through the different motor coils in a 2-phase hybrid stepper motor. A more detailed graph can be found in the data-sheet of Allegro A4988[41].

(40)

Full step: Full step is achieved by making a full step of the motor. A full step is achieved by stepping between the teeth’s of the stator. Unipolar, see figure17, makes a step by energizing each coil individually. But for a bipolar, see figure18, a full step is achieved by energizing both coils, where one is the others reverse[18][41]. A digital pulse is equivalent to one full motor step.

Half step: Some driver can achieve half step which means that the driver alter- nate the current through the two coils with high frequency[18]. A half-step sequence is illustrated in figure 24.

Micro-stepping: A full-step could be divided further into smaller micro-steps.

Micro-stepping tries to imitate a sinusoidal waveform to perform a smoother, quieter and a higher resolution when running at lower speeds[40]. The cur- rent waveform is a modulated sinusoidal step waveform[41].The waveform is created by alternating the current through the two coils with high fre- quency switching. This frequency is faster than the mechanical inertia in the motor. Results of this is that the motor can stand still in some smaller states between a full-step. This is a form of PWM technique, which is common in motor control, in order to create a stall torque[36][18].

The disadvantage is that it will have less torque (approx 70%) of a full step[40]. However it reduces the vibrations and overshoots since the coils are alternated smoothly thought the full-step[42]. It reduces some motor noise. However it requires that the controller can send 3200 pulses to perform a single revolution of the shaft, (for a 1.8ostep angle motor which has 200 steps/rev and uses 161 micro-stepping). It is a trade of depend- ing on how high frequency the controller could send in order to ac hive high motor speeds, against how smooth and high resolution the system needs[40][32]. High frequency signals do usually tend to give problems with EMC[42].

In this project a ”Big Easy Driver” based on the Allegro A4988[41] chip has been chosen to drive each motor. The Big Easy Driver was chosen for a combination of the following reasons.

• Simple control interface.

• Low price.

• Micro stepping capability.

• 3.3V and 5V interface.

• Current rating ≥ 2A.

• Easy to integrate with micro-controllers.

Below are the main specifications of the Big Easy Driver (Version 1.2)[24].

• Driver type: Chopper drive.

• Motors type: Bipolar stepper motor.

(41)

• Maxcurrent: 2A per phase

• Current Limiter: Potentiometer makes it possible to limit the maximum current

• Motor voltage range: 8V-35V

• Digital communicating levels: 3.3v and 5V

• Excitations method: Full-step, Half-step (12step), Quarter-step (14step), Eighth-step (18step) and Sixteenth-step (161step) (default)

• Extra features: Open hardware, Eagle schematic and layout and Bill Of Materials.

Alternative, cheaper drivers with similar specifications exists. Despite of this the Big Easy Driver was chosen because of its availability and simplicity. The chip A4988 is common in 3D printers and the chip can easily be accessed and connected to the Micro-Controller. The last reason was that it did match the motor specifications perfectly.

3.5.2 Sensors

Since the Rotary design has been implemented as a Open-loop system. This im- plies that this system do require a way to find a initial state (starting position).

Which is why some sensors are required.

3.5.2.1 Switches

Switches are mechanical components that closes/opens a circuit when they are pushed or switched by physical actions. These are quite cheap and are available in many different styles.

Figure 25: This figure illustrates how the micro gap switch is connected to the processor. The micro gap switch figure was provided by ELFA Distrelec which we do have a written permission to use[43]

(42)

This CNC-system requires a homing sensor, which indicates the starting po- sition. Micro gap switches, see figure 25, are quite precise and are widely used in many other CNC-systems[12][13]. A micro gap switch is a momentary switch which are made to switch the current at a quite precise level with minimum amount of bounces[44]. ”Micro” or ”snap action”-switch uses a mechanism which closes/opens an circuit rapidly by having a micro gap between the con- nections which snaps into place. The snapping mechanism is a spring movement which rapidly changes it position between the different contacts [44].

A Micro gap switch is suitable for the arm, as a homing sensor. This provides an absolute position for the arms initial state. Figure 25 illustrates how this sensor is connected to the controller with a pull-up resistor.

However a micro gap switch for the base plate is considered as unpractical, since the switch could interfere with the motion of the plate.

3.5.2.2 Optical sensor - optical fork

Optical sensors are common for positioning in printers and other automated sys- tems. These can sense the position of base plate without physically interfering with the motion. Figure 26 illustrates the layout of a optical sensor.

Figure 26: This figure illustrates how an Optical sensor can be implemented.

The Optical fork figure was provided by ELFA Distrelec which we do have written permission to use [43]

The LED of the optical fork transmits an IR-wave, which generates a voltage in the phototransistor receiver. If the gap is blocked the voltage will decrease.

The fluctuations can be monitored to determine if something is blocking the gap or not. The output level to the controller is dependent on which technology is used according to the following table 1. Where the resistors, in figure 26, are chosen to provide a low or high state when the gap are block or not.

The optical sensor is used to determine the starting position of the base plate by monitoring when a pin on the plate passes the sensor. More precise, the positive edge of the output signal. In the future several indicators can be put on the plate to generate a feedback system for the plates position. But this

(43)

Table 1: Digital logical levels for TTL and CMOS technology

Technique Low-level High-level Comments

TTL 0v − .8V 2V − 5V

CMOS 0V − 13VDD 2

3VDD− VDD VDD= supplyvoltage

does not guarantee that the system will be more accurate or precise since it is possible that the sensors is not accurate enough.

3.5.2.3 Rotary sensors - encoder

Encoders are typically used measuring rotations and are common in robotics and automation. These sensors gives a certain amount of pulses each revolution.

From which the direction, velocity and relative position can be derived.

Encoders are not used in the current prototype but can be mounted on the arm and base plate in the future. This would provide a feedback system if it is determined to be necessary.

3.5.2.4 Rotary sensors - Potentiometer

Potentiometers can be used to provide a absolute positioning system. This would get rid of the need of finding a initial state. However this has not been im- plemented in the current prototype because of price and optimization of amount of components.

3.5.2.5 Sensor summary

One could use several of the mentioned sensors to get more information about the movement/state of the system. However increasing the number of sensors will increase the cost and complexity of the design and therefore a minimum of sensors should be used.

3.5.3 Data management and User interface

A routing system such as this, require some easy file management and user interface, which is simple but still effective.

3.5.3.1 Data management

There are many different ways to manage the data transfer from the CAM- processor to a CNC-system. Wireless technologies like WiFi or Bluetooth can be used. However the focus on this ”prof of concept” project is to provide a simple and working solution in order to prove that a rotary design could work for engraving and milling PCB’s.

Physical data storage devices such as SD-cards or USB-memory sticks are more suitable for this project since they are easy to handle. In fact simi- lar systems like 3D printers and CNC-milling machines uses SD-card for data

(44)

transfer[12]. For these reasons a solution where a SD-card is inserted into a stand alone machine has been adopted.

3.5.3.2 User interface and feedback

To provide the user with some feedback regarding the progress of the machine, a simple RGB-LED is used. The RGB-LED can be programmed to show different colours depending on the state of the machine. This provides the users and developers with a simple debug tool, to help troubleshoot the system.

A more sophisticated way of providing the user with feedback is to use a display. There are simple and cheap LCD(liquid-crystal display), where the easiest to handle is probably a alpha numerical displays which comes with a embedded chip that handles the characters. This could be used as a more sophisticated way for debugging and user feedback.

However a LCD display is not included in the current design. Since a com- puter is used for debugging purposes and shows relevant information in the serial/TCP terminal.

3.5.4 Embedded platform

Platforms, processors, development boards, or evaluation boards is the brain in a CNC-system. These entities executes a program by fetching instructions and performs required operations such an calculation and data management. It communicates with the environment through input pins(fetch information) and the output pins(controls the environment).

As stated in the introduction of the electronics section a custom board would probably minimize the cost and size of the electronic system. The disadvantages of making a custom board is the development time and the difficulties for the end user to replace a damaged board. The question of certification and testing of the boards would also become a concern. For these reasons it was decided to use a pre-assembled, pre-tested platform.

This approach has the benefits of being very dynamic and easy to implement.

In addition it would simplify for the end user to update, customize or repair the electronics in the machine. By sharing their customizations the users could contribute themselves to the further development of the product. This type of user contribution has been tried in many projects in this market before. One example is the popular ultimaker 3D printer [13].

3.5.4.1 Choice of Embedded platform

The following platforms where evaluated to be suitable for this project. Table 2 illustrates the name of those:

(45)

Manufacturer Development boards

Raspberry PI Version A Version B

Atmel EVK1101 EVK1100

Beagle bone BeagleBone BeagleBone Black BeagleBoard

Arduino Uno MEGA 2560 R3 DUE

Android PC (APC) APC 8750 APC 8950 ROCK

Altera DK-Start-SC35N DK-MAXII-1270N

Texas instruments Piccolo LAUNCHXL- F28027

TIVA EK-

TM4C123GXL

HERCULES LAUNCHXL- RM42

Olimex OLIMEXINO-5510 MSP430F5510

Table 2: This table shows some platforms which was considered during this project. Each column illustrates different platforms meanwhile the rows illus- trates different manufacturers. For more information see each manufacturer’s official website.

Development platforms or Embedded platforms are available in a large num- ber of variants and can be found in most modern machinery and appliances.

Each platform is optimized for different purposes and applications and they differ in price, programming environment and many other specifications. For the Rotary CNC the following requirements were set up as guidelines for the platform specification.

• It should be readily available on the market.

• Easy to program, improve-software, update-software and customize-software.

• Affordable for a smaller company, DIYs and hobbyists.

• An open development environment which is available for all types of users.

• Use a well known programming interface and language.

• Be compatible with windows OS, Linux OS and Mac OS

• Require a minimum amount of external components.

• Minimum 20MHz processor since the program that handles the motion and reads the commands could get quite fast. Some users will probably, want to have the opportunity to customize and develop more advanced algorithms.

• Support as many communication interfaces as possible.

From the list stated above, Decisions can be made which results in that probably all of the platforms can work. However, some manufacturers focus on a more open solution for everyone, where everyone is welcome into their envi- ronment, such a manufacturer is Arduino[38]. Which is an open software and open hardware platform. Arduino are focusing on reaching a more wide crowd of users and not only the industrial market. Arduino uses a near machine envi- ronment (C programming) but still has some predefined libraries. The libraries are helpful for beginners and are still helpful for advanced users.

(46)

The focus for this project is to prove that the Rotary design works for PCB- engraving, the development board are chosen with concern to later development and marketing on the home and DIY market.

The evaluation resulted in a Arduino DUE platform and the main reasons are:

• The software environment is easy to use and well known in the DIY com- munity [38]

• Arduino is a open hardware and open software solution which makes it well documented and accessible.

• Easy interfacing, if the systems needs to be expanded or updated.

• Uses a Atmels ARM-processor with 84MHz clock frequency.

• Compatible with all common OS.

• Many I/O pins.

• Supports SPI, I2C, CAN, USART.

Arduino Due, see table 3, is a powerful but still simple development board for beginners in C and to micro controllers overall. The users can easily modify and download new code by themselves. This board has a powerful processor (ARM-processor) and are still quite cheap. One downside is that it relies on a 3.3V rail and every input and output is 3.3v, which implies that 5V components will damage or not work together with this board.

Arduino Due Specification Comments

Microcontroller AT91SAM3X8E

Operating Voltage 3.3V

Input Voltage (recommended) 7-12V

Input Voltage (limits) 6-16V

Digital I/O Pins 54 (of which 12 provide PWM output)

Analog Input Pins 12

Analog Outputs Pins 2 (DAC)

Total DC Output Current on all I/O lines 130 mA

DC Current for 3.3V Pin 800 mA

DC Current for 5V Pin 800 mA

Flash Memory 512 KB all available for the user applications

SRAM 96 KB (two banks: 64KB and 32KB)

Clock Speed 84 MHz

Table 3: Detailed information about Ardunio DUE, specifications gathered form[38]

3.6 System Compatibility

Most electrical devices contains one or more PCB’s where the electrical compo- nents are mounted. PCB’s are usually developed using different CAD programs,

(47)

more specific EDA (Electronic Design Automation) or ECAD (electronic Com- puter Aided Design) systems. To realize the design on a physical board, the information from the EDA/ECAD systems needs to be transferred to the PCB- fabricator(FAB). CAM-processors converts the layout into a file format readable by the PCB fabricator(FAB). The PCB fabricator insert the files into a specific manufacturing machine and then manufacture the PCB.

On the other hand, there are many standard format that could handle the transfer from PCB-layout to a CNC-machine. This project aims to develop a system that could work with as many EDA/ECAD programs as possible. Some of these formats are more common than others which will be concluded later in this section. It is therefor important to analyze the options for the intended application in order to make this CNC-system as compatible as possible for as many EDA/ECAD-programs as possible.

For this project was a Gcode-interpreter implemented, which reads some ba- sic Gcode commands, see table 7, to navigate the XY-plane. Different EDA/ECAD systems were used during this project. However the most common was CAD- soft Eagle[20] with a plug-in ULP-software (PCB-GCode[21]) to generate Gcode.

3.6.1 PCB-layout to CNC-system

Figure 27 illustrates the process from a PCB-layout to a motion performed by a CNC system.

(48)

Figure 27: This figure illustrates the process from a PCB-layout to a CNC- system. The first step is to develop a PCB in an EDA/CAD-program and convert the layout to a standardized transfer file with CAM-processors. The transfer files describes the objects and not the path around the object(cutting path). The CNC-system needs coordinates for the path, in a simple coordinate based coding language. The path is calculated with a Gcode converter and then a Gcode output file is generated, which can be executed by the CNC-machine.

EDA/ECAD: The PCB schematics and layout is developed in a EDA/ECAD software.

CAM: CAM-processors (Computed Aided Manufacturing) converts the layout from the EDA/ECAD software into a format containing the objects which are going to be routed (an example of object is illustrated in figure 28).

These files are usually called transfer files, where Gerber, PDF, pictures, ODB++, NC Drills are some example of common transfer formats. The transfer files describes the object which is going to be routed.

References

Related documents

The neighbourhood is next to a neighbourhood which has com- plete services and infrastruc- ture (running water, electricity, running gas, sewage and street illumination)..

You suspect that the icosaeder is not fair - not uniform probability for the different outcomes in a roll - and therefore want to investigate the probability p of having 9 come up in

This self-reflexive quality of the negative band material that at first erases Stockhausen’s presence then gradually my own, lifts Plus Minus above those ‘open scores’

The reason commonly cited against classifying aging as a disease is that it constitutes a natural and universal process, while diseases are seen as deviations from the normal

närmare presentation av dem och det är inte heller någon beskrivning av deras utseende. Det som däremot beskrivs är deras känslor inför situationen i klassrummet när Saga tar

While actors can “draw down” resources in order to replicate regimes of dominance (Edvardsson et al., 2011), actors can also function as a collective with collective agency

Let A be an arbitrary subset of a vector space E and let [A] be the set of all finite linear combinations in

When Stora Enso analyzed the success factors and what makes employees "long-term healthy" - in contrast to long-term sick - they found that it was all about having a