Skip to content

Latest commit

 

History

95 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lasergate

Lasergate is a PoE-powered light-barrier device built on the ESP32-S3, meant to watch doorways or other openings and report when something passes through. Instead of a camera, it uses pairs of modulated lasers and LDRs. No image data, no object detection model, no privacy questions to answer.

This is a hobby project I'm building in my spare time, not a finished product. Firmware, mechanics and electronics are all still in flux.

Status

Work in progress. What exists right now:

  • Firmware scaffolding on ESP-IDF/FreeRTOS, targeting the ESP32-S3
  • Application architecture in place: state machine, settings storage, HTTP API/web UI, HAL layers for GPIO, ADC, Ethernet, MQTT
  • The actual module logic: laser pulsing, pattern verification on the LDR side, and a gate class that ties several modules together
  • Modules calibrate themselves against ambient light rather than needing manual tuning.
  • Both self-calibration routines (LDR threshold, pulse frequency) persist their results to NVS, so a module doesn't have to recalibrate after every reboot
  • Decent unit test coverage by now, not just the low-level hardware wrappers, the module/gate/calibration logic gets exercised too, all running on a dev machine with no hardware attached
  • Mechanical prototypes for the sensor modules
  • A first electronics prototype: ESP32-S3 with a PoE HAT, breadboarded laser/LDR module

How it's meant to work

Each sensor is a laser/LDR pair, called a module. A gate is made up of however many modules you need to cover an opening. The main limit is the number of available GPIO (and ADC-capable) pins on the development board. Currently capped to four modules.

The laser is pulsed with a pseudo-random pattern instead of just being on or off, and the receiving LDR checks the incoming signal against the expected pattern rather than reading a plain brightness threshold. That should make the thing harder to fool with a flashlight or a well-timed hand wave than a basic light barrier would be. A long, narrow black tube in front of each LDR blocks stray light from the sides so the sensor mostly only sees its own laser. The alarm trigger condition (how many modules need to be blocked at once, and for how long) is meant to be configurable.

Interfaces

Planned: an HTTP API/webhook and CAN bus for linking multiple units together.

Currently working: a small HTTP-served web UI for basic and advanced settings, backed by a status/settings API. MQTT support is implemented but not yet used by the application.

Hardware / build photos

Fifth-iteration laser/LDR module prototype Glare-shield tube prototype, ESP32 nodemcu (not yet S3) First PoE board, ESP32-S3 with W5500
Laser/LDR module prototype wired on a cutting mat Glare-shield tube prototype and ESP32 nodemcu breadboard setup PoE board with ESP32-S3 and W5500 module

License

GPLv3

About

ESP32 S3 Firmware for the lasergate system based on the idf FreeRTOS implementation, HEAVY WIP

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages