Skip to content

PicoI2/esp8266-door-sensor-on-battery

Repository files navigation

ESP8266 Door sensor on battery

This sensor use the deep sleep ability of the ESP8266. The ESP is awaked when the door state is changing. Then it connects to WiFi, and call an URL to inform the domotic box of the new state of the door. It stay awake about 5 seconds only and then go back to deep sleep.
Deep sleep duration is limited to 207 minutes. So if for any reason, the domotic box has missed the new door state, it will be send again later.

Alt text

Step by step

  1. Print PCB https://easyeda.com/pico12/ESP12-door-sensor-on-battery.
    This PCB has a connector with Tx, Rx, Input0, Vcc, Gnd, to allow you to program the ESP.

  2. Buy components (you can easiliy find it on eBay or AliExpress) :

    • ESP12
    • CD4077
    • Magnetic door sensor
    • 2 resistors 100k
    • 1 capacitor 1uF
    • USB to ESP8266 ESP-01 Serial Adapter CH340 (to program it)
  3. Compile and download software

  4. Configure it using serial link or WiFi To configure the ESP, the input 0 has to be in low state (like to program it).
    You can configure it immediately after program it, or you can put input0 on low state 3 seconds after power up.
    Using serial link you can write command like "param 1 MySSID". You can also use the configuration web page.
    I recommend to avoid using DHCP because it is 5 seconds slower than using a static IP address.

  5. DONE !

About

Door sensor working on battery using an ESP8266

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages