Skip to content

4. Electronics Production

The is the topic for the fifth week, since the same topic of Week 3 and Week 4.

Overview

We’re learning how to fabricate our own PCBs (printed circuit board) this week. Creating the board with a very precise milling machine and learning how to solder teeny-tiny components on top of it.

Assignments

Our tasks for this week are:

Group assignment:

  • characterize the design rules for your in-house PCB production process

Individual assignment:

  • make and test a microcontroller development board.
  • extra credit: personalize the board
  • extra credit: make it with another process

Group Assignment

Click here to group work.

We use 晶研 CNC 数控雕刻机
Here is the product manual
alt text alt text

Following shows what I’ve learnt from the group work:

Instructions for use of engraving machine

Processing process of engraving machine Step 1: Fix the material to be processed on the machine with the corresponding fixture. Generally, thin plates are fixed with double-sided tape, 46 brand is fixed with a vise, and special-shaped workpieces are fixed with a special fixture.
alt text

Step 2: Clamp the tool to the spindle motor. When clamping the tool, it is necessary to pay attention to the specifications of the clamped tool to be consistent with the programming time, and the tool should be locked with a spindle wrench. After the tool is clamped, it is necessary to check whether the tool will deflect, otherwise it will lead to poor quality of the processed product and the occurrence of tool breakage during processing.
Step 3: Initialize the equipment. Open the control software Mach3 on the computer, turn on the power switch of the machine, and use the “Estop” button on the handwheel to cancel the alarm state.
Step 4: Use the handwheel to set the tool. Switch the machine to the handwheel control state, use the X, Y, 2 buttons on the handwheel to switch the corresponding axis, use the forward/reverse rotation of the hand pulse to control the forward/reverse movement of the machine on the current axis, use the “Speed” button on the handwheel to control the speed of movement, and move the center of the tool tip of the machine to the processing coordinate origin set during programming (for the convenience of tool setting, it is generally set at the four corners or center of the material during programming). For example, when programming, we set the origin at the lower left corner of the material, so we use the handwheel to align the center of the tool tip with the lower left corner of the material (the spindle should be turned on at 30% speed during tool setting to prevent the tool from breaking during tool setting. You can refer to the tool setting video in the U disk)
Step 5: Switch the machine to the computer control state and confirm the software If the “Emergency Reset” button in the lower left corner does not flash, click “X Clear”, “Y Clear”, “Z Clear”, “A Clear”, and click “Load G Code”. A pop-up window will appear to load the G code. Select “A11Files” as the file type and find the G code you generated and load it in. After loading, the corresponding simulation path will be displayed in the upper right corner of the software window (if no simulated path is generated, it means that the loaded G code is wrong or not recognized). Step 6: After the program is read in, adjust the spindle speed to 80%~100% (the spindle speed is set according to the processing material), and then click “Cycle Start” and the machine will start processing. If you need to adjust the processing speed during processing, you can control it by pulling the bar in the feed bar.

Additional Notes for Global Evaluation - The characterization of the design rules of your machine

The characterization of the design rules of a machine is usually done by milling this file. Here is an example. alt text

And we have two types of tools in our lab. alt text

According to the group assignment requirements, we need to produce the following tool heads to test PCB circuit boards. Under the guidance of our teacher Salman, we used 1/64 for trace mill test; 1/32 for holes(drills) and edge.And we got these results:

alt text

Since we are using 1/32 bit for drilling and edge processing, we should use at least 16 mil trace width, these parameters will be used later when we work on the schematic with Kicad.

Names and functions of each component of the equipment

alt text

Common functions of the software

alt text

Common material processing parameters

alt text

Individual Assignment

To make and test a microcontroller development board.

Terminology - microcontroller development board

A microcontroller development board is a printed circuit board (PCB) with a microcontroller or microprocessor mounted on it, along with other hardware components.

I am going to make the Quentorres show in Neil’s class.
alt text

Click here to download the Quentorres all source file .

alt text

Note 1 - what is the difference between these 2 versions:

This is the chip patch: alt text

This requires the use of 2.54*7.1H vertical female header (2.54*7.1H 立贴排母), name is Conn PinHeader1x03 P2.54mm Horizontal SMD. alt text

Note 2 - What are these holes for?

alt text

Allows you to access the chip from the back of the board for later functional development.

Note 3 - Why do we sometimes need to tape the PCB?

Have you seen the metal dots on the chip? In case your hand shakes and the metal dots stick to other lines on board, causing a short circuit or wrong connection.

alt text alt text

Let’s make a microcontroller development board!

Generate Gerber

Open the .kicad_pcb file, Kicad; KiCad Library; alt text

File - Fabrication Outpus- Gerbers(.gbr)
alt text

Set Output directory - Generate Drill Files; alt text alt text

To generate trace file - click Plot;
alt text

Gerber to PNG:

Click HERE

Upload all files: alt text alt text

Click ‘Quick Setup ’ to generat Top trace file- drill file - cut file in order: alt text

Download all files: alt text

PNG to G-Code:

Visit mos ;

For Trace PNG to G-code

Upload png Trace File and set dpi as 1000.
alt text
Set ‘tip diameter’ as 0.4 mm and click ‘send calculated settings’
alt text Click ‘calculate’
alt text

For drills PNG to G-code:

alt text

alt text

alt text

For edge cut PNG to G-code:

alt text
in case broken the tips of V-bits/ tapered bits, slow down the speed to 2mm/s:
alt text
Click ‘calculate’:
alt text

Done:
alt text

CNC Mill the Board !

I use 晶研 CNC 数控雕刻机
Here is the product manual
alt text alt text

Fixturing (固定木板)

  • Use tape to fix the board,in this way, the board can be drilled better, so does the copper wire. alt text
  • holds the board

Tools

V-bits

alt text
In my case, I use 20*0.2 bit for trace;
alt text alt text
I use this for drills & edge cut:
alt text
It was supposed to look like this, but it is 0.8 mm drill. alt text

alt text

Use Mach3Mill:

alt text

Press ‘Estop’ button to active/disable the Spindle; Use Handwheel/Hand Controller to control the position of the Spindle by adjusting X/Y/Z axis (horizontal / vertical/lifting)
alt text alt text

CNC Machine Controller : Here, the button to switch ‘Hand controller’ mode and ‘PC Control’ mode.
alt text

Import G-Code and Generate Toolpath

To mill trace - drill - outline in order.

  • Import G-code
    alt text
    -‘s3’ to create tool path:
    alt text alt text

  • Finish Milling !!!! alt text

  • Sand Paper to remove hairy part of the copper.
    alt text
  • Finish !!! alt text

Use a multimeter to test the circuit board for short circuits

alt text When the red and black test pens are connected, a “Di” sound is emitted, indicating that the circuit is connected. alt text

Soldering components to the PCB

Components :
alt text
alt text
alt text alt text

Note 4 - Direction of LED soldering on the circuit board

alt text alt text

Other components are soldered according to this schematic: alt text

Seeed Studio XIAO RP2040:
alt text

Embedded Programming

For more details about Embedded Programming, please check Week 6 - Embedded Programming ; Test week6;

Embedded Code- Functions that I want to realize and its principle

Once the switch is pressed, D1 is activated (the level is pulled high), and the electrical signal is transmitted to the D1 pin. Then the MCU controls the operation of other components through the program written on the chip. In this example, I want to light up the 3 LEDs corresponding to the DO, D6, and D7 pins;

alt text

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(D1, INPUT);
  pinMode(D0, OUTPUT);
  pinMode(D6, OUTPUT);
  pinMode(D7, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  int buttonState = digitalRead(D1);

  if (buttonState == HIGH) {
    // 如果按钮被按下,点亮所有LED
    digitalWrite(D0, HIGH);
    digitalWrite(D6, HIGH);
    digitalWrite(D7, HIGH);
  } else {
    // 否则,熄灭所有LED
    digitalWrite(D0, LOW);
    digitalWrite(D6, LOW);
    digitalWrite(D7, LOW);
  }            // wait for a second
}
  • Upload program to MCU board:
    alt text

  • Test the Result :

Hero Shot

alt text