I. Design rules of our PCB production process
A. Image editing
- Download the provided black and white image
- Open the image in an image editor (Gimp, or Photoshop)
- Clean the image: Zoom and inspect the image, erase all discontinuities
- Extract two images from the cleaned image:
- One for the internal traces to be milled
- One for the outline to be cut
(Note: The milling machine will mill and cut around the white areas, so the white areas are what will be left after milling and cutting; invert colours accordingly)
- Check the image size in the image editor (in image menu for Photoshop):
Both images should have the same size and be in scale with the PCB.
- Check resolution: It should be high enough (>1000 pdi)
- Save (or export) both images as PNG files in order not to lose resolution
B. G-code generation
- Import PNG image in Fab modules (other formats may be imported for other applications)
- Select the machine type: Our machine is a Roland mill (.rml)
- Select process:
- For the internal traces: select PCB traces (1/64) inch
- For the outline: select PCB outline (1/32) inch
- Check again image size and resolution (it should be as set in image editing)
- Invert colour if needed (if it hasn't been done in image editing)
- Select the machine model: Our machine is MDX-40 model
- 7Select speed (specifies milling/cutting speed):
- For milling: 4 mm/s
- For cutting: 0.5 mm/s
- Set starting position to zero: X0, Y0, Z0=0 (so the milling/cutting will start at 0,0,0)
- Select the cut depth:
- For milling: 0.1mm
- For cutting: 1.7mm
- Select the diameter tool:
- For milling: 0.4mm
- For cutting: 1mm
- Select number of offsets (specifies the number traces per line):
- For milling: We selected 4
- For cutting there is no offset (single line)
- Select the offset overlap (specifies the percentage of crossing between offset traces): 50-70% should be good
- Leave other parameters as default and click the calculate button
- Once the calculation is completed make a visual check to ensure that the number of offset is as set and that there are no unexpected lines (if there are it means that the image was not properly cleaned: go back to step 3 in image editing)
- If all looks good save the g-code file (.rml in our case)
C. Milling machine operations
- Fix the copper board on the milling table with double side duct tape
- Select the milling tool (0.4mm for milling; 1mm for cutting); inspect the tip to check for default or damage.
- Install the milling tool on the machine (care must be taken not to damage the tool to avoid breaking it or loosing milling precision)
- Open the operating software of the machine and add the g-code file for traces to the file list.
- Open PRINT SETUP (in the file menu), and select the machine model (Roland MDX-40)
- Open properties (in print setup window) to view settings in three tabs
- In SIZE TAB: The MDX-40 has a bed of 305x305mm
- In TOOL TAB: Set RPM to 4,500 for milling 10,000 for cutting, then set properties according to the specifications entered in Fab modules. The g-code parameters will give command, but machine settings should be set in conformity with g-code to avoid conflicting settings and for clarity (In particular set the Z Down Position is 0 for milling and -1.7 for cutting).
- In the OPTIONS ATB, open the OPERATIONAL PANEL to position the milling head:
- Position the milling head in XY above the desired starting position and set this position as the zero position in the reference point setting.
- Gradually and carefully lower the milling head on the z axis until the tip of the milling tool touches the copper board. This operation should be done with care to avoid damaging the milling tool. To precisely determine the zero level, we used a multimeter with one probe clipped to the milling tool and the other touching the copper board. Zero the z axis.
- Return to the main menu (the file list menu); select the rml file to be milled and click the output button to launch operation.
- Observe operation and eventually pause operation to inspect the milling precision. In the MDX-40: press view (wait until the head is in stand by position); open the cover, clean up with vacuum, and inspect. If it looks good close and press view to resume. If it looks bad check again the quality of the milling tool and fixation of the board: Make sure the duct tape is placed symmetrically
- Try again. If there is no improvement, go back to step 1 in g-code generation to check and adjust settings.
- When the milling of the traces is done and looks good, inspect the PCB with a multimeter.
- Go back to step 2 and repeat operations for cutting the outline.
The fist test wasn't good, the cuts were not clean because the cut was too deep and and we were using the 0.15mm thread. the z-axis leveling a bit. We should be using a 0.4mm tool (1/64inch) rather than 0.15mm.
Several tests failed with the 0.15mm. We then used a 0.4mm trhead and found the right calibration z-axis, lowering the milling head till it touches the board (beeping the multemerer) and then raising it a notch (2 pushes up). RPM was at 4500. With these settings the result was clean
II. ISP board
A. Making an ISP board
The ISP (In-System Programming) board is a programmer that will enable us to program microcontrollers already assembled in circuit rather than programming them prior to assembly. Our SIP board uses an Attiny85 AVR microcontroller manufactured by Atmel. I drew the diagram and the pcb on eagle. The design is an edited version of Brian's
The milling and cutting process is the same as the one described above for the test board, with the addition of two gcodes for drilling with an 0.8mm and a 1.2mm thread.
The component used for this board are:
- 1x ATtiny85
- 2x 1kΩ resistors
- 2x 499Ω resistors
- 2x 49Ω resistors
- 2x 3.3v zener diodes
- 1x red LED
- 1x green LED
- 1x 100nF capacitor
- 1x 2x3 pin header
- USB-A male connector
After soldering all the components, solder the jumper J1 before programming the ISP.
B. Programming The ISP
The steps for programming the ISP are:
- Download and open the Arduino software (IDE)
- In TOOLS, select the port and the Arduino model (Ardiuno UNO)
- Connect the Arduino programmer to the PC
- In FILE>EXAMPLES open ArduinoISP and upload it
- Connect the Arduino to the ISP as shown below
- Edit the makefile with your IC type, programmer code, and port name.In my case:
Replace the make file with a new make file (modified makefile)
Open the command prompt in Linux and go to the code directory
Enter the commands to generate a make file:
Open the Make file with Brackets and replace MDU=attiny45 by MDU=attiny85. Save file
Then Enter the following commands to load the programme on the ISP:
To test the ISP plug it and type lsusb. You should read Multiple Vendors USBtiny
In windows, In Control Pannel> Devise Manager. You should see:
If the ISP is recognized, the last step is to make its programing irreversible and to set the RESET Pin as GPIO. For that end the command is:
- MCU = attiny 85
- PROGRAMMER = stk500v1
- port = /dev/ttyUSB0