Featured Project 02
Academic Project — Microcontrollers

Dual-Factor Hardware Security System

MCUATmega328PBLANGUAGEBare-Metal CTOOLCHAINAVR-GCCINTERFACEUART + PWM
Hardware Prototype
Overview

Implemented a two-factor authentication lock in bare-metal C on an ATmega328PB Xplained Mini. A 4x4 membrane switch keypad feeds a 30ms software debouncer that filters contact bounce on each keypress. A strcmp() call checks the entered 4-digit code, and on match, the firmware sends a prompt over UART to a connected terminal for a second password. A correct password triggers Timer1 in Fast PWM mode to output a 2.0ms duty-cycle pulse, actuating a Datan B1122 servo to unlock for 5 seconds. State transitions are managed entirely through ISRs.

Implementation
Debouncer30ms software debounce loop per keypress on 4x4 membrane matrix
Code Matchstrcmp() against stored 4-digit entry; immediate retry on mismatch
UARTuart_putstr() prompt for second factor; password verified before actuating servo
ActuationTimer1 Fast PWM, 2.0ms pulse to Datan B1122 servo, 5-second unlock window
View Code on GitHub
Back to All Projects↑ Top