Project Overview and Analysis

Here are some short, geeky name ideas for the project:
  • LatchBit
  • ReedPing
  • DoorByte
  • OpenBit
  • FramePing
  • HingeByte
  • ReedNode
  • BitLatch
  • KnockBit
  • EdgeSense
  • GapPing
  • DoorNerd
  • LatchLink
  • ByteDoor
  • ReedBee — nice if you lean into BLE
  • GapBee — BLE + door/window gap
  • OpenBee
  • HingeBee
  • LatchBee
  • ReedBit
My favorites for this design: LatchBit, ReedPing, GapBee, and DoorByte.
I updated the project, so please create a new project description
I’ll update the project description to match the new ESP32-C3 + BLE/WiFi door/window sensor architecture and current AA/boost-powered design.
Updated the project description to reflect the current ESP32-C3-MINI-1-N4, AA battery, TPS613221A boost, reed switch, RGB setup LED, polarity protection, and WiFi/BLE reporting architecture.
Review current design
Check polarity stage
Update project name
Verify ESP32-C3 wiring
Prepare layout placement

Refine this doc
Ask about this doc
WiFi Door and Window Sensor — Project Explanation
This is a compact battery-powered WiFi door/window sensor that detects magnetic reed-switch state changes with an ESP8684-WROOM-02C module, provides local RGB LED indication, and exposes programming/debug access through a 6-pin header.
Purpose and Real-World Use
The board is intended for simple contact sensing: a magnet attached to a door/window aligns with the reed switch when closed, and moving the magnet away changes the reed switch state. The ESP8684 module can read that state and report it over WiFi/Bluetooth-capable firmware.
Typical applications:
  • Door/window open/closed detection
  • Cabinet, drawer, mailbox, or enclosure tamper sensing
  • Low-cost smart-home contact sensor nodes
  • Battery-powered wireless event detection devices
Core Architecture

Diagram


AAA battery BAT1 TPS613221A boost regulator IC1 3.3 V rail / VOUT ESP8684-WROOM-02C U1 RGB LED common anode LED1 Reed switch REED1 + RC/filter network EN / BOOT / USER buttons 6-pin programming header J1 GPIO current-limit resistors
Power Architecture
  • Input source: BAT1, a Keystone 1076 single AAA holder.
  • Input rail: BAT+, connected to BAT1 positive, input capacitor C2, and L1.
  • Boost converter: IC1, TPS613221ADBVR, with L1 = 2.2 uH and input/output capacitors.
  • Output rail: VOUT, functionally used as the board’s 3.3 V rail.
  • Main 3.3 V consumers: U1 ESP8684-WROOM-02C, LED1 common anode, pull-ups, reset/enable circuitry, and programming header J1 pin 1.
Power Components

Table


FunctionComponentsNotes
Battery inputBAT1, C2 22 uFSingle AAA source; C2 provides local input bulk capacitance.
Boost conversionIC1 TPS613221ADBVR, L1 2.2 uHGenerates fixed positive 3.3 V output from a lower battery voltage.
Output bulk/decouplingC4 22 uF, C8 22 uF, C7 1 uFStabilizes VOUT / 3.3 V rail near regulator and load.
Ground returnGND netShared return for battery, boost converter, MCU, switches, and LED.
Functional Subsystems
1. Wireless MCU / Controller
  • U1: ESP8684-WROOM-02C module.
  • Role: Main processing and wireless communications module.
  • Power: U1 3V3 is connected to VOUT; U1 GND and GND__3 are connected to GND.
  • Interfaces used:
    • TXD and RXD go to J1 pins 2 and 3 for serial programming/debug.
    • EN is tied to reset/enable circuitry and J1 pin 5.
    • Several GPIOs drive the RGB LED, read the reed switch, and connect to test/programming points.
2. Door/Window Reed Sensor Input
  • REED1: Littelfuse MDSM-4R-12-18 reed switch.
  • Input network: REED1, R2 = 100 kΩ, R6 = 50 Ω, C1 = 0.01 uF.
  • Net behavior: One reed terminal is grounded; the other side connects through the conditioning network to U1 IO7 via R6.
  • Design intent: The reed switch provides the physical magnetic contact signal, while the resistor/capacitor network provides biasing and some noise/debounce filtering.
3. RGB Status Indicator
  • LED1: Everlight 19-237/R6GHBHC-A04/2T RGB LED.
  • Topology: Common-anode style connection: LED1 A connects to VOUT.
  • GPIO drive: U1 GPIOs sink current through current-limiting resistors:
    • U1 IO5 -> R3 135 Ω -> LED1 R
    • U1 IO6 -> R4 50 Ω -> LED1 G
    • U1 IO4 -> R5 50 Ω -> LED1 B
  • Function: Firmware can indicate pairing, boot, open/closed state, error, or battery status with LED colors.
4. Buttons and Boot/Reset/User Control
  • EN button: Pulls the ESP enable/reset-related net low through a tactile switch; net also has R1 = 100 kΩ pull-up and C5 = 0.01 uF to ground.
  • BOOT button: Connected to U1 IO9 with C3 = 0.01 uF to ground; supports boot-mode entry during programming.
  • USER button: Connected to U1 IO1 with C6 = 0.01 uF to ground; provides a firmware-readable user input.
  • Design intent: The buttons support firmware flashing, reset/enable control, and local interaction.
5. Programming / Debug Header
  • J1: 1x6, 2.54 mm vertical pin header.
  • Connections:
    • Pin 1: VOUT / 3.3 V
    • Pin 2: U1 TXD
    • Pin 3: U1 RXD
    • Pin 4: U1 IO9 / BOOT
    • Pin 5: U1 EN
    • Pin 6: GND
  • Function: Provides external access for programming, serial debug, power, boot, reset/enable, and ground.
Signal Flow
  1. The AAA battery powers the boost converter input.
  2. IC1 boosts the battery voltage to the regulated VOUT rail used as 3.3 V.
  3. U1 boots from the 3.3 V rail.
  4. REED1 changes state when a magnet moves relative to the sensor.
  5. The conditioned reed signal reaches U1 through the REED/IO7 path.
  6. Firmware interprets the state and can report it wirelessly.
  7. U1 drives LED1 through current-limiting resistors for status indication.
  8. J1 allows flashing and debugging via UART plus boot/enable control.
PCB Implementation
  • Board: Custom outline, approximately 38 mm x 64 mm.
  • Copper layers: 2.
  • Placement: All 30 physical components are on the top side.
  • Density: High. The layout report shows about 66.2% raw component area fill, and routing-aware density reaches overflow when clearance is considered.
  • Mechanical emphasis: The AAA battery holder dominates the board area, while the ESP8684 module and reed switch placement constrain antenna and magnetic sensing geometry.
Key Technologies and Dependencies

Table


AreaTechnology / PartDependency / Reason
WirelessESP8684-WROOM-02CProvides MCU plus 2.4 GHz WiFi/Bluetooth-capable module integration.
SensingLittelfuse MDSM-4R-12-18 reed switchSimple, ultra-low-power magnetic contact detection.
PowerTPS613221ADBVR boost converterEnables 3.3 V operation from a single AAA cell.
User feedbackRGB LEDFlexible visible status with one package.
ProgrammingUART header + BOOT/EN controlsSimple bring-up and firmware flashing path.
Energy storage/filtering22 uF, 1 uF, 0.01 uF capacitorsBulk storage, local bypassing, and switch/input filtering.
Design Choices, Trade-Offs, and Optimizations
Single AAA Battery + Boost Converter
Benefit: Compact and widely available power source; boost regulator allows operation even when the cell voltage is below 3.3 V.
Trade-off: WiFi transmit current is bursty, so the boost converter, inductor, output capacitors, and PCB routing must handle transient load steps. Battery life depends heavily on firmware sleep strategy.
Reed Switch Instead of Hall Sensor
Benefit: A reed switch is passive and consumes essentially no steady-state sensor current.
Trade-off: Reed switches are mechanical/magnetic devices and may require debounce filtering and careful mechanical alignment with the magnet.
RGB LED
Benefit: Rich local status feedback.
Trade-off: LEDs can dominate average current if left on; firmware should pulse briefly or disable the LED during normal low-power operation.
2-Layer Compact PCB
Benefit: Lower PCB cost and simpler manufacturing.
Trade-off: The current board is dense, and routing is already flagged with airwires. RF placement, ground return, and regulator switching currents are harder to optimize on a dense 2-layer design.
Header-Based Programming Instead of USB-C
The project description mentions USB-C firmware flashing, but the actual schematic currently shows a 6-pin header J1 for UART/programming access rather than a USB-C connector or USB-UART bridge. This is important because the current implementation depends on an external programmer/USB-UART adapter.
Current Review Findings
The project is structurally recognizable and has a PCB layout, but the automated checks show several issues:
  • Airwires: 14 DRC airwire errors remain, meaning not all PCB nets are fully routed.
  • Missing manufacturer part numbers: Generic capacitors, resistors, and J1 lack MPNs, which affects manufacturing/BOM readiness.
  • No project documentation: The review reports missing project docs; this file addresses that gap.
  • Floating RouteBranchPoint warnings: ERC reports several route branch point floating-pin warnings.
  • Density risk: Layout is tight enough that routing clearance pushes the board into an overflow density tier.
Performance Considerations
Battery Life
Battery life will depend primarily on:
  • ESP8684 sleep current and wake frequency
  • WiFi transmit interval and transmit duration
  • Boost converter quiescent current and efficiency at light load
  • LED duty cycle
  • Reed input bias current through pull-ups/pull-downs
Wireless Performance
The ESP8684-WROOM module includes RF circuitry/antenna constraints. In a compact board with a large AAA holder nearby, placement and keepout around the module antenna region matter for range and reliability.
Power Transients
WiFi radio bursts can create sharp current demands. The 22 uF output capacitors and boost converter layout are important; short, low-impedance paths around IC1, L1, C2, C4, and C8 will help stability and reduce noise.
Reed Signal Robustness
The reed switch interface includes filtering, but real installations may still experience bounce, ESD, long magnet transition times, or vibration. Firmware debounce is recommended in addition to the RC network.
Potential Challenges
  1. Routing completion: Existing airwires must be resolved before fabrication.
  2. Manufacturing readiness: Passive components and J1 need real MPNs if the project will be assembled by a manufacturer.
  3. Power budget: WiFi from a single AAA cell is possible but demanding; sleep optimization is essential.
  4. RF/mechanical placement: Battery holder, enclosure, and magnet/reed alignment can affect both wireless range and sensing reliability.
  5. Firmware flashing workflow: Current schematic uses a programming header, not onboard USB-C; users will need an external serial adapter unless USB-C/USB-UART circuitry is added.
Improvement Ideas
Near-Term
  • Finish routing and clear all airwire DRC errors.
  • Assign real MPNs to all generic resistors, capacitors, and J1.
  • Verify the ESP8684 antenna keepout and module placement against the datasheet.
  • Add or confirm firmware debounce for the reed input.
  • Verify boost converter layout against the TI layout recommendations.
Power Optimization
  • Use deep sleep with wake-on reed event if supported by the selected GPIO strategy.
  • Keep LED indications short and infrequent.
  • Measure average current in sleep, wake, WiFi association, transmit, and LED-on states.
  • Consider a battery voltage measurement path if state-of-charge reporting is needed.
Feature Enhancements
  • Add a tamper switch or enclosure-open input.
  • Add battery voltage monitoring.
  • Add ESD protection for exposed/programming pins if the header is user-accessible.
  • Add an optional onboard USB-UART/USB-C programming interface if cable-based flashing is a product requirement.
  • Add test pads for production programming if the 2.54 mm header is only for development.
Scalability
For production or larger deployments:
  • Use provisioning-friendly firmware and secure credential storage.
  • Standardize telemetry protocol: MQTT, Matter bridge, HTTP, or vendor cloud.
  • Add OTA update capability.
  • Add manufacturing test firmware for reed, LED, current draw, and wireless connectivity.
  • Consider a smaller connector/test-pad scheme instead of the through-hole programming header.
Summary
This design is a practical compact smart contact sensor centered around an ESP8684 WiFi module, a reed switch input, a single-AAA boost power system, RGB indication, and programming/debug access. The main strengths are low-cost sensing, simple power architecture, and compact integration; the main risks are battery life under WiFi load, dense 2-layer routing, unfinished airwires, and the mismatch between the project description’s USB-C claim and the current header-based programming implementation.

    Purpose and Real-World Use

    Core Architecture

    Power Architecture

    Power Components

    Functional Subsystems

    1. Wireless MCU / Controller

    2. Door/Window Reed Sensor Input

    3. RGB Status Indicator

    4. Buttons and Boot/Reset/User Control

    5. Programming / Debug Header

    Signal Flow

    PCB Implementation

    Key Technologies and Dependencies

    Design Choices, Trade-Offs, and Optimizations

    Single AAA Battery + Boost Converter

    Reed Switch Instead of Hall Sensor

    RGB LED

    2-Layer Compact PCB

    Header-Based Programming Instead of USB-C

    Current Review Findings

    Performance Considerations

    Battery Life

    Wireless Performance

    Power Transients

    Reed Signal Robustness

    Potential Challenges

    Improvement Ideas

    Near-Term

    Power Optimization

    Feature Enhancements

    Scalability

    Summary

Documents

    WiFi Door and Window Sensor — Project Explanation

    AAA + TPS613221A Current Budget Check

    AA + TPS613221A Current Budget Check

    Reed Switch Low-Power Alternatives for Door/Window Sensor

    HQonline BOM Availability Audit

    AA + TPS613221A + ESP32-C3-MINI-1-N4 Runtime Report

    WiFi vs BLE Runtime Comparison — AA + TPS613221A + ESP32-C3-MINI-1-N4

Assets

WiFi Door and Window Sensor image.png

WiFi Door and Window Sensor image.png

WiFi Door and Window Sensor imageThumbnail
y8f5H9.svg

y8f5H9.svg

y8f5H9Default
WiFi Door and Window Sensor_IMAGE.png

WiFi Door and Window Sensor_IMAGE.png

WiFi Door and Window Sensor_IMAGE

WiFi Door and Window Sensor

WiFi Door and Window Sensor thumbnail
A compact battery-powered door/window sensor built around the ESP32-C3-MINI-1-N4 module. The design uses a single non-rechargeable AA cell with a TPS613221A 3.3 V boost regulator, reed switch magnetic contact sensing, low-power wake/report/sleep firmware strategy, RGB status LED for setup feedback, BOOT/EN controls, programming header, and input polarity protection. It is intended for smart-home security and automation applications, supporting WiFi or Bluetooth LE hub reporting with emphasis on low idle current, reliable RF burst power delivery, and field-replaceable battery operation. #ESP32-C3 #BLE #WiFi #DoorSensor #WindowSensor #ReedSwitch #LowPower #BatteryPowered #SmartHome #IoT

Pricing & Availability

Distributor

Qty 1

Arrow

$1.45–$2.12

Digi-Key

$2.57–$3.47

HQonline

$0.47

LCSC

$5.19–$5.27

Mouser

$3.76

TME

$2.79

Verical

$1.46–$4.40

Controls