Passive Detection of Flock LPR Cameras Using Infrared Pulses (no affiliation with Flock Safety)
Flock LPR IR Pulse Detector
NOT AFFILIATED WITH FLOCK SAFETY
Flock license plate cameras tend to use rapid pulses (10hz: 20ms on, 80ms off) of 850nm IR light as part of the nighttime capture process. The strobe/capture process appears to be triggered by motion; both vehicles and pedestrians will generally trigger it. The light is typically generated by IR LEDs arranged in a ring around the camera lens. Cameras have been observed to strobe as many as 40 times during a typical nighttime plate capture, providing a unique signal that can be detected.
This is a totally passive optical detector for identifying low-frequency pulsed infrared (IR) light sources (typically in the ~5-15 Hz range) using multiple photodiode channels. Designed for night/low‑ambient conditions where pulsed IR signals are easier to distinguish from background illumination.
Real-world testing using 3) photodiodes shows reliable detection of Flock plate capture attempts at speeds ranging from stopped to 65+ MPH highway speeds. It's expected that a single photodiode may also work, though it may require more effort in placement and optical design.
Full disclosure: the code is written by AI because I'm not a software guy. Don't ask me why something is done a certain way - I don't know.
What this is:
- A receive-only (passive) IR pulse detector intended for mobile, vehicle-mounted use.
- Uses multiple external photodiode sensors mounted at different viewpoints (e.g., rear-left, rear-right, roofline) feeding a microcontroller inside the vehicle/enclosure.
- Provides simple, real-time indication:
- System On LED (green) when enabled via switch.
- Detection LED (red) that latches briefly on confirmed pulse-train detection.
- Active buzzer that beeps rapidly only while pulses are currently present (no holdover).
- In summary: IR light sensors go on the outside rear of the car; a controller and some indicators go inside the car. If a Flock LPR flashes IR strobes at your car at night, you'll get a visual and audible indication.
What this is not:
- Not a jammer, emitter, or countermeasure device. It is entirely passive, fundamentally no different than an automatic headlight sensor.
- It does not transmit, broadcast, or project IR (or any RF) energy.
- It is not intended to be used as a tool to evade law enforcement.
Hardware Overview
Sensors / analog front end
- Photodiodes: BPW34NA (x3). Mounted externally and covered by a mylar IR-pass filter material to reduce visible light interference.
- Amplifiers: MCP6002 dual op-amps (TIAs; one MCP6002 handles two channels)
- Each sensor channel is a transimpedance amplifier (TIA):
- Feedback resistor: 4.7 MΩ
- Feedback capacitor: 10 pF (stability / HF shaping)
- Typical observed behavior (example conditions):
- Dark baseline output near ~0.2 V
- Strong IR pulse peaks can approach the 3.3 V rail (clipping is acceptable for detection)
- Power is provided by a 5VDC USB port in the car, with a Sparkfun 3.3V BabyBuck to provide 3.3VDC for the system.
Controller
- Seeed Studio XIAO ESP32S3
- 3.3 V logic
- Uses Arduino IDE (Espressif ESP32 core)
Pin map (XIAO header labels)
This project uses XIAO "Dx/Ax" pin names in code so the sketch matches the board silkscreen/header labeling.
| Function | XIAO Pin | Notes |
|---|---|---|
| Rear Sensor 1 (ADC) | D0 / A0 | analog input |
| Rear Sensor 2 (ADC) | D1 / A1 | analog input |
| Roof Sensor (ADC) | D4 / A4 | analog input |
| Enable Switch (input) | D5 / A5 | active‑HIGH, uses INPUT_PULLDOWN |
| System On LED (output) | D8 | on when enabled |
| Detection LED (output) | D9 | latches briefly on detect |
| Active Buzzer (output) | D10 | DC-driven beeps (active buzzer) |
Switch wiring: D5 → switch → 3.3V (closed = ON)
Buzzer wiring: D10 → buzzer → GND (active buzzer)
Software Overview
A code file for Arduino IDE is included in this repo.
Per channel (no averaging across sensors - any sensor can flag a detection):
- Sampling: ~1 kHz ADC reads per sensor.
- Baseline tracking: Exponential moving average (EMA) tracks slow ambient changes.
- Pulse extraction: Computes AC = sample - baseline (upward pulses assumed).
- Edge qualification: When AC exceeds a threshold, a pulse edge is recorded (with a short refractory period to avoid retriggers).
- Frequency validation: Time between pulse edges is measured; intervals are considered valid only if in 5-15 Hz (67-200 ms).
- Confirmation: Requires multiple consecutive valid intervals before asserting detection.
- Outputs:
- Detection LED: latches for a short hold time after detection.
- Buzzer: beeps rapidly only while valid in-band pulses are currently being observed (no holdover).
If any channel confirms detection, the system indicates detection (channels are independent).
Firmware / build
Requirements
- Arduino IDE 2.x
- "ESP32 by Espressif Systems" boards package installed
- Board selection: XIAO ESP32S3
- Serial Monitor: 115200 baud
Upload - Arduino IDE was used for this project, but it's not required
- Connect XIAO ESP32S3 via USB‑C.
- Select the correct board and port in Arduino IDE.
- Compile + upload the sketch.
- Open Serial Monitor at 115200 (optional; debug output can be enabled in code).
Configuration knobs (in code)
Common parameters you may tune:
- Sampling period (SAMPLE_PERIOD_US)
- Frequency band (MIN_PERIOD_MS, MAX_PERIOD_MS)
- Thresholds (THR_IDLE, THR_LOCKED, HYST_AC)
- Confirmation count (REQUIRED_VALID_INTERVALS)
- Detection LED hold (LED_HOLD_MS)
- Buzzer cadence (BUZZ_ON_MS, BUZZ_OFF_MS)
- "Active pulse present" window (ACTIVE_WINDOW_MS)
Troubleshooting
- No response / looks "dead":
- Verify switch input wiring (must drive D5 HIGH when enabled).
- Confirm you used D* pin names consistently (don't mix raw GPIO numbers with XIAO header labels).
- No buzzer:
- Confirm you have an active buzzer (it should beep briefly when touched to 3.3 V and GND).
- Confirm buzzer is on D10 and ground is common.
- False triggers:
- Increase THR_IDLE and/or increase REQUIRED_VALID_INTERVALS.
- Missed detections:
- Decrease THR_IDLE and/or THR_LOCKED conservatively.
- Sensors must be outside the car, as even factory tint may block enough IR to prevent reliable detection.
- ADC clipping near 3.3 V:
- Strong pulses may rail the op-amp output; detection still works, but you can reduce gain (Rf) if needed.