Skip to content

Raspberry Pi3 Fan Control Circuit: uses the RPi3 and Sklearn libraries to control transistor circuit PWM with optional machine learning optimized energy control.

Notifications You must be signed in to change notification settings

Sandman2127/RPi3-Fan-Control-Circuit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Raspberry Pi3 Fan Control Software & Circuit

Software Design:

This script was intended as an automated Fan Control system for the Raspberry Pi 3. It is very experimental so results may vary dependent on configuration. It is reasonable to assume that this controller will function well with a recent version of RPi3 and the designation of the correct position of the python2 environment in your ~/.bashrc (see usage).

The program senses temperature of the processor by reading the constantly updated file /sys/class/thermal/thermal_zone0/temp in short time intervals.

Circuit Details:

Fan Circuit

Circuit Details and Simulation

Circuit Description:

  • The circuit is a common-emitter amplifier with an NPN 2222A by Fairchild:
  • We feed the base of the transistor with ~8 mA using a 3.3V output from the RPi3 pin 37 through a 470 Ohm resistor. This setup pushes the transistor base current flow (3.3V/470Ohm = ~7 mA) halfway to RPi3's pin saturation (16 mA)
  • The max output current of a gpio pin is 16 mA calculated here
  • My fan can accept up to a 12V power source across the leads forcing a current flow of up to 200 mA

Usage

To run automatically add these lines to the bottom of your ~/.bashrc:

# use python2.7:
/path/to/RPi.GPIO/python /path/to/RPi3_temp_control/RPi3_temp_regulator.py & 

Activate:

source ~/.bashrc

The cpu cooling fan should now be under active regulation!

About

Raspberry Pi3 Fan Control Circuit: uses the RPi3 and Sklearn libraries to control transistor circuit PWM with optional machine learning optimized energy control.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages