Difference between revisions of "Fan HAT"
m (Text replacement - "https://www.waveshare.com/w/upload/" to "https://files.waveshare.com/upload/") |
|||
(14 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | <div class="wiki-pages jet-green-color"> | ||
{{infobox item| | {{infobox item| | ||
− | |img=[[File:Fan-HAT-6.jpg|400px|link=https://www.waveshare.com/fan-hat.htm|Fan HAT]] | + | |img=[[File:Fan-HAT-6.jpg|400px|{{Amazon_nolink|default={{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}|url=link=https://www.waveshare.com/fan-hat.htm}}|Fan HAT]] |
|caption=PWM Controlled Fan HAT For Raspberry Pi, I2C Bus, PCA9685 Driver, Temperature Monitor | |caption=PWM Controlled Fan HAT For Raspberry Pi, I2C Bus, PCA9685 Driver, Temperature Monitor | ||
|brand=Waveshare | |brand=Waveshare | ||
− | |{{#urlget:amazon|default}}=display | + | |{{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}=display |
|website_cn=[http://www.waveshare.net 中文网站] | |website_cn=[http://www.waveshare.net 中文网站] | ||
|website_en=[https://www.waveshare.com/fan-hat.htm Website] | |website_en=[https://www.waveshare.com/fan-hat.htm Website] | ||
Line 12: | Line 13: | ||
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. | 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=== | ===Features=== | ||
− | *PCA9685 PWM driver as the fan controller, powerful driving capability, auto PWM adjustment | + | *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 | + | *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 | + | *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 | + | *Supports retrieving temperature data in real-time, and then adjusting the speed automatically, programmable configuration. |
− | *I2C pins, for connecting other host control boards | + | *I2C pins, for connecting other host control boards. |
− | *16-ch PWM outputs, for driving other external PWM devices | + | *16-ch PWM outputs, for driving other external PWM devices. |
− | *Comes with heat sinks, better cooling effect | + | *Comes with heat sinks, better cooling effect. |
+ | |||
===Specifications=== | ===Specifications=== | ||
*Operating voltage: 5V | *Operating voltage: 5V | ||
Line 27: | Line 29: | ||
*Fan RPM (max): 8000 RPM | *Fan RPM (max): 8000 RPM | ||
*OLED driver: SSD1306 | *OLED driver: SSD1306 | ||
− | *OLED resolution: | + | *OLED resolution: 128 × 32 |
*OLED display color: White | *OLED display color: White | ||
*OLED FOV: > 160° | *OLED FOV: > 160° | ||
*Mounting holes: 3.0mm | *Mounting holes: 3.0mm | ||
+ | |||
==About board== | ==About board== | ||
[[File:Fan-HAT-9_960.jpg|700px]] | [[File:Fan-HAT-9_960.jpg|700px]] | ||
Line 46: | Line 49: | ||
==Example== | ==Example== | ||
===Hardware connection=== | ===Hardware connection=== | ||
− | First at all, please connect the Fan HAT to Raspberry Pi by attaching it on the 40PIN GPIO<br /> | + | First at all, please connect the Fan HAT to Raspberry Pi by attaching it on the 40PIN GPIO.<br /> |
The standoffs and screws can be sued to hold the Fan HAT in another side.<br /> | The standoffs and screws can be sued to hold the Fan HAT in another side.<br /> | ||
[[File:Fan-HAT-5.jpg|500px]] | [[File:Fan-HAT-5.jpg|500px]] | ||
− | |||
{{Libraries Installation for RPi}} | {{Libraries Installation for RPi}} | ||
+ | |||
===Download example=== | ===Download example=== | ||
Open the terminal and run the following commands to download example | Open the terminal and run the following commands to download example | ||
Line 56: | Line 59: | ||
cd | cd | ||
sudo apt-get install p7zip-full | sudo apt-get install p7zip-full | ||
− | wget | + | wget https://files.waveshare.com/upload/0/06/Fan_HAT.7z |
7z x Fan_HAT.7z -r -o./Fan_HAT | 7z x Fan_HAT.7z -r -o./Fan_HAT | ||
</pre> | </pre> | ||
Line 86: | Line 89: | ||
</pre> | </pre> | ||
==Resources== | ==Resources== | ||
− | *[https:// | + | ===Documents=== |
− | *[https:// | + | *[https://files.waveshare.com/upload/6/6f/Fan-HAT-Schematic.pdf Schematic] |
+ | *[https://files.waveshare.com/upload/a/af/SSD1306-Revision_1.1.pdf SSD1306 datasheet] | ||
+ | *[https://files.waveshare.com/upload/f/f6/RT9193.pdf RT9193 datasheet] | ||
+ | *[https://files.waveshare.com/upload/6/68/PCA96_datasheet.pdf PCA9685 datasheet] | ||
+ | ===Example=== | ||
+ | *[https://files.waveshare.com/upload/0/06/Fan_HAT.7z Codes] | ||
+ | |||
+ | ==FAQ== | ||
+ | {{FAQ| Why does the python or python3 program prompt the following questions (Debian Bullseye)?<br/>[[File:FAN_HAT_OLED.png|600px]]| | ||
+ | It is because the I2C is not turned on, just turn on the I2C interface of the Raspberry Pi. | ||
+ | |||}} | ||
+ | {{FAQ|Why does it turn and stop when running the default program? | ||
+ | | | ||
+ | Because the temperature of the Raspberry Pi did not go up, under normal circumstances the temperature of the Raspberry Pi was about 40 degrees, only when the CPU was computing up, the heat will go up, and the fan will turn up. Of course, you can modify the program to improve this phenomenon. | ||
+ | ||}} | ||
+ | {{FAQ|Why does the fan sound so loud? | ||
+ | | | ||
+ | Because the higher the speed of the wind, the wind sound is also correspondingly large, the noise is large. | ||
+ | ||}} | ||
==Support== | ==Support== | ||
− | {{ | + | {{Servicebox1}} |
Latest revision as of 14:57, 31 August 2023
| ||
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
- Standard Raspberry Pi 40PIN GPIO header
- PCA9685 PWM driver
- 3007 size PWM controlled adjustable fan
- PCA9685 I2C address configuration
- Reserved I2C control pins
- Reserved PCA9685 output channels
- 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 for RPi
First of all you make sure to use which language C or python Open the terminal of Raspberry Pi and install libraries as guides below
Install Library
If you use the bookworm system, you can only use lgpio library, bcm2835 and wiringPi can't be installed and used.
BCM2835
#Open the Raspberry Pi terminal and run the following command wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz tar zxvf bcm2835-1.71.tar.gz cd bcm2835-1.71/ sudo ./configure && sudo make && sudo make check && sudo make install # For more, you can refer to the official website at: http://www.airspayce.com/mikem/bcm2835/
WiringPi
#Open the Raspberry Pi terminal and run the following command cd sudo apt-get install wiringpi #For Raspberry Pi systems after May 2019 (earlier than that can be executed without), an upgrade may be required: wget https://project-downloads.drogon.net/wiringpi-latest.deb sudo dpkg -i wiringpi-latest.deb gpio -v # Run gpio -v and version 2.52 will appear, if it doesn't it means there was an installation error # Bullseye branch system using the following command: git clone https://github.com/WiringPi/WiringPi cd WiringPi . /build gpio -v # Run gpio -v and version 2.70 will appear, if it doesn't it means there was an installation error
lgpio
#Open the Raspberry Pi terminal and run the following command wget https://github.com/joan2937/lg/archive/master.zip unzip master.zip cd lg-master sudo make install # You can refer to the official website for more: https://github.com/gpiozero/lg
Install Python Library
#python2 sudo apt-get update sudo apt-get install python-pip sudo pip install RPi.GPIO sudo apt-get install python-smbus #python3 sudo apt-get update sudo apt-get install python3-pip sudo pip install RPi.GPIO sudo apt-get install python3-smbus
Download example
Open the terminal and run the following commands to download example
cd sudo apt-get install p7zip-full wget https://files.waveshare.com/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
Resources
Documents
Example
FAQ
It is because the I2C is not turned on, just turn on the I2C interface of the Raspberry Pi.
Because the temperature of the Raspberry Pi did not go up, under normal circumstances the temperature of the Raspberry Pi was about 40 degrees, only when the CPU was computing up, the heat will go up, and the fan will turn up. Of course, you can modify the program to improve this phenomenon.
{{{5}}}
Because the higher the speed of the wind, the wind sound is also correspondingly large, the noise is large.
{{{5}}}
Support
Technical Support
If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 AM GMT+8 (Monday to Friday)