Milling Machine for PCB Manufacture

From CEITWiki

Revision as of 16:38, 22 February 2013 by S4232516 (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Milling Machine for PCB Manufacture
By Eric Peng
Mike Reed
Worked On Summer 2012-13
Project Status Complete

The CEIT PCB Milling Machine was developed for students at the University of Queensland to have a cheap and fast method of prototyping printed circuit boards for team projects and other research based projects.


Contents

How to Make a PCB

The following section outlines how to make a PCB using CEIT's Milling Machine.

Design PCB

Firstly, download Cadsoft Eagle (if you have not done so already)

Design your custom PCB Using Cadsoft Eagle as per usual. However, when designing the PCB, please keep in mind some of the limitations of the machine.

The following limitations must be considered when creating the board in Eagle:

  • Maximum board size 12.6x6.3cm
  • Single sided PCB only (no bottom layer or vias)

Generating G-Code

Once a complete PCB design is completed in Eagle, G-code must be generated from the Eagle board file. G-code is a unique code which the milling machine firmware can read and actuate the machine. Therefore it is imperative to generate G-code before proceeding. There are two methods of generating G-Code. The two methods are PCB-GCODE or Cad.py. The instructions are each of these are outlined below.

PCB-GCODE (highly recommended)

This Eagle add-on is a very good tool in developing G-code from circuit boards designed on Eagle


The follow instructions outline the procedure to generate G-Code from your Eagle design.

  • 1. Download the PCB-GCODE ULP Script and install as per instructions. (Can be downloaded here: http://www.pcbgcode.org/)
  • Enter your board design on Eagle and open the PCB-GCODE ULP script which you have installed.
  • Edit the PCB-GCODE settings (Generation Options and Machine Options). The important options which must be editted are:

In 'Generation Options'

    • Isolation Default, Maximum, Step size
    • Etching Tool Size (set to the diameter of mill bit inserted in milling chuck)

In 'Machine' Options

    • Set Units = Millimeters
    • Spingle Spin Up Time: 3
    • Z-High, Z-Up, Z-Down, Drill Depth, Drill Dwell
    • Set Feedrates: XY 100mm/min, Z 500mm/min


  • Save G-code file (.tap extension) in a folder where you can easily locate

Example Screenshot:

File:PCB-Gcode screenshot.jpg

Cad.py (Generate from image only)

This is another G-code generator software. However, PCB-GCODE on Eagle is the much preferred method.

General process:

1. Obtain image file

2. Feed through cad.py (generates g-code)

3. Send through gcodesender

File:Ssv2 cad.py .png

Simulating G-Code (Optional)

Simulating G-Code is an optional but recommended step. This process ensures that the G-Code generator has created usable and reliable g-code.f Example G-Code Simulators Include:

NC-Plot

Upload G-Code file extension (.gcode, .tap) Opens in a new window

File:Pc plot.PNG

Photo Courtesy of: Hackerspace http://hackerspace.pbworks.com/w/page/48330990/Designing%20PCBs

Cam-Bam

This is another G-code simulator which can be used.

The link is in the resources sections.

Setting up Apparatus for Mill

  • Apply blank copper board with double sided sticky tape to the platform
  • Connect USB

Sending G-Code to Firmware and Start Milling!

To start milling, simply install the Universal-Gcode Sender software


Universal G-Code Sender

Download the program. Make sure the arduino Uno com port is installed on your computer

Make sure you plug in the machine with USB

Once connected, execute the universal g-code sender program.

From here, in the 'Command Mode' section, type: $H. This homes the machine to zero and this step is vital and essential everytime before milling.

Then, enter 'File mode' and find your generated G-Code from Eagle in your file system.

Then press send to START MILLING

Design

Mechanical Design

Mechanical Artwork for frame: The frame work was produced by a laser cutter.

File: MILL3D MODEL.png

File:IMG 1191.JPG

Electrical Design

Electrical Components:

3 x Bi-polar stepper motors 42BYGHM809
3 x Big Easy Drivers v1.2 (schmalhaus.com/BigEasyDriver)
2 x 4 legged RGB LED
6 x Limit Switches
1 x Arduino Uno
1 x 12 volt power source
3 x 220 Ohm Resistors (for LED)
6 x 10k Ohm Resistors (for limit switches)
1 x H Bridge
1 x Hex Inverter
3 x 0.1microF Capacitors (for noise reduction)
Carbide End Mills 0.8mm - 1mm


Arduino Uno GRBL Connections:

File:Grbl Pin Diagram.png

PCB Design

After functionality of the machine was fully tested, a printed circuit board design was developed. All electrical components of the milling machine would be designed as an Arduino Uno shield with the 3 Big Easy Drivers mounted on the top side of the PCB

File:PCB Milling Machine v1.0.png

File:IMG 1622.JPG

Implementation

Mounting Box

Electrical Connections

Software Implementation

The aim of the software implementation component of this project is to create g-code from an Altium file which is then streamed (through a g-code sender) to the Arduino. Here, the Arduino, working with grbl will actuator the motors and spindle to etch out a PCB board from a blank copper sheet. In order to do so, a couple of simple steps is required to set up the software. The following process demonstrates the general functionality of the software implementation of the current design

  1. Download grbl
  2. Compile grbl
  3. Flash grbl to Arduino
  4. Adjust grbl settings
  5. Finalise PCB Design on Eagle
  6. Generate G-Code from Eagle
  7. Stream g-code to arduino
  8. Run

Firmware (GRBL v0.8)

The firmware installed on the Arduino Uno is GRBL v0.8. Grbl is an open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that is capable of running straight off an Arduino board. GRBL software is downloadable from their github site: https://github.com/grbl/grbl


Compiling GRBL

1. In command prompt (cmd):

2. navigate to grbl folder (when downloaded)

3. type: make clean

4. type: make grbl.hex

Flashing GRBL to Arduino Uno

1. Plug Arduino into PC via USB connection 2. Install driver for the Arduino Uno (For windows: http://arduino.cc/en/Guide/Windows#toc4) 3. xLoader is the programmed used (downloadable from: http://russemotto.com/xloader/) 4. Open xLoader 5. Upload the .hex file from the GRBL folder that you have compiled (see Compiling GRBL above) 6. Once this is completed, the GRBL file will have successfully been flashed to the Arduino.

GRBL settings

The settings used for my CNC Milling Machine are as follows:

$0=2456.000 (x, step/mm)
$1=2456.000 (y, step/mm)
$2=2456.000 (z, step/mm)
$3=10 (step pulse, usec)
$4=20.000 (default feed, mm/min)
$5=500.000 (default seek, mm/min)
$6=192 (step port invert mask, int:11000000)
$7=25 (step idle delay, msec)
$8=10.000 (acceleration, mm/sec^2)
$9=0.050 (junction deviation, mm)
$10=0.100 (arc, mm/segment)
$11=25 (n-arc correction, int)
$12=3 (n-decimals, int)
$13=0 (report inches, bool)
$14=1 (auto start, bool)
$15=0 (invert step enable, bool)
$16=1 (hard limits, bool)
$17=1 (homing cycle, bool)
$18=224 (homing dir invert mask, int:11100000)
$19=25.000 (homing feed, mm/min)
$20=700.000 (homing seek, mm/min)
$21=100 (homing debounce, msec)
$22=5.000 (homing pull-off, mm)

Problems, Solutions and Current Limitations

1. It was orginally test on the EtherTen (supposedly Uno Compatible Board from Freetronics). I found that 2. grbl 0.8 has homing

The electrical component of the design was first tested using chipKit Uno32. However, this board was not compatible with grbl and therefore was later not further used. In one of the preliminary design stages, the spindle control was activated using: 1 x TIP120 MOSFET 1 x Diode (for MOSFET) 1 x 2.2k Ohm Resistor (for MOSFET)

Fixed Issues

  • Get G-Code Sender
  • Check G-code hardware output (used NC Plot, Cam Bam) (G-code simulators)
  • Obtained Blank Copper Boards (FR4)
  • Electrical Mount (PCB is currently being shipped)
  • Try to obtain FR4, CEM1 Copper material for easier cutting (paper based instead of fibre-reinforced (FR4)) (Not available online)

Current Issues

The following section is indicative of the further improvements and additions to functionality that still needs to be implemented.

  • 0.8mm carbide end mills frequently snap on FR4 material when cutting too deep
  • Carbide end mills cannot be secured tightly into the existing rigid coupling (Micro-chuck ordered from overseas)
  • Heat issues (Mini Heat Sinks ordered)
  • LED

Limitations

  • Due to the physical limitations induced by the mechanical design of the milling machine, it is only capable of milling prototype boards of maximum 12.6x6.3cm
  • Currently the minimum track width is constrained to 0.8mm due to the end mill used

Bug Logs

Current issues with the design: As of 27/11/12

  • Unable to load grbl hex file with xLoader (currently flashed to Arduino using Ubuntu)
  • g-code interpreter unable to demonstrate any form of visible functionality (currently using Circle G-code examples)
  • 6 limit switch pin layout needs to be minimized to 3

10/1/13: Bug Update:

  • All previous bugs have been fixed
  • $H, M3, Disconnect, $X, Run

7/2/13 Bug Update:

  • High noise susceptibility with PCB (possible fixes capacitors for noise reduction, higher value pull up resistors)

Alternatives Considered

Other alternatives to the Arduino Uno/grbl considered were:

Building the controller around the architecture of a Sanguinololou with Marlin and execute off Pronterface.

Design Images and Videos

Testing Stage (Video):

Youtube link: http://www.youtube.com/watch?feature=player_embedded&v=wmre5PYL6Zc


Electrical Design Development Image:

File:Development Image.JPG

Finished Arduino Shield PCB:

File:Finished Arduino Shield.JPG

Final Construction (without Mounting Box):

File:Final construction without mounting box.JPG

Final Design (with Mounting Box):

File:Final design with mouting.JPG

Completed Stage (video):

Youtube link: http://www.youtube.com/watch?feature=player_embedded&v=6zRelE_qVc8

Future Developments, Possible Improvements and Additional Features

  • Implement vacuum to the final design
  • Double sided PCB Capability

Additional Resources

The following links were extremely helpful throughout the construction of the milling machine.

Datasheets

Resources

Cad.py: http://sourceforge.net/projects/cadpy/
Cadsoft Eagle: http://www.cadsoftusa.com/
NCPlot: http://www.ncplot.com/
CamBam: http://www.cambam.info/
PCB G-Code: http://pcbgcode.com/
Github for grbl: https://github.com/grbl/grbl/wiki
MTM Snap: http://mtm.cba.mit.edu/machines/mtm_snap-lock/
Universal G-Code Sender: https://github.com/winder/Universal-G-Code-Sender

Reflection

Personal tools