Inspiration

Every door badge system can be defeated with a $30 card writer from Amazon. Every face ID can be fooled with a printed photo. We wanted to build something that defeats both attacks at the same time — not one or the other.

What it does

Sentinel Gate is a dual-factor physical access control device. Two independent security checks run simultaneously. Both must pass or the door stays locked.

Factor 1 — FaceBreak: Pi Camera detects your face and verifies you are actually alive using Eye Aspect Ratio blink detection. A printed photo has zero blinks and gets caught immediately.

Factor 2 — Sigil: RFID reader checks your badge UID is enrolled in the system. A cloned badge with the wrong timing fingerprint gets flagged.

AND Gate Logic: Both factors run in parallel threads. If face passes AND badge passes → relay fires → solenoid unlocks. If either fails → red LED, buzzer, OLED shows reason.

How we built it

  • Raspberry Pi 4 as the master controller
  • Arducam 8MP IMX219 camera via CSI ribbon cable
  • face_recognition + OpenCV for face encoding and EAR blink detection
  • SSD1306 OLED for real-time status display
  • HiLetgo relay module controlling a 12V solenoid lock
  • WS2812B NeoPixel ring for visual feedback (green idle, red deny)
  • Passive buzzer with PWM for audio alerts
  • Python threading to run both factors simultaneously

Challenges we ran into

The PN532 RFID hardware module failed to initialize on both Pi 4 and Pi 3 despite correct wiring and multiple driver attempts (SPI and I2C). We pivoted to keyboard UID input mode for the demo which preserved the full AND gate logic and security story while keeping the hardware track submission intact.

The camera images were coming in sideways due to the ribbon cable orientation, causing face_recognition to return zero detections. We fixed this by rotating frames in software before encoding.

dlib installed under the user Python path but was invisible to sudo, which is required for GPIO access. We solved this with a sys.path.insert at the top of each module.

Accomplishments that we're proud of

Built a fully working dual-factor physical security device in under 24 hours with real liveness detection, real face recognition, real relay-controlled door hardware, and a clean demo flow.

What we learned

Hardware fails at the worst time. Always have a software fallback that preserves the core security concept. Threat modeling from first principles produces better security than layering existing solutions.

What's next

  • Fix PN532 RFID with RF timing fingerprint to detect cloned cards by response timing delta
  • Mount everything in the ABS enclosure with cut holes for camera, OLED, and NeoPixel ring
  • Add anti-tailgating sensor
  • Add remote audit log over SSH

Built With

  • dlib
  • face-recognition
  • linux
  • luma.oled
  • opencv
  • picamera2
  • pn532
  • python
  • raspberry-pi-4
  • rpi-ws281x
  • rpi.gpio
  • ssd1306
  • ws2812b
Share this project:

Updates