Skip to content

5. Electronics production

Assignment

group assignment: characterize the design rules for your in-house PCB production process extra credit: send a PCB out to a board house

individual assignment: make an in-circuit programmer that includes a microcontroller : extra credit: customize the design mill and stuff the PCB test it to verify that it works extra credit: try other PCB processes

Design rules for PCB production

We use laser fiber to engrave copper board FR4 (rigid plate with epoxy and fibber glass).

Copper Clad board (FR4) and EPILOG Laser properties.
Copper Clad board in place for engrave.

We use the file bellow to define design rules with this machine. Whit that kind of file we can define the thinest piste we can create and the smallest distance we can have between two pistes.

File we engrave to characterize our process.

Parameters we use :

  • Resolution 1200
  • Fiber laser
  • Raster
  • Speed 10%
  • Power 100%
  • Freq 1
Laser parameters.

We adjust Z height with a standard tool for fiber laser and ajust it at the beginning of engraving. We want to see a green light when the laser hits copper.

Standard tool to adjust Z for Fiber laser.
Green light when the laser hits copper (and no epoxy).

We have made two samples (one with two passes and one with three passes) to characterize them. With only one pass with our laser we don’t pass through copper.

We use ohmmeter to test the two samples after cutting between top and bottom lines because it makes contact between top lines.

The first one with two passes :

  • smallest distance between two pistes : 0.015 inch
  • thinest piste we can create : 0.005 inch

The second one with three passes :

  • smallest distance between two pistes : 0.006 inch
  • thinest piste we can create : 0.006 inch
Result after tow passes. Result after three passes.
Microscope image of the result with two passes. Microscope image of the result with three passes.

Building of an in-circuit programmer : the FabTinyISP

The device we plan to build will become an AVR programmer. We use instructions here to do it.

PCB fabrication with laser cutting

We use laser to engrave and cut the PCB with two files : traces and outline cutout. We try to do it with a lower resolution (600) than before to spare time. It wasn’t a good idea but it permit to see the impact of resolution in our process.

Result with 600 resolution.

We use cutter to cut bridges between pistes and test it to be sure there stay no bridge.

We fix copper with two faces tape without bubble.
Here copper fixed on a heavy plate to be sure it don’t move during engraving because we have to do three passes.
PCB engraving.
Result after cleaning with isopropanol.
Cutting by hand because the CO2 laser don’t pass though material.

Assembling the PCB

I use this components like explained in instructions. I peak them in the lab and I stick them to a sheet of paper with their values next them.

(In order : 3.3v zener diodes - ATtiny45 - 2x1 kOhm resistors - 2x510 Ohm resistor - 2x47 Ohm resistors - red LED - blue LED (instead of the green one) - 2x3 pin header - 100nF capacitor

I solder all the components on the PCB I have build. I use ohmmeter to define the orientation of the LED.

Soldering in progress.
Test of the direction of the LED.
System to maintain PCB in place during soldering.
Pliers used to maintain PCB and USB plug during soldering.

I use multimeter to check for shorts between + and - and between each pin of the microcontroller. Everything was ok.

Programing the programmer

First I put my programmer into the USB plug. The red LED lights. That mean that the target circuit is powered. I use a AtmelICE programmer to program my programmer so I plug them together.

USBtiny plugged on the AtmelICE programmer with the 6 pin header and to the 5V current with USB connector.

I open Atmel Studio Studio and use it to recognize my ATtiny45.

With Atmel Studio I can load program on my card on the flash memories. Here a program to light the blue LED.

Program to light blue LED scribed with C and with Arduino.
Creating .hex with Arduino. The Show Sketch Folder helps us easily to find the exported binary file generated by Arduino.
Loading the program on the ATtiny45.

It works. Blue LED lights. Be careful with the clock fuse to manage the time between two lights.

Now it’s time to program the ATtiny45 to become a programmer.

I download the firmware source code and extract the zip file. I edit the makefile with the name of the programmer I use : atmelice_isp. In terminal program I go to the source directory. I run make and it built a .hex file.

Changes on makefile program opened with Notepad++.
make function to create fts_firmware.hex and files created.
Try to load fts_firmware.hex with control panel. It doesn’t work.
Loading fts_firmware.hex on ATtiny45 with Atmel Studio.

It succeed. Now I make fuses like scribed on makefile. We use a code to select fuse or not.

Fuses informations on makefile program : Extended(EFUSE) FF/HIGH(HFUSE) DD/LOW(LFUSE) E1.

Now I can check if computer detect USBtiny.

USBtiny detected.

After confirming that USBtiny works I set the fuse that disables the reset pin. This will let the chip use the reset pin to program other boards, but will disable the ability for this chip to be programmed again. It’s not easily reversible.

Changing fuse to disable reset pin (HIGH(HFUSE) = 5D).

Then I remove solder bridge.

Solder bridge removed.

To speak with the programmer I have download before some programs like explained here.

I download AVR Toolchain for Windows here and extract the files into C:\Program Files like explained.

AVR GNU Toolchain extracted into C:\Program Files

I install GNU Make and it put some files named GnuWin32. I put them into C:\Program Files (x86)\GnuWin32.

Make and GnuWin32 into C:\Program Files (x86)

I install avrdude find here because the one in the tutorial was 64bit and it doesn’t work on my computer.

avrdude extracted into C:\Program Files

I update my path in “Advanced System Settings”.

C:\Program Files\avr8-gnu-toolchain\bin and C:\Program Files (x86)\GnuWin32\bin and C:\Program Files\avrdude added into the path.

I download Atmel Studio (Microchip Studio) here but don’t use it now. I install Drivers for my programmer with Zadig. I plug my programmer and install driver.

Installing drivers with Zadig.

After all this installation I check with commands and everything was ok. Avrdude successfully found my programmer.

make -v and avr-gcc –version > make and avr-gcc are founded.
avrdude -c usbtiny -p t45 > Avrdude successfully found my programmer.

Test program with programmer

The blue LED lights when the programmer is talking to the target. I use programmer to program Led on an other board. Here is program in C.

#define F_CPU 8000000UL // set clock speed
#include <avr/io.h>
#include <util/delay.h> // for_delay_ms

int main(void)
{
PORTB = 0b11111111; // set port B pins all to output
    while (1)
    {
DDRB = 0b11111111; // send a HIGH to all port B pins
_delay_ms(1000);
DDRB = 0b00000000; // send a LOW to all port B pins
_delay_ms(1000);
    }
}

I generate .hex with arduino program and send it to the board with

Program send to the board.
LEDs flashing because of the program sent.

Other PCB process

Vinyl cutting

We try to use vinyl plotter to do our PCB. We use a petg board quite flexible with adhesive copper.

Vectors drawings.
Cutting parameters.
Removing copper in excess.
Production with vinyl plotter.
Coper cut with vinyl plotter viewed by microscope.

We try to transfer it to another material but it doesn’t work with the tape we have used.

We have to let the copper on the petg. For insulation when we solder we have to add kapton tape between petg and adhesive copper.

Kapton tape on a flexible petg board. Adhesive copper on kapton tape. Copper ready to be cut.

After cutting copper we cut all petg around and solder directly components on copper on it.

Milling machine

Design rules for PCB production by drilling

I use Roland MDX-40A to mill my PCB.

Roland MDX-40A

First I define production rules using the same file than with laser cutter. I try two types of tools for engraving and one for cutting.

Cylindrical tool for engraving.
Conical tool for engraving.
Cylindrical tool for cutting.

We use Vpanel software to drive the milling machine.

Here is the control panel :

Control panel

With arrows you can moove the tray (y) and the mandrin (x and z). You can change the speed and steep of shift by clicking on :

You put the tray under the mandrin and put the tool you choose into the mandrin (1/3 of the tool should be into the mandrin.)

I put the copper on the tray with double-sided tape.

Now it’s ready to calibrate the origin. That for I place mandrin over the place I want to engrave using x and y arrows on control panel.

Z - Origin

You have different ways to calibrate z. - by using a paper - by using the magnet connected to Roland milling machine - by using multimeter - by using mandrin’s keys.

I use a paper 0.1 mm thick and come the tool down by using arrows on control panel. I finish with 1 step when I approach the paper. Step by step. I stop when the tool “scratch” the paper.

I use that to register this position as Z=0 :

I go up the tool and put it where I plan to start milling. Origin of the file (.png) is at the bottom left.

I change the speed : 9000 rpm letting 100% for cutting speed and spindle speed. Rotation per minute is calculated during milling.

Other ways to calibrate z : - by using the magnet connected to Roland milling machine. (video) (photo)

Now it’s ready to cut. You have to download your file you have made with mods :

File we engrave to characterize our process.

I generate code for milling with mods.

We use 1 oz copper (1oz = 0.035 mm). I use a paper (0.1 mm) to do Z origin. That why I use 0.14 mm depth to engrave PCB.

It generate a file (.rml).

We can now go back on V-Panel loading the file by clicking on cut :

Here are results with two different tools :

cylindrical tool (o,4 mm diameter) conical tool (r=0.005 mm and 60 °)
mods parameters mods parameters

conversion table mil > mm

mil mm
1 0.024

A mettre ligne 257 : avrdude -c usbtiny -p m328p -P com2 -U flash:w:blink.hex

m328p is the microprocessor I program with my programmer. com2 is the port USB where the programmer is plug. blink.hex is the program we send in the flash memory of the micro.


Last update: February 5, 2023
Back to top