I’ll inspect the schematic, connectivity, and component values, then create a detailed project walkthrough covering power, sensing, ESP32 behavior, indicators, programming, and expected operating sequence.
In short: a single AA battery passes through PMOS reverse-polarity protection and a TPS613221A boost converter to produce 3.3 V. The ESP32-C3 monitors a magnet-operated reed switch, wakes when the door/window changes state, reports the event over WiFi or BLE, briefly uses the RGB LED for status, then returns to deep sleep. The project file includes the complete power path, GPIO mapping, reed-filter circuit, programming process, PCB implementation, firmware sequence, trade-offs, and current design risks.
Reed Switch Low-Power Alternatives for Door/Window Sensor
Summary
Your current reed input is not optimal for battery life or deep-sleep wakeup:
Current schematic:VOUT → R2 100kΩ → Net 24 → REED1 → GND, and Net 24 → R6 → U1 IO7.
Because the door/window is closed most of the time, the magnet closes REED1, so R2 continuously conducts.
With VOUT = 3.3 V and R2 = 100kΩ, idle current is:
Text
I = 3.3 V / 100kΩ = 33 µA
That is much larger than the ESP8684-WROOM-02C datasheet deep-sleep current of 5 µA, so R2 dominates sleep power.
A second important issue: U1 IO7 is not an RTC GPIO on ESP32-C2/ESP8684, so it is not suitable for waking from deep sleep. Espressif documentation says ESP32-C2 deep-sleep GPIO wakeup requires RTC GPIOs, and GPIO0–GPIO5 can wake from deep sleep. Your reed input should therefore move from IO7 to one of IO0–IO5, ideally a pin that does not create boot/LED conflicts.
Works with a normally-open reed switch used in the usual magnet-closed state.
No active parts required.
Cons
Still consumes current in the closed state.
Higher resistor values are more sensitive to PCB leakage, humidity, contamination, and EMI.
Needs firmware to set the opposite wake level after every event.
Contact bounce must be filtered in firmware and/or with a small capacitor.
Recommendation if using this option
Use 1MΩ as the practical starting point. It reduces closed-state current from 33 µA to 3.3 µA, which is below the ESP8684 module’s 5 µA deep-sleep current but not so high that the node becomes overly fragile.
Optional additions:
Keep R6 as a GPIO protection/RC isolation resistor if already present.
Add 10nF–100nF from the GPIO side of the reed signal to GND only if wake latency and edge speed are acceptable.
Configure wake on the opposite level each time:
If current state is closed/low, sleep waiting for high.
If current state is open/high, sleep waiting for low.
Option 2 — Flip the Circuit and Use a Normally-Closed Reed Switch
If you can choose a different reed part/contact behavior, use a contact arrangement that is open in the most common state.
For a door/window sensor, the door/window is usually closed. You want the normal closed-door state to avoid DC current.
Example topology
Text
3V3 / VOUT
|
REED contact, open when magnet present
|
+---- GPIO input
|
Rpull-down = 1MΩ–4.7MΩ
|
GND
Behavior target
Table
Door/window state
Desired contact state
Static current
Closed, normal
Open
~0 µA or leakage only
Open, alarm event
Closed
Current through pull-down only while open
Pros
Optimizes the most common state.
Can make normal idle current close to zero.
Simple passive circuit.
Cons
Requires a reed switch/contact orientation that behaves correctly with the magnet.
Open-door state consumes current until the door/window is closed again.
Not always possible with the chosen reed switch package.
Best use
This is good if the sensor is for windows/doors that are closed most of the time and open events are short. It is less ideal if a window may remain open for hours.
Option 3 — Use MCU Internal Pull Resistors Only During Sleep Wake Configuration
ESP-IDF supports internal pull-up/pull-down handling for deep-sleep GPIO wake in some configurations. ESP8684 DC characteristics list typical internal pull-up and pull-down resistance around 45kΩ.
Why this is usually not ideal
A 45kΩ pull-up to 3.3 V would draw:
Text
I = 3.3 V / 45kΩ ≈ 73 µA
That is worse than the current 100kΩ external pull-up if the reed is closed.
Pros
Fewer external parts.
Firmware-configurable.
Cons
Higher current than your 100kΩ pull-up in the conducting state.
Pull value tolerance may be broad.
Espressif notes that internal and external pull resistors can interfere if both are enabled.
Recommendation
Do not rely on the internal pull as the main low-power bias for this product. If using an external high-value resistor, disable the automatic internal sleep pull option or explicitly verify it does not turn on a 45kΩ path during sleep.
Option 4 — Use Two GPIOs and a Reed Contact Between Them
This can eliminate the continuous resistor path, but it requires periodic sampling or special wake support that may not be as straightforward in deep sleep.
Circuit concept
Text
GPIO_A ---- REED1 ---- GPIO_B
During active sampling:
Drive GPIO_A high or low briefly.
Read GPIO_B.
Return both pins to high impedance before sleep.
Pros
Near-zero steady-state current when both pins are high-Z.
No pull-up burning continuously.
Cons
By itself, it does not provide a passive deep-sleep wake signal unless one side is biased during sleep.
If both sides are high-Z during deep sleep, the MCU may not wake when the reed changes.
More firmware complexity.
Recommendation
Useful for periodic polling designs, not ideal if you require immediate interrupt wake from deep sleep with no continuous bias.
Option 5 — Add an Ultra-Low-Power Wake/Interrupt IC or Nanopower Comparator
A nanopower external circuit can monitor the reed switch and generate a clean interrupt/wake pulse while drawing far less than 33 µA.
Possible blocks
Nanopower comparator with internal/reference bias.
Low-power latch / flip-flop triggered by reed transitions.
Dedicated magnetic/reed wake interface if available.
Pros
Can achieve very low sleep current.
Can generate clean wake pulses for both transitions.
The external IC must itself be lower current than the resistor current you are trying to save.
Recommendation
Only worth it if you need multi-year battery life from one AA/AAA or if the window may remain closed/open for very long periods and every microamp matters.
Option 6 — Use a Normally-Closed + Normally-Open Reed / SPDT Magnetic Sensor
Some magnetic sensors provide both NO and NC contacts. You can choose the contact that makes the common state non-conducting, or use both contacts to detect tamper/fault states.
Pros
Lets hardware optimize the normal state.
Can improve tamper detection or detect missing magnet/contact faults.
Cons
Larger or more expensive sensor.
More pins and routing.
May not be available in the same footprint/form factor.
Deep-Sleep Wake Pin Recommendation
For ESP8684 / ESP32-C2, use GPIO0–GPIO5 for deep-sleep GPIO wake.
From your current design:
IO7 is used for REED1 through R6 — this should be changed.
IO4, IO5, IO6 are currently used for RGB LED control.
GPIO0–GPIO5 are RTC-capable, but some also have caveats.
Practical choices:
Use IO4 for REED1 and move the LED channel currently on IO4 to IO7/IO10/IO18 if available.
Avoid using strapping pins for reed if the external state could affect boot.
Avoid pins with power-up glitches for visible LEDs if that matters.
Because the reed input must wake from deep sleep, it deserves one of the RTC-capable pins more than an LED does.
Best Recommendation for This Project
Recommended low-risk revision
Move REED1 sense from U1 IO7 to an RTC-capable GPIO, preferably one of IO0–IO5 after checking boot/LED conflicts.
Change R2 from 100kΩ to 1MΩ as the first practical low-power value.
Configure firmware so each sleep cycle wakes on the opposite level:
Door closed / GPIO low → wake on high.
Door open / GPIO high → wake on low.
Keep LED fully off except installation/setup.
If false wakes occur, add small RC filtering and/or debounce in firmware.
Expected idle impact
Table
Case
Reed bias current when closed
Current R2 = 100kΩ
33 µA
R2 = 1MΩ
3.3 µA
R2 = 2.2MΩ
1.5 µA
R2 = 4.7MΩ
0.70 µA
A 1MΩ pull-up is a good compromise for a small battery product: low enough current to make the ESP deep-sleep current meaningful again, but not so high that leakage/noise dominates immediately.
Trade-Off Table
Table
Option
Idle current both states
Deep-sleep wake support
BOM impact
Robustness
Recommendation
Current 100kΩ pull-up
33 µA when closed
No, because IO7
None
Good
Not recommended
1MΩ pull-up + RTC GPIO
3.3 µA when closed
Yes
Minimal
Good if layout clean
Best first revision
2.2MΩ–4.7MΩ + RTC GPIO
0.7–1.5 µA when closed
Yes
Minimal
More noise/leakage sensitive
Test before production
NC/opposite reed topology
~0 µA in normal state
Yes if biased correctly
Sensor/contact change
Good
Best if suitable reed exists
Two GPIO sampling
~0 µA steady
Not immediate unless biased
Minimal
Firmware-dependent
Polling only
Nanopower comparator/latch
Potentially <1 µA
Yes
Adds IC
Excellent if designed well
For multi-year target
Implementation Notes
Firmware pattern
On every wake:
Read the reed GPIO.
Determine current state.
Send the new state to the gateway/hub.
Configure deep-sleep wake for the opposite level.
Enter deep sleep.
Pseudo-flow:
Text
state = read_reed_gpio()
if state == CLOSED_LOW:
configure_wake_on_high()
else:
configure_wake_on_low()
enter_deep_sleep()
Add ESD protection if the reed wire leaves the PCB or runs near the enclosure edge.
Final Recommendation
For this design, the best practical change is:
Text
Move REED1 sense from IO7 to an RTC GPIO, and change R2 from 100kΩ to 1MΩ.
This reduces the normal closed-door reed current from 33 µA to 3.3 µA and fixes the deep-sleep wake pin issue. If battery-life testing shows the design is stable, you can try 2.2MΩ for another ~2× reduction. I would not jump straight to 4.7MΩ unless you validate wake reliability over humidity, contamination, ESD, and temperature.
Summary
Baseline: Existing Circuit
Circuit
Behavior
Problems
Design Goal
Option 1 — Increase R2 to 1MΩ–4.7MΩ and Move to RTC GPIO
Circuit
Idle current when door/window is closed
Pros
Cons
Recommendation if using this option
Option 2 — Flip the Circuit and Use a Normally-Closed Reed Switch
Example topology
Behavior target
Pros
Cons
Best use
Option 3 — Use MCU Internal Pull Resistors Only During Sleep Wake Configuration
Why this is usually not ideal
Pros
Cons
Recommendation
Option 4 — Use Two GPIOs and a Reed Contact Between Them
Circuit concept
Pros
Cons
Recommendation
Option 5 — Add an Ultra-Low-Power Wake/Interrupt IC or Nanopower Comparator
Possible blocks
Pros
Cons
Recommendation
Option 6 — Use a Normally-Closed + Normally-Open Reed / SPDT Magnetic Sensor