{"id":28358913,"url":"https://github.com/kaulketh/simple-pi-fan-control","last_synced_at":"2026-04-19T05:35:14.805Z","repository":{"id":115854431,"uuid":"353490221","full_name":"kaulketh/simple-pi-fan-control","owner":"kaulketh","description":"Simple fan control for a Raspberry Pi via GPIO","archived":false,"fork":false,"pushed_at":"2023-12-24T11:58:24.000Z","size":206,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T20:17:07.909Z","etag":null,"topics":["fancontrol","fancontrol-script","gpio","gpio-pins","raspberry-pi","raspberrypi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaulketh.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}},"created_at":"2021-03-31T21:05:32.000Z","updated_at":"2023-11-19T12:32:11.000Z","dependencies_parsed_at":"2023-12-23T18:25:35.514Z","dependency_job_id":"2459dc92-0a23-46d5-aa8a-5929ef2c2908","html_url":"https://github.com/kaulketh/simple-pi-fan-control","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kaulketh/simple-pi-fan-control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaulketh%2Fsimple-pi-fan-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaulketh%2Fsimple-pi-fan-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaulketh%2Fsimple-pi-fan-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaulketh%2Fsimple-pi-fan-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaulketh","download_url":"https://codeload.github.com/kaulketh/simple-pi-fan-control/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaulketh%2Fsimple-pi-fan-control/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31996445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":["fancontrol","fancontrol-script","gpio","gpio-pins","raspberry-pi","raspberrypi"],"created_at":"2025-05-28T08:36:39.273Z","updated_at":"2026-04-19T05:35:14.788Z","avatar_url":"https://github.com/kaulketh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Plan\n\nI would have to switch the fan directly using a small piece of software via a\nGPIO pin. The program reads the CPU+GPU temperature and then switches the fan.\nThe OS should start the program periodically or automatically.\n\n### Structure\n\nThe GPIO pins of the Raspberry Pi have 3V3 logic and cannot switch the power\neven of such a small fan directly. That's why a switching amplifier is needed.\nThis is quite easy to implement with a transistor.\n\n### Hardware required in addition to the Raspberry Pi and its case with fan\n\n* 1 NPN transistor e.g. BC547 B\n* 1 Resistor 4,7 kOhm\n\nSee [circuit diagram](hardware/circuit_diagram.png)\nand [wiring image](hardware/wiring.png)\n\n### The Python code\n\n* Only required package: [**_RPi.GPIO_**](https://pypi.org/project/RPi.GPIO/)\n\n* **_control.py_** : FanControl class\n    * In an infinite loop temperature is checked in a certain time interval\n        * If the temperature is greater than or equal the max value, and the\n          pin is\n          not already activated, GPIO pin will set to HIGH\n        * Is the temperature lower than or equal to the minimum value, and the\n          pin\n          is set to HIGH, GPIO pin will set to LOW\n* **_config.py_** : Settings:\n    * GPIO pin of connected fan\n    * Max temperature at which the fan is switched on\n    * Min temperature at which the fan is switched off\n    * Check interval, in seconds\n\n* **_main.py_**: An instance of FanControl will load with passed parameters.\n\n### Auto run at boot up\n\nOne possibility is described in **_service_** directory. Refer\nto [README](service/README.md)\n\n### Installation possibilities and steps\n\n* Clone this repository and configure manually\n* Install distribution, service enabled automatically\n* Adapt _config.py_ ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaulketh%2Fsimple-pi-fan-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaulketh%2Fsimple-pi-fan-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaulketh%2Fsimple-pi-fan-control/lists"}