Skip to content

Simple Python and shell scripts to run a fan on a Raspberry Pi using CPU temperature.

License

Notifications You must be signed in to change notification settings

vc1492a/Raspberry-Pi-Fan-Control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raspberry Pi Fan Control

Simple Python and shell scripts to run a fan based on CPU temperature for your Raspberry Pi.

Language License

The Setup

This setup uses GPIO pin 18 with an NPN Transistor (S8050). Wiring diagrams for this setup are provided in the wiring_diagrams directory, with an image of the most basic setup below.

Basic Wiring Diagram

Raspberry Pi Fan Wiring Diagram

Running on Boot

Here's how to run this script automatically on boot:

  • Modify the shell script to ensure you have the correct path run-fan.py.
  • Make the files executable using sudo chmod a+x run-fan.py and sudo chmod a+x launcher.sh.
  • Use crontab (or another method) to execute launcher.sh on boot.

Helpful Links

The code included in this repository is mainly the work of others, with some modification and adaptations made to the code to document the approach.

Thanks to @vollman-ariel for providing a wiring diagram which includes an additional resistor.

About

Simple Python and shell scripts to run a fan on a Raspberry Pi using CPU temperature.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published