Skip to content

week8. Electronics Production

Assignment

Group assignment

  • characterize the design rules for your in-house PCB production process
  • submit a PCB design to a board house

Individual assignment

  • make and test a microcontroller development board that you designed
  • extra credit: make it with another process

Group assignment

For more information about group projects, please see the group project page on the FabLab Kannai website.
Group assignment page is here

group_work1.jpggroup_work2.jpg

group_work3.jpg

In the environment of FabLab Kannai, the V bit 30 degree End Mill was the most accurate of the following three End Mills, and it was able to cut the copper printed circuit board material.

1/64 Straight bitV bit 30 degreeR0.25 Ball-nose tapered
Traces thicker than 0.12mm are retainedTraces thicker than 0.07mm are retained0.10~0.16mm traces are gradually removed
A little burr occurred (may be due to wear)Almost no burrs occurredA large amount of burrs occurred though it was new
GoodGreat 👍 (At least while new)Not suit for PCB milling

Thank you, Naoki Hayashi-san!

PCB board manufacturing

The process of cutting the PCB board to create the microcontroller development board for FabLab Kannai in the Individual assignment was carried out using a CNC router Genmitsu PROVerXL 4030.

genmitsu_pro_verxl_4030.jpg

Creating data for milling

Using the electronic circuit created in week06, we used Fusion Electronics to create the data for milling. It is necessary to create each file according to the type of cutting work for the CNC router.

  • traces.png: Data for creating circuits by shaving the copper on the surface of the board
  • millholes.png: Data for holes that penetrate all the way to the bottom of the circuit board
  • outline.png: Finally, the data for cutting out the outline of the PCB

Creating traces.png

  1. Create a new layer called “RawPCB” in the right panel.

  2. Draw a rectangle that is slightly larger than the entire circuit.

  3. Display only the layers you need.

  4. Adjust the “SELECTION FILTER” so that unnecessary shapes such as “+” are not displayed.

    export1.jpg

  5. Export as traces.png.

    • Documents > Print > Export
    • Check “Monochrome”
    • Resolution: 800dpi export2.jpg

Create outline.png

  1. In the right panel, display only the “BoardOutline” layer.
  2. In the “SELECTION FILTER”, select Type: “Line”.
  3. Select all (Ctl+A).
  4. Right-click to select “Covert To Polygon”, then select “Copy” > “MillOutline”.
  5. In the right panel, display only the “MillOutline” layer.
  6. Export as outline.png.

pcb_layout1.jpg

Creating millholes.png

  1. Create a new layer called “MillHoles” in the right panel.
  2. Display only the “BoardOutline” layer.
  3. In the “SELECTION FILTER”, select Type: “Circle”.
  4. Select all (Ctl+A).
  5. Measure the diameter of the millhole (3.2mm).
  6. Select the tab “DOCUMENT” > “Grid Settings” and change the “Grid Size” to 1mm.
  7. Set the “Hole Drill” to the diameter (3.2mm) size. pcb_layout2.jpg
  8. Place a Circle on the MillHole.
  9. Select the tab “AUTOMATE” > “Run ULP” and set “drill-aid” to 0.
  10. In the right panel, display only the layer “centreDrill” created in the previous operation.
  11. Change the color of the layer “centreDrill” to gray. pcb_layout3.jpg
  12. Export as millholes.png.

Creating G-code with Mods

Use the mods G-code generator to create G-code.
Right-click on the white canvas and select Program > Open program > machines > G-code > mill 2D PCB.

mods_select.jpg

The structure of the "Mill 2D PCB" page is as follows.

  • A.: Read PNG
  • B.: Set PCB defaults
  • C.: V-bit calculator(if you use V-bit)
  • D.: Mill raster 2D

mods1.jpg

Milling the Traces

mods2.jpgmods3.jpg

Milling the Interior

When you load millholes.png, click the “invert” button to reverse the black and white.

mods4.jpg

mods5.jpgmods6.jpg

G-code file

The following is the G-code file we created this time.

traces.png.nc Download

millholes.png.nc Download

outline.png.nc Download

Controlling a CNC router with G-Sender

The PCB boards are milled using the CNC router Genmitsu PROVerXL 4030 based on the G-code created by GSender.

cnc1.jpg

GSender Settings

  1. Start GSender: Start the software and wait until the CNC router is recognized.
  2. Check the connection:
    • Click the “Connect” button.
    • Select the connected port and click “Connect”.
  3. Secure the material:
    • Secure the material firmly to the workbench. Use double-sided tape.
  4. Set the home position:
    • Set the initial position of the CNC router using the “Zero X” and “Zero Y” buttons.
    • Place a piece of paper between the material and the End Mill, and lower the End Mill until the paper stops moving, then lower it a further 0.1mm.
    • Set the initial position of the Z-axis using “Zero Z”. cnc2.jpg

Start milling

  1. Import G-code file:
    • Select “Open File” to load the G-code to be used for the machining.
  2. Preview check:
    • The G-code preview will be displayed, so check the working range and cutting depth.
  3. Set speed and progress:
    • Adjust the cutting speed and spindle speed in the “Settings” menu.
  4. Start cutting:
    • Press the “Start” button to begin milling.
    • While cutting, check the CNC router's operating status and remaining time on the GSender screen.
cnc3.jpgcnc4.jpg

WARNING

If you do not pay attention to the following points before starting the milling process with GSender, the milling process may stop partway through.

  • Close any other applications other than GSender.
  • Connect the power supply and set it so that it does not go into sleep mode.
  • Use the official USB adapter.

Soldering components to the PCB board

Solder the components to the PCB board using surface mounting.

Preparing the work environment

  1. Organize the workbench and make sure you have enough space to fix the components and the board in place.
  2. Ensure good ventilation so that you don't inhale any fumes from the solder.
  3. Set the soldering iron to the appropriate temperature (usually around 300℃ to 350℃).
  4. Clean the tip of the soldering iron with a sponge or cleaner to remove any oxides.

soldering1.jpg

Part positioning

  • Place the parts in the corresponding locations on the board.

soldering2.jpg

Soldering

  1. Put a small amount of solder on one of the lands on the circuit board in advance.
  2. Grab the chip component with tweezers and place it in the correct position (as close to the center of the pattern as possible).
  3. Hold the component in place with tweezers, and hold the soldering iron in the other hand to temporarily fix the side with the pre-applied solder.
  4. Join the other side of the component to the soldering iron and solder.
  5. Reheat the temporarily fixed side to finish the soldering.

soldering3.jpg

Programming

Connect the soldered PCB board to a USB cable, and use the development environment Thonny to program in the programming language MicroPython. The aim is to make the LED on the PCB board light up only when the tact switch is pressed.

Installing the firmware

Upload the latest MicroPython firmware (RPI_PICO-20241129-v1.24.1.uf2) to the XIAO RP2040. Download the firmware from the official website, and write it to the RP2040 in boot mode.

TIP

Uploading using Finder didn't work, but uploading the firmware using the cp command from the terminal did work.

MicroPython code

The LED is turned on only when the tact switch is pressed.

from machine import Pin

# Pin settings
button = Pin(4, Pin.IN, Pin.PULL_UP)  # Tact switch: pull-up resistor enabled
led = Pin(3, Pin.OUT)                 # LED: Output mode

while True:
    if button.value() == 0:  # When the switch is pressed (LOW)
        led.value(1)         # Turn on the LED
    else:
        led.value(0)         # Turn off the LED

You can see that the LED in the lower left corner is lit up only when the tact switch is pressed.

Afterthoughts

  • It's a great feeling of accomplishment to make your own PCB board. I was really impressed.

  • It was difficult to solder the surface mount components on the PCB board. My fingers shook.