What I Had to Do This Week

Assignment: Design and document the system integration for my final project (and hope everything actually works together!)

My MAKERGATE Project - The Big Picture

So MAKERGATE is basically my attempt to solve a real problem in our maker space - expensive tools going missing or getting damaged because anyone can just walk up and use them. My solution? Make them smart and secure! Here's how all the pieces work together:

ESP32s Board

ESP32 Board

This is the brain of everything - controls all the other components

RFID Reader

RFID Module

Reads user cards to identify who wants to use the equipment

Nokia LCD Screen

Nokia Display

Shows status messages and user prompts

4x5 Keypad

Keypad

For entering PIN codes (because cards alone aren't secure enough)

My Custom PCB

Custom PCB

Brings everything together on one board I designed myself

All the Components I Needed

Here's everything I had to wrangle into working together for this project:

Component How Many What It Does
ESP32-WROOM-32 1 The main brain that controls everything and connects to WiFi
IL9341 Display Module 1 Shows users what's happening and what they need to do
Keypad 4x5 1 For typing in PIN codes and navigating menus
RFID Reader Module (RC522-SR04-06) 1 Reads the cards to identify users
Relay Module 1 Actually controls the power to the equipment
Transistor Q1 (NPN) 1 Switches the relay on and off
USB-A Connector 1 For power and programming (much easier than wire connections)
Voltage Regulator (AMS1117-3.3V) 1 Steps down 5V to 3.3V for components that need it
Capacitor C1 (100µF) 1 Smooths out power supply noise
Capacitor C2 (10µF) 1 More power filtering for the voltage regulator
Resistor R1 (1kΩ) 1 Limits current to the transistor base
Resistor R2 (1.2kΩ) 1 Pull-up resistor for reliable relay control
LED (Status Indicator) 1 Quick visual indicator that the system is running
Push Button (Reset and boot) 2 Reset button and boot mode selection
Diode D1 (Protection) 2 Protects against voltage spikes from the relay
Terminal Blocks 2 Easy connections for external equipment power

How My System Actually Works

Okay, so here's how my MAKERGATE system actually secures expensive tools. It's pretty straightforward but effective!

Starting Up

When I power everything up, the ESP32 boots up and initializes all the components. The display shows "Ready" and the RFID reader starts listening for cards. Most importantly, the relay starts in the OFF position, so no equipment gets power until someone proves they're authorized.

Someone Wants to Use Equipment

Here's the typical flow: Someone walks up with their RFID card and holds it near my reader. The RC522 picks up the card's unique ID and sends it to my ESP32. I check this ID against my list of authorized users stored in the code. For really expensive stuff, I also make them enter a PIN on the keypad for extra security.

Granting (or Denying) Access

If everything checks out, the display shows "Access Granted" with their name, and my ESP32 sends a signal to turn on the transistor. This energizes the relay, which closes the contacts and lets mains power flow to the equipment. If something's wrong (bad card, wrong PIN), they get "Access Denied" and the equipment stays off.

While Equipment is Running

While someone's using the equipment, I keep track of who it is, how long they've been using it, and display their info on the screen. Everything gets logged so we can see usage patterns and track down problems if equipment gets damaged.

Finishing Up

When they're done, they either scan their card again or enter a code to log out. I immediately cut power to the equipment and save the session data. Simple and secure!

Safety Stuff I Built In
  • Fail-Safe: If power goes out, everything shuts down automatically
  • Complete Isolation: My low-voltage control circuit is completely separate from the high-voltage equipment power
  • Everything Gets Logged: Every access attempt, successful or not, gets recorded with timestamps
  • Card Removal = Immediate Shutoff: Take your card away and the equipment stops instantly
Why This Actually Works

The beauty of my system is that it turns any dumb tool into a smart, trackable piece of equipment. No more mystery about who used what when, and expensive equipment can't "walk away" or get damaged by unauthorized users.

Designing My Own PCB (The Fun Part!)

  1. Schematic First: Started by connecting all the components in the schematic view and making sure the logic made sense My schematic design
  2. Component Placement: Moved everything around on the PCB layout until it looked organized and the traces could route properly PCB component placement
  3. 3D Check: Used the 3D view to make sure everything would actually fit and look professional when assembled 3D visualization of my PCB
  4. Board Outline: Defined the exact size and shape I wanted for the final board
  5. Preparing for Manufacturing: Hid all the unnecessary layers and kept only what the mill needed to see Final PCB layout for milling
  6. Export for Milling: Saved the design as an SVG file that I could use with the milling machine

Making the PCB Real (SRM 20 Milling and Soldering)

Time to turn my digital design into an actual circuit board! Here's how I did it with our SRM 20:

First, I Uploadedthe svg into Mods CE to create the actual toolpath. This step is crucial - the milling machine needs precise instructions on where to cut.

Toolpath generation in Mods CE G-code preparation

After generating the G-code, I set up the copper board in the SRM20 and started the milling process. Here's the machine doing its thing:

The milled PCB turned out pretty clean! No broken traces or missing pads.

Fresh milled PCB

Then came the tedious part - soldering all the components one by one. Started with the smallest components and worked my way up to the bigger ones.

PCB with some components soldered

Finally got everything soldered on and connected. It actually looks like a real product!

Completed PCB with all components

Testing the Whole System

Time for the moment of truth - does everything actually work together? I started with some basic code to test the core functionality.

Here's the test code I wrote to see if the relay would respond to authentication:

My MAKERGATE Code - How I Made It Work

Writing the code for this was actually pretty fun once I figured out how to get all the components talking to each other. Here's how I built the security logic:

The Libraries I Needed

#include <SPI.h>
#include <MFRC522.h>
#include <Keypad.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>

These are basically the instruction manuals that tell my ESP32 how to talk to each component. Without these, nothing would work!

Wiring Everything Up in Code

// ESP32 pin connections
#define SS_PIN    21   // RFID reader
#define RST_PIN   22   // RFID reset
#define SCK_PIN   18   // SPI clock
#define MOSI_PIN  23   // SPI data out
#define MISO_PIN  19   // SPI data in
#define OUTPUT_PIN 26  // The important one - controls equipment power!

// Nokia display connections
#define LCD_CLK    14 
#define LCD_DIN   25  
#define LCD_DC    12  
#define LCD_CE    33  
#define LCD_RST   32

Pin 26 is the star of the show - that's what actually turns equipment on and off. Everything else is just input and feedback.

Setting Up the Keypad

char keys[ROWS][COLS] = {
  {'1', '2', '3'},
  {'4', '5', '6'},
  {'7', '8', '9'},
  {'*', '0', '#'}
};

I mapped out the keypad so users can press '#' to submit their password and '*' to clear what they've typed. Pretty standard stuff.

System Startup

void setup() {
  Serial.begin(115200);
  pinMode(OUTPUT_PIN, OUTPUT);
  digitalWrite(OUTPUT_PIN, LOW); // Start with equipment OFF
  
  // Get all components talking
  SPI.begin(SCK_PIN, MISO_PIN, MOSI_PIN, SS_PIN);
  mfrc522.PCD_Init();
  display.begin();
  
  // Welcome screen
  display.println("RFID Security");
  display.println("System Ready");
  display.println("Place card");
  display.println("near reader");
}

The most important line here is setting OUTPUT_PIN to LOW - this ensures equipment starts OFF and stays that way until someone proves they belong!

The Security Logic (The Important Part)

void loop() {
  // Looking for RFID cards
  if (mfrc522.PICC_IsNewCardPresent() && mfrc522.PICC_ReadCardSerial()) {
    cardDetected = true;
    waitingForPassword = true;
    Serial.println("Card detected! Please enter password:");
  }
}

This constantly checks for cards. When it finds one, it reads the unique ID and asks for a password. Two-factor security!

Password Checking

if (key == '#') {
  // Check if password is correct
  if (enteredPassword == correctPassword) {
    Serial.println("Password CORRECT! GPIO 26 ON");
    passwordEntered = true;
  } else {
    Serial.println("Password INCORRECT! Try again:");
    enteredPassword = "";
  }
}

When someone hits '#', I check if they entered "1234" (my default password). Right password = access granted. Wrong password = try again!

The Equipment Control

// Only turn on equipment if BOTH conditions are met
bool shouldActivate = cardPresent && passwordEntered;
digitalWrite(OUTPUT_PIN, shouldActivate ? HIGH : LOW);

This is the heart of my security system. Equipment only gets power when someone has both a valid card AND entered the correct password. Remove either one and it shuts off immediately.

User Interface

void updateDisplay() {
  if (!cardPresent) {
    display.println("Place card near reader");
  } else if (waitingForPassword) {
    display.println("Enter Password:");
    display.print("Pass: ");
    for (int i = 0; i < enteredPassword.length(); i++) {
      display.print("*");  // Security - show asterisks
    }
  } else if (passwordEntered) {
    display.println("ACCESS GRANTED");
    display.println("Machine: Running");
  }
}

The display always tells users what's happening and what they need to do next. And yes, passwords show up as asterisks for security!

How Someone Actually Uses It

  1. Walk up to equipment, see "Place card near reader"
  2. Hold RFID card near the reader
  3. Screen changes to "Enter Password:" with asterisks as you type
  4. Enter "1234" and press '#'
  5. If correct: "ACCESS GRANTED" and equipment powers up
  6. When done: remove card and everything shuts off instantly

The Big Demo!

What I Learned

This week was all about integration, and honestly, it was both exciting and terrifying. Getting individual components to work is one thing, but making them all work together as a complete system? That's a whole different challenge!

The biggest lesson was that system integration isn't just about connecting wires - it's about thinking through all the interactions between components, timing issues, power requirements, and user experience. My RFID reader works great, my keypad responds perfectly, but getting them to work together smoothly took a lot of debugging.

I also learned the importance of fail-safe design. My system defaults to "equipment OFF" and only turns things on when everything checks out. That's way safer than starting with equipment on and trying to turn it off when there's a problem.

The PCB design process was really rewarding. Going from breadboard prototype to actual custom circuit board made this feel like a real product rather than just a school project.

Most importantly, I proved to myself that I can take an idea from concept to working prototype. This MAKERGATE system actually solves a real problem we have in our lab, and I can see it being useful in other maker spaces too.

Next steps: Add WiFi logging, improve the user interface, design a proper enclosure. This could actually be something we deploy for real!

  1. ORGINAL File for pcb design files Final pcb design
  2. ORGINAL code i used makergate test code