For this week's assignment, I decided to design and manufacture a functional embedded microcontroller system. The main objective was to transition from digital design to a physical printed circuit board (PCB) using the precision manufacturing tools at the FabLab.
Materials and Tools
The base material used was a single-sided copper phenolic board. For the milling process in the precision machine, I used the following bits:
To correctly configure the feed rates and spindle speeds according to the material and the bit, you can consult the technical details on our GROUP PAGE.
The process for creating my board was as follows:
For the files for the Roland, which is the machine we have at FabLab Puebla, we use the following page called "mods."
To operate the Roland, we use the VPanel program.
To cut, we click the purple option and select the file we obtained from mods, then click "output." It is very important that we calibrate the tool in the machine well; additionally, between each file, we must change the tool depending on what we are going to do: traces, holes, and edge cut.
To make our PCB on the Roland at Fab Lab Puebla, we need a sacrifice bed that you can find in my downloadable files.
Then we have to stick the phenolic board to the sacrifice bed with double-sided tape.
The first file I placed was the one for the holes and that is how it finished.
Afterwards I put the file for the traces and finally the one for the border.
The result of my PCB after the Roland is like this:
I started soldering with the following materials:
This is how my soldered PCB ended up.
To test it, I used the following code that makes my LEDs turn on with the button.
const int botonPin = 0;
const int ledPin = 26;
int contadorToques = 0;
bool ultimoEstadoBoton = HIGH;
void setup() {
pinMode(botonPin, INPUT_PULLUP);
pinMode(ledPin, OUTPUT);
Serial.begin(115200);
}
void loop() {
int lecturaBoton = digitalRead(botonPin);
if (lecturaBoton == LOW && ultimoEstadoBoton == HIGH) {
delay(50);
contadorToques++;
if (contadorToques > 3) {
contadorToques = 1;
}
Serial.print("Modo actual: ");
Serial.println(contadorToques);
}
ultimoEstadoBoton = lecturaBoton;
switch (contadorToques) {
case 1:
digitalWrite(ledPin, HIGH);
break;
case 2:
digitalWrite(ledPin, HIGH);
delay(200);
digitalWrite(ledPin, LOW);
delay(200);
break;
case 3:
digitalWrite(ledPin, LOW);
break;
default:
digitalWrite(ledPin, LOW);
break;
}
}
The parameters I set for the vinyl cutter were:
const int filauno = 0;
const int filados = 1;
const int filatres = 2;
const int filacuatro = 4;
const int boton = 3;
int estadoBoton = 0;
int ultimoEstadoBoton = 0;
int estadoActual = 0;
void setup() {
pinMode(filauno, OUTPUT);
pinMode(filados, OUTPUT);
pinMode(filatres, OUTPUT);
pinMode(filacuatro, OUTPUT);
pinMode(boton, INPUT_PULLUP);
digitalWrite(filauno, LOW);
digitalWrite(filados, LOW);
digitalWrite(filatres, LOW);
digitalWrite(filacuatro, LOW);
}
void loop() {
// Leer el estado del botón
estadoBoton = digitalRead(boton);
if (estadoBoton == LOW && ultimoEstadoBoton == HIGH) {
estadoActual++;
if (estadoActual > 2) {
estadoActual = 0;
}
delay(50);
}
ultimoEstadoBoton = estadoBoton;
switch (estadoActual) {
case 0:
digitalWrite(filauno, LOW);
digitalWrite(filados, LOW);
digitalWrite(filatres, LOW);
digitalWrite(filacuatro, LOW);
break;
case 1:
digitalWrite(filauno, HIGH);
digitalWrite(filatres, HIGH);
digitalWrite(filados, LOW);
digitalWrite(filacuatro, LOW);
break;
case 2:
digitalWrite(filauno, LOW);
digitalWrite(filatres, LOW);
digitalWrite(filados, HIGH);
digitalWrite(filacuatro, HIGH);
break;
}
}
Here you can download the source files created during this week: