{"id":18929129,"url":"https://github.com/jwillikers/fan-controller-circuitpython","last_synced_at":"2026-02-28T13:02:57.761Z","repository":{"id":104838596,"uuid":"480134782","full_name":"jwillikers/fan-controller-circuitpython","owner":"jwillikers","description":"A simple program to set the speed of a fan using the RP2040 QT Py and the EMC2101 fan controller","archived":false,"fork":false,"pushed_at":"2024-12-02T16:57:11.000Z","size":14725,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-14T21:38:55.157Z","etag":null,"topics":["circuitpython","emc2101","fan","microcontroller","pipkin","python","qt-py","rp2040"],"latest_commit_sha":null,"homepage":"","language":"Just","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwillikers.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.adoc","code_of_conduct":"CODE_OF_CONDUCT.adoc","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":"2022-04-10T20:40:29.000Z","updated_at":"2024-12-02T16:57:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"d0aa3119-93ac-43eb-a1c6-abb54aced64b","html_url":"https://github.com/jwillikers/fan-controller-circuitpython","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/jwillikers%2Ffan-controller-circuitpython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwillikers%2Ffan-controller-circuitpython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwillikers%2Ffan-controller-circuitpython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwillikers%2Ffan-controller-circuitpython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwillikers","download_url":"https://codeload.github.com/jwillikers/fan-controller-circuitpython/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239927824,"owners_count":19719835,"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":["circuitpython","emc2101","fan","microcontroller","pipkin","python","qt-py","rp2040"],"created_at":"2024-11-08T11:30:13.878Z","updated_at":"2026-02-28T13:02:52.709Z","avatar_url":"https://github.com/jwillikers.png","language":"Just","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Fan Controller\nJordan Williams \u003cjordan@jwillikers.com\u003e\n:experimental:\n:icons: font\nifdef::env-github[]\n:tip-caption: :bulb:\n:note-caption: :information_source:\n:important-caption: :heavy_exclamation_mark:\n:caution-caption: :fire:\n:warning-caption: :warning:\nendif::[]\n:Adafruit-EMC2101: https://www.adafruit.com/product/4808[Adafruit EMC2101 I2C PC Fan Controller and Temperature Sensor]\n:Adafruit-QT-Py-RP2040: https://www.adafruit.com/product/4900[Adafruit QT Py RP2040]\n:CircuitPython: https://circuitpython.org/[CircuitPython]\n:just: https://github.com/casey/just[just]\n:Noctua-NF-P12-redux-1700-PWM-Fan: https://noctua.at/en/nf-p12-redux-1700-pwm[Noctua NF-P12 redux-1700 PWM Fan]\n:pre-commit: https://pre-commit.com/[pre-commit]\n:pipkin: https://github.com/aivarannamaa/pipkin[pipkin]\n\nimage:https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white[pre-commit, link=https://github.com/pre-commit/pre-commit]\nimage:https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json[Ruff, link=https://github.com/astral-sh/ruff]\n\nA simple fan controller using the {Adafruit-QT-Py-RP2040} and the {Adafruit-EMC2101}, written in {CircuitPython}.\n\nifdef::env-github[]\n++++\n\u003cp align=\"center\"\u003e\n  \u003cimg  alt=\"Raspberry PI Pico PWM Fan Controller Breadboard Top View 1\" src=\"pics/pico-pwm-fan-controller-breadboard-top-1.jpg?raw=true\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg  alt=\"Raspberry PI Pico PWM Fan Controller Breadboard Top View 2\" src=\"pics/pico-pwm-fan-controller-breadboard-top-2.jpg?raw=true\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg  alt=\"Raspberry PI Pico PWM Fan Controller Breadboard Side View 1\" src=\"pics/pico-pwm-fan-controller-breadboard-side-1.jpg?raw=true\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg  alt=\"Raspberry PI Pico PWM Fan Controller Breadboard Side View 2\" src=\"pics/pico-pwm-fan-controller-breadboard-side-2.jpg?raw=true\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg  alt=\"Raspberry PI Pico PWM Fan Controller Breadboard Side View 3\" src=\"pics/pico-pwm-fan-controller-breadboard-side-3.jpg?raw=true\"/\u003e\n\u003c/p\u003e\n++++\nendif::[]\n\nifndef::env-github[]\nimage::pics/pico-pwm-fan-controller-breadboard-top-1.jpg[Raspberry PI Pico PWM Fan Controller Breadboard Top View 1, align=center]\nimage::pics/pico-pwm-fan-controller-breadboard-top-2.jpg[Raspberry PI Pico PWM Fan Controller Breadboard Tope View 2, align=center]\nimage::pics/pico-pwm-fan-controller-breadboard-side-1.jpg[Raspberry PI Pico PWM Fan Controller Breadboard Side View 1, align=center]\nimage::pics/pico-pwm-fan-controller-breadboard-side-2.jpg[Raspberry PI Pico PWM Fan Controller Breadboard Side View 2, align=center]\nimage::pics/pico-pwm-fan-controller-breadboard-side-3.jpg[Raspberry PI Pico PWM Fan Controller Breadboard Side View 3, align=center]\nendif::[]\n\n== Hardware\n\nAll the hardware components in my particular build are enumerated here.\n\n.Fan Controller Components\n* {Adafruit-QT-Py-RP2040}\n* {Adafruit-EMC2101}\n* https://www.adafruit.com/product/64[Half-size breadboard]\n* {Noctua-NF-P12-redux-1700-PWM-Fan}\n* https://www.adafruit.com/product/759[Premium Male/Male Jumper Wires - 40 x 3\" (75mm)]\n* https://www.adafruit.com/product/4399[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long]\n* USB-C Power Supply for the microcontroller\n\nProgramming will require a USB-C cable and a computer.\n\n== How it Works\n\nThis is a dead-simple fan controller that simply lowers the speed of the {Noctua-NF-P12-redux-1700-PWM-Fan} to a quiet 40% speed.\nThe microcontroller simply sets the fan speed and then enters deep sleep indefinitely.\nTechnically, it enters deep sleep for around nineteen years, but after it sets the initial fan speed on the EMC2101 there's no compelling reason for it to wake up again.\nI could probably use PWM straight from the microcontroller just as easily, but the EMC2101 development board has an even easier to use CircuitPython library.\nThe fan setup might evolve in the future to take into account temperature sensing dynamic speed adjustment.\n\n== Getting Started\n\nThe instructions here setup the software for the QT Py RP2040.\nIt is assumed that you are on and familiar with Linux and using CircuitPython on microcontrollers.\n\n[TIP]\n====\nTo access the serial connection to the QT Py RP2040 without requiring superuser privileges, add your user to the `dialout` group.\n\n[,sh]\n----\nsudo usermod --append --groups dialout $USER\n----\n\nNow restart for the change to take effect.\n====\n\n. Wait for the file to finish copying, after which the Feather RP2040's onboard storage should automatically be mounted.\n\n. Clone this project's repository.\n+\n[,sh]\n----\ngit clone https://github.com/jwillikers/fan-controller.git\n----\n\n. Change into the project directory.\n+\n[,sh]\n----\ncd fan-controller\n----\n\n. Install {just} by following the instructions in the https://github.com/casey/just?tab=readme-ov-file#installation[installation section].\n\n. Hold down the button marked _bootsel_ on the QT Py RP2040 while plugging it in to your computer with a USB-C cable.\nThe RP2040 should automatically be mounted as a disk on your computer.\n\n. To download and install CircuitPython, run `just install-circuitpython`.\n+\n[,sh]\n----\njust install-circuitpython\n----\n\n. Run `just init` to initialize the venv.\n+\n[,sh]\n----\njust init\n----\n\n. Mount the QT Py RP2040 if needed.\n+\n[,sh]\n----\nudisksctl mount --block-device /dev/sda1\n----\n\n. Run `just install` to install everything to the QT Py RP2040.\n+\n[,sh]\n----\njust install\n----\n\n== Development\n\n. Run `just init-dev` to initialize the virtual environment for development.\nThis will install all of the necessary dependencies and the {pre-commit} hooks.\n+\n[,sh]\n----\njust init-dev\n----\n\n. To update dependencies, run `just update`.\n+\n[,sh]\n----\njust update\n----\n\n. Use `just --list` to list other available tasks.\n+\n[,sh]\n----\njust --list\n----\n\n== Documentation\n\n.CircuitPython Documentation\n* https://circuitpython.readthedocs.io/en/latest/shared-bindings/alarm/index.html[alarm]\n* https://docs.circuitpython.org/projects/emc2101/en/latest/[emc2101]\n\n== Contributing\n\nContributions in the form of issues, feedback, and even pull requests are welcome.\nMake sure to adhere to the project's link:CODE_OF_CONDUCT.adoc[Code of Conduct].\n\n== Open Source Software\n\nThis project is built on the hard work of countless open source contributors.\nSeveral of these projects are enumerated below.\n\n* https://asciidoctor.org/[Asciidoctor]\n* {CircuitPython}\n* https://git-scm.com/[Git]\n* {pre-commit}\n* {pipkin}\n* https://www.python.org/[Python]\n\n== Code of Conduct\n\nRefer to the project's link:CODE_OF_CONDUCT.adoc[Code of Conduct] for details.\n\n== License\n\nThis repository is licensed under the https://www.gnu.org/licenses/gpl-3.0.html[GPLv3], a copy of which is provided link:LICENSE.adoc[here].\n\n© 2022-2024 Jordan Williams\n\n== Authors\n\nmailto:{email}[{author}]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwillikers%2Ffan-controller-circuitpython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwillikers%2Ffan-controller-circuitpython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwillikers%2Ffan-controller-circuitpython/lists"}