Giter Site home page Giter Site logo

alexfukahori / rpi-pwm-fan-control Goto Github PK

View Code? Open in Web Editor NEW
26.0 2.0 5.0 16 KB

This Python script was created for the purpose to control a PWM FAN Noctua NF-A4x20 5V, using Raspberry Pi 4B hardware features. The script use WiringPi-Python as a dependecy, it is used to set Hardware PWM value clock as 25Khz that was specified by Intel (c.f. “4-Wire Pulse Width Modulation (PWM) Controlled Fans”, Intel Corporation September 2005, revision 1.3), to read the FAN speed using the tachometer, it is read by using Hardware provided interruption pin. Using Hardware feature use less CPU to execute the work, avoiding to use Raspberry Pi CPU resource only to control the FAN speed.

License: MIT License

Python 100.00%
rapsberrypi raspberry raspberry-pi-4 raspberry-pi-3 fan pwm-fan pwm wiringpi wiring-pi wiringpi-library

rpi-pwm-fan-control's People

Contributors

alexfukahori avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rpi-pwm-fan-control's Issues

HW PWM

What is needed to run HW PWM? Just uncomment line 153 and comment 154?

Noctua PWM Voltage

According to some internet sources and noctua white paper, PWM should recieve 5V. RPi GPIO are only 3.3V.
Some people advice connecting 3.3 to 5V pull-up level shifters. What's your opinion on that?

pinMode PWM: Unable to do this when using /dev/gpiomem

I'm trying to run your code on my 4b and I'm getting the error in the title. Here's my buildlog.

~ $ git clone [email protected]:alexfukahori/rpi-pwm-fan-control.git### 
Cloning into 'rpi-pwm-fan-control'...
remote: Enumerating objects: 30, done.
remote: Counting objects: 100% (30/30), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 30 (delta 14), reused 3 (delta 0), pack-reused 0
Receiving objects: 100% (30/30), 8.58 KiB | 627.00 KiB/s, done.
Resolving deltas: 100% (14/14), done.
~ $ cd rpi-pwm-fan-control/
~/rpi-pwm-fan-control $ pip3 install -r requirements.txt
Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
~/rpi-pwm-fan-control $ dir
LICENSE  README.md  requirement.txt  rpi-pwmfan.py
~/rpi-pwm-fan-control $ pip3 install -r requirement.txt
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting wiringpi==2.60.0 (from -r requirement.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/06/bf/7c4ec17172f72917707dddeacfa02eae80b56ad3b7b5674a4258e62b2f5a/wiringpi-2.60.0-cp37-cp37m-linux_armv7l.whl (285kB)
    100% |████████████████████████████████| 286kB 552kB/s 
Installing collected packages: wiringpi
Successfully installed wiringpi-2.60.0
~/rpi-pwm-fan-control $ python3 ./rpi-pwmfan.py
PWM FAN control starting
pinMode PWM: Unable to do this when using /dev/gpiomem. Try sudo?
~/rpi-pwm-fan-control $ sudo python3 ./rpi-pwmfan.py
Traceback (most recent call last):
  File "./rpi-pwmfan.py", line 3, in <module>
    import wiringpi as wiringpi
ModuleNotFoundError: No module named 'wiringpi'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.