570 likes | 729 Views
Laser PCB Milling Machine. Group 18 Nathan Bodnar David Dowdle Ryan Maticka. Project Overview. The system will be capable of laser etching copper coated printed circuit boards (PCBs) for the purpose of rapidly prototyping senior design projects The system will consist of:
E N D
Laser PCB Milling Machine Group 18 Nathan Bodnar David Dowdle Ryan Maticka
Project Overview • The system will be capable of laser etching copper coated printed circuit boards (PCBs) for the purpose of rapidly prototyping senior design projects • The system will consist of: • High powered green laser • Custom software • XY plotting table • Safety mechanisms 2
Project Motivation • Current milling machine used by senior design students has had numerous breakdowns • We replaced the current milling machine with a more reliable system that is capable of running without continuous user input • Design and build our own high powered green laser 3
Project Goals and Objectives • Capable of producing a quality result in less time than is required to ship out a PCB to a professional manufacturer • Capable of vaporizing copper in just a few pulses of a laser • Capable of burning through the fiberglass substrate with the laser alone • Capable of handling FR4 copper clad PCBs • Capable of milling warped boards 4
Project Goals and Objectives • Safe, most specifically in the area of eye and lung safety • Capable of accepting a Gerber file from a mainstream PCB layout software program • Capable of accepting boards to be milled in PNG format • Capable of interfacing with a computer through two USB ports 5
Project Specifications & Requirements • Capable of milling a 12 in x 12 in board • Resolution of 1 mil • 1 mil = 1/1000 in • Beam waste of 1 mil or lower • Software is protected through the storage of hashed user passwords (SHA-512) 6
Project Specifications & Requirements • Require 512 MB of main memory (computer) to run after everything else for the maximum supported file size (12,000 x 12,000 pixels) • Implement a call and answer protocol for the interface between the computer and the microcontroller through the use of 64 Byte data packets 7
Safety • User safety • Laser being ran as a class one • Enclosed laser subsystem • Equipment safety • Housing to protect equipment from the vaporized copper by product of the mill procedure 8
Laser Safety • Desirable to run the system as a class one laser • Laser safety glasses (Five OD as per ANSI Z136.1 standard) still required when testing and calibrating the laser • Needed to classify the laser as a class one: • Protective housing • Interlocks on the housing • Service access panel • Equipment labels 9
Energy (mJ) Burn Testing Minimum amount of Energy needed: 0.7mJ for 20ns @ 532nm 10
Laser • Previous Design • Second harmonic Nd:YAG Q switched laser • Generating second harmonic inside laser cavity is more efficient than outside cavity • Output: • Energy: 9 mJ • Pulse: < 40 ns
Laser Cavity • Folded cavity Design • Q switched • 808 nm Diode Pumped • Output: 532 nm • Nd:YAG (end pumped) 12
Laser Cavity Simulations • With 80 W input = 30 W @ 1064 nm • ~12 W @ 532 nm CW • Pulsed: 4 mJ @ 13 ns • ~307 MW duty 0.0013% 13
Main Main Computer Computer USB USB USB USB USB USB USB USB AC Power AC Power AC Power AC Power Laser Laser Laser Laser Thermal Electric Cooler Thermal Electric Cooler Thermal Electric Cooler Thermal Electric Cooler Power Supply Power Supply Power Supply Power Supply Cooling Lines Cooling Lines Cooling Lines Cooling Lines Thermistor Thermistor Wire Wire Thermistor Thermistor Wire Wire Cooling Cooling Cooling Cooling Flow Flow Flow Flow Laser Diode #1 Laser Diode #1 Laser Diode #2 Laser Diode #1 Wire Wire Wire Wire Cooling Lines Cooling Lines Cooling Lines Cooling Lines Laser Block Diagram 14
Current Laser System • Laser diode problem • 808 nm diode ran at 800 nm, and Nd:YAG has acceptance region of 0.6 nm • To work, the diode must be heated to unsafe operating temperatures • Flash tube based system • Advantages • Higher output power from oscillator • Fewer shots to burn through • Disadvantages • 2% efficient at best • Low duty cycle • Maximum: 100 pulses per second • Realistic: 1 pulse per second • Shorter mean time to failure compared to diode system
Flash Tube System • 15 J electrical input power generates 100 mJ of 1064 nm light • Flash tube based amplifier • Single pass amplification • Focusing lens creates focal point • Focused light passes through KTP crystal twice via highly reflective mirror to produce 532 nm • light hits mirror that reflects 532 nm and transmits 1064 nm • 532 nm transmitted to XY table via mirrors and 1064 nm stays in laser section
Previous Q Switch • Pockel Cell • Fast Switching Characteristics < 1ns • Voltage Rating: 3-5 kV • High Laser Power Operation • Crystal: KD*P • Polarization Dependent • Alternative Q Switches • AOM modulator • Mechanical • Saturable Absorber 17
Q Switch PSU Block Diagram • Generates 0 - 5 kV output • Generates pulses with minimal delay • Emergency Shutoff capabilities 18
Q Switch • Current Design • Saturable absorber • Laser cavity < 10 cm long, so no pockel cell • Saturable absorber is 3 mm long
Stepper Motor Controller • Stepper Controller • Full bridge MOSFET driver • 120 micro-steps per full step gives 0.0075° per step Stepper Motor • 0.9° rotation per step • Holding Torque: 30 oz-in • Unipolar 20
XY table Previous Design Current Design • Threaded Rod Design • Requires material to move • Requires double the area to travel • Belt Driven with linear bearings • Moves the mirrors and not the material • Requires only 6” extra for head travel 21
Laser Power Supply • Previous Design • Specifications • Input: 120 V AC, 60 Hz • Output: 0 - 5 V DC, 60 A • Output voltage ripple < 1 mV • Current controlled • Current monitoring • Temperature monitoring
DC to DC Converter • Choices: • Linear regulator • Low efficiency • Large size • Thermal problems • Switched-mode DC to DC Converter • Buck converter for voltage gain < 1 • Adjusting PWM will control voltage and current output 23
Switching • Choices: • Bipolar Junction Transistor (BJT) • Pros: High current carrying capability • Cons: High driving power, Low frequency • Metal-Oxide-Semiconductor Field-Effect Transistor (MOSFET) • Pros: High frequency, low driving power, low losses • Cons: Low current carrying capability, lowered efficiency at high voltage • Insulated Gate Bipolar Transistor (IGBT) • Pros: High current carrying capability, High reverse voltage blocking • Cons: Lower frequency and higher switching losses than MOSFET 24
Switching • Problem: • MOSFETs carry low current • Solution: • Use MOSFETs in parallel • High current • High switching speed • Low driving power 25
Synchronous Switching • Low Power • Blocking diode can handle low power • High Power • Risk of diode breakdown from high stress • Power losses on diode is large compared to using a MOSFET • Replace diode with MOSFET controlled by secondary PWM 26
Pulse width modulation (PWM) changes duty cycle of MOSFETs Choices: Microcontroller detects output and controls PWM to main MOSFET LT1339 buck/boost converter controller instead of microcontroller More features for better control Added circuit uses potentiometer to control current output Converter Control 27
Thermoelectric Cooling +12V PWM • Peltiers cool the laser diodes to desired temperature • ATX PSU: 12V DC • PWM controls MOSFET to control the power to each peltier • Temperature monitored via thermistor on peltier • TEC not used in current design 29
Current Laser Power Supply • Specifications • Input: 120 V AC, 60 Hz • Output: 730 V DC • Flash tube system not susceptible output voltage and current ripple • PWM controller • Switching: 17 kHz • No thermoelectric cooling required for laser
Boost Converter • IGBT chosen over MOSFET because: • Better than MOSFET when voltage is over a few hundred volts • Discontinuous conduction mode (DCM) • Generates larger peak current compared to continuous conduction mode (CCM) • Double converters for faster current response • Regulating Pulse Width Modulator (UC3526)
Snubber • Active snubber for increased efficiency • LC circuit stores power that would be turn-off losses on main IGBT • Secondary IGBT delivers to the energy output
Microcontroller • A different microcontroller will be used to control each part of the project • Needed to be able to do: • Pulse Width Modulation (PWM) for micro-stepping • Low cost • Easy to implement • Large repository of example code • Easy to reprogram (USB) 34
Microcontroller • Which programming language for the microcontroller? • Choices: • C • Assembly • We chose C, as we are the most familiar with it, and there is a large body of software already written for the PIC18F2550. Furthermore, Microchip offers the ability to blend C and Assembly in our source files, so we can get the advantages of both languages 36
Software Design Decisions • Which programming language to use? • Vector or raster mill? • Directly support Gerber files? • Directly support TIFF images? • How should we communicate with the microcontroller? • How should we control security? 37
Software Design Decisions • Which programming language for the computer program? • Choices: • C, Java, C# • We chose Java as we are the most familiar with it other than C, and it is much easier to create GUI’s in Java. C# would have interfaced with our microcontroller easier, but we were not as familiar with it as Java, and we wanted to cut down on development time so that we could have more time to debug and test 38
Environment • Window Builder Pro to produce the GUI • Eclipse to integrate everything together • To account for the 12,000x12,000 pixel size that could result from the convert operation, 512MB of memory was allocated to the JVM • This could be optimized if we were to use the JAI to tile the TIFF images, and read each tile separately. 39
Software Design Decisions • Vector or raster mill procedure? • Vector: follow the outlines of each object until you come back to the beginning of the object • Pros: Shorter mill time, less movement of XY head • Cons: more complicated algorithm • Raster: scan left and right across the area to be plotted • Pro: simple algorithm • Cons: longer mill time, more movement of XY head 40
Software Design Decisions • Directly support Gerber files? • Would allow for easier implementation of Vector milling • Specification is too complicated for the scope of this project • Use gerb2tiff (external program) to convert the input Gerber file to a TIFF • Use the output as a raster mill input 41
Gerber File Example G01* X6890Y40388D02* G03* X6500Y40550I-390J-388D01* G01* X6889Y40389D02* G03* X6500Y40550I-389J-389D01* G01* X81876Y18000D02* G03* X83624Y18000I874J1250D01* G01* X78376D02* G03* X80124Y18000I874J1250D01* G01* X82012Y10000D02* G03* X82012Y10000I-2013J0D01* G01* X76013Y552D02* G03* X76050Y750I-513J198D01* … … continues %ADD22R,7.000X2.000*% %ADD23R,24.000X17.000*% %ADD24C,1.800*% %ADD25R,1.800X1.800*% %ADD26C,2.000*% %ADD27C,2.200*% %ADD28C,1.600*% %ADD29C,1.200*% D10* X18192Y29200D02* G03* X17896Y29381I-942J-1200D01* G01* X16805Y30473D02* G03* X16073Y31205I-1305J-573D01* G01* X8012Y50000D02* G03* X8012Y50000I-2013J0D01* %FSLAX43Y43*% %MOMM*% G71* G01* G75* G04 Layer_Physical_Order=1* G04 Layer_Color=255* %ADD10C,0.250*% %ADD11R,3.000X1.800*% %ADD12R,4.700X3.810*% %ADD13R,0.720X1.800*% %ADD14R,4.060X3.810*% %ADD15R,3.810X6.350*% %ADD16C,1.000*% %ADD17C,2.000*% %ADD18C,2.200*% %ADD19C,0.600*% %ADD20C,0.254*% %ADD21R,8.400X1.800*% 42
TIFF and Machine Code Result • The Gerber file from the pervious page creates this TIFF file through the use of the gerb2tiff program • This TIFF file is then used to create the PNG file that Java will use Representation of the Gerber file that will be used to control the milling machine Format: <laser on/off> <distance to move> 1 364 0 99 1 132 0 98 1 463 0 211 1 1203 0 38 1 35 0 76 1 98 0 31 1 2462 0 39 1 35 0 38 1 24 0 28 1 639 0 28 1 1908 0 2 1 365 0 99 1 130 0 99 1 463 0 211 1 1202 0 38 1 35 0 78 1 96 0 32 1 2461 0 39 1 35 0 38 1 26 0 27 1 639 0 28 1 1908 0 2 1 365 0 100 1 128 0 99 1 464 0 211 1 1201 0 38 1 35 0 80 1 94 0 32 1 2461 0 39 1 35 0 38 1 27 0 27 1 112 0 415 1 112 0 28 1 1908 0 2 1 366 0 100 1 126 0 100 1 464 0 211 1 1200 0 38 1 35 0 81 1 94 0 32 1 2460 0 39 1 35 0 38 1 28 0 27 1 112 0 415 1 112 0 28 1 1908 0 2 1 366 0 101 1 124 0 101 1 464 0 211 1 1199 0 38 1 35 0 83 1 92 0 32 1 2460 0 39 1 35 0 38 1 29 0 28 1 110 0 417 1 110 0 29 1 1908 0 2 43
Software Design Decisions • How should we communicate with the PIC18F2550? • Initially: Send large amounts of data to PIC, with no response • Final choice: Send individual commands, wait for acknowledged response before sending another • Slower method, but we are using a very small amount of our available bandwidth at any one time, and the latency is low enough to be negligible compared to the rate of dots/s where 1dot = 1/1000in 44
Software Design Decisions • How should we control security? • Option1: None • Check the user’s input password against a plain text file • Not really an option, we need user access level control • Option2: Encryption • Encrypt the user’s password, and check against the inserted password • Difficult to implement • Option3: Hashing • Hash the user’s password, store the hash, and create a new hash based on the inserted password. Verify that they match. • Easy to implement, and mathematically impossible to construct the password from the hashed value 45
Software Design Decisions • How should we control security? • Option3: Hashing (SHA-512) • Can’t just store the user’s password • Need to store the user’s access level also • Therefore, store hash(<access_level>+<password>) • then compute the four possible hashes based on the current password that has been entered into the system and assign the user the correct access level • Access Levels: None, Standard, Advanced, Experienced, Administrator 46
Optimal Control Path Main Program User Login Main GUI Select File Translate Image Console GUI Main GUI Standard User Experienced User Administrator User mill() 47
Main GUI 48
Read Input File • Convert the Gerber file to a TIFF (gerb2tiff.exe) • Convert the TIFF file to a PNG (convert.exe, Image Magick suite) Runtime rt = Runtime.getRuntime(); pr = rt.exec(String toRun); • We did not want to have to write our own Gerber parser, so we used the gerb2tiff program • Java will not natively handle TIFF files, so we used the convert program • JAI library was deemed to add too much complexity to this project 49
Mill Procedure • mill(String fileName) procedure called • checkReady() • Is the laser on? • Have any errors occurred? • loadPreprocessedFile(String fileName) • If errors occur, exit gracefully to calling procedure which will handle the outcome • loadSettings() • Set how fast the XY head will move over areas where the laser will be on or off • traverseXY(int xy, int laser, int distance) • int xy determines which MCU to connect with, laser determines whether the laser will be on or off and thus how fast to move the milling head, and the distance determines how far to go with this one command • moveXY (int xy, int laser, int distance) • sends the actual commands to the respective microcontroller • returns a boolean to traverseXY(…) depending on whether the mill operation for that movement command was a success or not 50