Skip to content

Electronics Production

Goals

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

Individual assignment:

  • Make and test a microcontroller development board that you designed

Prior Knowledge

Electrical engineering and designing through KiCAD. I’ve milled basic circuits in EDM1.

Projected Timeline

  • Wednesday
    • Start group assignment
    • Start individual assignment
  • Thursday
    • Finish group assignment
  • Friday
    • Work on individual assignment
  • Saturday
    • Document
  • Sunday
    • Document
  • Monday
    • Finish individual assignment
  • Tuesday
    • Plan for next week

Actual Timeline

  • Wednesday
    • Start group assignment
    • Finish group assignment
    • Start individual assignment
  • Thursday
    • Work on individual assignment
  • Friday
    • Work on individual assignment
    • Start and finish group
  • Saturday
    • Work on individual assignment
  • Sunday
    • Work on individual assignment
    • Document
  • Monday
    • Work on individual assignment
  • Tuesday
    • Finish(?) individual assignment

Group Assignment

I was in a group with all the other girls.

You can see our documentation on our group site. I was assigned cut depth using outlines.

Individual Assignment: LED Board

Milling

While I’ve done this process, I needed a slight refresher in details such as settings and bit changes. Conard Hull helped me out with the initial mill.

Export Gerber files

I used the Gerber feature in Fabrication Outputs to export the files to the Fab Lab’s Google Drive folder. I also generated drill files and considered that the main distinction between PTH and NPTH was the depth of the cut into the copper. We favored PTH in my freshman engineering class, which determined my choice. I chose the front cut, edge cut, and PTH hole file and exported them to the Fab Lab’s Google Drive folder. I could access the files on the milling computer after.
alt text

Prepare and Mill

I measured the dimensions of the copper sheet using calipers, which were 115127.2.7 millimeters. After taping the sheet to the surface and jogging the machine, I generated the Gcode. To follow our lab procedure, I changed the trace depth setting to 1.5 mm. I entered the 1/100th bit instead of 1/64th, as Conard explained that his boards typically worked with this substitution. However, when milling, I realized that this would not translate to smaller boards. Mr. Budzichowski informed me that the circuit would not work with the current wire spacing and component placement.

At this point it also occured to me that I never milled the silkscreen layer with text and images. I now figured that this was beyond the scope of the circuit. Still, I found the KiCad experimentation beneficial.

Note: for the bits we were given, each measurement corresponds to a color. - Green: 1/16 - White: 1/32 - Purple: 1/64 - Multicolored: Engraving .005

Re-Mill

Mr. Budzichowski explained my issues with the limited amount of circuit space and the proximity of wires to components. After correcting these changes, I exported the updated PCB.
alt text
After re-doing the milling process, the board milled successfully. The wires were spaced properly with a layout that confused me at first, as I was not used to surface-mount pads, although I quickly adapted by referencing the PCB schematic.
alt text

Solder

Since I’m inexperienced in surface-mount soldering, the process took longer than intended. Still, there were no issues and the layout turned out clean and workable.
alt text

Of course, it then turned out that I cannot use headers when the rest of the board is surface mount. Or I - can - but really ought not to, because I somehow managed to melt it to the point that I could not remove the solder. I plugged it and the Arduino port simply didn’t connect, I presumably fried it.

Deciding to Design a Different Board

I decided I was spending an unnecessary amount of time on this board. I would instead design the servo board for my drawbridge in KiCad. This new design is more complex with less references, with an extra CAD component; I imagine this would prepare me with boards similar to the previous one fairly well.

Individual Assignment: Drawbridge Mechanism

Planning

I more or less already knew the intent of this week, that is, to create a potentiometer system that controls the speed of a servo motor. It must turn 90 degrees at controllable, reasonable speeds before I create a CAD mechanism around it.

TinkerCAD

Wiring

I found a potentiometer template that I adapted to a servo mechanism. I used a capacitor and transistor to handle the flow of current.
alt text

Coding

I used the original code for the pinouts and added another pin for the potentiometer. I also included the servo library and used the servo as an object in the system. I embedded the C++ code below. While comments were given, I went more in-depth with the ones I added.

#include <Servo.h>

Servo myservo;

int potPin = 26; // The signal pin for the potentiometer.
int potVal = 0; // The current read of the potentiometer using analog pins.    
int delayVal = 0; // Controls the speed of the servo rotation.
int pos = 0; // The angular position of the servo, currently at 0 degrees.     
int direction = 1; // The servo rotation direction, 1 is forwards and -1 is backwards.

void setup() {
  myservo.attach(3); // The signal pin for the servo is 3.
}

void loop() {
  potVal = analogRead(potPin); // Reads potentiometer value.            
  delayVal = map(potVal, 0, 1023, 1, 50); // Maps the reading to corresponding delay ranges of the servo.  

  myservo.write(pos); // Rotates the servo to a given angle.                 
  pos += direction; // Position increases based on direction.                           

  if (pos <= 0 || pos >= 90) { // The direction reverses when the angle falls in a certain range in order to keep moving back and forth.
    direction = -direction; // Direction reversal.                    

  delay(delayVal); // Delays by the value that the potentiometer read specifies in order to control speed.                          
}
}

Breadboard

I figured I would first work a breadboard to ensure that the wiring transferred to real life. Placing the signal wires properly took a minute, although the rest went smoothly. Attached below is a video of myself spinning the potentiometer to speed up and slow down movement. Note that this would translate to the drawbridge mechanism, and myself reducing the difficulty for my questionable putting skills.

Wiring Chart

Even though I already used the information that ChatGPT provided, now that I had a TinkerCAD simulation, I could make my own list of pinouts. I would transfer these to KiCAD.

  • Potentiometer

    • Terminal 1 - GND
    • Terminal 2 - 3.3V
    • Wiper - A0
  • Resistor (220)

    • Terminal 1 - D6
    • Terminal 2 - GND
  • Servo

    • Power - 5V
    • GND - GND
    • Signal - D9

KiCAD

Components

I first added the components required for the circuit to function properly. The TinkerCAD tutorial informed me of these. I also added the No Connect flags and global neighbors to avoid repeating the DRC incident.
alt text

Wiring

Since I already mapped the connections, I just need to wire accordingly and double-check.

With the potentiometer wiring, I ensured that I was attaching the wiper to the PWM pin, since I almost misplaced the wire by following the terminal numbers. I kept in mind that the wiper in KiCAD has an arrow.

I changed a few connections as well to simplify the layout.
alt text

Run DRC

The first DRC showed me errors based on the global labels and input pins. I referenced my previous documentation and detached the power symbols from the corresponding pins, which eliminated those errors.
alt text

I made a schematic with the microcontroller, servo, and potentiometer. The board passed the ERC.

I transferred this to a PCB and confirmed the success of the DRC.
alt text

Three More Re-Mills

I originally meant to do this with multiple headings, but the number of re-mills became depressing.

The first one milled well initially, then the depth of the bit did not align, and the milling simply trailed off.
alt text The second had ripped traces and the thickness measurement seemed off, with jagged lines of copper.
alt text

The third worked! Mr. Dubick offered suggestions as to why the boards had these issues. Also, Angelina Yang helped me out lots with bit choice and insertion, as well as some general advice. An engraving bit as opposed to the 1/64 bit let the machine reach those extremely small areas. While I managed to lift the board and break it, creating outlines has proven unfortunate. Albeit preserving the same material thickness, the bit dug into the bed at one point. I frantically pressed Stop. I still have no idea how this happened, but will update when (if?!) I find out.
alt text

Source Code

I simply used the TinkerCAD code.

#include <Servo.h>

Servo myservo;

int potPin = A0;      // analog pin connected to potentiometer
int potVal = 0;       // raw analog value
int delayVal = 0;     // mapped delay value
int pos = 0;          // current servo position
int direction = 1;    // 1 = forward, -1 = backward

void setup() {
  myservo.attach(3);  // attach the servo to pin 9
}

void loop() {
  potVal = analogRead(potPin);                   // Read pot value (0–1023)
  delayVal = map(potVal, 0, 1023, 1, 50);         // Map to delay range (smaller = faster)

  myservo.write(pos);                            // Move servo to current position
  pos += direction;                              // Step in current direction

  if (pos <= 0 || pos >= 90) {
    direction = -direction;                      // Reverse direction at ends
  }

  delay(delayVal);                               // Delay controls speed
}

Voila!

After many trials and tribulations, the servo did, in fact, function using the code above.

The thing is that while the board certainly works, and adjusts to potentiometer values, the soldering could be better. It delivers steady current, but isn’t as efficiently wired as is ideal for the final project.

Reflection

Group Work

I milled a circuit to test cut depth using the outline. Doing so involved importing the image and following standard milling procedure.

Positives

Accomplishing the circuit and seeing the servo movement was definetly a highlight. Now that there’s momentum, re-milling and continuing will be easier with previous successes in mind.

Negatives

There were errors, such as the outline depth, that I have still not quite solved. Also, while my KiCAD routing is much more intutitive, the first sketch and simulation gets a bit complicated. I can easily transfer designs, I’m still developing the ability to create them.

Takeaways

I do not think I overestimated or underestimated the overall difficulty. Future Fabbers reading this, please take this next bit with a grain of salt, as everyone has a different experience!

Personally, I found KiCAD wiring much easier than I thought, and producing the circuit much harder. Interestingly, though, the inverse begins to happen when I practice. The more I understand these circuits, the more intricate and detailed the wiring seems, and the more straightforward milling seems. At the end of the day, the machine does execute a limited array of fed commands, while the initial wiring opportunities are abundant. This means more complex circuits have room for error.

What I’m getting at though, for anyone who was as confused as I was, is to put a bit more faith in your electric skills, and a little less in the integrity of your traces. If TinkerCAD, breadboards, the ERC, and the DRC checks it off - they might not feed you the truth about every single component, all the time, but you’re… probably fine. Just use PTH files for holes, mill, add pin headers, test your components independently, and be VERY careful with your circuit. They are quite delicate, and you are not off the hook until you pry it off the bed, keep it safe in a box - taking it home in a bag risks damage through scraping - solder neatly onto the traces, do not burn anything, and keep the soldered components intact. I’ve made enough errors that it’s second nature to remind myself.

Make sure one stage works before you move on. This could be as detailed as testing over ten pinouts for continuity, or as simple as making an LED blink in TinkerCAD. If you succeeded, that is progress, and that means you still did better than you did yesterday.

Files

PCB

Schematic
PCB

Gerber

PCB Front Layer
PCB Edge Cuts
PCB Drill Files

Arduino

Code


Last update: May 29, 2025