Difference between revisions of "EP-0152"

From 52Pi Wiki
Jump to navigation Jump to search
(How to light up 4 LED indicators)
(Features)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Raspberry Pi Fan Expansion Board Plus 0.91 OLED V1.0==
 
==Raspberry Pi Fan Expansion Board Plus 0.91 OLED V1.0==
 +
[[File:Oledhat2.jpg|right|320px]]
 +
 
==Description==
 
==Description==
 
This is a 40pin Raspberry Pi HAT type expansion board, which provides a 0.91 inch display screen connected to the I2C pin. The display information can be customized through the program.<br>
 
This is a 40pin Raspberry Pi HAT type expansion board, which provides a 0.91 inch display screen connected to the I2C pin. The display information can be customized through the program.<br>
 
It provides an ultra-thin 4007 silent fan to provide heat dissipation support. There are also 4 customizable LED lights on the back of the board. You can also control the lighting mode of the LED lights through simple programming. The previous HAT board design is used. The 40Pin GPIO can still be easily accessed by users. The new fixing method avoids the risk of short circuit caused by metal parts and provides a good appearance design.
 
It provides an ultra-thin 4007 silent fan to provide heat dissipation support. There are also 4 customizable LED lights on the back of the board. You can also control the lighting mode of the LED lights through simple programming. The previous HAT board design is used. The 40Pin GPIO can still be easily accessed by users. The new fixing method avoids the risk of short circuit caused by metal parts and provides a good appearance design.
 +
<pre> Raspberry Pi 4B does not include in the package.</pre>
 +
 
==Features==
 
==Features==
 
* Speed Adjustable Fan
 
* Speed Adjustable Fan
Line 10: Line 14:
 
* GPIO expandable interface
 
* GPIO expandable interface
 
* Hat Style
 
* Hat Style
 +
* Compatible with Raspberry Pi 2B/3B/3B+/4B
 +
* Programmable Background light (Controlled by GPIO)
  
 
==Gallery==
 
==Gallery==
 +
* Product Outlook
 +
[[File:Oledhat2.jpg|left|800px]]
 +
<br style="clear:both;">
 +
* Top view
 +
[[File:Oledfan3.jpg|left|800px]]
 +
<br style="clear:both;">
 +
 
==Package Includes==
 
==Package Includes==
 
* 1 x Raspberry Pi Fan Expansion Board Plus 0.91 OLED V1.0
 
* 1 x Raspberry Pi Fan Expansion Board Plus 0.91 OLED V1.0
 +
[[File:OLEDFAN清单.jpg|left|800px]]
 +
<br style="clear:both;">
  
 
==How to assemble==
 
==How to assemble==
Line 19: Line 34:
 
* Fix the hat with copper pillars and nuts.
 
* Fix the hat with copper pillars and nuts.
 
* Fix the hat to Raspberry Pi with screws.
 
* Fix the hat to Raspberry Pi with screws.
 +
===Assemble Steps===
 +
[[File:Oledfan安装.jpg|left|800px]]
 +
<br style="clear:both;">
  
 
==How to enable Fan==
 
==How to enable Fan==
Line 125: Line 143:
  
 
==Keywords==
 
==Keywords==
*
+
* Raspberry Pi Fan Expansion Board Plus 0.91 OLED V1.0, Fan expansion board, oled 0.91, raspberry Pi 4B, heat dissipation, hat board for raspberry Pi 4B

Latest revision as of 13:34, 17 December 2021

Raspberry Pi Fan Expansion Board Plus 0.91 OLED V1.0

Oledhat2.jpg

Description

This is a 40pin Raspberry Pi HAT type expansion board, which provides a 0.91 inch display screen connected to the I2C pin. The display information can be customized through the program.
It provides an ultra-thin 4007 silent fan to provide heat dissipation support. There are also 4 customizable LED lights on the back of the board. You can also control the lighting mode of the LED lights through simple programming. The previous HAT board design is used. The 40Pin GPIO can still be easily accessed by users. The new fixing method avoids the risk of short circuit caused by metal parts and provides a good appearance design.

 Raspberry Pi 4B does not include in the package.

Features

  • Speed Adjustable Fan
  • 0.91 Inch OLED Display
  • Programmable LED Indicator
  • High Performance Heat Dissipation
  • GPIO expandable interface
  • Hat Style
  • Compatible with Raspberry Pi 2B/3B/3B+/4B
  • Programmable Background light (Controlled by GPIO)

Gallery

  • Product Outlook
Oledhat2.jpg


  • Top view
Oledfan3.jpg


Package Includes

  • 1 x Raspberry Pi Fan Expansion Board Plus 0.91 OLED V1.0
OLEDFAN清单.jpg


How to assemble

  • Connect the Hat board to the GPIO pins of the Raspberry Pi.
  • Fix the hat with copper pillars and nuts.
  • Fix the hat to Raspberry Pi with screws.

Assemble Steps

Oledfan安装.jpg


How to enable Fan

  • Fit for Raspberry Pi OS
  • Open a terminal and typing following command:

sudo raspi-config

  • Navigate to `4 Performance Options` -> `P4 Fan` -> `Yes` -> `14` -> `60` -> `OK` -> `OK` -> `Finish` -> `YES`.
  • Raspberry Pi will reboot and take effect.

How to display system info

  • Enable I2C interface
sudo raspi-config
  • Navigate to `Interface Options` -> `I2C` -> `Enable` -> `YES`.
  • Detect If OLED has been recognized.
i2cdetect -y 1
  • OLED default address: `0x3c`

Installation and Upgrade

  • Adafruit_SSD1306 and Adafruit-BBIO

Those library and its dependency(Adafruit GPIO library) can be installed from PyPI by executing:

sudo pip3 install pi-ina219
sudo pip3 install Adafruit-SSD1306
sudo pip3 install Adafruit-BBIO
  • Or you can download and install it by manual:
    • Download SSD1306 library:
sudo python -m pip install --upgrade pip setuptools wheel
git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git
cd Adafruit_Python_SSD1306
sudo python setup.py install
pip install Adafruit-BBIO

Demo Code Download

  • Download Demo Code:
git clone https://github.com/geeekpi/RPiFEBP.git
cd RPiFEBP/
python3 oled.py & 

How to Setup LED indicator

  • Reinstall wiringPi library.
sudo apt -y purge wiringpi
hash -r 
cd /tmp
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
gpio readall
  • LED indicators Pin out

There are 4 LED under the PCB board.

- LED1 - nearby the GPIO pins and fan on left corner, connect to `GPIO 24` (BCM 19)
- LED2 - under LED1, connect to `GPIO 23` (BCM 13)
- LED3 - on the right of LED2, connect to `GPIO 22` (BCM 6) 
- LED4 - on the top of LED3, connect to `GPIO 21` (BCM 5) 
  • Demo code in shell:
for i in `seq 21 24`
 do 
    gpio mode $i out
 done 

while true
do 
  for i in `seq 21 24`
  do
	gpio write $i 1 
  	sleep 0.01
  	gpio write $i 0
  done
done

Control LED on the bottom of expansion board by using RPi.GPIO library.

  • Demo code in Python:
import RPi.GPIO as GPIO
import time 


# BCM Number of LED indicators
leds = [5, 6, 13, 19]

GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)

for i in range(len(leds)):
    GPIO.setup(leds[i], GPIO.OUT)


try:
    while True:
	for led in leds:
       	    GPIO.output(led, GPIO.HIGH)
	    time.sleep(0.01)
            GPIO.output(led, GPIO.LOW)
except KeyboardInterrupt:
    GPIO.cleanup()
    print("BYE")

Keywords

  • Raspberry Pi Fan Expansion Board Plus 0.91 OLED V1.0, Fan expansion board, oled 0.91, raspberry Pi 4B, heat dissipation, hat board for raspberry Pi 4B