Laser Milling Machine Group 18 Nathan Bodnar David Dowdle...

117
Laser Milling Machine Group 18 Nathan Bodnar David Dowdle Ryan Maticka

Transcript of Laser Milling Machine Group 18 Nathan Bodnar David Dowdle...

Page 1: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

Laser Milling Machine

Group 18

Nathan Bodnar David Dowdle Ryan Maticka

Page 2: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

i

Table of Contents: SECTION 1: Executive Summary ...................................................................................... 1 SECTION 2: Motivation ..................................................................................................... 2 SECTION 3: Technical Objectives and Goals .................................................................... 3 SECTION 4: Specifications and Requirements .................................................................. 4 SECTION 5: Research and Investigations .......................................................................... 7 5.1 ‐ Burn Test .............................................................................................................................. 7 

5.4 ‐ Laser Safety .......................................................................................................................... 9 

5.3 ‐ Air Scrubbing ...................................................................................................................... 11 

5.4 – Similar products ................................................................................................................ 12 

SECTION 6: Laser System ............................................................................................... 14 6.1 – Types of Lasers: ................................................................................................................. 14 

6.2 – Laser Design: ..................................................................................................................... 15 

6.2 ‐ Prototype/Test ................................................................................................................... 22 

6.3 ‐ Build ................................................................................................................................... 23 

6.4 – Evaluation plan .................................................................................................................. 24 

SECTION 7: Laser Power Supply Unit ............................................................................ 25 7.1 ‐ Design ................................................................................................................................ 25 

7.1.1 ‐ Rectification ................................................................................................................ 25 

7.1.2 ‐ DC to DC Converter ..................................................................................................... 26 

7.1.3 ‐ Switching ..................................................................................................................... 26 

7.1.4 ‐ LC filter ........................................................................................................................ 28 

7.1.5 ‐ Controller .................................................................................................................... 30 

7.2 ‐ Prototype/Test ................................................................................................................... 30 

7.3 ‐ Build ................................................................................................................................... 31 

7.4 ‐ Evaluation Plan .................................................................................................................. 31 

SECTION 8: TEC Power Supply Unit ............................................................................. 32 8.1 ‐ Design ................................................................................................................................ 32 

8.1.1 ‐ Rectification and DC to DC Conversion ....................................................................... 32 

8.1.2 ‐ Cooling Control ........................................................................................................... 32 

8.2 ‐ Prototype/Test ................................................................................................................... 33 

8.3 ‐ Build ................................................................................................................................... 33 

8.4 ‐ Evaluation Plan .................................................................................................................. 34 

Page 3: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

ii

SECTION 9: Q Switch...................................................................................................... 35 9.1 ‐ Design: ............................................................................................................................... 37 

9.1.1 ‐ Q Switch High Voltage Power Supply ......................................................................... 38 

9.1.2 ‐ Q switch Fast FETs ....................................................................................................... 44 

9.2 ‐ Prototype/Test: .................................................................................................................. 46 

9.3 ‐ Build: .................................................................................................................................. 47 

9.4 ‐ Evaluation Plan: ................................................................................................................. 48 

SECTION 10: Motors and Motor Controller Unit ............................................................ 49 10.1 ‐ Design .............................................................................................................................. 49 

10.2 ‐ Prototyping and Testing ................................................................................................... 53 

10.3 ‐ Building ............................................................................................................................ 53 

10.4 ‐ Evaluation Plan ................................................................................................................ 54 

SECTION 11: XYZ Table ................................................................................................ 55 11.1 – Design .............................................................................................................................. 55 

11.2 – Prototype/Test ................................................................................................................ 57 

11.3 – Evaluation Plan ................................................................................................................ 58 

SECTION 12: Microcontroller ......................................................................................... 59 12.1 ‐ Design .............................................................................................................................. 59 

12.2 – Prototype/Test ................................................................................................................ 63 

12.3 ‐ Build ................................................................................................................................. 65 

SECTION 13: Software .................................................................................................... 66 13.1 ‐ Design .............................................................................................................................. 66 

13.2 ‐ Prototype/Test ................................................................................................................. 88 

13.3 ‐ Software Build .................................................................................................................. 90 

13.4 ‐ Evaluation Plan ................................................................................................................ 90 

SECTION 14: Security ..................................................................................................... 92 SECTION 15: Personnel ................................................................................................... 95 15.1 – Nathan Bodnar ................................................................................................................ 95 

15.2 – David Dowdle .................................................................................................................. 95 

15.3 – Ryan Maticka ................................................................................................................... 95 

SECTION 16: Bibliography ............................................................................................. 96 SECTION 17: Facilities and Consultants ......................................................................... 99 SECTION 19: Budget and Financing ............................................................................. 100 SECTION 20: Project Summary ..................................................................................... 101 APPENDIX A: Copyright Notices ................................................................................. 102 

Page 4: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

iii

A.1 – jPicUsb License ................................................................................................................ 102 

A.2 ‐ gerb2tiff License .............................................................................................................. 102 

A.3 – ImageMagick License ...................................................................................................... 108 

APPENDIX B: Example DRL File................................................................................. 110 APPENDIX C: Password Generation Code ................................................................... 111 APPENDIX D: jPicUsb Documentation ........................................................................ 112 

Page 5: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

1

SECTION 1: Executive Summary This goal of this project is to replace the current milling machine used by senior design students. The main reasons that motivated us for replacing the current milling machine are the cost factor for the replacement of the milling bits and its safety. These cost factors, along with the amount of user errors need to be improved. Therefore, this project will utilize a new design using a high powered Nd:YAG laser. The laser light will be used to mill the printed circuit boards allowing for tool-less machining. This will reduce the cost load of maintaining a rapid printed circuit board prototyping machine. This process will also avoid some of the safety issues involved with the old milling machine, which included having fiberglass debris flying everywhere and the openness of the rotary blades cutting the copper clad boards. This project will consist of building the high powered Q Switched second harmonic Nd:YAG laser and the control units to power it. The controllers for the laser will also be able to check for malfunctions and to shutdown the system safely if a fault occurs. The project will also include the designing and building of a XYZ table to move the laser light to the target copper substrate. The designs for this venture will also incorporate safety throughout the electronics. This will prevent the users from causing damage to the machine and to protect the user. The software will be engineered to allow the user to engrave away the copper using either a Gerber file or a bitmap Portable Network Graphics (PNG) file. This will allow the senior design student to have the opportunity to utilize any design software that they choose and be able to mill their circuit board. This is something that the current milling machine cannot do. The framing of the machine will incorporate a safety viewing window that will allow the senior design student to view their work as the laser mills the board out. The doors of the laser milling machine will also contain interlocks that would trip and safely stop the laser when the user opens the door while the board is being milled. The exterior case will contain an emergency stop button that when fired would also safely shutdown the system. The cost of the parts for this project will be funded by the group. Attempts will be made to try to acquire donations for the parts required to build this machine. The budget for this adventure will be around three to eight thousand dollars. The budget was estimated from what the parts would cost if they were bought new from the manufacture. The team has been working in acquiring the materials through used and surpluses stores and through the online provider of eBay. If acquired, these materials would greatly reduce the cost of this project.

Page 6: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

2

SECTION 2: Motivation The motivation for this laser PCB etcher is the constant down time of the TTech Quick Circuit 5000 PCB milling machine in the senior design lab. As two of our group are ARC members, and are tasked with keeping the machine repaired and running, we have found this to be an increasingly difficult task. In just the last year we have had to replace the lead screw, and are currently in the process of replacing the main spindle motor. These problems resulted from two areas: ignorance and fatigue. The lead screw only needed to be replaced because someone thought it would be a good idea to oil it. As the very large stickers warn, lead screws are not meant to be oiled. If the plastic shavings that were everywhere was not an indication that something was wrong, the horrible screeching noise would have. This case of ignorance on the part of a senior design student caused several months of down time as we needed to first search for the part, find funding for the part, and have that part replaced. The spindle motor has simply worn out because of fatigue. These things happen, but this particular part is very expensive and has been particularly difficult to find funding for. Our project intends to take care of both of these problems. We will be leaving it with the amateur radio club when we are finished to be used by future senior design students. Ignorance will be solved through security and training. The current milling machine is in a locked room, inside another locked room, but this was not enough to keep it from being damaged. Our project will take this further in that our project will be completely contained and monitored. There will be no interaction with the machine without first having enrolled in senior design, and being certified by an ARC member. The certification will only come at the end of an intensive training session that we will develop as part of the project. At this time the user will be granted a username and password that will determine their level of access to the machine. We are taking a hierarchical approach to security in this regard. No one will have access to a part of the machine that they do not need access to, and have not been trained in the proper use and maintenance of. For the standard senior design student this will equate to being able to open the main lid, and nothing else. The compartments storing the lasers, most of the optics and all of the electronics will be sealed. Fatigue will be solved through less moving parts. In fact, the only moving parts of our project will be the chilled water required to cool the laser subsystem, fans for the exhaust system, and the XYZ table itself to do the etching. The chilled water and exhaust systems can be accomplished with a relatively inexpensive pump and some easy to get fans respectively. The XYZ table, unlike the current system, will most likely be driven by stepper motors attached to a belt system. These belts will most likely have to be custom made, but the motors could be purchased from any of a dozen online retailers for a reasonable price. In this project, the main thing that can break is the laser diodes themselves. We are already in the process of taking care of this problem by purchasing the spares that will be required to keep our project in operation for many years.

Page 7: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

3

SECTION 3: Technical Objectives and Goals Our goals for this project are that the finished machine will be safe, reliable, and timely. This will be accomplished through the extensive use of sensors for everything from an overheated diode to a user trying to force the machine open at the wrong time. Mediation schemes will be in place for as many scenarios that we can think of. When higher level reasoning is required, the information will be passed off to the computer based software portion of our project and the decision relayed. This will be only used for the less immediate concerns, however. All of the lower level decisions will be computed on chip in the project itself. Any part that goes out of specification or if a sensor requires immediate attention, the entire project will enter a programmed shutdown that will attempt to reduce the negative effects on the hardware. This will be the default case if an unexpected error is reached. We will attempt to meet the goal of reliability through the use of high quality components and through the reduction of moving parts. The use of a laser will further meet the goals of reliability and timeliness. By the very nature of our design, we will not have any need to change bits. This allows us to reach our reliability goal in that very few people will be able to access the laser portion of the project. As with any system, the less people that have access to it the less likely someone is going to try and tamper with it. In the current setup, everyone has access to the bits and often load them wrong, or chose the wrong one for the current job. While it is true that our project will take a little over double the amount of time as the current machine to remove all the copper from a standard sized board, we have the advantage of not requiring a user’s constant input. It will be entirely possible for a user to start the etch process in the morning, go to all of his or her classes and come back at a later time to find one entire side of their board finished. All they will need to do is flip the board over at the appropriate time. The function of this project is to replace the current milling machine used by senior design students. This will be accomplished through the use of a focused high powered green laser. Furthermore, our project will not only be able to etch the copper off of the printed circuit boards, but will also be able to cut the fiber glass substrate of the boards. This will avoid the safety issues of using a shear or rotary saw to cut prototypes out of the master board and allow holes for through hole components to be made during the main etch process.

Page 8: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

4

SECTION 4: Specifications and Requirements The specifications outlined below were defined in large part to satisfy the desires of our sponsor. This list is what we would implement in our project if we had a large amount of time, so many of these specifications are considered optional and will only be implemented if we have time at the end of the project. The software of this project is quite significant. It will have to be able to handle communicating with microcontrollers, handling large input files, and running on a wide variety of hardware. It will also be responsible for providing users and technicians with an interface to work with or on the machine.

• Software o XYZ Table

Allow positioning of board Import images Import Gerber Store previous boards Remember previous board cuts Checks safety measures

o GUI for Laser Standard Users (Senior Design Students)

• Allows the milling of FR-4 boards only • Allow only two boards to be milled • Cannot add boards • Must follow all safety measures • Cannot add any user

Advanced Users (non-Senior Design Users) • Users may have privileges from some but not all of

advanced users settings • Can be created from Administrators or Experienced

Users • Cannot add any users

Experienced Users (Arc Trainers) • Allow the addition of boards • Allow the modification of unique sized boards • Allow control of laser power • Allow the selection of different PCB materials • Must follow all safety measures • Can add Standard and Advanced Users • Can remove any Standard or Advanced User • Can change user access to all but Administrator and

Experienced Administrator (Laser Experienced Service Technicians)

Page 9: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

5

• All safety measures can be over written • Can create all users • Can remove a user or change access level

The XYZ table will be one of the only main moving parts of this project. The only other things that could be considered to be moving would be the cooling system and the exhaust system, and those have very few parts. This table will be responsible for moving the mirrors and lenses around, collectively called the milling head, and must be able to reach the entire board.

• XYZ Table o Adjustable focus by moving material in Z direction (up and down

from floor) o Belt driven o DC motors with encoders for positions o Board size of 12” by 12”

The laser is the heart of this project. We will be removing copper from the printed circuit boards through the power of this laser and the supporting structures alone. Therefore we will need a powerful laser that is also relatively cheap and easy to find to allow for backups to be reasonably attainable.

• Laser o 5 W @ 532 nm o 15 W @ 1064 nm o Q-switched o Solid State Diode 808 nm, 40 W o Nd:YAG o KTP (KD*P)

• Optics o Allow beam waste to be 1 mill o Allow Rz to be 0.25” o Directing mirrors to be 532 nm HR 45º, 1064 nm HR 45º

o Automatic focusing o Automatic board positioning and aligning o Automatic removal checker o Pixel burning @ 1 kHz o 1 – 2 mm pixel size

• Laser Power Supply o Input: 120 V AC, 60 Hz o Output: 0 – 5 V DC filtered @ 60 A o Vripple < 1 mV o Current controlled o Microcontroller controlled o Monitoring current

Page 10: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

6

o Monitoring laser output o Monitoring temperature

• TEC Power Supply o Input: 120 V AC, 60 Hz o Output: 60 V DC, 3A o PWM o Input thermister from diode and base o Controlled by microcontroller o Maximum temperature error o Water flow indicator

• Q-switch Power Supply o Pockel Cell

2.5 kV DC -2.5 kV DC Pulsed with microcontroller

• Stepper Motor Power Supply o 12 V DC o H-bridge configuration

• Power Management Circuit o Turn on specific devices o Controlled by microcontroller

The rest of the project will help to protect the user. This includes air scrubbing and safety features. It is uncertain if this project will be used in a working environment, so some of these features will only be implemented if time permits. There is not a large danger from polluting the air if the laser is just on for a short time to prove that it works.

• Others o Air scrubbing o Safety locks o Safety viewer o Air assisted cutting o Fume evacuation o Emergency power shutdown

Page 11: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

7

SECTION 5: Research and Investigations 5.1 - Burn Test Estimating the amount of power required to generate the plasma required to vaporize the copper substrate of a printed circuit board will help in designing the laser for this project. An equation was created to estimate the amount of energy to vaporize the copper substrate. This was created by calculating the volume of the copper target. The next step would be to multiply this value with the density. This value was then multiplied by the molar mass and the heat of vaporization constant for copper. This value was then used to estimate the total energy required to vaporize the copper. This value was then multiplied with the absorption spectrum and the graph below shows the amount of energy to vaporize the copper substrate depending on the wavelength (Figure 5.1).

Energy to Vaporize Copper

0

5

10

15

20

25

30

35

2484486488481048

Wavelength (nm)

Pow

er (m

J)

Figure 5.1: Graph of energy required to vaporize copper for given wavelength

To verify the graph a testing laser was used. The laser used was a second harmonic Nd:YAG laser. The laser was flash tube based with a pulse durations of around ten nanosecond. The pulse energy ranged from 0.7 millijoules to around two millijoules. The laser was the YG580 series Active Q switched Nd:YAG laser from Quantel. The pulse rate was ten pulses per second. The target that was used was a printed circuit board that was mounted in a stage to allow minimal movement. This would allow multiple shots to hit the same location. The focusing lens that was used was a convex lens with a focal point of around 100 millimeters. The laser diameter from leaving the laser cavity was about one centimeter in diameter. The target was placed at the focal point and

Page 12: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

8

the laser the laser pulses were counted until the laser light exited through the copper target. The number of pulses that were required to vaporize the copper target was about 40 pulses for the 0.7 millijoules and around 30 for the two millijoules. The following photo is the profile of the pulses of the laser hitting the copper target. The profile goes form a single pulse at the right of the image to five pulses, then to ten pulses and continuing this iteration to up to 25 pulses (Figure 5.2).

Figure 5.2: Burn testing with second harmonics of Nd:YAG

Looking at a close view of one of the shots, it seems that the laser pulse generated copper whiskers. The width of one of the widest whisker measured to be around one micron. The comparison of this size to the size of the hole is around 25 time its thickest width. This would be apparent that these whiskers should not be a problem for the milling process of the printed circuit boards. The following image is the crater that was generated from having the laser pulse hitting the printed circuit board (Figure 5.3). It can also be seen that for one of the firings that there was a misalignment and another pulse was shot below the original spot.

Figure 5.3: Close up view of the burn test

Page 13: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

9

5.4 - Laser Safety The laser system that this project will employ is a class four laser. When the laser is enclosed in a sealed environment that has interlocks and other preventive measures, the laser class will drop to a class one. When the laser is being serviced the laser will change its class back to a four. This is what is characterized by the Federal Laser Product Performance Standard and the ANSI Z136.1. There will be numerous signs that will need to be placed along the project. The first sign will indicate that the project is a Class one laser. This is a yellow and black caution sign. The following image will show the layout of this sign (Figure 5.4).

CAUTIONLASER RADIATION

DO NOT STARE INTO BEAM

CLASS 1 LASER

Enclosed Nd:YAG, 532nm, 10mJ, 40ns

! CAUTIONLASER RADIATION

DO NOT STARE INTO BEAM

CLASS 1 LASER

Enclosed Nd:YAG, 532nm, 10mJ, 40ns

!!

Figure 5.4: Laser Safety Label for exterior case of project

The next sign that will be placed is in the material processing area. This will indicate that a class 2A laser is in progress. This is because when aligning up the printed circuit board a low powered 730 nanometer diode laser will be present. This will help in indicating the header position. The following image will show the sign that will be placed in the material processing area (Figure 5.5).

CAUTIONLASER RADIATION

DO NOT STARE INTO BEAM

CLASS 2 LASER

LASER DIODE, 730nm, 100mW

! CAUTIONLASER RADIATION

DO NOT STARE INTO BEAM

CLASS 2 LASER

LASER DIODE, 730nm, 100mW

!!

Figure 5.5: Laser Safety Label for Material Processing area

The next signs that will need to be placed in the project will be the high powered laser section. Within this section the laser class will be a class four. This section

Page 14: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

10

will need to have a sign that indicates the laser wavelength output and the power output. There will also need to be a laser sign for the output of the oscillator. The following images will be the signs for this section of the laser (Figure 5.6, 5.7).

DANGERLASER RADIATION

WEAR PROTECTIVE EYEWEAR

CLASS 4 LASER

Nd:YAG, 532nm, 10mJ, 40ns

LASER DIODE, 808nm, 80W

! DANGERLASER RADIATION

WEAR PROTECTIVE EYEWEAR

CLASS 4 LASER

Nd:YAG, 532nm, 10mJ, 40ns

LASER DIODE, 808nm, 80W

!!

Figure 5.6: Laser Safety Label for High Power Laser

Figure 5.7: Label at exit of High Powered Laser

There will have to be safety precautions that will need to be followed as given by the ANSI Z136.1. These safety precautions are necessary to allow the high powered laser to be run as a class one. The following procedures are to run the system as a class one laser. There has to be a protective housing, interlocks on the protective housing, a service access panel, and equipment labels. To run the laser as a class four, the following control measures must be followed. A protective housing, interlocks, service access panel, key control, removable interlock connector, beam stop or attenuator, Activation warning system, laser controlled area, equipment labels, and laser area warning signs. One of the precautions in working with the high powered laser is to wear laser safety glasses. The rating that the glasses that need to be worn are the following ratings that were generated from the ANSI Z136.1 Standard. The OD rating is five OD for 532 nanometers, five OD for 1064 nanometers and greater than four optical densities for 808 nanometers.

Page 15: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

11

Since there will be high voltage for the Q switch there will have to be warning signs for the high voltage terminal of the Q switch and the power supply that drives the Q switch. The warning sign is as followed (Figure 5.8).

HIGH VOLTAGE

DANGERHIGH

VOLTAGE

DANGER

Figure 5.8: Warning Sign for the High Voltages need for the Q switch

5.3 - Air Scrubbing Since the process in generating vaporized copper plasma creates particulates that can be considered as a hazard to the health of the user, the vapors from this process must be processed in a manor that will protect the user. There are two types of scrubbing schemes used to purify the pollutants from the system. The fist type of system is illustrated below; this is a wet scrubber (Figure 5.9).

Page 16: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

12

Figure 5.9: Wet scrubbing of polluted air (Permission granted Wikipedia.com)

This process works by injecting the contaminated air with small water droplets. The droplets generate a static charge and pull debris out of the air. The biggest problem with this type of system is that the partials that can be collected range for 20 microns down to two microns [1]. This process will also generate a lot of waste water and give off a great deal of moisture. This process would work great for systems were the output of the system exits to the outside of the building. For this project this process would not work. The next option would be to use dry scrubbers. The main compound for collecting the pollutants generated through this system would be active carbon. The only downside of using active carbon is that the larger particles will clog the scrubber and reduce the efficiency. The best method would be to include a pre-filter that would collect the larger debris. For the initial design of this project there will be no filtration during this stage. During the second revision then this system may be employed. 5.4 – Similar products While researching this topic there were some manufactures that currently use lasers to mill printed circuit boards. The leading manufacture for this is LPKF [2].

Page 17: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

13

There system uses a 1064 nanometer laser to etch the boards. The system that they use also using gravimeters to move the laser light to the target on the copper clad board. Another alternative to etching the copper substrate from the board is to coat the boards with an opaque polymer and using a CO2 laser to remove the polymer. The newly prepared boards are then chemically etched. This process is something that this group currently employs in creating circuit boards. Another method of creating the printed circuit boards is to use mechanical methods to remove the copper substrate. This is the method that is currently employed for the senior design students. In previous senior design groups a similar project was created [3]. There project consisted of taking a one watt 808 nanometer laser diode and attaching it to an XY table. When etching occurred the XY table would move the laser and its optics to the location and the laser would turn on. This project compared to the previous project is that the pulse energy is much greater. The power of the laser diode that is being used for this projects laser system compared to that of the previous system is about 80 times greater. This will allow this laser system to be able to mill away the copper substrate.

Page 18: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

14

SECTION 6: Laser System 6.1 – Types of Lasers: The two common lasers that are used in industry for material processing are the CO2 laser and the Nd:YAG laser. The CO2 laser works by exciting a mixture of gas that contains CO2 with a high voltage or with microwaves. The output of the CO2 laser is around ten microns. For copper this wavelength is over 98 percent reflective. Using a CO2 laser would require very high power design to allow the two percent that is absorbed to vaporize the copper target. The Nd:YAG laser is created by exciting a neodymium doped rod of the crystal yttrium aluminum garnet. The main output frequency that this laser generates is 1064 nanometers. This too, is highly reflective for copper with a reflectivity of 96 percent. The big advantage to the Nd:YAG lasers is that there are nonlinear optics that can generate harmonics of the fundamental wavelength of this laser. For the second harmonic of 532 nanometers, the reflectivity of copper drops down to 45 percent. This will allow 55 percent of the laser pulse to be absorbed and will allow the laser to run at much lower powers than if just the fundamental wavelength would be used. The conversion to generate the second harmonic is not perfect and the best efficiency in generating the harmonic is 45 percent of the fundamental wavelength. If the third harmonic of the fundamental would be used the reflectivity drops down to 35 percent. The only problem with generating this third harmonic is that the conversion efficiency drops to at best 30 percent of the fundamental wavelength. For third harmonic generation, the process requires multiple nonlinear optics to generate it. The reason for multiple optics is that the first optic generates the second harmonic and the second nonlinear optic takes the second harmonic and the fundamental and generates the third harmonic. This process becomes even less efficient because it is almost imposable to generate in that laser cavity. So to first generate the fundamental the laser cavity will need to be pumped over 90 percent higher than if the third harmonic would be built in the laser cavity, this is because the standard output coupler is 90 percent reflective. Since the second harmonic can be created in the cavity, it is therefore more efficient to generate the second harmonic in the cavity at a higher power than to user the third harmonic. Nd:YAG lasers can also generate even higher order harmonics, but these conversions waist a numerous amount of the fundamental wavelength energy and are not used for material processing. A new development is being implemented in generating high powered fiber lasers. This design consist of fiber that is doped with some rare earth metals that when excited by a pump laser and placed in a cavity they can generate high powered lasers. The most common fiber doped laser is the Ti:Sapphire. This laser has an output wavelength of around 790 nanometers. The biggest problem with Ti:Sapphire laser systems is that the fiber is hydroscopic and over a short time will need to be replaced regularly. Another type of fiber laser schemes is to use thulium doped fiber. This fiber system generates a wavelength of around two

Page 19: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

15

microns. The biggest drawback to this fiber system is that the cost of the fiber being used costs around a thousand dollars per foot. The second drawback is that the laser is in the infrared wavelength that cannot be detectable using standard IR viewers or standard IR fluorescents cards. There is a new type of laser system that is called thin disk laser system. The leading developer in this laser system technology is Trumpf. Thin disk laser system works by generating the doping material to be a 100 micron thick disk. On one side of the disk is a very precise temperature controller. If used, this would generate a higher conversion efficiency. The reason for this higher conversion efficiency is that it reduces the thermal lensing and controls the crystal’s temperature to the ideal range for the conversion of the pump light to the laser’s output light. The doping material that is used for this system is Yb:YAG. This crystal structure generates a wavelength of 1060 nanometers. This is very close the Nd:YAG laser wavelength and this would allow many of the same optics to be used. This would also include the second harmonic crystals. The biggest downside of this system is that because this is a new process, the cost of the thin crystal is very high and the means of accurately controlling the temperature of the disk would be costly as well. The last alternative in laser system design would be to use the laser diode as the fundamental laser and generating the second harmonic wavelength by using another second harmonic generation crystal. The downside of using this schema is that the energy output will reproduce the same as if the laser was running in continues wave mode. Comparing this design in continues wave configuration, the conversion efficiency is very high compared to Nd:YAG. The difference comes when the system is pulsed. Unlike Nd:YAG, this system cannot be Q switched. This will prevent the crystal from dumping all of its energy at once. So to compare the laser output energy, if 80 watts of laser diodes would be used the output energy will be around 3.2 microjoules. Comparing this to a Nd:YAG laser the output would be about a thousand time greater. 6.2 – Laser Design: The laser design used for this project will consist of a second harmonic Nd:YAG Q-switched laser. The second harmonic generation will be generated in the cavity. The following layout will show the design of the laser system (Figure 6.1).

Page 20: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

16

HT:1064 HR:532

HR:1064 HR:532

HR:1064¼ Wave

Q-switch

Polarizer

HR:1064 HT:808

HR:1064 HT:808

Diode Diode

KTP

Nd:YAG

HT:1064 HR:532

HR:1064 HR:532

HR:1064¼ Wave

Q-switch

Polarizer

HR:1064 HT:808

HR:1064 HT:808

Diode Diode

KTP

Nd:YAG

Figure 6.1: Layout of Laser system

To generate the fundamental wavelength, a Nd:YAG rod will be end pumped with one to two 808 nanometer laser diodes. The diodes chosen for this project are fiber coupled diodes. The output of each diode is rated for 40 watts of laser light output. The manufacture of the diodes is Coherent. The reason that these diodes were used was because they are commonly available on eBay. If the diodes were bought from the manufacture, they would have cost over ten thousand dollars each. Also the advantage of using fiber coupled diodes is that the optics required to generate a round beam is much easer than if a non fibered coupled diode is used. The reason is that in order to generate the high power output the diode must be multiple diodes stacked on top of one another. The shape of the output of the stacked diodes reproduces exactly how the diodes were stacked. This would require many optical elements to fix the shape of the beam and the addition of each optic would degrade the power output. The design is to first use only one diode, and if the power output is too low than a second diode will be added to increase the pump power. When the two diodes will be setup, it will be important to prevent the diodes form having the pump laser light from one diode enter the other diode. So when the system is setup, the focal point of the diodes will be off center of the crystal rod. This will prevent a large amount of the pumping light that exits the crystal from hitting the other diode. The Nd:YAG rod that will be used for this laser was collected from a old range finder that was used on a M1 tank. The rod was bought also from eBay. An alternative crystal that could have been used for this system is the Nd:YVO4. This crystal has the great advantage to have an acceptance pump wavelength that is much wider than Nd:YAG. The disadvantage to this crystal is the pricing for just a small crystal us about four times the cost for a larger Nd:YAG rod. Another disadvantage to this crystal is that the crystal is polarization dependent. The common practice for using Nd:YVO4 is to use it as a low power oscillator

Page 21: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

17

and to then use a Nd:YAG rod for an amplifier. This would increase the complexity of this projects design, therefore it is better to stick with using one Nd:YAG than the Nd:YVO4 crystal. The doping proportion of the neodymium is unknown, but comparing it to other rods, it looks to be around 0.7 percent. This is the standard doping used for diode pumping. The Nd:YAG rod will also need to be cooled when it is being pumped this is because the conversion efficiency from the pumping laser light to the laser’s fundamental light is around 45 percent. The crystal will be mounted in an aluminum block that will water cooled. As a safety precaution the aluminum heat sink’s temperature will also be monitored. This aluminum heat sink will need to also be about a quarter of an inch longer than the Nd:YAG rod. The reason for the increase in length is that the crystal will start to generate thermal lensing at the ends of the rod. If the heat sink was not longer than the rod the crystal will destroy itself by fracturing at the ends. To generate the second harmonic wavelength a nonlinear crystal will be used. There are about four different crystals that are used for this generation. The easiest nonlinear crystal to grow is the Potassium Dideuterium Phosphate (KDP). This crystal is the cheapest second harmonic generation crystal. The downside of using this type of crystal is that it is hydroscopic and the conversion efficiency in generating the second harmonic is temperature dependent. The lasers that use this type of crystal normally need to be continually purged with desiccated nitrogen, or the crystal is placed in a small box that has anti-reflective windows and filled with expensive index matching fluid. The crystal would also need to have a peltier on it to regulate the temperature. If the humidity of the crystal is not low the crystal will start to fog over and the crystal could easily be destroyed by putting minimal pressure on it. This pressure would be the pressure of just mounting the crystal in a heat sink. The crystal also has the issue of aging. When the KDP crystal ages, it darkens and reduces the power output [4]. Another second harmonic generation crystal is the Lithium Triborate (LBO). It does not have the setback of KDP when it comes to being hydroscopic. The LBO crystal also has a conversion efficiency of about three times greater than KDP [5]. The Beta Barium Borate (BBO) second harmonic crystal also is not hydroscopic and has a conversion efficiency of about double that of LBO and six time that of the KDP [6]. BBO crystals also do not need to be temperature controlled like the LBO and KDP because it has a temperate bandwidth of 55 degrees centigrade. Lastly the commonly used second harmonic crystal used today for the green laser pointers is the Potassium Titanyl Phosphate (KTP). The reason that this crystal is used is that it has a conversion efficiency of 15 times greater than the KDP [7]. It also is not hydroscopic and has a large working temperature range from 25 degrees centigrade to 80 degrees centigrade. The biggest problem with KTP crystals is that the cost of generating large crystals is much greater than KDP. So the general rule is that if a long crystal is needed than a KDP crystal is used, otherwise the more efficient KTP crystal is used. There was a more

Page 22: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

18

recently development method in generating Anti-gray Tracking KTP crystals. These crystals have about double the damage threshold than the standard KTP crystal [8]. Without the anti-gray tracking the aging of the crystal over time generates gray tracks within the crystal, the new crystals are engineered to reduce this problem and therefore increase the lifetime of the crystal. For this project a KTP with the anti-gray tracking crystal will be used. The crystal dimensions are three and a half millimeters by six millimeters. The crystal was also acquired from eBay. The KTP crystal was also coated with anti-reflective coatings for 1064 and 532 nanometers. To prevent overheating of the crystal it will be placed in an aluminum heat sink. The heat sink will also be water cooled. The temperature of the heat sink will also be monitored. If the crystal is misaligned the temperature of the crystal will increase, measuring the temperature of the heat sink will help diagnose that there is a misalignment. This will also save the laser cavity because if the crystal heats up past a hundred degrees Fahrenheit the crystal will fracture. To protect the diodes from the 1064 nanometer laser light the cavity will be folded. The folding mirrors will be coated to reflect the YAG fundamental light and to be transparent to the laser diodes wavelength. So what happens is that 99.8 percent of the fundamental light is reflected and the 0.2 percent hits the diode. The amount of light that hits the diode will be a much less than 160 mircojoules. This amount of energy would not be enough to damage the diode. The design of the cavity is to allow the second harmonic to be generated in the cavity. The cavity is folded to allow the pump diodes to be placed for end pumping the Nd:YAG rod. For the second harmonic generation crystal, it will be placed as close to the second focal point in the cavity. The efficiency of the cavity is dependent to how much the majority of the YAG rod is in the cavity. To prevent the cavity from continuing to expand and preventing the second harmonic crystal from being completely in the beam, a lens was placed in the cavity. The lens will be placed in a location that generates an image of the center of the YAG rod. At the focal point of the lens a highly reflective mirror will be placed. The mirror will need to be designed for high power laser light for the fundamental wavelength of Nd:YAG and the second harmonic. The reason is that the cavity will be converging to a very small spot size on the mirror. The mirror’s coating will need to be rated for a power of greater than 120 joules per centimeter. The section that is in between the lens and the mirror will be the location for the second harmonic crystal. This will allow the second harmonic crystal to be fully exposed without letting the edges of the crystal be exposed. The output coupler for this laser will be a special coated mirror that allows the fundamental Nd:YAG laser light to pass through and reflect the second harmonic light. The second harmonic laser light that exits the cavity will need to be collimated. This is done with adding a convex lens on the output sections of the laser cavity. The lens reduces the beam from diverging. This will help in maintaining the same spot size

Page 23: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

19

when the laser is engraving. Since the output power of the laser pulse will be very high the lens will need to be coated with an antireflective coating. The focal point of the lens that will be used for collimating the output of the laser will have to be determined after the laser is built. The measurements of the divergence will determine the lens that is used. To generate pulsing of the laser a Q switch will be implemented. The additional parts required to generate pulsing of the laser are the polarized beam splitter and a quarter wave plate. The pulse generation works by first having the Q switch change the polarity of the laser light by a quarter-wave. Then when the laser light passes through the quarter wave plate it rotates by another quarter wave. The light is then bounced back from the cavity mirror and passes back through the quarter wave plate and the Q switch then changes the polarity back to the original polarity and passes right through the beam splitter. When the Q switch is turned off and when the laser light is passed through the system the polarity is horizontal and when it goes through the beam splitter it is sent out of the cavity. This prevents the laser from oscillating and the laser is turned off. The two methods of preventing the polarization from passing are to use a cubic beam splitter or to use a polarizing filter. The reason that a cubic beam splitter was chosen was that polarizing filters absorb the entire laser light that is not the correct polarization. Since the design of this laser is for high power, this would burn and destroy the polarizing filter very quickly. Using a cubic beam splitter diverts the horizontally polarized light out of the cavity and allows the vertically polarized laser light to pass through. Once the light exits from the beam splitter it can be collected in a water-cooled beam dump. This will prevent damaging the polarizing optic. The polarizing beam cube that was chosen was designed for Nd:YAG fundamental wavelength. The manufacture of the polarizing beam splitter is CVI Lasers. The beam splitter was also bought on eBay at a heavily reduced price compared to buying it directly form the manufacture. The quarter wave plate that is used for the project is a Spectra Physics multi order wave plate with the center frequency of 1064 nanometers. This quarter wave plate was chosen because it was also available from eBay and the company is very reliable. The down side of using a multi order wave plate is that the acceptance wavelength is around one percent. If a zero order plate was used the acceptance bandwidth is around two percent. The cost of a zero order wave plate is about double the cost of a single wave plate, therefore a multi order wave plate was bought. The cavity mirror that is going to be used for the laser will be a highly reflective concave mirror. The focus point of the mirror will be 500 millimeters. The lens that will be used for relaying the center image of the Nd:YAG rod will have a focal point of 800 millimeters. These values were chosen because a model was created using a computer simulator named LASCAD. This software is designed to take in the crystal parameters and the different lenses and will generate the cavity stability. The software will also estimate the output power of the laser cavity. Using the Nd:YAG rod that was specified in the above test, a simulation of

Page 24: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

20

the entire cavity was designed. The following figure is the design of the cavity (Figure 6.2).

Figure 6.2: Cavity deigned in LASCAD

This cavity design was also simulated to be pumped with two end pumping lasers with a total pump power of 80 watts. The software design was not created for frequency doubled cavities, but it does follow the same rules for stability. The 11 elements in the software represent the objects of the cavity. The first element starting at zero is the highly reflective mirror. The second and third elements are the interfaces of the KTP crystal. The fourth element is the mirror that would separate the second harmonic from the fundamental wavelength. The fifth and sixth section is the Nd:YAG crystal. The seventh section is the beam splitter and the eighth element is the quarter wave plate. The ninth and tenth elements are the interfaces for the Q switch. The last element is the concave mirror. In simulating the laser cavity, the concave mirror was chosen to be the output coupler. The data collected from the simulations shows that this laser cavity will oscillate and that the output power is mostly exponential by the dependence of the input pumping power. This can be illustrated in the graph of the input pump power to the output lasing power (Figure 6.3). This data can be used to estimate the laser power for the second harmonic generation.

Figure 6.3: Power output Vs Input estimations using LASCAD

Page 25: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

21

The software will also simulate the ability to pulse the laser with a Q switch. The design criteria that were inputted were that the laser would be pulsed for 41 nanoseconds and that the laser pulsing would have a duty cycle at one kilohertz. The data collected showed that the output power for this laser cavity would generate pulses of over nine millijoules. If the efficiency of converting the pulse form the fundamental frequency to the second harmonic is 45 percent then the output power of the second harmonic pulse should be around four millijoules. This power output is about six times higher than the minimum amount of energy required in generating the plasma to vaporize the copper off the circuit boards. As previous experiments showed that the laser power output of the software is concretively lower than the experimental outputs. This indicated that this laser design will generate a laser system that should be able to generate the plasma needed to vaporize the copper substrate. The control elements that are required to run the laser correctly need to be synced together in order to allow the proper operation of the laser. When some of the elements fail the entire system must act accordingly in order not to damage the laser system. The following is a flow chart that illustrates how these different elements interact with one another (Figure 6.4).

Main Computer

Laser Power Supply

USBUSB

AC Power

Cooling Lines

Thermal Electric Cooler

Laser Diode #1

WireCooling

Flow

Thermistor

Cooling Lines

Wire

USB USB

Laser Power Supply

AC Power

Cooling Lines

Thermal Electric Cooler

Laser Diode #1

WireCooling

Flow

Thermistor

Cooling Lines

Wire

Main Computer

Laser Power Supply

USBUSB

AC Power

Cooling Lines

Thermal Electric Cooler

Laser Diode #1

WireCooling

Flow

Thermistor

Cooling Lines

Wire

USB USB

Laser Power Supply

AC Power

Cooling Lines

Thermal Electric Cooler

Laser Diode #1

WireCooling

Flow

Thermistor

Cooling Lines

Wire

Figure 6.4: Flowchart of Laser system

Page 26: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

22

6.2 - Prototype/Test The first task in prototyping and testing this design is to first test the diodes. The diodes are designed to give out a wide range of wavelengths from 804 nanometers to 810 nanometers. The center frequency is determined by the temperature of the die. The first test would be to determine what temperatures are required to generate an output wavelength of 808 nanometers. The reason that this is important is because the efficiency for Nd:YAG conversion to the fundamental wavelength is best preformed with a pump wavelength of 808 nanometers. The test will also be used to determine what power outputs are generated for the current that is used by the diode. This data will be helpful when building the laser power supply. Another measurement that will be preformed is the calculation of the diodes laser power output to its internal power meter. This will be used to determine if the diode is working correctly. Once the laser diodes are fully tested, the next step is to build a simple laser cavity that would consist of the laser diode, the highly reflective concave mirror and a 99 percent output coupler. The next step would be to add in the imaging lens. Once the lens is placed back in, the cavity length will have to be changed to regenerate a stable cavity. Once the cavity is stable, the next element that would be added would be the mirror that is reflective for the second harmonic and transparent for the fundamental wavelength. The laser mirrors will then be tweaked to generate the highest power output. The next object that would be added would be the KTP crystal. The crystal rotation and position will be adjusted until the highest output power will be generated through the output of the reflective mirror for the second harmonic. The next step is to change out the 99 percent output coupler with a highly reflective mirror for the fundamental and second harmonic of Nd:YAG. The next element that would be placed in the cavity would be the beam splitter. Since the KTP crystal is polarity dependent, both the cubic beam splitter and the second harmonic generation crystal’s rotation will have to be adjusted until the highest output could be achieved. The next element that will be added is the Q switch. The Q switch will need to be adjusted until the output power will be the maximum. The last element that would be added would be the quarter wave plate. This will be adjusted so that the cavity will not lase. The next step would be to test the Q switch to see if generates a pulse laser pulse. The power will be measured and all components will be adjusted to improve the output power of the laser. The next step would be to calibrate the power output compared to the input pump power. The next step would be to see if the power output can reach the minimum required energy to generate the plasma that vaporizes the copper substrate. If the power output is below the required energy output then the second diode will have to be added to the setup. This will consist of first removing the Q switch, the quarter wave plate and the cubic beam splitter. The next step would be to add another highly reflective mirror for the fundamental Nd:YAG and transparent to the pump diode’s wavelength. Then the cavity will be tweaked to produce the

Page 27: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

23

maximum energy with just one of the diodes. Once this is done the next step will be to turn on both diodes at half power and adjust the cavity until maximum power is achieved in the output. Now that the maximum is found the next step will consist of placing back in the cubic beam splitter. After tweaking the beam splitter, the next step will be to add the Q switch. As before, the next element that will be added is the quarter wave plate. The final step will be to adjust all the elements to generate the maximum output power. After the adjustments, the laser system needs to be calibrated to understand what characteristics of diode power will be needed to vaporize the printed circuit board material. The final test will be to measure the divergence of the output beam. This data will help in choosing the correct focal point in the output lens to collimate the beam. Characteristic such as the mode and the M2 will also need to be measured to determine what the spot size will be when the beam is being focused on the copper substrate. This data will also be used to determine what type of focusing lens will be used. The next testing that will need to be done is to redo the burn testing that was done with the quantaray laser. 6.3 - Build Once the burn tests are finished the next step is to look at the layout of the prototype laser and redesign a new bread board that will be the final placement of the elements. When the design of the bread board is designed the next step will be to prepare the stock aluminum by first flattening it and then drilling the holes to mount the elements. The next step will be to attach the elements on the new bread board. Each element will be placed on the bread board in the same order as when they were prototyped. The next step will be to adjust the elements until the power outputs match the outputs that the prototype gave. When this process is finished the next step will be to cover the laser. This will prevent dust form entering the cavity and degrading the power output. The exit portal for the laser will be an antireflective coated window. This will allow the entire laser to be sealed. For diagnostic and safety purposes temperature sensors and humidity sensors will be added to the laser cavity. For the laser cavity mirror a photo diode will be placed in its location. This will be used to measure the output of the laser cavity without using a high powered power meter. This can be used to detect faults and warn the computer that a fault has occurred and to shut down the system. The same could be said for the humidity sensors and the temperature sensors. The diodes are also equipped with photo detectors and with the calibrated data from the testing section this data could be used with the software to determine when a diode is going bad.

Page 28: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

24

6.4 – Evaluation plan The first step in evaluating the laser section of this project is to first test a simple cavity. The next step will be to add additional elements to the laser cavity. This process allows the ability to diagnose problems before adding additional complexity. Once all the elements are added to the laser cavity. The next step will be to test it to see if the power output is within specification. If the power is below specifications, then a second laser diode will be added to the cavity. The next step will be to determine the divergence of the laser beam and the modes. The beam will then be corrected to generate a near collimated divergence. The next step will be to place the laser on a bread board that would be dedicated to this laser design. The next step will be to add the sensors that detect faults with the laser cavity. Lastly the laser will be sealed up and the laser beam will be ready to be routed to the XYZ table.

Page 29: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

25

SECTION 7: Laser Power Supply Unit 7.1 - Design The method used to power the laser diode should be reliable, precise, efficient, and have relatively low heat dissipation. The laser diode will need to have a constant source of power that has a precise value, which requires the power output of the conversion to have a small voltage and current ripple. If the change in input power is too large, it will not allow the laser diode to function and may damage the laser diode. The power supply will need to have an input of 120 V AC at 60 Hz from the AC mains and deliver an output of 0 to 5 V DC at 60 A to the laser diode. The output voltage ripple must be less than 1 mV. The laser power supply will be designed and simulated using LTspice. It will be used because it is commonly used in engineering courses and uses equations that closely simulate actual circuit operation. 7.1.1 - Rectification The AC mains will need to be converted to a DC voltage before entering the converter. The first part of the rectifying stage will filter out high frequency AC noise using a low-pass filter. A metal oxide varistor (MOV) has a high resistance at low voltages and a low resistance at high voltages, and it will be used to protect the power supply circuit from power surges. After this, a 60 Hz isolation transformer will provide electrical isolation from the AC mains. The output of the transformer will enter a rectifier bridge with a filtering capacitor on the output to change the single phase AC to a DC waveform. This DC waveform will enter the DC to DC converter, which will give a regulated DC output that can be changed in magnitude and corrected by a control circuit if it differs from the desired output. There are different options to consider when creating the DC to DC conversion circuit. The following schematic is the rectifier used for converting AC to DC (Figure 7.1)

Figure 7.1: The filtering and rectification stage.

Page 30: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

26

7.1.2 - DC to DC Converter A linear regulator is an option to convert the DC voltage. It can deliver a lower output voltage compared to the input, but it is not efficient enough. The regulating component is an adjustable voltage divider network that maintains a constant output voltage. The divided voltage that is not used as the desired voltage value is dissipated as heat. This can make the efficiency drop to as low as 40% [9]. They are more inefficient as the voltage drop from input to output increases, and they dissipate heat power equal to the product of the output current and the voltage drop [9]. A better option is the switched-mode DC to DC converter or switched-mode power supply. Instead of constantly dissipating unused power as heat, it uses power semiconductor devices to allow the input power to provide power at certain times, charging the power storing inductor and capacitor. The duty cycle, D, is the ratio of on-time of the semiconductor to the switching period. Changing the duty cycle allows for this converter to use the minimum input power necessary to achieve the desired output power. Today, switching devices have very high switching speeds and very high power handling capabilities, which allows switched-mode power supplies to operate with an efficiency greater than 90% with low cost and relatively small size and weight [9]. Another reason the switched-mode converter will be used is because its complexity allows for the most control of the output voltage and current, compared to a linear regulator. It can be adjusted by changing the duty cycle of the PWM on the microcontroller. Changing the output power is more difficult on a linear regulator because in many cases of linear regulators more difficult hardware adjustments must be made. The two switched-mode converter configurations that can be used in the design to decrease the voltage and increase the current are the buck, which can only have a voltage gain less than one, and the buck-boost, which can have a voltage gain less than, equal to, or greater than one. A gain below one is the only requirement for the laser power supply, so it will be used instead of the buck-boost. 7.1.3 - Switching There are several options for the semiconductor to be used for switching. The desired characteristics of the semiconductor are high forward current carrying capability and fast switching. The BJT, IGBT, and the power MOSFET are the best options for achieving these requirements. The BJT has a high power rating with high current carrying

Page 31: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

27

capabilities in the on state, but if it becomes too hot, it is prone to malfunction from second breakdown [9]. Also, it requires more power to drive than the MOSFET, which gives the MOSFET an advantage. The IGBT is made of a BJT and a MOSFET so it has a high current, but has it’s turn-off time is larger than a BJT, and can only operate up to 20 kHz in medium power applications, such as this power supply [9]. The laser power supply cannot be operated at this low of a frequency, because a much higher frequency must be used to obtain a voltage ripple smaller than 1 mV. The power MOSFET has the highest switching speeds compared to the other two, reaching more than 1 MHz, and a power rating of up to 600 V with a current rating of 40 A [9]. This power and current rating is sufficient for the power supply, and the high switching speeds are good, so the MOSFET will be used. In Figure 7.2 the diode that blocks when the MOSFET is on is also an important part of the efficiency and successfully switching operation of the power supply. The diode dissipates power as heat equal to its forward voltage drop multiplied by the current through it. This heat requires the converter to be cooled to prevent heat from damaging the circuit. Also, the diode current increases exponentially with the voltage across it [9].

Figure 7.2: (a) A buck converter with a switch and diode (b) A buck converter

with two switches for synchronous switching. A low power design uses a diode to block power from reaching the ground node of the circuit. The high power being delivered to the output puts a high stress on the diode. Diodes are not usually used for high power applications such as this. This is a major disadvantage of this circuit, because the diode can be prone to breakdown, and a power diode must be used to successfully block the high power being delivered to the output. The switched-mode power supply will be made more efficient by replacing the diode with a MOSFET, as seen in Figure 7.2.b. This is more efficient than using any type of diode. This method is called synchronous switching [10]. To replace the diode, M2 will turn off when M1 is on, and then M2 will turn on only for a short time when M1 is off, which will drain ground the negative voltage on the inductor. It is important that the two MOSFETs are not on at the same time, because some

Page 32: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

28

of the output power from M1 will drain to ground, and the desired amount of power will not reach the output of the converter. The three MOSFETs put in parallel in place of M1 in Figure 7.2 are will provide the 60 A of current needed for the output of the converter. Initial designs had current output lower than 60 A, so adjustments had to be made to the circuit. The requirements of a low voltage and high current output can be achieved by using more than one switching MOSFET in parallel instead of a single switching MOSFET. This will increase the output current while having little effect on the output voltage. 7.1.4 - LC filter The LC filter at the output of the buck converter serves to reduce the output voltage and current ripple. If the inductor is too large, it will require too much time to get to the desired steady state value. A larger inductor can decrease the voltage ripple by keeping the converter in continuous conduction mode (CCM), but because synchronous switching is used, the converter will be operating in discontinuous conduction mode (DCM). Therefore, inductor will be small to save space, have a lower resistance, and provide the desired inductor current in a reasonable time. Increasing the output filtering capacitor will be a method used to lower the voltage ripple. The capacitor will be derived from

281LCf

DVV

o

C −=

Δ

where ∆VC is the voltage ripple, Vo is the output voltage, D is the duty cycle of the three MOSFETs in parallel, L is the inductor value, and f is the switching frequency of the three MOSFETs in parallel, as can be seen below in Figure 7.3.

Figure 7.3: Buck converter schematic.

Page 33: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

29

The output voltage ripple must be smaller than 1 mV, which will be achieved by adjusting the output filtering capacitor of the converter or changing the switching frequency of the switching MOSFETs. The ripple size decreases as the capacitor increases (Figure 7.4). The ripple can also be decreases as the switching frequency increases, but this also lowers the power delivered through the switching MOSFET due to the switching limitations of the MOSFET.

Figure 7.4: Buck converter simulation measuring output voltage and current.

In this converter, a relatively moderate switching frequency of is used, and a relatively large capacitor is used to achieve the desired output voltage ripple. The ripple measures approximately 0.7 mV, as seen in Figure 7.5 below.

Figure 7.5: Buck converter simulation measuring output voltage ripple.

Page 34: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

30

7.1.5 - Controller The PID compensation controller will be used because it is a common control circuit used to control switched-mode converters. The controller will not be able to handle the high power of the converter, so the current will be divided. This will be done by the sensor gain. The sensor gain signal will lower it to safe levels for the op-amp. The op-amp will compare this signal with a reference voltage, and output an error signal. The error signal will be sent to the microcontroller, and it will change the PWM output to lower or increase the duty cycle signal that controls the switching MOSFETs. The converter is high power, so heat will be an issue. The temperature of the switches and inductor will be monitored by a thermistor circuit, and if the components reach the maximum allowed temperature, the circuit will send a signal to the microcontroller to shut down the power supply operation. 7.2 - Prototype/Test The parts will be acquired via online distributors. All of the testing of the laser power supply will be done in the UCF senior design lab. The control circuit and other circuits that do not have high currents can be constructed on a breadboard. The parts of the power supply using high currents will need to be soldered onto a printed circuit board (PCB), because a breadboard will not be damaged by the high currents. Oscilloscopes will be used to probe the circuit and check to make sure there are no short circuits and the voltages and currents are correct at all nodes in the circuit. The laser power supply will then be connected to a GFCI outlet and all node values will be checked. Then it will be connected to a standard wall outlet and all node values will be checked. A dummy load will be the first load to be tested. This will be a resistor rated for 50 W. All nodes will be checked, especially the output current, which must not vary much from 60 amps, and the output voltage ripple, which should remain smaller than one millivolt. Next, a laser diode that is less powerful and less expensive than the final high power laser diode will be the first type of laser diode connected to the power supply. This is for testing the XYZ table without burning through any material. All nodes will be checked as this less powerful diode operates. It will also be turned on for continuous operation for a length of time comparable to the time it takes to etch a circuit board. Finally, the high powered laser diode will be used and monitored when etching.

Page 35: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

31

7.3 - Build All components will be bought from online distributors, making sure they will arrive on time and then the soldering and other building will be done in the senior design lab. The inductors will be bought already wound, instead of being wound manually, so that they are professionally wound. The laser power supply will be housed in a container with a locked door to eliminate the chance of anyone damaging it, or anyone being injured by the high power in the converter. Only people with high authorization will be able to access it. 7.4 - Evaluation Plan The laser power supply must meet the requirements of a voltage output between 0 and 5 V DC, a current output of 60 A, and an output voltage ripple less than 1 mV. If the power supply operates with more heat than predicted, more air or liquid cooling may be required. It is important that the design for the high power circuits is accurate, because they will not be prototyped on a breadboard. Making a mistake here will take longer to change. The MOSFET current could be a reason for a redesign. The MOSFETs may provide lower current than in the simulations, and more may be needed to add in parallel, or a new MOSFET with different characteristics may be needed. After iterations of corrections are completed, the final build will occur and be placed in the final housing for the etcher.

Page 36: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

32

SECTION 8: TEC Power Supply Unit 8.1 - Design The power supply used to power the thermoelectric cooler (TEC) should be reliable, precise, and efficient. The TEC power supply will need to have an input of 120 V AC at 60 Hz from the AC mains and deliver an output of 60 V DC at three amps. A maximum temperature will be sensed to prevent damage from overheating, and the water flow will be monitored. 8.1.1 - Rectification and DC to DC Conversion The AC mains will need to be converted to a DC voltage before it can be used to power the TEC. This rectification will be similar to that of the laser power supply, except the isolation transformer will be utilized to step-down the voltage. The first part of the rectifying stage will filter out high frequency AC noise using a low-pass filter. A fuse will be used on the incoming line to prevent any current surges from reaching the power supply. A metal oxide varistor (MOV) has a high resistance at low voltages and a low resistance at high voltages, and it will be used to protect the power supply circuit from power surges. If there is a surge, it will send it to ground instead of the power supply. After this, a 60 Hz isolation transformer will provide electrical isolation from the AC mains and it will be a step-down transformer. The winding ratio will be two to one to transform 120 V AC into 60 V AC. The output of the transformer will enter a rectifier bridge with a filtering capacitor on the output to change the single phase AC to a DC waveform. 8.1.2 - Cooling Control The DC waveform will now enter a buck converter will be used to control the power sent to the peltier (Figure 8.1), the thermoelectric cooling device. The amount of cooling is proportional the power send to the peltier [11]. A thermistor circuit will be used to sense the temperature of the laser diode and create a signal to be sent to the microcontroller. The microcontroller will adjust the duty cycle from the PWM that controls the switching MOSFET of the buck converter, giving it a larger duty cycle if more cooling is needed. The ripple is not an important factor for the converter, because the voltage has already been stepped down with the transformer to 60V. Since four peltiers are being used, they will require nearly 60 V and it will not damage them if 60 V is applied. As long as the ripple is not more than about 10% to 15% and the frequency of the switching MOSFET is above about 1 kHz to 2 kHz, the peltiers should operate well [11]. A high current is not required, so only one switching MOSFET is required to provide the three Amp output.

Page 37: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

33

Figure 8.1: A peltier that has already been acquired. 8.2 - Prototype/Test The prototyping and testing will be similar to the laser power supply testing, including the parts acquisition, testing in the senior design lab, and putting only low power circuits on a breadboard. Oscilloscopes will be used to probe the circuit and check to make sure there are no short circuits and the voltages and currents are correct at all nodes in the circuit. The precision of the control circuit and the PWM must be verified for proper cooling of the diodes. The laser power supply will then be connected to a GFCI outlet and all node values will be checked. Then it will be connected to a standard wall outlet and all node values will be checked. An ohmmeter cannot be used to measure the peltier, so a resistance test will be done with an LCR meter, which measures the resistance using an AC voltage [11]. A dummy load will be the first load to be tested. This will need to be a heat source, and this will be the hot side of spare TECs. The TECs will be run at a certain temperature, and the temperatures of the heating and cooling TECs will be measured. The data sheets for the peltiers will be checked to see if they are operating at the expected efficiency. Next, the TEC will be tested on the high power laser diode. It will be tested for a long duration to ensure it does not fail when the etcher is unattended. 8.3 - Build Similar to the laser power supply build, the TEC power supply will have all components bought from online distributors and then the soldering and other building will be done in the senior design lab. The inductors will be bought already wound, instead of being wound manually, so that they are professionally wound. It will be housed in a container with a locked door to eliminate the chance of anyone damaging it, or anyone being injured by the high power in the converter. Only people with high authorization will be able to access it.

Page 38: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

34

8.4 - Evaluation Plan The TEC power supply must meet the requirements of a conversion of 120 V AC at 60 Hz to 60 V DC at three amps. The voltage ripple must be less than about 10% to 15%. Sufficient testing sessions at durations comparable to that of a PCB being etched that inspect every voltage, current and temperature will determine if corrections need to be made to the power supply. It is important that the design for the high power circuits is accurate, because they will not be prototyped on a breadboard. The MOSFET current could be a reason for a redesign. After iterations of corrections are completed, the final build will occur and be placed in the final housing for the etcher.

Page 39: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

35

SECTION 9: Q Switch A Q switch is an optical device that changes the quality (Q) factor of the laser cavity. One of the main reasons to implement this technique is that it allows the laser to generate a high intensity pulse instead of a continuous wave. To generate the high energy laser pulse there are two main principles. First when the Q switch is off the laser cavity has a low Q. In this state all the laser cavity is being dumped out of the cavity and preventing the cavity from oscillating. This also allows the gain medium to become saturated. The second state is when the Q switch is turned on. At this state the laser cavity generates a high Q factor and oscillation begins. Since most of the gain medium was becoming saturated in the first state, when the cavity starts oscillating the gain medium generates a population inversion and most of the medium dumps all of its energy into one pulse. The first use of this technique was used on a ruby laser [12]. When the first tests were ran the ruby crystals fractured because of the immense pulse energy. The reason for this was that the lasers were pumping out many megawatts of laser light. There are four main devices used for Q switching. The easiest to use are mechanical shutters or choppers. These work by physically placing an object into the cavity to reduce the Q factor. The main drawback to this design is that the standard pulse duration is less that 200ns and the mechanical device would have to move fast enough to open and close the shutter in this time period, or the output energy would be reduced. The following is a common chopper that would normally be used for CO2 laser systems (Figure 9.1).

Figure 9.1: Mechanical chopper for Q switching

Page 40: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

36

Another technique is to use a Saturable Absorber. This technique employs a crystal such as Cr:YAG or bleachable die. The material reduces the Q by absorbing all the light until it becomes saturated, once that happens it becomes transparent and the cavity begins to oscillate. The main drawback to this design is that the crystal generates a lot of heat when it is absorbing the light; this prevents the laser from operating at high repetition rates. The crystals used in this technique over time will start to darken and reduce the power output.

The third design is an acousto-optic modulator (AOM). The AOM works by generating a pressure wave in a crystal medium. This pressure wave bends the lights path. When the crystal is off, the laser light passes straight through the crystal. In high powered laser designs the cavity is setup to run on the first order path that is bent when the crystal is on. The reason for this is that with high power the little light that doesn’t become bent is enough to start lasing. The following is the standard output beams of the acousto-optic modulator (Figure 9.2).

Figure 9.2: AOM diagram (Permission granted Wikipedia.com)

The last design is to use a pockel cell. There are two common types of crystals used for this cell, they are BBO and KD*T. These cells work by rotating the polarity of the optical beam and using a polarized beam splitter to remove one of the polarities. When the crystal is off the beam is not rotated and the beam exits through the beam splitter. When high voltage is applied to the cell the crystal rotates the beam’s polarity by a quarter turn and when it bounces through it again it rotates another quarter turn. The Beam then passes through the beam splitter, and oscillations begin. The following diagram shows how the polarized wave reacts after leaving the pockel cell (Figure 9.3).

Page 41: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

37

Figure 9.3: Pockel cell diagram (Permission pending)

For this project it was chosen that we use a pockel cell. The reason is that it will allow easer alignment than an AOM and will allow higher power pulses than the other two régimes. The crystal type that we chose was a KD*P crystal. The reason for choosing this type of crystal is that it would fit in the budget. The drawback in this crystal compared to BBO is that the crystal cannot be modulated at higher frequencies. Since our goal is to modulate around one kilohertz this crystal will work well. 9.1 - Design:

In order to drive this Q switch, it will need to have a differential of around three to five kilovolts. The switching speed of this will need to be around 10ns. To accomplish this there are three common methods, they are planar triode, avalanche transistors, and fast FETs.

The main reason that a planar triode was not chosen was that it is hard to find in common electronic stores and the government highly regulates the selling of them. The reason that the Q switch driver was not designed using avalanche transistors is that basing each transistor would generate many issues and create a larger part list. Therefore the best solution would be to use fast FETs. The driver works by generating a high voltage power supply and driving the voltage to ground using the fast FETs. The power supply was broken into nine sections that would allow easer for easer testing. The following block diagram will help explain the breakdown of the high voltage power supply (Figure 9.4).

Page 42: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

38

Voltage Regulator

DarlingtonTransistor

Microcontroller

+12V

40kHzOscillator

VoltageDivider

FilterCaps

VoltageMultiplier

1:98Transformer

FastFETs

Voltage Regulator

DarlingtonTransistor

Microcontroller

+12V

40kHzOscillator

VoltageDivider

FilterCaps

VoltageMultiplier

1:98Transformer

FastFETs

Figure 9.4: High Voltage Power Supply Block Diagram

9.1.1 - Q Switch High Voltage Power Supply The design of the oscillator for the high voltage power supply is a square wave generator using two operation amplifiers. The reason that a square wave was chosen was because the darlington transistors used generate a non linear gain. The non-linear gain would modify a sine wave, if it was used and the amplification would generate more of a square wave. It seemed that using less parts and loosing the efficiency of not using a sign wave would be the design of this part. The transformer used for this high voltage power supply is a CCFL transformer. The reason for choosing this transformer is that it is commonly available from electronics stores and the cost associated with it is minimal compared to having a transformer custom made. The transformer has a primary tap that is split this will allow bidirectional pulling. This is why two operation amplifiers are used. The first one generates the square wave and the output drives the one of the darlington transistors, the output also drives the second operational amplifier, who is set up and an inverter. This output will then be connected to the second darlington amplifier. The scheme will allow the transformer to have a push pull operation and generate a more efficient system compared to just modulating one side of the transformer. The transformer also has a feedback coil that would commonly be used to generate the oscillations, but for our project it was determined that allowing the device to freely oscillate may generate instability when the circuit is connected to unknown devices, therefore the outputs from the feedback coil are left floating, and the main coil is driven at a set frequency. The frequency of the oscillator is controlled by the RC constant of the circuit, using the following equation the values of R and C are rounded to the nearest common value. The R was set to one kiloohm and the C was set to 4.7 nanofarad. This combination generates a frequency of around 50 kilohertz. The following is the schematic of the oscillator (Figure 9.5).

Page 43: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

39

Figure 9.5: Schematic of oscillator circuit

The specification sheet for the transformer gives a range of usable frequency to run it, they range from 40 to 80 kHz, and therefore the given RC values are within specifications of the datasheet. The following is the simulated output of the oscillator circuit (Figure 9.6).

Figure 9.6: Simulated outputs of oscillator

The voltage regulator for this circuit consists of a transistor that limits the current that enters the transformer. The transistor is controlled by an operational amplifier that compares the voltage that the voltage divider circuit gives and the voltage that the microcontroller gives and if the voltage is lower than the microcontroller, the operational amplifier give a high state and the transistor permits more current to enter the transformer. When the voltage is above the microcontroller’s, the opamp gives a negative state and reduces the current that the transistor is sending to the transformer. This design does generate a voltage swing between the two states, but this voltage change would be low enough to allow the Q Switch to operate correctly. This current limiting design was presented in “The variable High-Voltage Power Supply 0-3kV [13].” The Voltage multiplier section of the High Voltage power supply consists of a Cockcroft–Walton multiplier. The reason that this section is needed is that the maximum voltage that the CCFL transformer can deliver is 1.34 kilovolts. To get the five kilovolts needed to run the Q switch the output of the transformer goes through a two stage voltage multiplier. This will generate a four times

Page 44: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

40

multiplication. Since the cost of high voltage capacitors that are needed to run the voltage multiplier are exponentially expensive verses surge voltage, it is more cost effective to run the capacitors in series. Running the capacitors in series will allow higher voltage handling while maintain a low cost for materials. To prevent one of the capacitors form generating a higher voltage then the others, in its series, each capacitor will have a ten megaohm resistor. This will allow the capacitors to discharge when not in use and prevent one of the capacitors from generating a voltage above its specification. For the diodes used in the multiplier it is also cost effective to use multiple diodes in series than to use just one. The diodes used are the HER108. The diode is rated to have a 1000 volt reverse voltage and is designed for fast switching with a recovery time of 75 nanoseconds. The reason that this diode was chosen was that it was a cheap diode that is readily stocked and allows a faster recovery rate compared to the standard 1N4007. The following is the schematic of the voltage multiplier (Figure 9.7).

Figure 9.7: Schematic of Voltage multiplier

The left terminals are connected to the CCFL transformer and the right side terminals are connected to the filter caps. The filter caps were added to the circuit to regulate the voltage and to create a storage tank to prevent voltage drops when the FETs are switch on. Like the voltage multiplier, it is more cost efficient to use multiple capacitors in series than to use one capacitor rated for the five kilovolts. The capacitance chosen was not too critical because the voltage multiplier smoothes out the voltage as it passes through the circuit. The capacitors chosen was a 0.15 microfarad capacitor rated for 3000 volts and eight milliohms for ESR. This is the same capacitor used for the voltage multiplier. The following is the schematic of the filter cap design (Figure 9.8).

Page 45: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

41

Figure 9.8: Schematic of the Filter Cap layout

To allow the circuit to regulate the voltage for this power supply, a voltage divider will be used the divide ratio will be 999:1. This ratio will allow the voltage to be read at safe levels of three to five volts. The high voltage resistors used are the 8.2 megaohm metal film resistor, and one 100 kiloohm resistor and a 6.8 kiloohm resistor. The current rating for this circuit is 0.25 watts and the rated values for the resistors are 0.5 Watts. To protect the comparers that the voltage regulator uses there will be a Zener diode on the output that is rated for a breakdown voltage of 5.1 volts and a power rating of 1 Watt. This circuit will prevent voltage spikes form destroying the comparers. The voltage regulator circuit is a circuit that will take the voltage from the voltage divider circuit and compare it to the voltage from the digital to analog chip that the microcontroller set. The voltage comparer circuit checks to see if the voltage form the divider is lower than the digital to analog converter. If it is lower the output is railed to high. This output is sent to an N type transistor. The current is regulated by a 330 ohm resistor. The transistor used is the 2N3055, this transistor was chosen because it has a voltage rating of 60 volts, which is well above the 12 volts that the circuit uses, and it was used in the reference high voltage power supply [14]. The comparer used for this portion of the high voltage power supply is the standard LM358 comparer microchip. This was chosen because of its reliability and it is commonly available. The following schematic illustrate the voltage divider and the voltage regulator (Figure 9.9).

Page 46: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

42

Figure 9.9: Schematic of the Voltage Divider and Voltage Regulator

The output from the voltage regulator is sent to the CCFL transformer. The 12 volts that this power supply uses is from an ATX power supply. The reason that this type of power supply was chosen was that it is cheap and more stable than a wall version. Using an ATX power supply will also allow this circuit to be smaller because there will need not be a reason to have a voltage regulator regulate the 12 volts for the circuit. This will also reduce the space that this power supply occupies. For the microcontroller section of the high voltage power supply, The Digital to Analog chip that was used is Microchip’s MCP4251. The reason that this chip was used was that it has a low cost and had 256 divisions [15]. This will allow the computer to have step control of 20 Volts per step. There will also be override pins that will be connected to a multi turn potentiometer. The reason for the override scheme is that it will allow easer testing of the circuit, and give an alternative to have the voltage permanently set if the microcontroller fails. The microchip is controlled by SPI serial. The microcontroller will read the preset values from its EPROM and send it to the Digital to Analog potentiometer. If the computer requires changing the voltage, the microcontroller will get the packet from the computer and resend the data to the Digital to analog potentiometer. The microcontroller will also sample the voltage form the voltage divider and when the voltage does not reach the correct voltage after a preset number of cycles the microcontroller will send to the computer a fault and shutdown the power supply. The Microcontroller will have seven main functions that will be personalized for the Q switch power supply and driver. In the first section it will read the EPROM, this is the data that the microcontroller will send to the high voltage power supply when the chip turns on. The second section will be computer change data, this will read the USB data packet and will determine to change the value of the Digital to Analog potentiometer. The third section is the Change EPROM, this will

Page 47: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

43

read the USB data packet and change the EPROM data that relates to the Voltage that the potentiometer sets. This section will also call the fourth section to update the potentiometer. The fourth section of code will read from the EPROM and send the data to the potentiometer to update the voltage. The fifth section will read the onboard Analog to Digital circuits and determine if the voltage is within the given range that the potentiometer set. The sixth section will determine if the voltage is below the specification for over one second the microcontroller will shutdown the power supply. Shutting down the power supply is cutting the 12 volts power supply. The cutting of the 12 volt power supply is done by shorting a relay coil that cuts the voltage. This section will also send a USB data packet to the computer, with the data that a fault has occurred and at what voltage the chip read. The last function that the controller uses is the pulse function. This section will toggle a pin from low to high and then back to low. This will trigger the fast FETs to switch on. This function will be called when a USB packet is sent by the software with the command to call this function. When the device shuts down, to create isolation from the circuit and the ATX power supply, a relay will be switched on. To switch the relay on and to keep it on until the device is reset, a SCR is used. The SCR used for this section is the 2N5061. This SCR was used because of its pricing and that it allows the on state hold current is within the specifications of the relay that will be used. The relay that will be used for this section is the G6RL-1-DC12. This relay was chosen because it has a coil voltage of 12 volts and a current usage of 18.3 milliamps [16]. The reason for the low current design is to be a little more efficient in power management. This size of this circuit is a little bigger than if solid state components are used, but it is a little more reliable than the solid state versions when it comes to electrostatic discharge. The reason is that many times when the solid state relays fail, they are normally shorting the switch on. Since the design of this section is geared for safety, that scenario would be defeating the purpose of this circuit. So a relay was chosen because it is more resistant to electrostatic discharge. The only part of this circuit that is sensitive to ESD is the SCR and if the SCR would be destroyed, it will turn on the relay coil and cause the circuit to shutdown. The setup of the relay is that the switch is normally closed. This will allow the relay to only be used in a shutdown situation. This will increase the lifetime of the relay because it is not switching every time the power supply is turned on. The following schematic will show how this section is connected to the high voltage power supply (Figure 9.10).

Page 48: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

44

Figure 9.10: Schematic of the Shutdown Circuit

9.1.2 - Q switch Fast FETs The main design of the fast FETs section is that there will be two banks that will be charged by the high voltage power supply. When the laser needs to pulse, one of the banks will be discharged through the fast FETs. This will create a differential between the two banks and will switch the Q switch on. When the pulse is over the circuit will fire both banks, so that they will be shorted to ground. This will then generate a differential of zero between the two banks and turn the Q switch off. The RC component of the bank will then start to refill the banks and the voltage on both of the banks will be back to the high voltage power supply’s voltage. There are six components to the fast FETs circuit. The flow diagram below shows how they are linked together (Figure 9.11).

Figure 9.11: Schematic design of the fast FET section

The microcontroller will send a pulse to the pulse generator. This section was covered in the above literature for the High Voltage power supply. The

Page 49: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

45

microcontroller will just toggle the states from low to high. The pulse length of this toggle is about two clock cycles. Since the clock of the microcontroller will be running about 48 MHz, the pulse duration will therefore be 41.6 nanoseconds. The next section that the microcontroller passes the toggled pulse to is the pulse generator. This section will shorten the pulse and generate the second pulse to turn off the Q switch. The pulse generator will consist of a LC delay network that will be connected to the input of the circuit. The output from the delay circuit will then be compared with an exclusive OR gate. This will generate an output of two pulses. To remove the falling edge pulse the output will be compared with the original input signal, using an AND gate. The output will then be the pulse that will be sent to the first bank to turn on the Q switch. This pulse is also connected to another passive LC delay network and generates a delay of around 20 nanoseconds. This section will be allowed to be changed because when tweaking the pulse energy of the laser this delay time will greatly change the efficiency of the laser pulse. The output of this section is connected to the pulse driver of the second bank and when fired it will turn off the Q switch. The pulse driver is used to drive the main inductor coil. The pulse driver will be a 120 volt line driver that will amplify the five volt pulse that the pulse generator created and amplify the voltage to 120 volts. This is done by first generating 120 volts DC. This is created by taking the 120 volts from the AC power line and passing it through a bridge rectifier. The output of the bridge rectifier is then filtered with a 10000 microfarad capacitor. The bridge rectifier is just four 1N4001 diodes. The reason that they were used is because the current needed for this section is minimal so buying a premade bridge rectifier would increase the cost of the design. The output of the filtered DC source is then passed through a one kiloohm resistor. The resistor is to limit the current that will be generated when driving the pulse driver. The driving mechanism is four MOSFETs that are connected in parallel. This will generate a faster turn on for the pulse than just having a single MOSFET. The MOSFET used for this section is the STF5NK100Z. This MOSFET was used because it will also be used for the FETs section of this project. The inductive coil that is used to bias the MOSFETs in the FETs sections, consist of a Teflon wire that is also covered with an additional Teflon sleeve. This will generate the isolation that is needed for the circuit. The wire is then placed in the center of six ferrite beads. Each bead will have a loop of Teflon wire that will be connected to the base of the FETs and the gate of the FETs. When the pulse enters the inductive coil, a voltage will be generated on the gate and will turn on the FETs. The FETs section will consist of six series of MOSFETs. Within each series there will be two MOSFETs connected in parallel. The reason for the series design is that high voltage MOSFETs are not commonly stocked through electrical distributers and the cost of a high voltage MOSFET is significantly higher than

Page 50: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

46

the cost of multiple transistors in series. To prevent some of the transistor from generating voltages high than their specifications, each series connection will have a ten megaohm resistor connected to the source and drain. This was the same idea that was used for the high voltage filter capacitors. At the end of the FETs section the output of the last series is connected to the ground plane of the board. The beginning section is then connected to the RC bank. This section and the pulse driver sections are duplicated for both the ON Q switch bank and the OFF Q switch bank. The last section is the RC bank that is used to connect the high voltage power supply, the FETs and the pockel cell together. The resistor that is used is a high voltage resistor that is rated at 750 kiloohms. The voltage rating of the resistor is 5 kilovolts. The capacitor that is used is a high voltage ceramic capacitor. The voltage rating of the capacitor is six kilovolts and the capacitance rating is 47 picofarads. The connection to the pockel cell will consist of a high voltage screw terminals. The pockel cell will be connected to the terminals using high voltage Teflon wire. The voltage rating for the wire must be greater than five kilovolts. The following schematic is the pulse driver, the inductive coil, the FETs, and the RC bank (Figure 9.12).

Figure 9.12: Schematic of the Pulse generating circuit

9.2 - Prototype/Test: To prototype the electronics for the Q switch, the electronics will be broken up into two main sections. The first section consists of the high voltage power supply and the second section will be the fast FETs. The reason for the splitting of the electronics in the two sections allows ease for testing them. Once the power supply and the fast FETs electronics are verified to be working the boards will be joined together with a high voltage Teflon wire. To prototype the high voltage power supply as a whole, a circuit board will be generated on the computer and the board will be etched out. The reason for not building the supply on a bread board is because it will be generating high voltage

Page 51: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

47

that would be able to jump the traces in the bread board and short its self out. Some of the sections that were explained in the design section can be made on the bread board. The sections that could be made on bread boards are the shut down circuit, the 40 kilohertz oscillator, the voltage regulator and the microcontroller. Once those parts are verified to be working the board will be designed and when the board is made, the parts will be soldered in place and verified that the connections are in place. Sections that need special care are the high voltage sections. The high voltage sections must be checked to see if there are any sharp solder points. These points will start to ionize the air and could generate a failure of the high voltage power supply. When the board passes its visual inspection, the board will then be connected to a GFCI outlet and tested with high voltage probes. The board will also then be connected to the microcontroller. The high voltage power supply will then be regulated by the microcontrollers set values. The results will also be verified by testing it with the high voltage probes. The microcontroller will also simulate a power supply will then be safely biased incorrectly. This will test to see if the microcontroller will shut down the high voltage power supply. The next step will see if the computer will be able to control the voltage of the high voltage power supply. The computer will send the USB data packet to change the voltage to two kilovolts. Then if the power supply works correctly it will be changed to other voltages and verified as well. The next step would be to see if the other functions that were programmed will also work. Since the complexity of the fast FETs electronics, by using mostly surface mount parts, it is unreasonable to prototype this section on a bread board. The first step in prototyping this section, is to break it up into the six sections that were broken up in the design section. This will allow the ability to test the circuits to see what characteristics they have and how to modify the delay networks in order to improve on the switching speeds. Once the sectional boards are verified to work correctly they will be designed to be on one board. To prototype the fast FETs electronics, they will also be drawn up on the computer and a circuit board will be made. To test the circuit, a lower voltage of around one hundred volts will be applied to the high voltage power supply section and when the pulse is generated, the high voltage probes will check to see the fall rate of the circuit. It will also tell if the circuit is working correctly without destroying the majority of the components. Then the board will be tested at the five kilovolts to see if it will switch and at the rate specified for the pockel cell. Then if all goes well, the high voltage power supply board and the fast FETs board will be connected and retested to see if they will work together and that the system will be within specifications to run the pockel cell. 9.3 - Build: Once prototyping and testing is finished the boards will be remade on one board and mounted in an enclosure. Like before in the prototyping section care must be taken in checking to see for sharp point on the high voltage side. Because of the

Page 52: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

48

high voltage characteristics of this power supply, the board will be elevated a quarter of an inch above the enclosure using fiberglass spacers. This will generate an isolation of five kilovolts. The enclosure will also be labeled “Caution High Voltage” The inputs to the box will be a USB port and AC power jack and a 12 volt terminal. The outputs will be two high voltage Teflon coated wires with enough length to connect to the pockel cell. 9.4 - Evaluation Plan: The evaluation plan for the Q switch electronics is to first layout the sections of circuits that could be tested using bread boards. Then after fully testing the circuits that were made on the bread boards the parts that could not be tested this way would be designed and prototyped on printed circuit boards. Once all the sections are tested and working correctly the main design two sections will be designed and created in printed circuit board material. The Boards will be built and tested. If the boards work correctly they will be joined together and retested, otherwise they will be redesigned and redo the testing. After the boards pass the testing a new printed circuit board will be constructed, this one would include the electronics for the high voltage power supply and the fast FETs. Once built, it will be tested. The board will then be packaged in an enclosure and will be ready for use with the pockel cell.

Page 53: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

49

SECTION 10: Motors and Motor Controller Unit 10.1 - Design To move the mirrors into the location for milling away the copper substrate, a motor would have to be used. The delivery mechanism for moving the mirrors is through a belt. There are two main genders of motors to choose from. The first is a DC motor. The biggest problem with a DC motor is that the reliability that the motor will stop in the same locations time and time again is very minimal. This could be improved by attaching a rotary encoder. This device would allow the microcontroller to know the location of the big steps. The down side of this is that if the motor needed to make smaller steps that what the encoder measures then it is more of a guessing game. The reason is that if during the step the motor experiences inconsistent load changes then the position location would not be the same location every time. The second type of motor that could be used is a stepper motor. The stepper motor allows high reliability and accuracy compared to a standard DC motor. The stepper motor also has the advantage of allowing micro steps. These steps would be divisions of the major steps and would still be more reliable compared to the standard DC motor. The biggest problem with stepper motors is that the controlling electronics to move the stepper motor is more complex than a standard DC motor. For an example, a standard DC motor would only require an H-bridge to control the movement of the motor. For a stepper motor the electronic can vary from using two H-Bridges, this scheme would only allow the motor to move in the major steps. The second type of electronics that could be used for a stepper motor, that would allow the micro stepping scheme, is a full bridge configuration. There are three different kinds of wire configurations that can be used to run the stepper motor. The more common variety is the Unipolar configuration. This configuration consists of two main coils per phase. Each coil also contains a center tap in the coils. This configuration my also come with two of the ends of the coils connected. This would reduce the amount of wire used from six wires to five. The five wire scheme also allows easer design for the electronics. If a six wire stepper motor was reconfigured it can be used to generate the second most common type of stepper motor. The second type is called a Bipolar Stepper Motor. The bipolar stepper motor is the same as the unipolar stepper motor in that it contains two coil windings per phase. The difference between the two is that there is no center tap for the bipolar scheme. This allows the wire count to be down to only four wires. As said before this design can be created using a unipolar motor scheme by just ignoring the center tap wires. The last verity of stepper motor is the eight lead stepper motor. This is a hybrid version of the two verities given above. The reason for the hybrid design is that the stepper motor can be designed for high torque operations and then switch to high speed operations with low current consumption. An example of this form of operation is for a lathe CNC machine. The reason is that when the bits are not cutting the

Page 54: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

50

material they can be moved quickly to the next position and when the bit would need to be cutting the material the circuits would switch to a high torque portion of the motor. This design would not be needed for this project because there will not be changes in the torque while the machine is in operation. This leads the choice of using a bipolar motor or a unipolar stepper motor. Looking that the current availability of the stepper motors available through our current distributers. The stepper motor that was chosen was a unipolar stepper motor. The motor is from Jamco. The reason that this motor was chosen was that it had a step angle of 0.9 degrees. This is half the stepping angle of standard stepper motors. The holding torque for this stepper motor is 30 oz per inch. Since the gears that will be driving the belts for this project will be around a quarter of an inch the holding weight that the motor will hold will be seven and a half pounds. This is far higher that what would be needed to run the XY portion of the XYZ table. The motor will be run as a bipolar motor because the electronics to run a bipolar motor are commonly built in a single package design. The reason that we chose to use the electronics that are in a single package design compared to just using discrete components is that the part count is far lower and the need to customize the electronics to match the stepper motors by using discrete components is not needed. The reason is that this project is not running on a battery or with other unique design criteria that would prevent the use of an all in one stepper motor driver. There are many different types of stepper motor driver chip that are commonly used by many hobbyists. The chips range from using multiple H-Bridges to dual full bridge modules. The most common one is the L298. This is a full bridge MOSFET driver. This chip was designed for running stepper motors with a driving current of one amp. The chip also has a continuous drain current of four amps. This was chosen because there are many coded examples for driving this chip for micro stepping. Even Microchip has an article for using this chip with the PIC18C452 to drive a bipolar stepper motor [17]. The model that will be used for this project is the vertical mounted L298N. This chip was made from STMicroelectronics. The reason that the vertical mounting scheme was chosen was that the chip will be generating a great deal of heat when the chip is running micro steps. There will therefore need to be a heat sink connected to the chip to prevent them from overheating. There will also need to be a monitor that will check to see if the heat sink is be cooled correctly. If the chip is not being cooled correctly the chip will be shutdown and the microcontroller will send to the computer that a heat sink cooling error has occurred. Since the microcontroller that will be used for this project is the PIC18F2550 series, the microcontroller only has two PWM. To run the circuit for micro steps the chip will need to have four pulse width modulators. One way that was noted from Microchip was to use logic chip, such as two inverters and four AND gates. This scheme will be used to modulate the PWM to make Four PWM from two. The following schematic will be what will be used for the microcontroller and the full bridge driver for the stepper motor (Figure 10.1).

Page 55: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

51

Figure 10.1: Schematic of microcontroller and full bridge driver

To prevent the feedback that is generated from switch the stepper motor, a snubber circuit will be added to the terminals of the stepper motor. The snubber circuit will be primarily two diodes that will be connected to the 12 volt power supply and ground. The diode that STMicrochips recommends for this type of application is the 1N4001. This diode is the common diode that is used in other designs. For this project the diode that was chosen was the 1N4001. The main reason for choosing this diode was because of the recommendations and because it is the most reliable design since the popular use of it. This would help

Page 56: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

52

in debugging this section of the circuit because of the review that others have generated. In the event that the heat sink is generating too much heat the circuit must have a shutdown procedure. The procedure for shutting down the stepper motor controller is to first remove the power from the full bridge driver. The circuit that will be used for this is the same that was used for the high voltage power supply for the Q switch. This circuit consisted of a relay that was normally closed. When a fault occurred the microcontroller would send a pin high and that would short the SCR circuit. Once the SCR circuit is shorted the relay's coil is energized and the relay opens. This would turn off the power supply. The next step would be to turn off the full bridge driver by turning its enable pin off. The last step would be to send a string to the computer that the stepper motor power supply over heated. The only way that the stepper motor controller could be turned back on is to reset the power supply. The power supply that will be used for this portion of the project will be one of the 12 volt leads from an ATX power supply. The ATX power supply will be able to drive the circuit at a much greater current that what the circuit uses. It is therefore a reasonable choice to use the ATX power supply than to build a voltage regulated power supply that would need to drive more than four amps per stepper motor. This design that was created would only be able to drive one of the stepper motors. Since this design will be the same for both the X and Y axis the circuits will be duplicated for each. When the circuit first starts up, the stepper motors must move to the home position. The reason for this is that when the machine is turned off the motors can be moved to any position without having the microcontroller knowing where it is. When the machine is turned on the microcontroller will move the motor backward until it hit the home position. Once the motor reaches the home position the stepper motor will stop and will be ready to receive the commands from the computer. The stepper motor will know when it reaches the home position because there will be a limit switch located at the end of the rails. When the axis hit the limit switch the switch will send a low to the microcontroller and the microcontroller will stop the stepper motor. The circuit for the limit switches must contain low noise. The reason is that if the noise level is too high then a false limit will be hit and the zeroing of the axis will not be correct. The method that will be used to prevent the device form generating high levels of noise is to connect a pull up resistor to the pin that will be used for the input. The value that was chosen was a one kiloohm resistor. A capacitor will also be added to the circuit to further reduce the noise on the lines. The capacitor that will be used is a multilayer capacitor. The value for this capacitor will be 0.1 microfarads. This will limit many of the noise that will be generated from the stepper motor and the other electronics. There will also be limit switch that will be placed on the extreme locations of the axis. The reason is that in case the commands that are sent to the microcontroller is incorrect or that there was a false homing position then the stepper motors will not destroy the machine. The microcontroller will also send this data to the computer when this fault occurs. The computer also can have the

Page 57: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

53

ability to send to the microcontroller the command to go to home. This would rerun the same code that would run when the microcontroller turns on. The microcontroller will be able to maintain the position of the axis. This will be important if the computer would send an absolute position rather than a relative position. The microcontroller will be able to move the stepper motor in full steps as well as the micro steps. The stepping space of the micro steps will be about two micro steps per major step. This value is calculated by taking that each major step for the stepper motor is 0.9 degrees and that the gear that will drive the belt will be a quarter of an inch so for each major step the movement will be around two thousandths of an inch. So to get the resolution of one mill, the resulting value will be divided by one mill. This value will need to be rounded to the nearest decimal place to allow ease in calculating the pulse widths in order to create the micro steps. The initial design of this system is to allow the laser to have the accuracy of one mill, but to allow the laser to achieve this accuracy the stepper motors must be able to move with an accuracy of more than one mill therefore the micro step size will be increased by a factor of four. This will allow the motor axes to be moved with a step size of 0.00025 per inch. Even though this accuracy is not going to be possible through slippage through the gear and the belts used to drive the axes. This will help in debugging the errors generated through the machine as not being a problem of the stepper motor position. 10.2 - Prototyping and Testing For the motor controller the first step would be to prototype the microcontroller. The testing of the microcontroller would consist of looking at what the waveforms would be when the microcontroller is moving the stepper motor to the home position. The next task would be to see if the waveforms stop when the limit switch is initiated. The next step would be to see if the microcontroller works with the computer by sending an error message when the other limit switch is activated. The next task would be to trick the temperature sensor to start a shutdown of the power supply. If all the above tests work, the next step would be to build the board with both the microcontroller and the full bridge driver. This would then be connected to one of the stepper motors. The testing of this stage would consist of seeing if the stepper motor moves in the correct direction and to verify that the stepper motor micro steps correctly. The next element that would be added to the circuit is the emergency shutdown circuit. The last task would be to verify that everything is working correctly. 10.3 - Building For building the stepper motor power supply and controller unit, the first step will be to redesign the board that was used for prototyping. The newly designed board will then be etched out of the copper substrate. After the components are soldered onto the board, the next step will be to test the board. Testing the board would consist of checking that the limits work correctly and that the emergency shutdown works. The next step would be to verify that the motors are moving the

Page 58: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

54

correct way. The last step would be to connect it to the XYZ table and check to see if everything works correctly. 10.4 - Evaluation Plan For the design of the motor this project will use a unipolar stepper motor. The controller that was designed will be the L298. The first step in completing this portion of the project is to first prototype the microcontroller. The next step will be to design and prototype a board that will contain the microcontroller and the full bridge driver. The next step after building the prototypes will be to test the designs. If all goes correctly the last step would be to build the final board. If a problem occurs, the basic process of first locating the error and to try to recreate the problems on the prototyped boards is the first step. The reason to try to recreate the issues is to see if the result was an initial design flaw or a problem with the current board. The last step would be to connect the stepper motor control board to the XYZ table and test to see if all works correctly.

Page 59: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

55

SECTION 11: XYZ Table 11.1 – Design For this project we need a way to access all of the parts of the board to be milled. There are two options on how to do this. We first discussed using a system (Figure 11.1) where the laser is redirected above the PCB, and the PCB is actually moved.

Figure 11.1: Alternative XY Table Design

This would have the benefit of having less moving parts in the laser system. However, the seeming simplicity of this system is its own downfall. In this system, we would need to include a method for users to attach their boards to the moving XY table. Furthermore, we would need to have the capability of handling the different weights of the boards. Even a small change in either a different size of a board, or a new board type would change the dynamics of the system. This could add slip, reducing the accuracy of our milling process. Because of these problems we have decided on moving the optics assembly above a stationary PCB. This is shown below is Figure 11.2.

Page 60: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

56

Figure 11.2: CO2 laser engraver XY table

This eliminates the problem of needing to strap the board down, as all that needs to be done now is correctly align the board. This also solves the problem of varying weights; the optics will always weigh the same weight. We may still incur slip, but at least in this system we will have a constant amount of slip over time, and can correct for it in software. We also have identified the need to change the distance from the board being milled and the XY head. This necessitates the addition of a Z axis. We at first considered implementing a fully motorized Z axis. This would have used a lead screw threaded inside a stationary nut on the platform holding the PCB. This would have been useful as we would be able to vary the height of the board through our main program for various thicknesses of boards. This would be a necessity if standard users were capable of using boards besides FR4, and a wide range of board thicknesses were used as the focal point of the laser needs to precisely located at the surface of the PCB. However, after some consideration we found this to not be the issues and have disallowed the use of anything besides FR4 boards by standard users. This allows us to simplify the Z axis of this machine. We will be using the same system that we first thought of using, except without a motor. To move the milling table up and down the user will now need to move turn a screw under the table. We had several design decisions left once we eliminated the motor controlled Z axis. The first of those decisions was how to carry the mirrors and focusing lens that will be moving above the PCB. We discussed the merits of using either precision milled rods or open rail system similar to desk draw sliders. We decided on using the precision milled rods due to the fact that the rail system necessitates the use of exposed bearings. The open bearings would have accumulated too much dust for this project, and would have required cleaning. It is possible to construct this system using only two rods and a caster on the end that is not connected to a motor. However, this allows for the possibility of the entire assembly to torque and the machine to lose alignment with the board and the laser. To counter this possibility, we have designed a system that uses four precision milled rod, two for each axis. We then had to make a decision on using either bushings or linear bearings. This was a simple matter of cost, the bushing are cheaper to purchase than the linear bearings. This is important as this is one

Page 61: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

57

of the most likely components of the project to wear out, and we will need spares. To move the assembly we had the choice of using either Acme threaded rods or a belt system. For similar reasons that we did not use the open rail system, the Acme threaded rods have a tendency to get clogged. Furthermore, we have observed that a belt system allows for faster movement than a threaded rod system. To move this whole assembly we will be using two stepper motors. For more information on these motors, please see Section 10 of this report. The motor to move the Y axis of the table will be stationary and will have its shaft horizontally oriented. Since we are using two precision milled rods for that are some distance apart for the Y movement of the XY table, we will need to attach a long shaft to the spindle of this stepper motor. This shaft will need to be very accurately aligned with the stepper motor spindle to reduce any possibility of wobble. We plan on doing this through the use of adhesives and a stout collar mechanism. Then, we will attach gears to this shaft at the locations where the carriage is aligned. These gears attach to the belts that drive the actual Y movement of the table. Since the two belts for the Y movement of the table are synchronized by the common shaft, there should be no different in the movement of each side of the machine. This is critical to our design. The other end of the belt will be attached to a stationary stand that holds a freewheeling gear of the same type and size that is attached to the timing rod. The X movement of the machine is slightly more complicated than the movement in the Y direction. This is due to the fact that the entire X axis assembly has to move in the Y direction on a carriage system. The stepper motor for the X axis will be attached to this carriage with its spindle oriented in the positive Z direction. This spindle will be directly couple to a gear that will interface with the belt driving the X movement of the XY table. The other end of this belt will be attached to a stationary stand that holds a freewheeling gear on the other end of the carriage. This carriage will also hold the optics that are responsible for the transfer of the final laser to the PCB surface. The laser will be shot down the left Y axis of the XY table, hit a 90 degree mirror, move along the X axis of the carriage, hit another 90 degree mirror, turn down, and then finally hit a focusing mirror before hitting the PCB surface. 11.2 – Prototype/Test We have no completed any prototyping or testing on the XY table system yet. This is one of the systems that we are least worried about, as we have constructed several in the past. However, it will need to be thoroughly tested for both precision and accuracy. This will need to be done before we even try to align the laser for a test run. We will most likely accomplish this through the attachment of a laser pointer directly to the head of the XY table. Then, using time lapse photography we would run through multiple iterations of moving the head around the board. Looking at the resulting image, we should be able to verify that the laser is hitting the same location every time it gets to a certain point in the run. We will be able to tell if the machine is running itself out of square by this method also. After we have gone through this stage of testing, we

Page 62: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

58

will need to align the real laser with the head and do a few test runs using the same time lapse photography system as before, but with the laser on a very low power setting. The next test that we will perform will be one to remove the time lapse photography system altogether. This will be a test with the laser on a medium power setting with a paper substrate laid down. Over a large number of iterations of the machine being forced to go to different corners and travel different paths, we will be able to tell if the machine is going out of square of if we are accumulating slip anywhere if holes start to appear in new parts of the paper. 11.3 – Evaluation Plan We will not be able to evaluate this XY table until almost at the very end of the project. We will need a working laser system, software system, and power system before we can do a realistic test. While the tests that we plan are good metrics at determining the accuracy of the table, the metric that we will need to evaluate is speed. It will take some time to do the mill procedure, and any amount of extra speed that we can achieve in the movement of the mill head would help greatly. Our main goal is to replace the current milling machine that resides in the senior design lab. To be capable of replacing this machine, we need to be able to approach it in speed of milling. The capability of the laser to punch through the copper determines one part of this, but the speed of the movement of the XY head determines the other. The final evaluation of this section of the project has to be the actual milling of a PCB. If the PCB that is created by our machine matches the users input specifications, and is created as specified by the users input Gerber file then this section will be a success. A further evaluation that could be used is the comparison of a professionally milled PCB with a PCB that our machine creates using the same Gerber file. If the two matches are identical, then we would definitely call this section of the project a success. However, even if the PCB’s are very similar we will consider this section a success. This machine is only intended to be used in the prototyping of PCB’s, not production runs or extremely precise work.

Page 63: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

59

SECTION 12: Microcontroller 12.1 - Design The first step in the design of the microcontroller section of our project is the decision of what our project requirements are. A Pulse Width Modulation (PWM) circuit will be needed to allow for micro stepping of our motors. An analog to digital converter will be required to do handle the conversion of the output of the temperature sensors into a useful digital signal. The microcontrollers that we decide to use will also need to be able to interface with a large number and a large variety of sensors, while being easy to implement, program, and low cost. We are attempting a fairly complex project, with some very expensive components. To protect our investment, we will have a large number of sensors located in our project. Currently, we are planning to implement seven types of sensors: contact, temperature, light, current, voltage, humidity, and flow rate. In total, we plan to have twenty three sensors inside our project. Due to this large number of peripherals that we will have to interface with, we know that one microcontroller will not be able to handle all of our needs. The microcontroller that we use will need to be easy to implement. We have a large range of systems from various disciplines going into this project, and the last thing that we need is to incur artificial complexity due to a poor design decision. For this reason, we have decided to eschew any microcontrollers that require assembly programming and are only going to look at microcontrollers that support the C programming language. To help easy implementation, we will also be searching for a microcontroller that has a large repository of code already written for it. It will also need to be easy to reprogram. We are only human, and it is very likely that we will make a mistake in the programming of the microcontroller. The harm of this will be limited some by having the main program handling occur on our control computer, but errors will still most likely occur in our microcontroller code. For this reason, we have decided to try and find a microcontroller that can be programmed in the final circuit of our design, without having to be removed. We do not want to have to remove precision aligned optical equipment to just change a few bits around in a microprocessor, so this is a very important requirement. This requirement necessitates that we use a microcontroller that has Universal Serial Bus (USB) support if we do not want a large number of wires inside our project box. Our final requirement is that the microcontroller be cheap. This seems slightly counter intuitive, as we have some very expensive optical equipment in this project. However, we will most likely be going through a fair number of these microcontrollers as we move through multiple revisions of our project, and go through testing of all of the various components. Furthermore, these microcontrollers are going to be in a fairly hostile environment. For example, if the fume extraction system fails for even a small amount of time there will be a large amount of vaporized copper released directly into the main enclosure of our project. We cannot anticipate all of the problems that might occur this early in the project, but we want to be able to swap out

Page 64: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

60

microcontrollers fairly frequently if we need to. For this reason, we will not be going with a system such as the Arduino that has a support system already built in, but for a cost almost an order of magnitude larger than a bare microcontroller. A major factor that contributes to the cost of all microcontrollers is their data bus width. We expect that a 16 bit data bus width will suffice for our needs. However, these microcontrollers are significantly more expensive than their 8 bit counter parts. To overcome this obstacle, we have decided that we will search for an 8 bit microcontroller. The difference is in how we will program this microcontroller. The standard ANSI C programming language allows for an integer to be created that can be two data entries wide. This allows an 8 bit microcontroller to be used as a 16 bit microcontroller, with a minimal loss of performance [18]. The lead microcontroller designer in our group was already familiar with two microcontrollers that fit these needs, the Microchip PIC18F2550 and the PIC18F4550. These two microcontrollers are nearly identical, except that the PIC18F4550 has one more “Capture/Compare/PWM Peripheral”, 3 more ADC’s, 8 more output pins, and a streaming port [19], [20]. Very early on we decided to eliminate the PIC18F2550 from the competition. The PIC18F4550 offers more functionality in a slightly larger package for just slightly more money. Furthermore, this microcontroller meets all of the specifications that we have defined above, while still remaining cost effective. Another plus if we were to use this microcontroller, would be that we already have the software setup, and the support hardware (namely a microcontroller programmer) that we would require. This would allow us to cut down on our initial development time considerably. We were unsure of where to go from here in finding other microcontrollers to research for our project. However, we found that the Mouser Electronics website has a tool that can find similar products. We used this tool on the listing for the PIC18F4550 and found the Silicon Labs C8051F342-GQ, the Atmel ATMEGA162-16PU, and the Freescale Semiconductor MC9S08JS8CWJ [21], [22], [23]. For this research, we decided to compare these microcontroller offerings to the PIC18F4550 to try and determine if we could find one that exceeded its qualifications. Through former work in a similar area of one of our members, we already knew that the PIC18F4550 would work for our purposes from firsthand experience. At first glance the Silicon Labs C8051F342-GQ appears to beat the PIC18F4550 in nearly every field. It has a larger program memory size (64KB versus 32KB), a larger data ram size (5.25KB versus 2KB) and the same clock frequency. However, this microcontroller only has twenty five programmable input/output pins, is in a surface mount package, and is twice the cost of the PIC18F4550. We still do not know how many sensors our final project will have, and we do not want to limit ourselves with a microcontroller that does not have enough input/output pins. Furthermore, we are trying to avoid the use of surface mount components in the microcontroller section of our design. We wish to do this to aid in the prototyping process, as it will allow us to use breadboards without creating custom breakout boards, and to ease the soldering process for the final product. The Atmel ATMEGA162-16PU is in the type of package that we wish to use (PDIP-40), and has the same number of input/output pins as the

Page 65: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

61

PIC18F4550, but is seriously lacking in other areas. First off, it only has a maximum clock frequency of 16MHz. We are planning on doing a large amount of data manipulation and calculation, and do not want to be limited by a slow clock rate. Also, the ATMEGA162-16PU only has a 16KB program memory size. We will be loading complex path following and contour routing algorithms into this microcontrollers memory, and once again we do not want to be limited by buying a substandard chip. While we could have looked at the next microcontroller up in Atmel’s offerings, the ATMEGA162-16PU was already over our $5 limit for each microcontroller, and Atmel’s offerings just increased in price from there. The Freescale Semiconductor MC9S08JS8CWJ microcontroller really never had a chance of being selected. It only has a 16KB program memory size, a 256B data dram size, and only one timer to the PIC18F4550’s four timers. This microcontroller looked appealing, as it is only half the cost of the PIC18F4550 at the time of this writing, but it just does not have the requirements that we believe will be necessary to make this project a reality. After some consideration, we have decided to use the PIC18F4550 as the main microcontroller in our project. It is simply has more to offer in terms of hardware, has a larger user community on the software side, and we already have experience and support hardware in developing for it. The next decision that we needed to make, was on which topology that we wished to implement. One method of designing the microcontroller system for our project that we considered using was to connect the computer to one main microcontroller, and that microcontroller would then be used to send and received commands and data from other less complex microcontrollers. These less complex microcontrollers would be used to do the interfacing with each of the individual sections of our project. These sections include the laser power supply, the TEC power supply, the Q switch power supply, and the motor controller. One attractive aspect of this design is that these less complex microcontrollers, we were discussing using PIC16F54’s, would be much cheaper to purchase than the PIC18F4550 that we have ended up deciding to use. However, the main reason that we have decided to not use the PIC16F54’s is that they are not capable of running assembled C code. We would have had to write all of our code in assembly. After some deliberation, we decided that this would add too much time to the development cycle for a small monetary reward. Our project is going to be complex enough that we do not need to be artificially adding difficulty. In this design, we were going to use a PIC18F4550 to do the control of the other microcontrollers, and to interface between the machine and the computer over USB. For our next design, we decided to solely use this chip. The final design that we have come up with for the microcontroller of our project is going to be a topology of one to many. This will be the computer directly connected to many microcontrollers. This is possible since every PIC18F4550 that we will be using can be directly interfaced with through a USB connection, and a theoretical limit of 127 devices can be connected to a single USB host controller [24]. We will have nowhere near this many microcontrollers in this

Page 66: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

62

project, and we will have a dedicated control computer that will have at most three USB devices (mouse, keyboard, and flash drive) connected to it at any time. The main reason that we have decided on this design is one of simplicity. These microcontrollers will allow us to do all of our circuit programming while they are already in the project, with only one pin (pin RC0) pulled to high and a restart of the board. With this design, our main controller will be the computer. This will allow us to easier record errors, and allows us to have tighter control of how we implement procedures. Now that we have decided on which microcontroller that we are going to use, and what topology we are going to use the interface the computer with our multitude of sensors, we need to decide on what protocols we are going to use to talk between the computer and the microcontroller. As the PIC18F4550 is fully USB 2.0 compliant, we will have a data bandwidth of 12Mbps and will be sending 64B packets at a time. This is a standard of the USB 2.0 specification. Following the standard for most microcontroller applications, the first character, or the first eight bits, of this packet will be a control code determining what function to run on the microcontroller. The other 504bits will be used for data. This is an entirely arbitrary setup, but we will be able to call 2^8=256 functions with this method, while still having plenty of space for our data to be passed. The following functions can be viewed from the aspect of the compute sending the microcontroller commands. These functions include moving the XY head in the X direction, moving the XY head in the Y direction, turning on the laser, turning on the Q switch, turning off the laser, and a verbose senor reading state. Due to the way that we are planning on designing our software, we will be sending a command every time we want the XY head to move, and therefore these commands will take up the bulk of what we are sending to the microcontroller. Furthermore, we will need to decide if the Q switch should be on or off for each location that the XY head is capable of being located at. For this reason, and due to the nature of the Q switch, the command to cut the Q switch on and off will be a pulsed command that is a sub routine of the X and Y movement functions. To simplify the move functions, there will only be one move function that reads in specific digits that tell the machine to move in the X or the Y direction. There will be another bit that tells the machine to pulse the Q switch. The laser will be cut on at the beginning of the mill operation, and left on until the job is finished, as it will not actually be lasing in this state and thus will not be actually removing any material. The verbose sensor function will be used to do diagnostics on the machine, and will give priority to sending a large amount of sensor readings back to the graphical user interface. This will be very useful when we are fine tuning the laser output power. Finally, we will be implementing a shutdown function. This function will read specific bits out of the data regarding which parts of the machine need to be shutdown, and if the machine needs to go through a safe and normal shutdown or if it needs to do an emergency shutdown. An emergency shutdown has a high likelihood of damaging equipment, and would only be utilized if there is an imminent safety concern. We can also look at the functions that will be solely focused on sending data to the computer. These functions are

Page 67: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

63

mainly sensor readings and log file operations. These files will take a background existence to the commands coming from the computer, as they are less important. Since we have a flat topology, we will be able to poll and send sensor readings. They will not be real time, but will be only slightly delayed. This is required as we have a large number of temperature sensors, and each temperature sensor will require the use of the analog to digital converter for it to be read. For other things, however, such as the limit switches on the XY table, or the contact switch on the case, we will be able to read those in real time as they will be coming in as a digital signal. These digital signals can be read on a per buss basis. This is necessary as we want to stop the XY head as fast as possible if it has hit one of the limit switches, and we want to shut down the laser system immediately if someone has forced open the case without entering the administrative override. As of right now, we are planning on having two commands go to the machine for every one command that comes from the machine. This will give us a good data rate for sending commands, and will still give us a good sensor and log resolution on the computer side of things. We will be storing all of the log files, which will include the sensor readings for the entire time that an event is occurring, on the computer. We will only be storing a small local log file on the microcontroller for errors that occur that would limit communication with the computer. At this point in time, we will not be trying to implement any fancy method to handle memory bandwidth bottlenecks. We will simply enter a loop until the data that has been requested is received. 12.2 – Prototype/Test We have already started the prototyping of our microcontroller hardware, as we will need this hardware to test a large portion of our machine. The figure below (Figure 12.1) shows the schematic that we used to create the prototype board, and Figure 12.2 shows an actual picture of the board that we have created for testing.

Page 68: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

64

Figure 12.1: Schematic used to create prototype board

Figure 12.2: Picture of the actual prototype board

Page 69: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

65

This board was created in house using an etching process. A FR4 board was first evenly coated in a layer of black spray paint. The portion of the coating over areas of the PCB where we wanted the copper to be removed was then etched off using a CO2 laser on a professional laser milling machine. The now exposed copper was then removed using hydrochloric acid and hydrogen peroxide. This finished board will be used for the prototyping of each section of our project that is going to require a microcontroller. The laser power supply, the TEC power supply, the Q switch power supply will all have their own microcontrollers. Additionally, there will be a microcontroller for each axis of the XY table, and the laser sensors and the security sensors will share a microcontroller. The main purpose of the prototype board is to determine which pins we will need to use for that section. This will allow us to make the final boards with the exact layout that is required. Extensive testing will be required before we can actually use any of the six microcontrollers in our project. The number one thing that we will need to test for is logic errors. This will include things like the machine reporting an error, and a result occurs such as the laser power increases instead of the machine shutting off. This will take the longest of all of the tests, as a large number of combinations will need to be tried. The main thing that we will be looking for, however, is simple mismatches between event codes and actions. So, while this will take the longest to test it should take the shortest amount of time to fix. After we have assured ourselves that there are no logic errors in any of the microcontroller code, we will test the connections between the microcontroller and the peripherals themselves. This will involved connecting each individual sensor to the prototype board, and applying a stimulus to the sensor and verifying that the correct result is received by our software. After we have verified that each individual sensor works, and that the microcontroller is reading those sensors and getting the data back to the computer correctly, we will test the combinations of sensors that will occur in each section of the machine. This is to make sure that sections that have to process multiple sensors that use the analog to digital converter, such as the laser sensor microcontroller, are capable of handling reading all of the sensors, and reporting any changes to the sensors in a timely fashion. 12.3 - Build We will use the same process that we used to design the prototyping board for the actual boards that will go into the machine. The difference in the actual boards and the prototyping boards is that each sections board will be custom made for it.

Page 70: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

66

SECTION 13: Software 13.1 - Design For this section of our project, we first needed to decide which programming languages we wanted to use. The C programming language was a given for the embedded portion of the project due to the PIC4550’s support of it. This allowed us to avoid the tedious task of hand coding assembly. The other reasons for choosing the PIC4550 have been discussed in Section 13. For the portion of our project that will be running on the control computer we have chosen to use the Java programming language. The other options that we considered were the C programming language and Visual Basic 6. The main reason that we chose the Java programming language was that our main coder for the GUI and computer/machine interactions has had the most experience in graphical user interface design in the Java language. The C language does not support the creation of a GUI as easily as Java does, from a standpoint of object oriented programming as well as from the standpoint of the Netbeans IDE available for Java. We did not chose to use VB6 as our language of choice as there are some issues with it interfacing with a PIC microcontroller, along with our coder not being familiar with the language. Furthermore, the jPicUsb Java library will allow us to easily send and receive data from the PIC microcontroller from within Java. The Java programming language will be used to display the GUI to the milling machine user, make calculations, and send data to the machine itself. The GUI will initially present the user with a simple interface to load a Gerber file, to load a user file, or to load a PNG file. A Gerber file format is able to be produced through a wide range of PCB layout software, and is the current standard used by many professional PCB manufacturers. The two main files that we are concerned with are the *.GTL and *.GBL which are the layers for the top layer copper trances, and the bottom layer copper traces respectively. The format supports other layers such as a silk screening layer (*.GTO) and a solder resist layer (*.GTS), but these will not be implemented in this project. If a project requires those two layers, the user will need to contact a professional PCB manufacturer to have their project processed. The processes used to transform the Gerber files into a format that our machine can handle are discussed later on in this section. The user file will be loaded by the user at the same time as they load the Gerber file. This file is only necessary if you are using a board that you have already milled a portion of, and is created during the milling procedure for the old board. If no user file is specified, a blank user file will be used and it will be assumed that you are using a new 12inx12in board. To determine the user’s access level, a user name and password combination will be used. This was initially going to be done with a hardware based user access card that stored the user access level in an encrypted format. This turned out to be one too many additions to this project and has been cut for the foreseeable future, but will be re-added if time permits. The user name and password will be assigned to the user at the time of their milling machine certification. The user name will be the

Page 71: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

67

students NID. The password will be a random string generated from lower case letters and numbers that is between six and eight characters in length. This access level determines the interactions that a user is capable of with the machine. These interactions are discussed further in the Security section of this paper, Section 15. The combination of the two fields also will load a selection of the previous boards that the user has milled. The program then takes the bitmap generated from the Gerber file and allows the user to place it in the valid areas of the board. The user file that in the users folder, maintained on the computer running the machine, will just be a list of the extents of the previously milled board. The user will be responsible for creating a new user file whenever they start with a new board. This will be accomplishable from the GUI when the user is placing the image to be milled. Alternatively, a new user file will be if no User file is specified in the GUI. Further discussion of how this is implemented is discussed in the GUI design section below. The GUI for this project will consist of several parts. The first part is the window (Figure 13.1) that will accept data from the user pertaining to the Gerber file name, and the user file. An option will exist in this window if the user wants to use a custom PNG file to mill from. The main part of the GUI will contain the rest of the options, including the placement of the image on the board and the options for the users above the level of Standard User. These features will be discussed in more detail below.

Figure 13.1: Select a File Name and User File

This is the first window that the user will see after running our program. The options available to them in this window entail entering a file name, entering a user file, or the more advanced option of entering a PNG file. All three of these

Page 72: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

68

options can be accomplished through the use of a text box and simply typing in the full path to the file, or using the Browse button to the side of it to locate the file on disk. The Clear button will just clear the specific text field. This allows a user to accidentally enter a file name, clear it, and then enter a PNG file without causing an error. The user file that is entered in this step will be available for the user to use in the main portion of the GUI in a following step, or they may choose to use the user file stored on their access card. If the PNG file option is used, the user needs to have cleared the file name box before proceeding with the Next button, and vice versa. The user will only be allowed to proceed past this stage if no errors occur. Errors will be caused by having both an entry in the File name, and PNG File fields, if one of the files that is specified does not exist, or if a required field is left blank. The only required fields are the File Name or PNG File fields, but not both at once. If an error occurs, the same window, with the same inputs, will be shown to the user after an explanation of the error is shown to the user in a popup window. The user will be given two more chances to fix the error using the same inputs. If after three errors, the user has not cleared all of the errors, all of the inputs will be cleared for the user to try again. This step does not ascertain the fitness of the input files, it just accepts them. After the user presses the Next button, only then does the system try to determine if the files are well formed. The Browse button functionality in this section is handled by the Java JFileChooser class. This allows us to show a fully functional browsing window that we can pull the path name of a file from, and still limit the user to what types of files they select. We will different instances of the JFileChooser class for each of the three Browse buttons. This is required as we want each button to filter to only a specific type of file that can be selected. The File Name browse button will only be able to select *.GTL and *.GBL files, while the User File browse button will only be able to select *.user files, while the PNG File browse button will of course be only able to select *.PNG files. This would cause some inconvenience to the user, as each new instance of the JFileChooser class would default to the logged in users home directory while most of our users will be either accessing their files off of email or a flash drive. We will solve this problem by saving the first directory that the user enters with the getCurrentDirectory() and setCurrentDirectory(File dir) methods of the JFileChooser class. Every time a browse button is pushed, a check will be run if a directory has been used besides the default directory of My Documents. If a new directory has been used to open a file, then that directory will be displayed when the Browse window is displayed. This will be useful, as most users will have all of their files in either a single directory or in directories that are close to each other on the file tree. The result of the file selected in the Browse window will be stored in the text box next to the specified button with the getSelectedFile() method. Since this is a text box, the toString() method of the File class will need be called to be able to display this information. This String will be written to the text box with the setString(String str) method of the TextBox class. The Clear button will simply use this same method to set the String in the text box to null.

Page 73: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

69

The Next button will be responsible for several tasks. First of all, it will popup the next window, but with the Go button disabled. Next, it will perform a final check to verify that there are no errors in the types of files in each text box, that either the File Name or PNG File field is filled in, and that the files actually exist at the specified location. These tasks are accomplished through the use of string comparison, Boolean logic, and by attempting to open the files while checking for a FileNotFoundException to be thrown. The logistics of these tasks are trivial, and will not be mentioned in this report nor will tasks such as this be mentioned again. If there are no errors from these procedures, the next step of determining if these are well formed files is done. The easiest way to check if the input Gerber file is a valid Gerber file is to actually run it through the gerb2tiff program, and check the error messages that are returned, if any. If any error messages are returned, the first GUI window will be redisplayed with a copy of the error message shown in a popup window. To check the PNG image we will have to do a pixel by pixel read of it to determine its fitness. Since this is done in the conversion of the PNG image to a format that the machine can use, we will simply run the convertPNG(String str) and issue a flag if a discrepancy is discovered. A discrepancy would be if the file is composed of anything besides black and white pixels, or if the file is too large. The board size would be too large if the PNG file is more than 12,000 pixels in either dimension. This check will also be completed on the PNG that is automatically created if the user chooses to input a Gerber file, to keep users from trying to mill projects larger than the largest available milling area. We arrived at this number as we will support a maximum of 12inx12in boards, and will be running our XY table at 1000dpi with one dot equaling one pixel. Again, if a discrepancy is discovered the first GUI window will be redisplayed explaining to the user that their PNG image is malformed. If no errors are found, the first GUI window is closed, the Go button is enabled, and the machine will go through its startup procedure if it was not already on. At this stage the user will enter their user name and password combination in Figure 13.2 that was assigned to them at the time of their certification. This will determine the user’s access level so that they are not shown restricted options in the next step. If the user name and password combination do not exist in the memory of our program the user will be returned to the dialog asking for their user name and password until they enter a valid combination or exit the program. The user name entry will be a simple JTextField, but the Password field will be a JPasswordField, so that the password is hidden when the user is typing it in.

Page 74: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

70

Figure 13.2: Enter a User Name and Password

In this stage, the Next button will call the method authUser(userName, password) to determine if the user is a valid user or not. Additionally, this method will return the user’s access level. If a -1 is returned the entry is not valid, if a 0 is returned the entry belongs to a Standard user, if a 1 is returned the entry belong to an Advanced user, if a 2 is returned the entry belongs to an Experienced user, and if a 3 is returned the entry belongs to an Administrator. This authentication will be accomplished through the use of the SHA-512 hashing function. The user name and password pairs will be stored in a plain text file in the same directory as the main program. Each time a new user is certified, their user name will be entered into the file along with the hashed value of the password they are assigned, slightly modified to provide the user’s level. Instead of simply storing the user’s password as a hash, we will compute the hash of a combination of the user’s password and their assigned access level. For example, if the user aa123456 is assigned to user access level 0 and they are assigned the password b1234cd, the string that will be hashed is “0+b1234cd.” When the user gets to this window, all of the user name and hash key pairs will be loaded into a TreeMap. When a user enters their credentials at this step, the user name they enter will be used as a key for the TreeMap data structure. This will return the stored hash key, and this stored hash key will be compared against the four hash key’s that are possible for this user’s password that was just entered. The user will be granted their access level depending on which of these hashes matches the hash on file. The security applications of this implementation are severe. Since hash functions are one way, it will be difficult for someone to guess a user’s assigned password. However, if the user obtains access to the main password file, it would be trivial for them to change their access level by simply re-entering a hashed entry of a new access level concatenated with a password. We plan to eliminate this possibility by dynamically setting the permissions of the user access file and the user data folders. The user access file will only be able to be read or write when the main program needs to read or write it, and the user data folders will only be able to be read or written when the correct user is logged in. Experienced and Administrative users will be able to see all users folders and the user access file any time they are logged in, but any other user will only be able to see their data

Page 75: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

71

folder when they are logged in. This would be possible through the use of the windows command line tool CACLS. We will attempt to solve this problem if we have time next semester.

This is the main area where the user will interact with the milling machine. Figure 13.3 shows the layout of the full GUI that an Administrator would see. All of the content in this window is displayed based on the user’s access level. This figure shows what a user of access level Administrator would see after logging in. If an Experienced User logged in, they would only see the Standard, Advanced, and Experienced user boxes. The reason for displaying the options like this is three fold. First, the GUI is shown in this manner in the spirit of security. There is no need for users to be able to see the options available to them at a higher access level, and be tempted into trying to trick the system into granting this higher access level. This sounds like the principle of security through obscurity, but it is mainly to take away the temptation for users to break the system. The actual methods that will be controlling the features contained within the GUI will all be locked based on the user access level. This way, even when running the program from a command line, users can not run commands illegal for their access level. Second, this is done for reasons of simplicity. The vast majority of users will be standard users, and will not need to see the Administrator options, even if they will not work for them. The window will be resized to fit the available components that the user can access to avoid having a large empty space by using the pack() method of the Window class in Java. Third it cuts down on the number of windows that need to be opened for the user to interact with the machine. If we had spawned a separate window for each access level the software would have been difficult to work with. The top row of Name, Access Level, and Status are shown no matter what level the logged in user is. The userName and accLevel fields are not modifiable, and are included in this window to allow someone to easily tell who is logged in by glancing at the screen. The userStatus field will display either OK or ERROR, with OK being displayed when the machine operating at full capacity and ERROR being displayed when the machine has any error occur that limits the operation or safety of the machine and the user. This status is left purposefully vague, as the Standard level users will not be able to fix any of the errors that are serious enough to result in an ERROR status.

Page 76: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

72

Figure 13.3: Shows how the individual user sections fit into the main GUI

The Standard Users box (Figure 13.4) within the main GUI is where most of the work will be done, and is accordingly the largest area on the screen. It will be 12inx12in, or scaled to be half the size of the actual machines millable area. This box will contain the area where users will place their image on the available mill area, create a new user file, load a previous user file, and start the mill procedure.

Figure 13.4: Standard user input pane

The area that will be used for the placement of the image on the mill area will be the most complicated part of this GUI. This area will start off with a 12x12 square

Page 77: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

73

drawn on the Java Canvas class with the paint() method. This hollow square will be in black, and represents the area that can be milled on a new FR4 board. Then, a filled in red rectangle will be drawn on top of this square to represent the area that cannot be milled due to a user file being loaded. If no user file has been loaded, then there will be no red rectangle drawn. If the user loads a previous user file or enters the dimensions that can be milled on the board in the machine, the red rectangle will be drawn at that time. The user image will start off following the computers mouse. This will be accomplished through the use of the getX() and getY() methods of the MouseEvent class. The result of these methods will be used to move the rectangle representing the users Project image around the board, based on the location of the top left corner of the image. When the user clicks on the board, the program will call the isValidImageLocation() method to determine if that is an appropriate place for the image to be located. If it is not an appropriate place, false will be returned and the image will continue to follow the mouse. If it is an appropriate place, true will be return and the image will not follow the mouse anymore. If the user desires to move the image to another location, they will be able to do so by clicking anywhere within the image and the image will start following the mouse again, only to be dropped when isValidImageLocation() return true once again. The isValidImageLocation() method will determine if the image that the user is attempting to add to the board is in a valid location. It will accomplish this through two checks. The first check will be based on the centroid of the image being placed and the remaining area that can be milled. If the centroid of the image is within that area, the image will not be allowed to be placed there. This will be used to eliminate any images that are too large for the remaining area that can be milled. An example of this case is shown below (Figure 13.5).

Figure 13.5: Invalid image placement locations, condition one

The second check (Figure 13.6) will be based on the lines that make up the image, the maximum area that can be milled, and the area that has already been removed. If the lines belonging to the image that needs to be placed intersect any of the other lines on the display, a false will be returned. This will be accomplished through the use of the intersects(Rectangle2D p) method in the java.awt.geom.Area class. This method returns true if the current Area object is intersecting the specified Rectangle2D object. This will take care of the cases that appear on the following image. Note, only one image is actually going to be

Page 78: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

74

placed on the window at a time, this is just showing the possible areas of conflict that the intersects(…) method will detect.

Figure 13.6: Invalid image placement locations, condition two

We want to implement an automatic placement algorithm, if time permits. This algorithm would take the user image and attempt to place it anywhere in the image. As of right now, the only way that we know of doing this would be to start with the two corners of the image and the maximum area that can be milled and move the image over pixel by pixel until the right most side of it reaches the right side of the millable area. Then move down a pixel, and sweep to the left. Every time the image was moved a pixel, the isValidImageLocation() method would have to be called. In the worst case scenario of a 1pixelx1pixel image, this would result in 144,000,000 calls to the isValidImageLocation() method. This is an unacceptably large number, and until a better algorithm can be found for moving the image around this will not be implemented. Clicking of the New User File button will perform several tasks. First, it will save and close the current user file. Every time a user file is created, it is named by the convention of YYMoMoDD_MiMiHHSS.user where DD is the day in two digit format, MoMo is the month in two digit format, YY is the year in two digit format, and MiMiHHSS is the time. This user file will then be displayed onto the GUI in the Millable Area box. Furthermore, the corresponding entry to the millReady String will be set to a zero, explained below, as the image has not been properly placed on the new user file. Even if the image is in a correct location, it must be moved at least once, even if it is back to the starting location, for the isValidImageLocation() method to trigger. The Load Previous User File button will present the user with another browse window, much like in the earlier part of the GUI, that will only display *.user files. This browse window will default to the user’s directory on the controller computer. The last thirty saved user files will be stored in this file, along with the last thirty PNG files that have been created from user input Gerber files. The Mill button will do just that, and start the mill procedure. This will first check with the millSet() method. The millSet() method will check the millReady String to verify that all entries are a 1. We have designed the system this way so that we can easily implement additional checks before the mill procedure is ran. While we have not decided on the final length, or what all will be included in the checks, if there is even a single 0 in the String

Page 79: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

75

readyToMill will stay false and the mill procedure will not be allowed to move forward. A for loop checking each entry will be responsible for the verification using the substring() methods and the length() method of the String class. If the string is found to contain all 1’s, the readyToMill Boolean variable will be set to true. Once the millSet() method returns true, the mill() method will be run, and the readyToMill variable will be returned to false. This is to prevent users from double clicking the Mill button, and causing two mill procedures to run simultaneously. And finally, the saveUserFile() method will be run. This will save the user file in use to the user’s folder, and check if there are more than thirty user files present. If there are more than thirty, a policy of least recently used will be implemented, and the oldest files will be deleted until there are only thirty left. Due to this policy, it is unadvisable for users to store their custom user files in this directory if they wish for them to remain for more than thirty milling cycles. The mill() method will be discussed in this section below. We had planned on including an option for user’s to enter the dimensions of the remaining millable area of their board. After some consideration, however, we decided that this was too advanced a feature to include in the GUI of the standard user, but something that standard users might still find useful and thus something that could not be exclusively part of one of the higher user access level groups. Therefore, we have decided to just include documentation on the format of the user files, and allow users to input the data themselves into a file. A final format for the user files has not been decided on yet, but it will most likely be pixel coordinates outlining the areas that have already been removed from the board. A single entry would be sufficient to remove a rectangle from the board, but any other shapes would require multiple entries, each describing a rectangular area that cannot be milled on. The conversion factor from inches to pixels is simply 1000 pixels per inch. Therefore, if you have a 12inx12in board, and a square that is 3inx3in has been removed from the top right corner, the entry in the custom user file would be ‘9000 12000 0 3000’. The first two numbers are the X coordinates that have been removed, and the second two numbers are the Y coordinates that have been removed. We will use the convention that the top left corner of the board is 0,0. The next conditionally displayed box (Figure 13.7) is the one belonging to the Advanced user group. Advanced users will have all of the permissions of the Standard users and will be able to modify the attributes of existing boards and modify the available PCB materials. When a user clicks the ‘Select Current Board’ button, the window in Figure 13.8 will appear.

Page 80: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

76

Figure 13.7: Advanced user input pane

Figure 13.8: Select Current Board

This window will allow an advanced user to select which type of board is going to be mounted in the machine. This will remain the default board for the machine until this setting is changed. Figure 13.9 shows the window that will open when an Advanced user clicks the ‘Modify Available PCB Materials’ button. In this window, the user will be able to select which types of boards that can be selected in the Modify Board window discussed below. We have designed it this way to allow us to be able to easily add and remove boards that our machine can work with, as we will only be able to tell how well the machine works with a certain type of board after we have tested that board on the actual machine itself. Any number of the jRadioButton’s can be selected. We have included options to select or deselect both individual groups, as well as every entry displayed.

Page 81: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

77

Figure 13.9: Selection of PCB Materials

When a user clicks on one of the ‘View Saved Attributes’ buttons, Figure 13.10 figure will be displayed. None of these entries are editable, as this window is for the sole purpose of allowing a user to see what that particular board’s previously saved attributes are.

Figure 13.10: Information about PCB Materials

Figure 13.11 shows the window that will open when an Advanced user clicks the ‘Modify Attributes of Existing Board’. Notice, Advanced user’s are not capable of adding new boards to the system, only modifying boards that are already in the system. This is accomplished through the use of the jComboBox that will populate the variable savedBoardName. The entries that will be in this drop down box will be decided on by the aforementioned ‘Modify Available PCB Materials’

Page 82: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

78

button. When a previously saved board has been selected, the entries in this window will all auto populate with the data stored in the data structure used to store the boards. For more information on how the board data will be saved, see the section below on adding new board types. There will always be a default saved for normal FR4 boards that can not be edited by any users under Administrator level. Furthermore, the four laser entries in this window are only suggestions. Advanced users are not laser experienced service technicians, and adjusting these settings could cause harm to the machine. For this reason, when an Advanced user makes a suggestion on the laser attribute entries, they will only be able to use this setting in a test mill. A test mill will allow a user to run the mill procedure, but will only allow the procedure to run for a set amount of time. We will determine this amount of time after we have built the machine, and tested its response to various laser settings. This test mill will be sufficient for the Advanced user to determine if the settings will work for the current type of board. Advanced users are not allowed to over ride any safety measures, and therefore they will only be able to vary the laser power and pulse rate slightly. An Administrator must verify the laser settings from this window before they will be available for a normal mill procedure.

Figure 13.11: Board modification options

The next conditionally displayed box (Figure 13.12) is for the Experienced user access level. These users will be responsible for the training and certifying of Standard and Advanced users, and will almost exclusively be members of the Amateur Radio Club at UCF. For this reason, they will be able to add and modify users, and to add new board types to the system.

Page 83: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

79

Figure 13.12: Experienced user input pane

Figure 13.13 shows the window that will be displayed when the ‘Add User’ button is pressed by an Experienced user. The userName should be the students NID. The other two fields, Access Level and Password, will be conditionally displayed. Since Experienced users can only add Standard and Experienced users, they will only be able to select an access level of 0 or 1 for the new user. Furthermore, experienced users will not be able to override the password restriction and will be forced to use the ‘Generate Password’ button. Administrators will be able to select any one of the four access levels, and will be able to manually type in a password. The ‘Generate Password’ button will generate a password of the format x####xx, where x is any lower case letter and # is any single digit decimal number. This can be accomplished through an extrapolation of the code snippet shown below (Figure 13.14).

Figure 13.13: Add a user to the system

Figure 13.14: Example of Password Generation Code

For the full program that will be generating our passwords, please see the code titled ‘Password Generator’ in Appendix C. The isValidUserName() method will be called when the ‘Done’ button is pressed to verify that the user name that was entered is a valid NID, if the user is not an Administrator. The check to see if the user name is a valid NID is bypassed when a user with the access level of

Page 84: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

80

Administrator is logged in. After this is completed, a folder is created for the user in the main program directory and its permissions are set. For more information on user folder permissions, please see Section 14. Figure 13.15 shows the window that will be displayed when an Experienced user clicks on the ‘Modify User’ button. The isValidUserName() method will run after every keystroke into the userName field. This will be done by checking the KEY_PRESSED field of the java KeyEvent class after every entry into the box. The isValidUserName() method will return true if the user name is found in the system. We were originally going to verify that the user name is a valid NID here, but we have decided to skip that step as Administrators can create user accounts that do not have an NID for a user name. The user’s current access level will be read out of the data structure that we are using when isValidUserName() returns as true. User access levels will be placed in a TreeMap along with the user name and hashed password pairs when the user access level files is first opened. Experienced users will only be able to click on the 0 and 1 buttons, as they are only allowed to modify a user to become a Standard user or an Experienced user. Furthermore, if the user’s access level is returned as that of Experienced or Administrator, an Experienced user will not be able to edit the access level at all. Administrator users will be able to change anyone, even other administrators, to a different access level. Due to the way that we are storing user passwords, hashes, there is no mathematically possible way to retrieve a user’s password. To overcome this, we will only be able to re-issue passwords to users. This will be accomplished through the same method that the Add User window used, and will only be available to Experienced and Administrative users.

Figure 13.15: Modify user account

Figure 13.16 shows the options that are available to an Experienced user when the ‘Add New Board Type’ button is pressed. It is very similar to the ‘Modify Attributes of Exiting Board’ button that is available to Advanced users, but with the important distinctions that Experienced users are allowed to add new boards and that Experienced users do not need to wait on the authorization of an Administrator to change the laser power output. The entries (Name, Substrate

Page 85: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

81

Material, and Copper Thickness), under the information heading are for human information and records keeping only and do not come into effect at all. The entries under the Data sections are the values that are actually used by our main program and the machine itself. The width and height values are used only in the main program, and the laser power settings will be fed to the microcontroller.

Figure 13.16: Add a new board to the system

The Administrator section (Figure 13.17) of our GUI is by and far the largest section. We will be using this section to test our laser system, XY table, exhaust system, and TEC system while we are building the project. Furthermore, this section will help us to troubleshoot any errors that might arise, and adjust laser output power for new board types. This section can be split into two areas. The top part is mainly controls that control some aspect of the state of the machine. The bottom part is mainly sensor readings to determine the health of the machine. It is important to note also, that there are instantaneous state controls, and controls that only matter for the next mill operation. The instantaneous state controls are the movement of the milling head up, down, left, or right, forcing the laser either on or off, and adjusting the lasers power up or down. The controls for adjusting the amount of power used to remove either the copper layer or the copper and substrate layers will only affect the next mill operation. This is possible because the values that are stored with the board types have already been loaded into a temporary data area. These controls only change that temporary data area, and the next time that a user logs in, or a new board type is selected, the temporary values are overwritten. Furthermore, Administrators have the ability to override safety measures which entails opening and closing the cover during the machines operating, turning on and off the TEC, and turning on and off the fume extraction system. The last two controls that the Administrator

Page 86: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

82

has access to is the ability to verify the laser settings (Figure 13.18) recommended by an Advanced or Experienced user, and to force the stepper motors to run back to the origin until they hit their limit switches. This return to origin button is necessary because the stepper motors will lose their position data if there is a power outage.

Figure 13.17: Administrator user input pane

Page 87: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

83

Figure 13.18: Verify Laser Settings

We do not know what steps we will be using for the adjustment of the laser power yet. We will determine this once we have our laser up and operating and have a range of working power levels. As for the XY table head movements, we will be going with a stepped system for this based on time. For the first five seconds that one of the up, down, left or right buttons is held down, the XY head will move at one tenth of its maximum speed. After five seconds, the head will move at half of its maximum speed, and after ten seconds the head will move at its maximum speed. This algorithm will only apply in the central milling area. When the XY head gets close to the edge of the milling area it will be forced to slow down no matter how long the control has been held down, just so that no physical damage is done when the head hits the limit switch. Where applicable, the sensor data that is being displayed primarily in the bottom half of the Administrator section will have units incorporated with this display. This will allow us to vary the scale on the displays in real time as the values vary of a large range. The same main Java program will also be used for the backend of the user interface. This backend will be responsible for transforming the input file into a milling format, performing operations on the created file, transmitting the file to the machine, and handling errors thrown by the machine hardware. The first step of the backend will be transforming the user input Gerber file into a format that can be sent to the machine. This will be done by transforming each Gerber file into a monochrome bitmap TIFF file. The conversion process is handled through the use of the Gerb2tiff program created by Adam Seychell. Our machine will only be capable of producing 1000 dots per inch (DPI), and therefore the gerb2tiff program is passed the argument to set the DPI to 1000.

Page 88: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

84

This will help keep the file sizes down, and will make further image process less time intensive while not losing any resolution. Since we have to do pixel by pixel operations on this image, and Java does not natively support TIFF images, we first need to do an image conversion. The PNG (Portable Network Graphics) image format was chosen for our final image type because it is natively supported by Java and employs a lossless data compression scheme. We did not want to use an image format that implements lossy data compression, such as JPEG, and risk image artifacts ruining the mill procedure. This conversion process was done through the use of the ImageMagick software suite, most specifically the convert.exe binary. This conversion can easily be run programmatically through Java in a very short amount of time, one to two seconds on the tested TIFF transformed Gerber files. The reason for the conversion from Gerber format to a tiff image, and finally to a PNG image, is one of abstraction. This abstraction will allow us to implement other milling formats in the future, if time permits, as all of our backend processing of the image will be on a standard format PNG image file. Also, if a user wishes to implement a nonstandard feature of one of the major PCB layout programs, they will be able to directly input a formatted PNG file. A feature allowing users to save converted PNG files from pervious runs will be included, which will be the easiest way for a user to have a starting PNG to make changes to that is in the correct format. The final operation on the PNG file will be the actual read. This will be accomplished through the use of the BufferedImage Java class. The getWidth() and getHeight() methods of this class will allow us to create a double nested for loop that will traverse every pixel in the PNG image. These pixels will then be placed in a two dimensional integer array of the same size. The locations on the board that will either have the copper removed, or have the copper and the PCB material removed, will be indicated by a white area in the image and a 1 in the integer array, while the areas that will not be touched will be indicated by a black area in the image and a 0 in the integer array. There will be separate layers for areas that just need copper removed and areas that need copper and PCB material removed, as the laser will need to be set to a higher power and spend more time at the location for the second case. This will allow us to do a mill of one side of the board in two steps, copper removal and copper and PCB material removal. We are still not certain if our laser system will be capable of penetrating the PCB substrate, and this design for the input to the machine will allow us to at least accomplish the copper removal successfully. Users could then be able to but the board on a standard drill press and drill the holes themselves, while still getting a prototype far cheaper and faster than the professional PCB manufacturers. The next decision that we faced was to do a raster or a vector mill. Raster is the obvious choice as our data on where to cut the laser on, where an integer of 1 is stored, and where to leave the laser off, where an integer of 0 is stored, is

Page 89: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

85

already in a raster format. We were initially hesitant to use this format though. A raster mill procedure will take significantly longer than a vector mill procedure, just due to the movement time of the XY head where the laser is not on. Furthermore, a raster mill will add undue wear and tear to our drive motors and table assembly. A vector mill would locate and mill contiguous objects, instead of simply just sweeping over the entire accessible area of the XY table. This would add a large amount of computation time to the computer side of the program. However, it would reduce the wasted amount of time during the actual mill process. This would be the most favorable way to run the machine, as it also provides the minimum amount of movement of the motors, which translates into the minimum amount of cumulative slip generated and thus provides the highest tolerances. We have been unable to find an algorithm to successfully do a vector mill operation on the shapes that would need to be milled in a PCB. Therefore, we will implement the raster mill procedure. However, as we will be implementing this in an object oriented fashion, we will design the interfaces in such a way that a vector mill operation will be able to be implemented in the future. This is made possible due to the way that we will be sending data to the milling machine. Java will also be used to interface with the PIC4550 MCU’s on the milling machine. This will be accomplished through the use of the jPicUsb interface created by Geronimo Oñativia. The main portion of the data that we will be sending to the MCU will be relative position data along with a binary value of whether to cut the laser on or cut the laser off. Since we will not be sending any complex pictures or data sets to the microprocessor side of this project, it doesn’t matter how the directions are provided. In the raster mill procedure that we will be implementing, the directions will be mostly along the lines of ‘Move Right/Left/Up/Down X Steps’, ‘Cut laser on/off’. The difference between this and the vector mill procedure is that the directions would be telling the XY head to move around the shape of objects. Either way, the microprocessor is only seeing commands on where to move and if the laser needs to be on or not once we are in the main portion of the program. The jPicUsb software only needs three commands to be instantiated. These commands are “iface.load();”, “iface.set_vidpid(“vidString&pidString”);”, and “iface.set_instance(0);”. After this, data can be sent back and forth from the main Java program to the microcontroller through the use of the Write(…) and Read(…) methods. Please see Appendix D for the documentation of these methods. The mill() method will be the bulk of what could be considered our core program. This method will be responsible for doing two things: calling the translateData() method and sending that data to the PIC4550. The translateData() will take the internal data structures that we are using in Java and translate them into something that can be used by the PIC4550. We will have to send commands to turn the laser on and off, commands to turn the Q switch on and off, move a distance in the X direction, move a distance in the Y direction, and a go home command. The data on how to move the XY head and whether to cut the Q switch on or off will come directly out of the array created from the processing of

Page 90: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

86

the PNG file. This will be done line by line in the mill() method itself. As we will not be sending any complex data structures to the microcontroller, when the X array index moves over one location, we will send a command for the XY head to move in the X direction one step. The same goes for the Y direction. If the integer at that index is a 1, the Q switch will turn on, else the Q switch will stay off. The number of times that the Q switch will pulse before the head moves on to the index will be set by the type of board that is loaded or based on what the Administrative over ride has been set to. After this entire run has been completed, the XY head will move back to the origin. This will be done through the running of the returnToOrigin() method. All that this will do is move the XY head back towards the origin until the two limit switches in that corner trigger. We are doing this to limit the amount of slip in our XY table between the copper remove and the process that removes copper and PCB substrate material. We have separated these two processes as we were unable to get through the substrate material in our burn test. If nothing else, the user will have a location to drill at and a drill bit width to use in that location if the machine fails to punch through. After the mill procedure, they will be able to put the board on a drill press and drill out their hole locations accurately. We will be using the *.drl file of the same name as the Gerber file to get the data for the location of the holes to be made. As this is a file intended to be used by a mechanical drill, we will be ignoring a large portion of the file. The entries that we will mainly be interested in are the tool sizes, indicated by the T prefix, and the absolute X and absolute Y position. Please see Appendix B for an example *.drl file. This T code would look something like “T1C0.025”. This indicates that tool one (T1) will be making holes that are 0.025inches, or 25mils. The line indicating where this hole would be placed would look something like “X4.775Y-3.625”, after a “T1” had been issued. This absolute location would be where the center of the hole made by T1 would be located. Instead of delivering this information directly to the milling machine, we will be doing the processing on it in our Java code and sending the same style of relative position and laser on or off commands that we sent for the removal of the copper layer. To accomplish this, we were first going to plot the locations that the exterior of the circle will touch in an array of 12,000x12,000 entries. This will equate one cell in the array to one mil on the actual board. This would have resulted in an extremely large array that would be difficult to work with. Instead of this, we have decided to use a multilevel indexing strategy where we will take the entire 12000x12000 array and divide each dimension by 8. Then, we will have an offset that will index inside this initial index, and can select the correct bit within this index. The way that we were initially going to accomplish this was with the code in Figure 13.19 below.

Page 91: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

87

Figure 13.19: Code snippet of circle tracing algorithm

The code that we will use in our final project will be very similar to this code but with the index translations described above. In this implementation (Ax, Ay) describes the locations that the outside of the circle traces, (Bx, By) is the location of the center of the circle, and D is the diameter of the circle as read from the tool entry of the *.drl file. We will start with a map of all zeros, and each position on the map that intersects with the trace of the circle will be turned into a one. We will then take this array, and go line by line cutting the Q switch on, just the same as before, whenever the array index matches up with the stepper motor position. Our main program’s backend will also be responsible for handling high level errors thrown by the machine. Any immediate concerns that could affect user or machine safety will be handled by the onboard PIC microprocessors and be echoed to the main program for logging purposes only. These errors (Table 13.1) are things like a laser diode is getting too hot, the cover has been opened, or the XY table is not responding. The solutions to these sample problems are outlined below. Problem Solution Laser diode overheating Increase chilled water flow to that

particular diode OR reduce the power to the diode OR shut off the diode

Cover has been opened Stop all activity except for critical cool down procedures (some exceptions, discussed in Section 14.

XY table is not responding Stop sending commands to the steppers motors to attempt to lessen the damage. Turn on a warning light on the outside of the machine.

Table 13.1: Problems handled by the microcontroller

The main program will be responsible for handling less concrete errors (Table 13.2), and general errors that get thrown that we have not programmed specific resolutions to in the microprocessors. These errors are things like the input data is malformed, the machine is in an unrecognized state, or there are ambiguous power fluctuations. The solutions to these problems are outlined below.

Page 92: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

88

Problem Solution Input data is malformed Request user to resend data unless

the user has a level of Administrator. Then the machine will mill the given data unless it would damage the machine itself.

Machine in unrecognized state Request help from the user. Log the actions that lead up the error.

Power fluctuations Report the problem. Increase monitoring of power fluctuations unless the problem has disappeared. If problem is determined to be detrimental to the hardware, a flag will be issued to shut down the machine and not allow it to be restarted without resolving the issue.

Table 13.2: Problems handled by the Java code

13.2 - Prototype/Test We realized this was going to be a complicated project from the start. We have lasers, moving parts, high power, and lots of data moving around. Because of this, we started prototyping the software as soon as we had decided on the project. The sections of the software that have already been prototyped are described as follows. We have started a preliminary prototype of the software needed to pass data from the main Java program and the program running on the PIC microcontroller. This attempt has been hampered due to some difficulty we have had in developing the hardware interface between the microcontroller and the computer. However, we have a program that should theoretically work once we have the hardware interface working. We still need to write the microcontroller side of this program. The software to transform the Gerber file to a TIFF file, and then into a PNG file has also been prototyped. This software that handles this is written in Java, and will be incorporated into our main program but relies on two external programs. These programs are command line oriented, and are thus easy to run, send commands to, and receive info from, directly from Java. The program that handles the Gerber to TIFF conversion is gerb2tiff by Adam Seychell. We will call this program with arguments indicating the location of the file that needs to be transformed, and a parameter setting the DPI of the output image to 1000. The gerb2tiff program supports the use of a user defined file name to save the TIFF image as, but as this will just be a intermediary step we will be using the default mode that simply appends a .tiff to the end of the original file name, extensions and all. For example, if Project.gtl is input as the Gerber file to be milled, the

Page 93: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

89

intermediary file Project.gtl.tiff will be created. So far in our testing of this program, we have not run into any problems with the Gerber to TIFF conversion process. A problem that may arise however is mentioned on Mr. Seychell’s documentation of the program, the entire RS-274X standard is not implemented. The gerb2tiff program will abort and report an error to the main program if the parameters AS, IR, RO, IJ, KO, or SR are contained within the Gerber file. These parameters are rarely used features of the specification, but if the gerb2tiff reports this error we will stop the mill procedure. As of right now, we do not have plans to manual read the Gerber file, and thus the file that the user is trying to import will fail for our machine. The only recourse in this instance for the user will be to use a different CAD program for their circuit layout, produce a PNG file of the correct format, or contact a professional PCB manufacturer. After the conversion from a Gerber file to a TIFF file, the method handling this portion of the code will call another method to handle the TIFF to PNG. This method will call the convert.exe program out of the ImageMagick software suite. We chose this software as it is licensed under the GPL, and thus is free for us to use in our project and is well supported in both code maintenance and tutorials with several books having been written on the suite. While we are planning on using the ImageMagick suite for the foreseeable future, we are not committed to it in any way. Our project is only using a very small part of this advanced software suite, and we do not need anywhere near this level of functionality for what we are doing. Literally, all that we need to do is convert a TIFF image into a PNG image. We have found that the convert.exe binary can run independently from the actual ImageMagick suite. However, to the best of our understanding this would violate the license that the software is published under. Due to this restriction, we will have to actually install the entire software suite on the machine running our Java program. While this is not necessarily a problem, as we are already constrained to a PC running Windows, it does add one extra piece of software that would need to be installed and configured correctly if our control computer is ever replaced. If we are able to locate a program, or have time to design one ourselves, that can convert a TIFF into a PNG image, and can be run as a standalone binary under the GPL, we will switch our project over to use that software. This will allow us to decrease the work load on the maintainers of the project while increasing the portability of the project as well. Currently, we are planning on simply installing the software on the machine and hardcoding the location of the binary into the Java program. This will be an adequate solution as long as the one computer that we setup is the one that always controls the milling machine. If we have time, we will create a software package that can be installed on any Windows based machine. This software package will have a text file that contains the path locations of all of the necessary external programs, such as the Java virtual machine as well as the ImageMagick suite. The text file will allow new versions of the programs that we are utilizing to be installed. This way whoever is the current person servicing the machine will be able to install the files to any location that they wish. The Java program should run on any operating system that has a Java virtual machine installed, however our project will not. This is due to the fact that the way that we are running the external

Page 94: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

90

programs is Windows specific. The programs that we depend on will only run on a Microsoft Windows PC also. For these reasons, the machine that is controlling the milling machine will have to be Windows based. It would be possible to run our project on a different operating system, but substantial changes would need to be made. The changes that are required for our project to run under a GNU Linux operating system are outlined below in Table 13.3: Method currently used Possible solution gerb2tiff program Create or find a program that

does the same conversion ImageMagick program Find a program that can handle

TIFF to PNG conversion that is not Windows specific

jPicUsb program Create a custom interface between Java and the Microchip API that is not Windows specific

Table 13.3: Possible solutions to the Windows dependence

The main changes are shown above, but other smaller changes would also need to be done in the source itself. The changes necessary would mainly be in file handling sections of the code. 13.3 - Software Build We have not begun to make the actual software required for this project. As seen in the Prototype/Test section above, we have only written parts of the code. These parts were mainly for prototyping and testing purposes, to be sure that the methods and external programs that we are planning on using actually work as described. However, putting together this software should take the least amount of time on this project, as most of the work of the design is already completed. All we need to do next semester is to combine the code that we have written into a single project and write a GUI to interface with that code. 13.4 - Evaluation Plan We wish to write robust software, and will therefore need to extensively test our software. This will be accomplished through the use of both black box and white box testing procedures. Black box testing is a method of testing that treats software as a ‘black box’ that is impossible to view inside. This means that the code will be tested with no knowledge of what internal structures, methods, or external programs are being used. We will accomplish this testing by writing some automated software testing programs. These programs will be responsible for checking to see what exactly can break our main program, and reporting that result to us. For each version of code that is accomplished, the testing tools will be run against that code to

Page 95: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

91

ensure that no functionality has been lost. In short, these testing tools will run all possible ranges values into every possible input of the program. This may be somewhat extreme, but it is necessary as we will have a wide variety of technical competence among the users of the machine. To accommodate these testing tools, we will implement a command line version of our program that can accomplish the same tasks as the GUI version. Currently, we do not plan on this being a supported option for the end users, but if time is permitting we will write the documentation and open the ability for them to use our program in this manner. The testing tools that we will run will include a test for multiple instance, a file input test, a file format test, a PNG test, a user access check, and a user file test. These tests will most likely be contained in one monolithic file that simply cycles through them The multiple instances test will make sure that the program does not allow multiple instances of itself to be run. This would cause havoc with the mill procedure if it was done at the wrong time. The file input test will verify that any range of file names can be accepted by the program. The file format test will check to see if a wide range of Gerber files are transformed correctly into TIFF images. We will collect a sample of Gerber files from various CAD software packages to test. The TIFF images will need to be inspected manually. The PNG test will verify that a PNG image that is read in is treated the same as a file that has been transformed from a Gerber file to a TIFF file to a PNG file. The user access check will run all commands available to the user on each user access level and verify that the restricted users can not access the functionality of the higher access levels. The user file test will test an assortment of various premade User files, and ensure that the user can not place drawings to be milled in that location, and that the machine can only access the locations specified in the file. White box testing is a method that relies on knowledge of the internal workings of the software being tested. This testing will use the same testing tools as the black box testing, but will purposefully try to break the system with certain input values. This causes there to be a smaller number of values that need to be tested, and thus allows us to test faster. Furthermore, this test is more important than the black box testing, as these are the cases that we need to find and either prohibit users from accessing or warn the users of the possible consequences and are the most likely to cause problems. The black box testing is only to find errors in places that we did not expect to find them, such as a Java method mishandling a string of a certain length while the white box testing is to verify that we don’t have problems with something such as reading the first value, the last value, and not the value after the last value of an array.

Page 96: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

92

SECTION 14: Security The main focus of the security aspect of this project is the support of the safety of the user, and to a secondary extent the safety of the machine. We will accomplish this through the use of a multi tiered security paradigm. The first level of this security scheme was to be a user access level that is read off of the user’s identification card. Since the identification card was to be a proprietary format that we were going to design for this project it would be difficult for a user to spoof a higher access level than they have been assigned through the use of standard card reader hardware. However, we have since decided to use a user name and password combination for access to the system. The user names will be students NID’s, and passwords will be of the format x####xx where x is any letter and # is any single digit decimal number. The user passwords will be hashed and stored in a file in the directory under the main program. When a user enters their password, this password will be hashed and their user name will be used as a key into a TreeMap. If the value of that location in the TreeMap is returned as the same hash, the user is allowed access to the system and is assigned the access level that is listed in the same file on the same line. To protect this file, we will be implementing a system of dynamic permissions, so that no user can simply open the file and change their access level. Furthermore, we will be running the machine on a copy of Windows XP that has been severely crippled to allow the user to only run our program. The possible user access levels are Standard User, Advanced User, Experienced User, and Administrator. Each increase in access level provides the user with more privileges on the machine, as well as more responsibility. The logs of the machine will contain which user was logged in at the time the event occurred. These logs will be kept on the control computer until the log file folder reaches 100MB, and then the oldest log files will begin to be deleted. Each mill procedure or machine access will generate an individual log file. The name of the log files will in the format YYMoMoDD_MiMiHHSS.log where D represents day, Mo represents month, Y represents year, Mi represents minute, H represents hour, and S represents seconds. The logs will kept for such a long time so that we can hopefully determine who was using the machine at the time that a user preventable, or user caused, error occurred. If that user has an access level that indicates that they should have had the ability to deal with the error, or known better than to cause the error, they will either be demoted in access level or permanently banned from further use of the machine depending on the seriousness of the infraction. The Standard User access level will be what is assigned to certified Senior Design students. This access level will allow the users to open the machine when it is not running and attach their boards to the static portion of the XY table. These users will only be allowed to mill FR-4 boards, and will not be allowed to add additional board types to the machine. We will not be checking the type of

Page 97: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

93

the board that the user enters, but the height of the XY table will need to be adjusted for different board thicknesses. This is done to insure that the surface of the board is at the focal point of the milling laser, and if a different board is added the machine will still run with the FR-4 board height setting. This will most likely result in an unusable board, or at best a board that requires multiple runs through the machine. Additionally, Standard users will not be able to add other users and must strictly follow all safety measures. The next level after the Standard User access level is the Advanced user. These users will not be senior design students, but rather other students that have gone through the milling machine training sometime in the past. These users will have needed to prove themselves as responsible Standard level users, and will almost exclusively be past senior design students that are now working on their graduate degrees. These users will have all of the privileges of the Standard user access level as well as being allowed to modify unique sizes of boards and being allowed to change the selection of different PCB materials. Additionally, Advanced users will not be able to add other users and must strictly follow all safety measures. Experienced users will the users that are responsible for the day to day operation and upkeep of the machine. These users will be ARC members that have agreed to take care of the machine, as well as train new users. They will be able to add and modify Standard and Advanced users, but will not be able to add or modify permissions for other Experienced users. These users will also have the permissions of the Standard and Advanced user access levels but will also be able to add new types of boards to the machine, These users must follow all safety procedures, but they will be able to suggest the laser output power when adding new types of boards. An Administrator must verify and allow this suggestion before it is available for an Experienced user to choose from. The laser power will be held in check by the safety guidelines however, so these users do not accidentally violate them. The last, and highest, user access level is that of Administrator. This access level will only be used by laser experienced service technicians. This is due to the fact that users in this access level can ignore all safety measures. This could potentially cause harm to the machine and to the user, so it will only be issued to people that have demonstrated knowledge and experience of working with high power laser systems and all of the risks that are involved in those activities. Furthermore, all users at this access level will be required to have a liability waver on file with the Amateur Radio Club. The only thing that a single Administrator cannot do is run the machine with one of the covers, explained later, open. This will require for two administrators to log in consecutively. This is to ensure that at least one responsible user is nearby incase the Administrator doing the work is incapacitated in anyway. This could be caused by the fumes coming out of the machine or interaction with the laser itself. For more possible

Page 98: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

94

dangers associated with this machine, see the Safety section of this report in Section 14. The physical security of this project will be accomplished through the use of the external case of the machine. This steel case will be secured to the bottom chassis of the machine through the use of a four separate solenoids. These solenoids, which are attached to the base of the machine, will go into locking holes on the top of the box itself. The external enclosure will be designed this way to ensure that the enclosure can removed for easy access to the internals of the machine. We initially planned to have a hierarchical security scheme. This was going to be comprised of the external enclosure, along with enclosures for the laser subsystem, the XY table, the power systems, and the microcontroller section. The idea behind this scheme was to allow users to access portions of the internals of the machine, but not others. We will have precision optics in this project, along with dangerous power systems, and if something needs to be repaired we did not want that technician to mess with other sections of the project. This plan fell through due to the complexity of securing the boxes inside the main box, and the fact that we decided that this project will stay a student endeavor. The only people that will be working on it will be other students that we trust to not mess with something that they have not been properly trained on. The compromise that we have come upon is that there will be multiple internal boxes inside our main box, they just will not be actually locked to the main case. These boxes with either simply be sitting in the case with some RTV Silicon to secure them, or have been screwed down to the main case.

Page 99: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

95

SECTION 15: Personnel 15.1 – Nathan Bodnar Nathan Bodnar is an undergraduate student working on his B.S. in Electrical Engineering at the University of Central Florida. In 2008, Nathan joined Dr. Richardson’s Laser Plasma Laboratories EUV group, there he works as an undergraduate researcher. In the summer of 2009, he took part in the International REU program with the main emphasis in droplet formation. Current projects that he is currently working on includes a time resolving FTIR spectrometer, building a mass spectrometer, designing motor controllers for the droplet delivery system, and testing new compounds that generate EUV emissions. Nathan’s spare time is spent working on projects ranging form building high-powered lasers to plant tissue culture. 15.2 – David Dowdle David Dowdle is a senior working on his BS in Computer Engineering. He is currently employed with the biology department working on amplifiers for electrostatic disturbances generated by amphibious animals. David’s previously worked under Dr. Chew as an undergrad researcher for packaging of the 70cm transmitters for high altitude experiments. During his leisure time he diligently works with the Amateur Radio Club at the University of Central Florida. Here he works on projects and helps maintain the environment of the senior design lab. 15.3 – Ryan Maticka Ryan Maticka is an undergraduate Electrical Engineering student at the University of Central Florida and expects to complete his courses for Electrical Engineering in the spring of 2010. He also plans to obtain a major in Computer Science and minor in math after the spring of 2010. After graduation, he would like to work for several years and then return to school to complete a master’s degree.

Page 100: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

96

SECTION 16: Bibliography [1] Richards. J. R. "Control of Particulate Emissions," APTI, 1995. [2] D. J. Meier, S. H. Schmidt, and LPKF Laser, “PCB Laser Technology for Rigid

and Flex HDI – Via Formation, Structuring, Routing,” 2002. [Online]. Available: http://www.lpkfusa.com/articles/hdi/pcb_laser_technology.pdf. [Accessed: Dec. 13, 2009].

[3] B. Kelly, C. Hallman, D. Arnold, and R. Weiss, "Project ANGEL,"

Undergraduate Senior Design Project, University of Central Florida, Orlando, 2007.

[4] Red Optics, “KD*P(DKDP) Crystal (Potassium Dihydrogen Phosphate and

Potassium Dideuterium Phosphate),” 2007. [Online]. Available: http://www.redoptronics.com/KDP-crystal.html. [Accessed: Dec. 13, 2009].

[5] Red Optics, “LBO Crystal (Lithium Triborate),” 2007. [Online]. Available: http://www.redoptronics.com/LBO-crystal.html. [Accessed: Dec. 13, 2009].

[6] Red Optics, “BBO Crystal (Beta Barium Borate),” 2007. [Online]. Available:

http://www.redoptronics.com/BBO-crystal.html. [Accessed: Dec. 13, 2009]. [7] Red Optics, “KTP Crystal (KTiOPO4),” 2007. [Online]. Available:

http://www.redoptronics.com/KTP-crystal.html. [Accessed: Dec. 13, 2009]. [8] Red Optics, “Anti-Gray Tracking KTP Crystal,” 2007. [Online]. Available:

http://www.redoptronics.com/Anti-Gray-Tracking-KTP-crystal.html. [Accessed: Dec. 13, 2009].

[9] Batarseh, Issa, “Power Electronic Circuits,” Hoboken: John Wiley & Sons, Inc,

2004. [10] Maxim Integrated Products. “DC-DC Converter Tutorial – Maxim,” Nov. 29,

2001. [Online]. Available: http://www.maxim-ic.com/appnotes.cfm/an_pk/2031. [Accessed: Dec. 5, 2009].

[11] “Thermoelectric Peltier Device Information (TE Heater / Cooler / Generator

Modules) – General Info,” 2009. [Online]. Available: http://www.peltier-info.com/info.html. [Accessed: Dec. 12, 2009].

[12] F. McClung and R. Hellwarth, "Giant Optical Pulsations from Ruby," Journal

of Applied Physics, 1962.

Page 101: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

97

[13] “The Variable High-Voltage Power Supply 0-3kV,” 2008. [Online]. Available:

http://www.elecfree.com/electronic/the-variable-high-voltage-power-supply-0-3kv. [Accessed: Dec. 13, 2009].

[14] ON Semiconductor, “2N3055(NPN), MJ2955(PNP),” 2005. [Online].

Available: http://www.onsemi.com/pub_link/Collateral/2N3055-D.pdf. [Accessed: Dec. 13, 2009].

[15] Microchip, “MCP413X/415X/423X/425X, 7/8-Bit Single/Dual SPI Digital POT

with Volatile Memory,” 2007. [Online]. Available: http://ww1.microchip.com/downloads/en/DeviceDoc/22060a.pdf. [Accessed: Dec. 13, 2009].

[16] OMRON, “PCB Relay G6RL,” 2008. [Online]. Available:

http://www.omron.com/ecb/products/pdf/en-g6rl.pdf. [Accessed: Dec. 13, 2009].

[17] Microchip, “AN822 Stepper Motor Microstepping with PIC18C452,” 2002.

[Online]. Available: http://ww1.microchip.com/downloads/en/AppNotes/00822a.pdf. [Accessed: Dec. 13, 2009].

[18] Microchip, “MPLAB C18 C Compiler Libraries,” 2004. [Online]. Available:

http://ww1.microchip.com/downloads/en/devicedoc/51297c.pdf. [Accessed: Dec. 12, 2009].

[19] Microchip, “PIC18F2550,” Oct. 27, 2009. [Online]. Available: http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010280. [Accessed: Dec. 12, 2009].

[20] Microchip, “PIC18F4550,” Oct. 27, 2009. [Online]. Available: http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300. [Accessed: Dec. 12, 2009].

[21] “C8051F342-GQ Silicon Labs Microcontrollers,” 2009. [Online]. Available: http://mouser.com/ProductDetail/Silicon-Labs/C8051F342-GQ/?qs=sGAEpiMZZMvu0Nwh4cA1wWtRoPcQBaz3BDp7SQlE0jo%3d. [Accessed: Dec. 12, 2009].

[22] “ATMEGA162-16PU Atmel Microcontrollers,” 2009. [Online]. Available: http://mouser.com/ProductDetail/Atmel/ATMEGA162-16PU/?qs=I3kMT7EEIOUre5FsjF6g7A%3d%3d. [Accessed: Dec. 12, 2009].

Page 102: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

98

[23] “MC9S08JS8CWJ Freescale Semiconductor Microcontrollers,” 2009. [Online]. Available: http://mouser.com/ProductDetail/Freescale-Semiconductor/MC9S08JS8CWJ/?qs=t6o%252baWFra1eNwN1CL2tWgw%3d%3d. [Accessed: Dec. 12, 2009].

[24] “USB overview and Plug & Receptacle pinouts,” Jul. 19, 2009. [Online]. Available: http://www.accesscomms.com.au/reference/usb.htm. [Accessed: Dec. 12, 2009].

Page 103: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

99

SECTION 17: Facilities and Consultants Throughout the project the Laser Plasma Laboratories team in the CREOL department helped in generating the burn test required for this project. The staff also helped in simulating the laser cavity and gave thoughts on how to improve the design of the Nd:YAG laser cavity. For the testing of the laser diodes and the calibration of the wavelength of the outputs from the diode will also be done with the LPL team. When first testing the laser diode the laser diode driver will be supplied as well from the CREOL department. This would allow a high accuracy for the outputs of the laser than if the laser power supply that this project is building were to be used. The output power will also be measured with a high powered light meter that will be barrowed through the LPL team.

Page 104: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

100

SECTION 19: Budget and Financing This laser milling machine will primarily be funded by Nathan Bodnar. Some of the supplies may be donated from the Laser Plasma Laboratories at CREOL. The group will also attempt to obtain donations from some of the major optics supply companies, such as Thorlabs and Melles Griot. Some of the parts that cannot be acquired through donations may be obtained from eBay, which will greatly reduce the cost of the parts. For all other parts that cannot be obtained through the above sources they will be purchased from optics companies. The following list outlines the general cost of the parts required for this project.

• Software – free • Parts for XYZ table – $200 • Laser setup

o Q-switch – $60 - $5000 o 808nm Diodes – $600 o Nd:YAG rod – $50 o KTP(KD*P) – $30 to $100 o Directing mirrors – $450 o Lens – $600 o Quarter wave plate – $200 o Polarizer – $400

• Parts for Laser Power Supply – $200 • Parts for TEC Power Supply – $75 • Parts for Q switch Power Supply – $50 • Parts for Stepper Power Supply – $30 • Parts for Power Management Circuit – $50 • Fume controller – $30

Total: $3100 to $8100

Page 105: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

101

SECTION 20: Project Summary The goal of this project is to replace the current milling machine used by senior design students. This machine has a history of being bereft of problems, causing it to almost continually be in a state of disrepair awaiting funding or a particular component. We aim to eliminate the problems that the machine has suffered in the past by radically changing the method that is used in the mill procedure. While the current Quick Circuit 5000 uses a spinning drill bit to remove copper from copper clad boards, we will use a Nd:YAG laser. While there are health and safety issues with the light from the laser and the fumes from the copper, we believe that we can significantly improve the overall safety of the senior design students, while improving the uptime of this resource. Our solution will achieve this through the use of strict user access control, both software and physical, and through the use of an intuitive graphical user interface. Because we are designing this project to be used in an enclosed environment, in a building that is not designed to house high powered lasers, we have had to make some allowances in our design. The most important of these is the air scrubbing system. This is an absolute must, as this machine will be running in an enclosed room in close proximity to students. Furthermore, the air scrubbing system removes the vaporized copper that is being made by the laser. If this is not removed as soon as it comes off of the board, we would very quickly have the inside of our enclosure coated in a layer of copper. We wish to make our project self sufficient, and because the location where this machine will be located has no high powered laser power supplies we have had to design our own supplies that we will incorporate into our main project box. Lastly, there is no chilled building water supply in the Engineering 1 building. We have therefore had to design our own Thermo Electric Cooling system to provide cooling to proper cooling for the laser diodes. We have design a large amount of software based feedback control into this project. The reason for this is twofold, safety and mean time to failure. It is an absolute necessity that we provide a safe environment for users to work in. Therefore, we have designed twenty four sensors into the project that will continuously feed information back to a graphical user interface. Errors happen, no matter how well a system is designed. Because of this, we have implemented a detailed logging system any time there is a system error. These errors may or may not shut down the machine, and may or may not force the machine to stay in an off state until the problem can be resolved. This information will help administrators decide on the best course of action on any errors that might occur. A safe environment for users to work in is also a safe environment for the machine to operate in. We are dealing with very expensive equipment, and we wish for it to last as long as possible. Through the use of judicious safety practices, we will also accomplish our second goal of reducing the mean time to failure of the machine.

Page 106: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

102

APPENDIX A: Copyright Notices A.1 – jPicUsb License

Permission pending A.2 - gerb2tiff License GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software

Page 107: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

103

Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow.

Page 108: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

104

GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but

Page 109: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

105

does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

Page 110: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

106

If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the

Page 111: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

107

integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

Page 112: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

108

MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. $Id: GPL,v 2.0 1998/12/12 08:05:30 roessler Rel $ A.3 – ImageMagick License Licensed under the ImageMagick License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.imagemagick.org/script/license.php Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Page 113: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

109

Figure 9.2: Copyright Notice

Figure 5.6: Copyright Notice

Page 114: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

110

APPENDIX B: Example DRL File M48 ;DRILL file {PCBNEW (2007-07-09)} date 26/3/2009-21:21:07 ;FORMAT={2:4 / absolute / inches / decimal format} R,T VER,1 FMAT,2 INCH,TZ TCST,OFF ICI,OFF ATC,ON T1C0.025 T2C0.032 T3C0.040 % M47 G05 M72 T1 X4.775Y-3.625 X4.425Y-3.325 M30

Page 115: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

111

APPENDIX C: Password Generation Code import java.lang.Math; public class passwordGenerator { public static void main(String[] args) { String alphabet="abcdefghijklmnopqrstuvwxyz"; for (int i=0; i<100; i++) { int ch=(int)(Math.random()*26); String partialPass1=alphabet.substring(ch, ch+1); ch=(int)(Math.random()*26); String partialPass2=alphabet.substring(ch, ch+1); ch=(int)(Math.random()*26); partialPass2 += alphabet.substring(ch, ch+1); int num1 = (int)(Math.random()*9); int num2 = (int)(Math.random()*9); int num3 = (int)(Math.random()*9); int num4 = (int)(Math.random()*9); String numString = num1+""+num2+""+num3+""+num4; System.out.println(partialPass1 + numString + partialPass2); } } }

Page 116: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

112

APPENDIX D: jPicUsb Documentation

Page 117: Laser Milling Machine Group 18 Nathan Bodnar David Dowdle …eecs.ucf.edu/seniordesign/fa2009sp2010/g18/IR.pdf · 2010. 5. 3. · APPENDIX D: jPicUsb Documentation ..... 112. 1 SECTION

113