{"id":18897838,"url":"https://github.com/aneisch/magnetometer-vehicle-sensor","last_synced_at":"2025-09-04T13:32:07.056Z","repository":{"id":79012325,"uuid":"207156461","full_name":"aneisch/magnetometer-vehicle-sensor","owner":"aneisch","description":"Magnetometer Vehicle Sensor","archived":false,"fork":false,"pushed_at":"2020-06-23T18:08:33.000Z","size":14897,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T06:08:16.445Z","etag":null,"topics":["d1-mini","esphome","homeassistant","lolin-d1-mini","qmc5883l"],"latest_commit_sha":null,"homepage":null,"language":null,"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/aneisch.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-08T18:37:14.000Z","updated_at":"2024-01-02T13:24:22.000Z","dependencies_parsed_at":"2023-03-12T06:27:12.103Z","dependency_job_id":null,"html_url":"https://github.com/aneisch/magnetometer-vehicle-sensor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneisch%2Fmagnetometer-vehicle-sensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneisch%2Fmagnetometer-vehicle-sensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneisch%2Fmagnetometer-vehicle-sensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneisch%2Fmagnetometer-vehicle-sensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aneisch","download_url":"https://codeload.github.com/aneisch/magnetometer-vehicle-sensor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231965370,"owners_count":18453069,"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":["d1-mini","esphome","homeassistant","lolin-d1-mini","qmc5883l"],"created_at":"2024-11-08T08:39:45.524Z","updated_at":"2024-12-31T08:32:07.092Z","avatar_url":"https://github.com/aneisch.png","language":null,"funding_links":["https://www.buymeacoffee.com/aneisch"],"categories":[],"sub_categories":[],"readme":"# Magnetometer Vehicle Sensor\n\u003ca href=\"https://www.buymeacoffee.com/aneisch\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-black.png\" width=\"150px\" height=\"35px\" alt=\"Buy Me A Coffee\" style=\"height: 35px !important;width: 150px !important;\" \u003e\u003c/a\u003e\n\u003cbr\u003e\n\nD1 Mini Pro based vehicle detection sensor utilizing QMC5883L magnetometer. Features vehicle detection using megnetometer, gate staus with reed switch, battery voltage detection with voltage divider, and relay for gate actuation. \n\nCompile using ESPHome from https://github.com/esphome/esphome/pull/671 for QMC5883L support.\n\n# Hardware\n[D1 Mini Pro](https://www.banggood.com/Geekcreit-D1-Mini-Pro-16-Module-ESP8266-Series-WiFi-Wireless-Antenna-p-1144951.html): $4  \n[D1 Mini Dual Base](https://www.aliexpress.com/item/32642733925.html): $1.00  \n[D1 Mini Relay Shield](https://www.aliexpress.com/item/32596395175.html): $1.20  \n[D1 Mini DC Power Shield](https://www.aliexpress.com/item/32790327733.html): $1.40  \n[D1 Mini Proto Board](https://www.aliexpress.com/item/32627711647.html): $0.30  \n[QMC5883L Triple Axis Compass Magnetometer](https://smile.amazon.com/gp/product/B008V9S64E): $6.59  \n[Sonoff IP66 Junction Box](https://www.banggood.com/SONOFF-IP66-Waterproof-Junction-Box-Waterproof-Case-Water-resistant-Shell-p-1223669.html): $6.99  \n[Voltage Divider](https://smile.amazon.com/gp/product/B06XHKZCD4): $1.38  \n\n# Wiring\n**QMC5883L**: 3v or 5v, GND, D1 (SCL), D2 (SDA)  \n**Reed Switch**: GND, D7  \n**Relay**: D8 (you can modify the pin # on V2, or physically cut D1 pin and add bodge wire)  \n**Voltage Divider**: GND (if not shared ground), A0  \n\nVoltage divider and reed switch terminals were connected to a shared proto board\n\nDon't forget to connect the external wifi antenna if needed!\n\n\n\n![Stack from the front](images/front.jpg)\n\n![Stack from the back](images/back.jpg)\n\n![Wiring annotated](images/wiring.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneisch%2Fmagnetometer-vehicle-sensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faneisch%2Fmagnetometer-vehicle-sensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneisch%2Fmagnetometer-vehicle-sensor/lists"}