Week 5_Electronics Production

Assignment

group assignment:
characterize the design rules for your PCB production process
individual assignment:
make an in-circuit programmer by milling the PCB, program it, then optionally try other PCB processes


characterize the design rules for your PCB production process

The machine used: Roland MDX-40

Roland mdx-40

The idea is to understand the different settings of the CNC milling process that could affect the output products. There are many variables in the Milling process setting that could be changed and respectively affect the output of the machine. The settings are:

  1. RPM of Milling Bit is the variable that controls the rotating speed of the milling bit.
  2. Mrilling Bit Diameter is the variable that is directly related to the bit diameter. The bigger the diameter, the less we can achieve thin connecting lines.
  3. Feed Rate is the variable that controls the rate the milling bit moves on the surface of the copper board. Milling the inner lines requires a normal feed rate. However, milling the outer parameter of the pcb required very slow feed rate.
  4. Offset Number is the variable that controls the number of passes the milling bit does over the same path. This setting majorly affects the final product. Paths that are not cut in the first pass most probably will be cut during the other passes.

We started by a Test File we got from the internet, that has different paths of various thicknesses. We tested milling this image using the milling bit of diameter 0.15mm.
The test file was downloaded from the following Link

Before milling the test file we had to create 2 images, one for the internal traces and one for the outline cutout.For that we did the following:

  1. Open the file in Photoshop, and select the white border by the magic wand tool then go to select /expand and hit 5 pixels.Then use the brush tool to paint the selection in black. We did this to make sure that the selection is bigger than the white border and there is no gap between the new black and the old black in the center.
  2. test1
    test2
  3. Now we will save it as the Inernal Traces.
  4. We open the original file (the one that was downloaded) and select the white border , paint it in black then we select inverse to select the other part and paint it in white making sure there is no black part left.
  5. test3
  6. Now we will save it as the Outline Cutout.
You can download these images from the following links:
  1. Interal Traces
  2. Outline Cutout

Now we will calculate the g-code for these images

test4
test5
You can download the g-code used for the test from the following links:
  1. Linetest Traces
  2. Linetest Outline Cutout

The results:

test milling
test milling

The result are not very satisfying, so we decided to do another test with another milling bit diameter 0.4mm instead of 0.15mm

The new g-code:

test6

The new results:

test milling-n0
test milling-n

make an in-circuit programmer by milling the PCB, program it, then optionally try other PCB processes

To build our own ISP(In-system programming) we need the following:

  1. Preparing the Design
  2. Extracting the PCB Layout Image
  3. Producing the G-Code
  4. CNC Milling the PCB Board
  5. Welding the Components
  6. Programming the Microcontroller

1-Preparing the Design

We had different design to choose from , I have decided to use the BRIAN pcb.
The schematic diagram and the PCB layouts are usually done on Eagle software.

PCB

2-Extracting the PCB Layout Image

After finalizing the design on Eagle, the next step is to extract the final layout of the PCB, which mainly represents the location of the different components and the connecting lines between them. The image should be extracted from Eagle in a Monochrome setting, and opened in GIMP or Photoshop to enhance the extracted layout and produce 2 different images:

  1. Image 1 that represents the internal traces of the PCB
  2. Image 2 that represents the outline cutout of the PCB
PCB In my case I download the BRIAN images for the traces and the board outline cutout:
  1. Traces (1000 dpi)
  2. Outline Cutout (1000 dpi)

3-Producing the G-Code

I will use Fab Modules to produce the g-code for PCB milling on the ROLAND MDX-40.
Below are the steps followed on Fab Modules to generate the g-code:

  1. Choose input format and select image (png) that the g-code is going to be generated from
  2. Then select the file from the specific folder
  3. Then go on to Output format and select the format that applies to the CNC machine you are using, in our case it was Roland mill (.rml)
  4. Then select Process and choose PCB traces (1/64) for internal paths and PCB Outline (1/32) for the external cutting.
  5. Then under Output, select the CNC machine you are using, it was a Roland MDX-40. Under speed 4mm/sec for the Internal Traces and 0.5mm/sec to the External Cutout. Change the X0, Y0 and Z0 to save space on copper board used.
  6. Then Under Process, adjust the cut depth which should be 0.1 mm for the internal tracing, and 1.7mm for the external parameter. The tool diameter (milling bit) which was 0.15 mm for the Internal Traces, and 1 mm for the external Cutout.
    The Number of offsets is 4 and the offset overlap used is 70%
    No other adjustments need to be made.
  7. Once the Input, Output, and Process tabs have been adjusted and double checked. Go ahead and press the Calculate button
  8. Then finally click the Save button and save it to the designated folder. It would be saved as an .rml file
You can download the original g-code used for my ISP from the following links:
  1. Traces (1000 dpi)
  2. Outline Cutout (1000 dpi)

4-CNC Milling the PCB Board

After preparing the G-code, the following steps were taken to mill the layout onto the copper board:

  1. First I needed a software that would send the g-code directly to the Roland MDX-40. In my case I used the Drop-Out software to send the .rml file to the CNC machine
  2. dropout
  3. Then go to File and select Print Setup
  4. printsetup
  5. On the Print setup first choose the name of your printer, in my case it was the Roland mdx-40
  6. rolandmx
  7. Then go to Properties and press the Tool tab, the only thing that should be adjusted are the Z Down Position and Z Engraving Pitch both should be at 0.00 mm. The X/Y Speed should be 4 mm/s and the Spindle RPM should be 10000.
  8. tools
  9. Then go on to the Options tab and select Operation Panel
  10. Set the X and Y-axis on the position where you want your PCB to be engraved on the copper board inside the CNC, then press the XY origin SET button
  11. operation panel
  12. As for the Z-axis, we needed to zero the tool at the top surface of the copper board. In order to do this delicate process we need to gradually bring it down onto the board, with the help of a multimeter with the beep mode on and have one of the cables on the copper board and the other on the drilling bit. In this case as soon as the drill-bit touches the copper board the multimeter would beep. Make sure to go extremely slow at the end so you don't risk breaking your drill-bit
  13. multimeter
  14. Once the beep is heard, you know that the drilling bit is right at the surface and you can go back to the operational panel (on Drop-out), and the Z axis is set automatically to zero.
  15. On the Drop-Out application press the add button and choose the .rml file you created and press open
  16. output
  17. Once everything is set press the Output button. Your CNC machine should now start the process of milling/engraving the copper plate set inside. watch the process until its done
  18. I will repeat the same steps for the file of the external cutout, after changing the drilling bit to 1 mm. I should not change the X and Y axis. I just need to reset the Z axis. I don't need to use the electrical tester in this case, I will place a paper under your drilling bit and keep pushing the Z axis down until the paper is not coming out very easily from under the drilling bit
  19. z axis paper
  20. Then go again to Properties and press the Tool tab, the only thing that should be adjusted are the Z Down Position to -1.7 and keep Z Engraving Pitch at 0.00 mm. The X/Y Speed should be 0.5 mm/s and the Spindle RPM should be 10000.
  21. cutout settings
  22. On the Drop-Out application delete the older .rml file and add the cutout .rml and then press the Output button.
  23. output
  24. Check the final result, using a multimeter with the beep setting to make sure components are isolated and all conductivity channels are connected
testing pcb

After finishing my PCB milling I decided to adjust the design by adding my logo and a key hole .
For that I adjusted the initial BRIAN design on Photoshop by doing the following:

  1. Change the 2 images mode from Bitmap to Grayscale to be able to modify them.
  2. Put them together in a single PSD file with 2 separate layers in order to see the modification simultaneously and have the same image size at the end.
  3. Modify the circuit board routing (by painting in black the old unwanted links between the components and drawing white lines for the new routing) in order to add a place for my logo in the middle.
  4. pcbna0
  5. Insert the logo I made on my third week assignment and adjusting the external cutout to include a key hole
  6. Resave the internal traces layer(image 1) and the cutout layer(image 2) on separate files then change the image mode back to bitmap and save.
pcbna

Now I will recalculate the G-code for my new PCB board in the same way I did before.

pcb1
pcb1
You can download the g-code used for my new ISP from the following links:
  1. My ISP Traces
  2. My ISP Outline Cutout

The final result.

pcbna millling

5-Soldering the Components

Obtain the components:

Parts
  • 1x ATtiny45 or 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
Note the components that must be installed in the correct orientation:
- The zener diodes are marked with a line on the cathode side.
- The LED cathodes on the PCB drawing are marked with dots and thicker lines. There is usually a green or black line visible on the cathode side.
- The ATtiny85 marks pin 1 with a dot laser-etched into the corner of the package. Pin 1 is marked in the drawing with a dot as well.
welding

And at each step I test the board with the multimeter to check if there is any welding touching two different circuit and creating shortcut.


After finishing my second ISP. I discovered that after Programming it, the ISP wasn't recognizable as a Usbtiny so I decided to do another one.
I think that the problem was in the quality of the milling and the spacing between the wires was too thin which could lead to some short specially that it is my first experience with soldering.
So this time I will use another bit diameter 0.4 mmm instead of the 0.15mm and make 12 passes instead of 4(to make more clearance between the wires) and finally take more care of the soldering.

The new g-code.

gcode adj

The new milling.

milling adj

The new final one.

final adj
You can download the g-code used for my new adjusted ISP from the following links:
  1. My ISP Traces
  2. My ISP Outline Cutout

6-Programming the Microcontroller

After finalizing all the required hardware components needed to build the PCB, the next step is to download the Software on the ISP.
For that we do the following:
  1. Download and open Arduino IDE software.
  2. In TOOLS, select the port and the Arduino model (Ardiuno UNO).
  3. Connect the Arduino programmer to the PC.
  4. In FILE>EXAMPLES open ArduinoISP and upload it.
  5. Connect the Arduino to the ISP as shown below:
  6. arduino5
    arduinoisb
  7. Download the provided firmware and extract the zip file.
  8. Open the command prompt in Linux and go to the code directory.
  9. Enter the commands to generate a make file:
    • make clean
    • make
  10. Replace the make file with a new make file (modified makefile).
  11. Open the Make file with Brackets and replace MDU=attiny45 by MDU=attiny85 and save the file.
  12. Then Enter the following commands to load the programme on the ISP:
    • make fuses
    • make flash
    software
  13. Now, disconnect your ISP from the Arduino and plug it into the PC.
  14. To test the ISP type 'lsusb' in the linux command propmpt and you should see in the list Multiple Vendors USBtiny
  15. final adj
  16. After verifying that my ISP is recognized I need to reconnect it to Linux and run the command "rstdisbl" ; This does the same thing as the make fuses command, but this time it's going to include the reset disable bit as well
  17. Finally I remove the bridge on the solder jumper and I can use it as programmer

my pcb

<Prev - Next>