Featured Projects


Autonomous Door Opener

Autonomous Door Opener

Autonomous door opener using a Raspberry Pi 3b, camera, and a stepper motor.

The goal of this project was to make a device that will watch the outside of my door and use a deep learning model to determine if the person at the door is authorized to enter. After an authorized person is detected, the stepper motor will open the door.

The first step of the project was getting the hardware set up and working.

I chose to use a Raspberry Pi as the main controller because I already had it and it can run the camera, deep learning model, and stepper motor. The camera I used was an official Raspberry Pi camera module because it is small and can connect to the Pi easily. The motor I used was a bipolar stepper motor that was harvested from a broken 3d printer. I purchased an EasyDriver stepper motor driver to control the motor. Other components such as power supplies and jumper wires were also used. To get the hardware working, I had to connect the camera and motor to the Pi. A diagram of the motor wiring can be found below.

Diagram generated by Circuito.io

Important things to note about the diagram:
Seperate power supplies were used for the Pi and the motor. The motor power supply has the positive lead connected to the motor driver power and the ground is connected to the motor driver ground as well as the Pi ground. The motor driver STEP and DIR pins are connected to the Pi GPIO pins to control the motor. Lastly, the A and B motor leads are connected to the motor driver. After the motor driver is fully wired, the motor can be tested using a simple Python script included in the github repository.

After the hardware is set up, the software can be completed. My main aspiration for this project was to get the deep learning model working. An Important aspect to consider for this project was the hardware limitations of the Pi. With no hardware acceleration and only 1GB of RAM, the model would have to be very lightweight. I chose to use the MobileNet model as a base model because it can fit in the Pi's memory and it is fast. After downloading the model, I implemented transfer learning with my own custom dataset of authorized people. The dataset is compiled from images I have taken of myself. The dataset is small consisting of around 100 images. Another label used for training was the "unauthorized" label. This label was created to capture anything that is not me. After training, the model reports about 90% testing accuracy.

Once a trained model has been saved, then the main application can be completed. I created a class called MotorDriver that uses the RPi.GPIO library to control the motor. The class has methods to open and close the door. Another class called ImageClassifier takes a model path and a MotorDriver object as arguments. This class is responsible for loading the model weights and making predictions. After the model is loaded a loop is started which takes a picture from the camera and makes a prediction using the model. If the prediction is "authorized" then the MotorDriver object is called to open the door. The loop continues until the program is stopped.

Homelab

Homelab

Background

My homelab is a collection of servers and networking equipment that I use to learn about networking and server administration. The lab is built on a budget and is constantly changing. The lab is used to host websites, game servers, and other services. I started the lab by installing Ubuntu on my dads old desktop computer. Since then the lab has grown to serve myself, my family, and my friends.

Network Diagram

Diagram created using diagrams.net

This diagram provides an overview of my network. First is the pfSense firewall which controls access to the internet. pfSense is a powerful open-source firewall based on FreeBSD OS that can be run on most consumer hardware. The firewall is connected to a switch which connects all the devices in my network. The next appliance is the TrueNAS Core server which provides network storage and backups on a redundant ZFS pool. TrueNAS Core is an open-source network-attached storage (NAS) operating system based on FreeBSD. Currently the array has 24TB of raw storage capacity. Offsite backups are made to prevent data loss. The real star of the lab is the Proxmox VE host. Proxmox VE is an open-source virtualization management platform based on Debian Linux. All of my services are hosted on virtual machines and containers on this host. Since I want the services to be accessible from outside the local network, I have the host connected to zerotier VPN. Zerotier provides a secure way to remotely access devices on the network. This allows me to create a secure tunnel to a cloud server hosted by Oracle. The Oracle server acts as a reverse proxy which securely routes requests from the internet to the respective services on my local host. This allows me to point my domain name to my servies and avoid exposing my local IP address. The reverse proxy also provides many benefits like load balancing and SSL termination. Since the reverse proxy is hosted by Oracle, I get the benefit of their security and DDOS protection as well.


Paintball Game

Paintball Game

This paintball game was created because I wanted to improve my skills with full stack web development. The game was created using HTML, CSS, and Javascript on the frontend. For the backend I used Node.js. The game is a simple 2D shooter where the player can move around and shoot paintballs at other people on the game. I used Express to create the server and Socket.io to handle the client-server communication. Web sockets was the ideal protocol because it allows for fast bi-directional communication to transmit game data. I learned a lot about networking and backend development while creating this game.


Cool Max Games

Cool Max Games

Cool Max Games is a website that I started development on in middle school with one of my friends. It contains some of the first code that I ever wrote. The website is a collection of games that we made using HTML, CSS, and Javascript. Our hope was that we could provide entertaining games for our friends at school and learn valuable skills along the way. The website is hosted using Netlify for continuous integration and continuous deployment. This website sparked my passion for software engineering which I have been pursuing ever since.