A simple fan controller using the Adafruit QT Py RP2040 and the Adafruit EMC2101 I2C PC Fan Controller and Temperature Sensor, written in CircuitPython.
All the hardware components in my particular build are enumerated here.
Programming will require a USB-C cable and a computer.
This 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. The microcontroller simply sets the fan speed and then enters deep sleep indefinitely. Technically, 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. I could probably use PWM straight from the microcontroller just as easily, but the EMC2101 development board has an even easier to use CircuitPython library. The fan setup might evolve in the future to take into account temperature sensing dynamic speed adjustment.
The instructions here setup the software for the QT Py RP2040. It is assumed that you are on and familiar with Linux and using CircuitPython on microcontrollers.
💡
|
To access the serial connection to the QT Py RP2040 without requiring superuser privileges, add your user to the sudo usermod --append --groups dialout $USER Now restart for the change to take effect. |
-
Wait for the file to finish copying, after which the Feather RP2040’s onboard storage should automatically be mounted.
-
Clone this project’s repository.
git clone https://github.com/jwillikers/fan-controller.git
-
Change into the project directory.
cd fan-controller
-
Install just by following the instructions in the installation section.
-
Hold down the button marked bootsel on the QT Py RP2040 while plugging it in to your computer with a USB-C cable. The RP2040 should automatically be mounted as a disk on your computer.
-
To download and install CircuitPython, run
just install-circuitpython
.just install-circuitpython
-
Run
just init
to initialize the venv.just init
-
Mount the QT Py RP2040 if needed.
udisksctl mount --block-device /dev/sda1
-
Run
just install
to install everything to the QT Py RP2040.just install
-
Run
just init-dev
to initialize the virtual environment for development. This will install all of the necessary dependencies and the pre-commit hooks.just init-dev
-
To update dependencies, run
just update
.just update
-
Use
just --list
to list other available tasks.just --list
Contributions in the form of issues, feedback, and even pull requests are welcome. Make sure to adhere to the project’s Code of Conduct.
This project is built on the hard work of countless open source contributors. Several of these projects are enumerated below.
Refer to the project’s Code of Conduct for details.