• sales

    +86-0755-88291180

Raspberry Pi Fan HAT User Guide

Introduction

This is a PWM controlled Fan HAT, which is designed for Raspberry Pi, I2C Bus, PCA9685 driver, it can be used as a temperature monitor as well.

Features

  • PCA9685 PWM driver as the fan controller, powerful driving capability, auto PWM adjustment
  • 0.91" OLED, 128x32 pixels, displays board temperature or other user-defined content in real-time
  • Adopts 3007 size PWM controlled fan, up to 8000rpm speed, brings strong airflow
  • Supports retrieving temperature data in real-time, and then adjusting the speed automatically, programmable configuration
  • I2C pins, for connecting other host control boards
  • 16-ch PWM outputs, for driving other external PWM devices
  • Comes with heat sinks, better cooling effect

Specifications

  • Operating voltage: 5V
  • Logic level: 3.3V
  • Driver: PCA9685
  • Interface: I2C
  • Fan PWM driver duty cycle: ≥25%
  • Fan RPM (max): 8000 RPM
  • OLED driver: SSD1306
  • OLED resolution: 128×32
  • OLED display color: White
  • OLED FOV: > 160°
  • Mounting holes: 3.0mm

About board


  1. Standard Raspberry Pi 40PIN GPIO header
  2. PCA9685 PWM driver
  3. 3007 size PWM controlled adjustable fan
  4. PCA9685 I2C address configuration
  5. Reserved I2C control pins
  6. Reserved PCA9685 output channels
  7. 0.91inch OLED display

Pinout


Relationiship of temperature and Fan speed


Example

Hardware connection

First at all, please connect the Fan HAT to Raspberry Pi by attaching it on the 40PIN GPIO
The standoffs and screws can be sued to hold the Fan HAT in another side.

Libraries installation

Open the terminal of Raspberry Pi and install libraries as guides below

Install WiringPi Library

cd
sudo apt-get install wiringpi
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
gpio -v

Install C Library bcm2835

cd
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz
tar zxvf bcm2835-1.60.tar.gz 
cd bcm2835-1.60/
sudo ./configure
sudo make && sudo make check && sudo make install

For more information and the newest libraries please refer to website:http://www.airspayce.com/mikem/bcm2835/

Install Python Library

For python2
cd
sudo apt-get update
sudo apt-get install python-pip
sudo pip install RPi.GPIO
For python3
cd
sudo apt-get update
sudo apt-get install python3-pip
sudo pip install RPi.GPIO

Download example

Open the terminal and run the following commands to download example

cd
sudo apt-get install p7zip-full
wget https://www.waveshare.com/w/upload/0/06/Fan_HAT.7z
7z x Fan_HAT.7z  -r -o./Fan_HAT

Run the example

C
cd
cd Fan_HAT/c/
make clean 
make
sudo ./main
Python
cd
cd Fan_HAT/python/
sudo python main.py

Run when booting

Modify rc.local script

sudo nano /etc/rc.local

Add the lines below to the script, you need to set them in the front of exit 0

fi
sudo /home/pi/Fan_HAT/c/main &
#exit 0
TAG: Modbus RTU Jetson Orin 5G/4G/3G expansion board GNSS GPS RM520N-GL X1300 X1300-A2 Raspberry Pi 5 HDMI to CSI-2 Shield 1080P@60fps & Audio & Video Also 5inch USB Monitor Gyroscope User Guide Raspberry Pi Pico 2 RP2350B RP2350-PiZero Development Board PSRAM DVI For HDMI RV1106 Laser 450nm 5W high precision module Adjustable focal length For Laser Carving / Laser 3D Printing ESP32-P4-WIFI6 5inch LCD Display AI Development Board 720×1280 5 inch TouchScreen Deepseek ESP32 1.54 inch E-Paper Smart Watch display Screen 200x200 Ultra-low power For Arduino/Micropython/RTOS For Watchy Raspberry Pi 0.85inch LCD ESP32 S3 Development Board 2.8 inch B LCD 2.8inch Display 480x640 TouchScreen QMI8658 Sensor / Battery Port LVGL/HMI For Arduino Tutorial ESP32 P4 Development Board WIFI6 3.4 inch LCD Round Display 3.4inch TouchScreen 800×800 Dual Microphones Raspberry Pi LCD Raspberry Pi 5 Official Original PCIe to M.2 HAT+ Compact Expansion Board NVMe SSD Raspberry-Pi-A7670E-GSM-GPRS-GNSS-LTE-Cat-1-2G-A-User-Guide XIAO RA4M1 Tiny SuperMini Board For Arduino Uno IDE For SeeedStudio R7FA4M1 DeepSeek AI Voice Chat ESP32 C6 Development Board 1.69 inch LCD Display 240x280 1.69inch TouchScreen Programmable Watch