{"id":50938666,"url":"https://github.com/corychainsman/water-sensor","last_synced_at":"2026-06-17T11:37:59.291Z","repository":{"id":12222225,"uuid":"14830701","full_name":"corychainsman/water-sensor","owner":"corychainsman","description":"A water sensor based on the Raspberry Pi","archived":false,"fork":false,"pushed_at":"2025-11-21T21:14:55.000Z","size":3230,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-21T23:16:55.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/corychainsman.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-30T23:51:48.000Z","updated_at":"2025-11-21T21:14:58.000Z","dependencies_parsed_at":"2022-09-24T13:13:35.768Z","dependency_job_id":null,"html_url":"https://github.com/corychainsman/water-sensor","commit_stats":null,"previous_names":["corychainsman/water-sensor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/corychainsman/water-sensor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corychainsman%2Fwater-sensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corychainsman%2Fwater-sensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corychainsman%2Fwater-sensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corychainsman%2Fwater-sensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corychainsman","download_url":"https://codeload.github.com/corychainsman/water-sensor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corychainsman%2Fwater-sensor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34447266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-06-17T11:37:58.678Z","updated_at":"2026-06-17T11:37:59.286Z","avatar_url":"https://github.com/corychainsman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"What's It Do? \n============= \nThis project is a water sensor. When it detects water, it sends an email and sounds an alarm. When the sensor is dry again, it sends another email and silences the alarm. \n\nBill of Materials \n================= \n- Raspberry Pi Type B \n- 10μF capacitor \n- Piezo buzzer that works between 3.3 and 5 volts. \n- small piece of rigid plastic \n- 2 inches of copper or aluminum tape \n- Wire \n- breadboard \n- jumpers (MtM and FtF) \n\nTools \n===== \n- soldering iron \n- Keyboard/Screen/ETC get the script onto the Raspberry pi \n\nThe Water Sensor \n================= \n\n### Making the sensor \nThe sensor is made of two pieces of copper tape stuck to a piece of rigid plastic. Put the copper strips parallel, and close together on the same side of the plastic. Solder a lead to each piece of copper. I used speaker wire as the leads because it is cheap to get in long lengths. The longer the leads, the farther from the Raspberry Pi your sensor can be.\n\n\u003cimg src=\"water_sensor_image.jpg\" alt=\"Image of the assembled water sensor\" height=\"250\"  /\u003e\n\n\n### Orienting and placing the sensor \nIn my case, I was trying to determine if water had entered my basement, so I put the copper side down on the floor with a small weight on top of it. If needed, sprinkle a small amount of table salt around the sensor to ensure electrolytic conduction. When water bridges between the two copper strips, it will close the circuit, and set off the alarm. \n\nThe Code \n========\nThe code requires you to have a gmail account to send the email. It will store your gmail password in plaintext, which is insecure. I suggest you make a dummy account for your sensor. Name it something cool; get creative. Feel free to modify the code however you'd like. Make the speaker send S.O.S. in morse code. Have the Raspberry Pi update a web server when it detects water. Go nuts.  \nThe code is also available in a gist: https://gist.github.com/corychainsman/5480533\n\n\u003cimg src=\"Screenshot of Wiring.png\" alt=\"Image of the assembled water sensor\" width=\"500\"  /\u003e\n\n\nChangelog \n============= \nEnno provided a better design in the comments on Fritzing, so I incorporated it into of this project. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorychainsman%2Fwater-sensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorychainsman%2Fwater-sensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorychainsman%2Fwater-sensor/lists"}