{"id":16981083,"url":"https://github.com/jasonacox/waterdetectorwifi","last_synced_at":"2026-04-16T11:34:34.581Z","repository":{"id":67236394,"uuid":"239924320","full_name":"jasonacox/WaterDetectorWiFi","owner":"jasonacox","description":"ESP8266 NodeMCU WiFi Based IoT Water Detector","archived":false,"fork":false,"pushed_at":"2020-02-18T05:55:13.000Z","size":379,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T17:46:59.936Z","etag":null,"topics":["2n2222","esp8266","iot-water-detector","temperature-sensor","water-sensor","wifi"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jasonacox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-12T04:09:42.000Z","updated_at":"2020-08-16T00:26:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"2ce43b6f-d5ab-4a46-b5d4-9f53c834db68","html_url":"https://github.com/jasonacox/WaterDetectorWiFi","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"d6199028dddfa1036ee398baa4348216d2bc76d4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonacox%2FWaterDetectorWiFi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonacox%2FWaterDetectorWiFi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonacox%2FWaterDetectorWiFi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonacox%2FWaterDetectorWiFi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasonacox","download_url":"https://codeload.github.com/jasonacox/WaterDetectorWiFi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244882291,"owners_count":20525831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2n2222","esp8266","iot-water-detector","temperature-sensor","water-sensor","wifi"],"created_at":"2024-10-14T02:04:35.765Z","updated_at":"2026-04-16T11:34:34.518Z","avatar_url":"https://github.com/jasonacox.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WaterDetectorWiFi\nESP8266 NodeMCU Based IoT Water Detector with Temperature Probe\n\n## Description\nThis project describes how to build a device to detect water and post the status to a URL or MQTT endpoints. \nWe will use a ESP8266 NodeMCU Arduino based controller with a simple water detection circuit using a 2N2222 NPN transitor, \n1K ohm reistor and a 100uF electrolytic capacitor (with optional LED for indicator).  Multiple water probes can be added to measure water level.\n\nOptional temperature probe: Adding a DS18B20 One-Wire bus temperature sensor to read and send current temperature.\n\n## Circuit\nThis project is based on the amazing low-cost WiFi enable ESP8266 NodeMCU controller.  We will use the GPIO digital ports, specifically:\n* GPIO 13 (pin D7) - Water Sensor #1\n* GPIO 12 (pin D6) - Water Sensor #2\n* GPIO 14 (pin D5) - External LED Indicator\n* GPIO  4 (pin D2) - OneWire Bus for DS18B20 Temperature Probe\n\n![Circuit Board](schematic.png)\n\n### Water Sensors (2)\n* E1 \u0026 E2 - Water resistant 2 prong electrodes \n* R1 \u0026 R2 - 1K ohm reistors \n* C1 \u0026 C2 - 220uF electrolytic capacitors \n* Q1 \u0026 Q2 - NPN Transitor (e.g. 2N2222)\n\nThe capacitor provides signal stability and the capacitance can vary depending upon how long you want the sensor to register after the water is detected removed.  For my application, I expect water waves across the sensor so I want to hold the signal high as soon a crests of the waves start making contact with the electrode.  By using a 220uF capacitor once the first detection is made it will hold the signal high for 5 seconds, preventing signal oscillation. \n\n### Temperature Sensor (1)\n* Temp1 - DS18B20 temperature sensor (recommend waterproof probe) \n* R3 - 5.1K ohm resistor\n\n### Alert LED (1)\n* D1 - Standard Red LED - Could be replaced with buzzer\n* R4 - 400 ohm resistor\n\n## Code\nArduino IDE Requirements:\n1. You should be able to program your ESP8266 from the Arduino IDE.  \n2. Open your Arduino IDE and go to Sketch \u003e Include Library \u003e Manage Libraries and add:\n    * One Wire Library\n    * Dallas Temperature Sensor library\n3. Open [ESP8266WaterDetector.ino](ESP8266WaterDetector.ino) source code.\n\n## Reference\nESP8266 NodeMCU - Amazon: https://www.amazon.com/gp/product/B07XVKJ36C/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8\u0026psc=1\nWater Induction Electrode - Amazon: https://www.amazon.com/gp/product/B014SACDSO/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8\u0026psc=1\nDS18b20 Waterproof Temperature Sensors - Amazon: https://www.amazon.com/gp/product/B00CHEZ250/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8\u0026psc=1\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonacox%2Fwaterdetectorwifi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasonacox%2Fwaterdetectorwifi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonacox%2Fwaterdetectorwifi/lists"}