Objectives For This Project:
Utilize KiCAD's schematic and PCB layout tools to design a functional through-hole PCB, incorporating essential components like LEDs, resistors, and connectors
Master the process of translating KiCAD designs into physical PCBs (how to export correct files from KiCAD)
Setting up the milling machine, using the Bantam software to guide the milling process, and ensuring the quality and precision of the milled board
Demonstrate competence in through-hole soldering techniques, effectively assembling and "stuffing" PCBs with required components, ensuring secure and electrically sound connections
Develop and upload a basic program to control traffic light's sequence
Understand basic programming constructs, and the integration of hardware and software in an embedded system
Project Overview:
This project mainly centered around the PCB boards we designed. In the A Cold Solder unit, we were given a board and only soldered components, whereas in this unit we ventured more in depth into design work. Based on the board, a code was generated, components were soldered on, and a 3D casing was designed and printed. The PCB board was designed in KiCAD 7.0 starting in the Schematic Editor, and moving on to the PCB editor when blocking out the traces. When it came to printing, it was critical to understand the process of using Bantam milling machines. Next, using an online generator, a code was generated so that the LED's would light up as expected of a stoplight. Going forwards, everything was a refresh of previous project. We designed a stoplight case in Fusion 360, as we did in Plane and Simple, and 3D printed that design. The purpose for the project was to introduce us to the new processes pertaining to our PCB boards while also freshening previously learned concepts through the stoplight case.
About Milling Machines:
Three-axis CNC machines are used for many workflows in product development
From low fidelity to high & support any volume of part production from individual
Able to cut most materials softer than steel (most often Delrin, HDPE, aluminum wood, and wax)
Small parts (gears, enclosures, small-scale models, name plates)
Molds (room temperature casting of rigid or flexible parts, injecting molds at scale)
Printed Circuit Boards (PCBs)
Workflow For Milling Machines:
Milling the PCB using Othermill and Bantam Software:
Turn on the Othermill milling machine
Open Bantam Tools Desktop Milling Machine Software
(Going from top to bottom) Start with the initial setup
Load your material onto the Othermill machine bed (ensure it's secured, preferably with double-sided tape)
In the Bantam software, import the Gerber and Drill files you exported from KiCAD¹
In material setup, input the size of the PCB2
Add double sided tape to the back of the PCB
Clean the aluminum spoiler board of dust and leftover adhesive with alcohol (wait until alcohol evaporates)
Define your milling tool and set the required parameters like feed rate, plunge rate, etc. based on the material you're using and the intricacies of your design³
Use the two wrenches on top of the machine to loosen the collet and slip your chosen bit in. Then finger tighten the collet
Position material in the software (measurements matter)
Jog-> Install Tool and follow the prompts (this is so the machine establishes the relationship between the end of the tool which changes every time you do tool installation)⁴
Preview the milling paths in the software. Ensure there are no issues or overlaps
Begin milling (the software will guide the Othermill machine to carve out your PCB design)
Once complete, remove the PCB from the milling bed and carefully clean up any debris
Post-milling:
Inspect the PCB to ensure all traces and holes are milled correctly
You can now solder the through-hole components onto your freshly milled PCB
Test the board to ensure functionality
↪ 1. Choosing Gerber Files
↪ 2. Material Size Setup
↪ 3. Choosing Milling Tools
↪ 4. File Setup Toolpaths
Video of Milling Resistance Board:
↪ Only 0:00-1:00
↪Testing with lights on
↪ Milled Board
↪Testing with lights on
Changes were made to our original resistance PCB size so soldering would be easier and the copper traces would be less likely to fall off. The channels are more spread out and holes are wider. They are not aligned horizontally as before, but rather vertically and staggered so to fit the LED's better.
Ohm's Law:
Ohm's Law a law stating that electric current is proportional to voltage and inversely proportional to resistance so long as all physical conditions remain constant. It is described by the equation Current=Voltage/Resistance, or l=V/R. In our resistance PCB with lights on, we can see that the left side with lower resistance has a brighter light. Conversely, the right side with higher resistance has dimmer lights.
↪ Board with components soldered on
↪ Back of board with components soldered on
↪ Board with lights turned on
Problems Encountered (Part I):
When I tried connect the traces to the holes, they would not connect completely into the hole. By enlarging the lines to 1 instead of .25 and changing the grid size to 0.2540 mm (0.0100 in) instead of 1.2700 mm (50.00 mils) I was able to fully reach the center of the hole and with more precision
Another problem we encountered was while milling our PCB boards
↪ Image of the Schematic Editor
↪ Finished digital PCB design
↪ I cut the edge too short and the Arduino would have fallen off
↪ 3D viewer
↪ Fixed edges
↪ 3D viewer
↪ Back of pre-soldering PCB
↪ Back of the PCB with components soldered
↪ Front of pre-soldering PCB
↪ Front of the PCB with components soldered
↪ Video of the milling of our PCB boards
The prompt I used was: This code will turn on and off, with varying periods and lengths, the LED's for a stoplight. The code should be specific to pin 13, pin 12, pin 11, and GND.
//Define pins
int redLED = 13;
int yellowLED = 12;
int greenLED = 11;
int ground = GND;
//Setup
void setup() {
pinMode(redLED, OUTPUT);
pinMode(yellowLED, OUTPUT);
pinMode(greenLED, OUTPUT);
pinMode(ground, OUTPUT);
}
//Loop
void loop() {
//Red LED on
digitalWrite(redLED, HIGH);
delay(3000);
//Red LED off, yellow LED on
digitalWrite(redLED, LOW);
digitalWrite(yellowLED, HIGH);
delay(1000);
//Yellow LED off, green LED on
digitalWrite(yellowLED, LOW);
digitalWrite(greenLED, HIGH);
delay(3000);
//Green LED off, yellow LED on
digitalWrite(greenLED, LOW);
digitalWrite(yellowLED, HIGH);
delay(1000);
//Yellow LED off, red LED on
digitalWrite(yellowLED, LOW);
digitalWrite(redLED, HIGH);
delay(3000);
}
↪ Arduino Code that didn't work
// variables
int GREEN = 28;
int YELLOW = 27;
int RED = 26;
int DELAY_GREEN = 5000;
int DELAY_YELLOW = 2000;
int DELAY_RED = 5000;
// basic functions
void setup()
{
pinMode(GREEN, OUTPUT);
pinMode(YELLOW, OUTPUT);
pinMode(RED, OUTPUT);
}
void loop()
{
green_light();
delay(DELAY_GREEN);
yellow_light();
delay(DELAY_YELLOW);
red_light();
delay(DELAY_RED);
}
void green_light()
{
digitalWrite(GREEN, HIGH);
digitalWrite(YELLOW, LOW);
digitalWrite(RED, LOW);
}
void yellow_light()
{
digitalWrite(GREEN, LOW);
digitalWrite(YELLOW, HIGH);
digitalWrite(RED, LOW);
}
void red_light()
{
digitalWrite(GREEN, LOW);
digitalWrite(YELLOW, LOW);
digitalWrite(RED, HIGH);
}
↪ Arduino Code that works
Problems with my Code:
GND should not have been included in the code
Instead of pins 11, 12, and 13, they should be changed to pins 26, 27, and 28
There was also something inherently wrong with my original code, so I had to use Tess's code
Problems Encountered(Part II):
When calibrating the LEDs, only the yellow and red one lit up.
However, when I tested the LEDs out on the Arduino board, they lit up perfectly.
When I tested mines through Emilie's code and the cord connected to her desktop, all lit up perfectly as well
Through trial and error, we realized it was because the wires weren't connected properly (with the help of Tess)
↪ Not working
↪ Working on Arduino
↪ Working on Emilie's computer
↪ Working after changing the wires and wire order
Problems Encountered
(Part III):
After importing the 3D stoplight model from Thingiverse and converting it, it ended up being the size of a "real" stoplight
I went to Mesh-> Modify-> Scale Mesh and made it uniformly smaller
↪ Original Thingiverse stoplight size
↪ Size scaled smaller to fit the milled board
↪ 3D design of my stoplight case in various angles
↪ Printed stoplight case just after printing
↪ Printed stoplight case with unlit PCB inside
↪ Supports inside
↪ Supports inside
↪ Lit PCB inside
↪ Videos of PCB lighting up