Skip to content

8. Electronics Production

Assignments

Here you can find a recording of the lecture from the 12th of march.

This week's assignments and learning outcomes, see here:

Group assignment:

  • Characterize the design rules for your in-house PCB production process: document feeds, speeds, plunge rate, depth of cut (traces and outline) and tooling.
  • Document the workflow for sending a PCB to a boardhouse
  • Document your work to the group work page and reflect on your individual page what you learned

You can find the documentation for our group assignments here.

Individual assignment:

  • Make and test a microcontroller development board that you designed

Questions to be answered/from Nueval:

Have you answered these questions?

  • Linked to the group assignment page
  • Documented how you made the toolpath
  • Documented how you made (milled, stuffed, soldered) the board
  • Documented that your board is functional
  • Explained any problems and how you fixed them
  • Uploaded your source code
  • Included a ‘hero shot’ of your board

Hero shot

Hero shot from group assignment

Milling test

Hero shots from individual assignment

All parts souldered

Testing logo

Here I wanted to see if I could mill my logo on a PCB board

Summary

This week we characterized our in-house PCB production in our group project. We also described the workflow for sending a PCB to a boardhouse. We documented the results on our group page and you can find it here.

In the individual assignment I produced the PCB board that I designed in week 06. Then I programmed it to see if it was functional.

Work process detail

Capacitor needed to be moved

Capacitor had to be moved

This week I wanted to produce the PCB that I designed in week 06. Then Svavar Konráðsson sent me this image to explain that I did not position one of the capacitors at the right place. It should have been closer to the LED and positioned between the plus and minus on it. I also had to make sure that the Micro-usb was accessable.

Capacitor to be moved

Moving Capacitor in PCB editor

This meant that I had to go to the PCB editor, move the capacitor and wire elements again. There always seemed to be some crossing of the wires. I complained about this to Svavar Konráðsson but he explained that tracks could go under the LED, so tracks would not cross each other.

Tracks crossing

Exporting Gerber files

Exporting from the PCB editor

When the design is ready in the PCB editor you click on File, then Fabrication outputs and then Gerbers. If you write f.ex. "Gerbers" in the Output directory, click on Plot and then the files will be saved in a folder named "Gerbers".

Converting Gerber files to PNG

Fab Lab Kerala made this Gerber2PNG website. You can drag your Gerber files onto the website. Then you choose Top trace under quick setup and click on Generate PNG. Then you choose Top cut under quick setup and click on Generate PNG. When the .png images were ready, it was time to continue in Fab Mods and mill the board.

The MonoFab SRM-20

When I milled the trace test in the group assignment, I documented all the process in the group assignments here. I followed the same process when prepairing the job in Fab Mods and milling the board in the MonoFab SRM-20. I will repeat most of it here, so that everything is clear.

The MonoFab SRM-20

We have a MonoFab SRM-20 milling machine in our Fab Lab Austurland. It is usually used for milling PCB boards but according to this site it can mill all kinds of things.

MonoFab SRM-20

Preparation for milling

In this video by Andri Sæmundsson it is shown how to mill the board by using Fab Modules here. Andri Sæmundsson was not using a MonoFab SRM-20 like I was, so I also watched this video by Fab Lab Barcelona here.

Andri Sæmundsson was using Fab Modules but we use Fab Mods, a newer edition, for setup before cutting and milling in the MonoFab SRM-20 machine. The Fab Mods website is used online. Here you can see an overview of Fab Mods. It looks very complicated but is very simple when you begin using it.

Overview Fab Mods

Using Fab Mods

Choosing the right machine and what to create

I opened the website and right clicked on the screen for this window (upper left photo) to open up.

Then I chose Programs and clicked on Mill 2D PCB which was under SRM-20 mill (lower left photo).

Opening program

Choosing the right machine and what to do

PNG in Fab Mods

The first thing you do is look at the left on the screen and choose if you want to use .png or .svg and here you can see the .png. When you have chosen the .png image that you use for the milling test it appears in the window you can see on this image. The next step is to look at the settings in the window below (to be continued here below...).

Fab Mods

PNG in Fab Mods

Then you click on the size of the endmill you want to use. Here I clicked on the 1/64" traces when I milled the traces but when I cut the outline I clicked on the 1/32.

1/64 for traces or 1/32 for outline

No offset

The offset was not used when milling the board. After adjusting all settings the Calculate button was clicked and the program showed a small preview of the traces. In the next tab on the browser an image of the traces appeared and you could see how the traces would be milled.

No offset/calculate

Fab Mods calculated the path to travel

Here you can see how the MonoFab would travel when milling the traces.

Path

Milling in the MonoFab SRM-20

The Vpanel

You use the Vpanel to control the MonoFab SRM-20. You use the arrows to move the spindle around. You can control if you want to move it fast or if you want to move it in small steps by choosing between Continue, x100, x10 or x1. When you have put the endmill you want to use in the machine, you lower the endmill until it almost touches the plate. Then you loosen it and lower it carefully until it touches the plate. It is good to use one finger to press on the side of the endmill, so that it won't fall down. Then you click on the Z for setting the zero point for the Z-axis. Press the plate down while doing this.

The next step is to set the x- and y-axis. You move the endmill to the starting point and then click on the xy for setting the zero point.

The Vpanel

Move a few millimeters up

Make sure to move the endmill a few millimeters up above the material before turning the spindle on, so that the endmill isn't touching the material when it starts spinning.

Adding a job

In the Vpanel you click on Cut. Then a window openes up. You begin by clicking on Delete all to remove former jobs and then you use Add to fetch the job you want to be done. You only do one job at a time. First I milled the traces, then I cut the outline.

Vpanel - adding a job

Milling the traces

Souldering the board

Souldering was not easy

I had all kinds of problems when souldering. I used too much tin, sometimes the soulder melted and touched areas that it should not be connected to and it was also hard to fasten small elements.

Souldering iron not warm enough

I used this souldering iron and did not realize that I could adjust the head with the small yellow knob. This caused the tin not to be warm enough and therefore it did not melt as it should.

Souldering iron

Heat settings on souldering iron

Souldering station gave more heat

When I switched to using this souldering station, it was much easier to soulder. The tin melted as it should and the result was silvery looking tin but I was still using too much tin.

Souldering station

New board in case the first one would not work

When I began souldering and it did not go well. I decided to mill another board just to be ready to begin all over with the souldering if the first board would not work. I had also noticed that the track at the top wasn't straight so I decided to fix this before milling the next board. Additionally, I wanted to see if I could add my logo to the board.

PNG in Fab Mods

When I added the .png for the logo in Fab Mods, all I got was a black image. Svavar Konráðsson pointed out that the .png had a transparent background and that was the reason for this. When I made the background white, it worked as it should.

Logo with transparent background

Paths not good enough

Fab Mods created this path for the logo that the MonoFab SRM-20 was going to follow. I did not notice that the path did not create rectangles around the name as it should have done. I only noticed it when the board was fully milled. I need to find out why that happens.

Logo

Path for logo

Board with logo

Here you can see the new board fully milled. I didn't use it because the first board worked well.

Testing logo

Measuring the continuity of the traces

After souldering all components to the board the continuity of the traces were measured with a Multimeter. Everything seemed to be connected the right way.

Checking the continuity of the traces

The third hand

The third hand can be useful to hold things in place. Here you can see how I used it for probing when I was taking a video.

The third hand

Programming the Raspberry Pi Pico

I need to understand better how coding works and Svavar Konráðsson pointed site out where he and Þórarinn Bjartur Breiðfjörð had explanation on how to program LEDs. Svavar Konráðsson explained the codes and showed me how to change them.

One LED changes colours

A code for one LED to change colours

I copied this example from Nicolas Decoster. It controls one LED. I used it to see if the board and LED was working.

from machine import Pin

from time import sleep

from neopixel import NeoPixel


np_power_pin = Pin(11, machine.Pin.OUT) # XIAO neopixel power is on Pin11

np_pin = Pin(0)                        # Pin to control neopixel (signal)


# Power the neopixel

np_power_pin.high()

pixels = NeoPixel(np_pin, 1) #only one pixel led


colors = [

  (0xff, 0x00, 0x00),  #RED

  (0x00, 0xff, 0x00),  #GREEN

  (0x00, 0x00, 0xff),  #BLUE

  (0xff, 0xff, 0x00),  #YELLOW

  (0x00, 0xff, 0xff),  #TURQUOISE

  (0xff, 0x00, 0xff)   #PURPLE

]


color_n = len(colors)

color_index = 0


while True :

  for color in colors:

    pixels.fill(color)

    pixels.write()

    sleep(0.5)

Using code from Nicolas Decoster to control one LED

Two LEDs light up

Telling two LEDs to light up

The next step was to learn how to control more than one LED. Svavar Konráðsson explained how to create this code and it tells two LEDs to light up in the same colour.

import neopixel
from machine import Pin
import time

pixPin = 0  # Numper of pin
pixSize = 2  # How many LEDs
pix = neopixel.NeoPixel(Pin(pixPin), pixSize)  # Initialization

blue = (0,0,255)
blue = (0,0,255)

while True:
    pix[0] = blue
    pix[1] = blue
    pix.write()  # Tells the LED to perform the command

Both LEDs blue

Two LEDs change change colours

A code for two LEDs changing colours

Svavar Konráðsson helped me write this code and it makes two LEDs blink in two different colours.

import neopixel
from machine import Pin
import time

pixPin = 0  # Numper of pin
pixSize = 2  # How many LEDs
pix = neopixel.NeoPixel(Pin(pixPin), pixSize)  # Initialization

yellow = (255,255,0)
red = (255,0,0)

while True:
    pix[0] = yellow
    pix[1] = red
    pix.write()  # Tells the LED to perform the command

    time.sleep(1)
    pix[0] = red
    pix[1] = yellow
    pix.write()  # Tells the LED to perform the command
    time.sleep(1)

Two LEDs switching red and yellow

Results: The board is functional

The board is functional

Using the codes to control the function of the LEDs and seeing that the LEDs do as they are told, tells me that the board is functional!

Learning outcome

Learning outcome from group assignment

I learned so much about all the important details when prepairing a job and performing it in the MonoFab SRM-20. I also learned a lot from testing the traces. The copper foil can come off the board if the traces are too thin, so it is important not to make them too thin. I also learned that it is important make sure that the plate is carefully fastened in the machine before beginning to mill, also between jobs on the same plate.

Learning outcome from individual assignment

I learned how capacitors work and that it is important to place them on the right spot when I had to fix this on my board. I ran into problems with crossing tracks and I learned that traces can go under elements like LEDs.

The souldering did not go well, but I hope that I will do better the next time I will soulder. I learned that it is important to use enough heat when souldering and both the components and the board need to be heated up. I also learned that it is good to put a tiny little spot of led and then heat it up to fasten the components in one spot to begin with. Also that it is good to begin by fastening the small components first and then the bigger ones.

The image below is an interesting documentation of a remote lesson. Svavar Konráðsson took this photo and it shows how he is assisting me with the MonoFab milling machine in a remote lesson. The distance between our hometowns is almost 900km by car, so it is brilliant to be able to participate in Fab Academy this way.

Remote lesson

Design files

Files for Wokwi-Raspberry Pi Pico and NeoPixel LEDs

Wokwi files for Raspberry Pi Pico and one NeoPixel LED

Here are the files for one NeoPixel LED connected to Raspberry Pi Pico. LED is programmed to change colours. The settings were done as in the example from Nicolas Decoster and the code was copied from him.

Wokwi file - NeoPixel LED and RPP

Wokwi json file - NeoPixel LED and RPP

Wokwi txt file - NeoPixel LED and RPP

Code for Raspberry Pi Pico and two NeoPixel LEDs turning blue

Here is the code that tells two LEDs to turn blue.

Two blue LEDs

Code for Raspberry Pi Pico and two NeoPixel LEDs blinking yellow and red

Here is the code that tells two LEDs to blink yellow and red.

Code for two leds blinking red and yellow

Files for the first PCB board

Here are the files for the first board that I milled.

Traces first board

Outline

Gerber files:

1-gbr

1-Edge_Cuts.gbr

1-job.gbr

F-Cu

Files for the extra PCB board

Here are the files for the extra PCB board that I milled. The outline is the same as in the first board.

Traces

Outline

Gerber files:

top

Job

Edge_Cuts

F_Cu

Files for logo on PCB

Here are the .svg and .png files for the logo that I milled on the extra board.

Logo on PCB - .svg

Logo on PCB - .png