Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stridsvagn69420/rpi-fanctl

Raspberry Pi GPIO PWM fan controller
https://github.com/stridsvagn69420/rpi-fanctl

gpio pwm pwm-fan pwm-fan-controller raspberry-pi raspberry-pi-4 raspberrypi rpi4

Last synced: 5 days ago
JSON representation

Raspberry Pi GPIO PWM fan controller

Awesome Lists containing this project

README

        

# rpi-fanctl
Raspberry Pi GPIO PWM fan controller

A program that uses the hardware PWM of a Raspberry Pi's GPIO 18 pin to properly control a 5V fan. Currently it's just a quick test that uses the `rppal` crate, but in the future this project is supposed to be a daemon that features:
- A fan curve (X: temperature; Y: duty cycle)
- IPC/pseudo files to read and set stats during runtime
- Dedicated daemon user (does not run as root, daemon user is priviledged, e.g. `gpio` group)
- Support for Systemd, OpenRC and runit
- Automatically check if `/boot/firmware/config.txt` is configured correctly

This is sufficient for my needs, but here are some things I might add to this project:
- (Point out that the fan can *technically* be any voltage as long as the MOSFET gate switches with just 3.3V and supports the fan's voltage)
- Make use of the second hardware PWM channel (e.g. secondary fan)
- Read the tach value on 4-pin PWM fans


runfs structure:
```sh
/run
├── rpi-fanctl
│   ├── rpi-fanctl.pid
│   └── rpi-fanctl.sock
```