1

The goal is to design thermostat system via stacking Raspberry pi HATs:

  1. Raspberry pi (3B+ or 4)
  2. 4-channel relay
  3. TFT Touch Display

It would be preferable that community experience point out any obstacles before I purchase the relay-HAT and steer away from a poor design decision. Below is a preliminary analysis, however, I would like the community's experience to review and pick it apart for any obstacles.

A touch-display hat was purchased from Amazon.com: based on the pinout data from the waveshare website the display uses:

DISPLAY: 
=======
PIN GPIO 
11  17   TP_IRQ Touch Panel interrupt, low level while the Touch Panel detects touching
18  24   LCD_RS     Instruction/Data Register selection
19  10   LCD_SI / TP_SI     SPI data input of LCD/Touch Panel
21   9   TP_SO  SPI data output of Touch Panel
22  25   RST    Reset
23  11   LCD_SCK / TP_SCK   SPI clock of LCD/Touch Panel
24   8   LCD_CS     LCD chip selection, low active
26   7   TP_CS  Touch Panel chip selection, low active

The DockerPi 4 Channel Relay display indicates I2C relay control. Given that the display uses the GPIO & PINS listed above.

I2C pinout:

  • I2C pins in BCM mode are: 2, 3
  • I2C pins in WiringPi are: 8, 9

QUESTIONS

  1. Can the two hats stack and perform their respective functions?
  2. Or is there a feature that I have not considered that may be an obstacle?

BONUS ROUND

If you have had success stacking multiple HATs, please indicate which HATs and any lessons-learned in your reply.

UPDATE: Fail-safe \ failure-mode

Because the application is HVAC (heating , air-conditioning), it is important to understand failsafe modes and ensure that relays are not engaged in a failure mode

gatorback
  • 637
  • 1
  • 6
  • 21

1 Answers1

2

Answer

Remark: Just a quick and dirty answer. Perhaps more details later.

Warning: no guarantee no nothing won't meltdown or blow up.


I skimmed the datasheets and quickly concluded that there is 80% chance OK, for the following reasons:

(1) Touch display is SPI, and relay is I2C,

(2) I2C relay has well documented instructions to change addresses, and further more, if you use Ri4B, you can choose one of the multiple (max 5, stable 3) I2C channels to avoid any GPIO pin conflicts.


References:

(1) Rpi I2C Four Channel Relay (with demo python program) - DockerPi

(2) Docker Pi 4 Channel Relay Module - Seeed Studio

(3) Rpi SPI 3.5" 480x320 Touch Screen TFT LCD - WaveShare

(4) DockerPi GitHub

(5) 52Pi Rpi Modules Catalog

(6) How to use a stackable Rpi relay HAT to control 220V AC mains power?

(7) How to tap/tee/fork the Rpi GPIO pins covered/blocked by a HAT/pHAT/bonnet?

(8) Choosing between relays of 3V/5V/12V, High/Low logical level trigger, Rpi compatible/incompatible (and how to modify/get around Rpi incompatible relay to make it compatible), Cheap/Expensive, Risky/Reliable/Newbie proof, Hobbyist/Industrial/professional grade, Direct/Optically isolated, ...

(9) Smart home/building/city learning/research project notes/references 1/2 - tlfong01 2018/2019

(10) Smart home/building/city learning/research project notes/references 2/2 - tlfong01 2018/2019


End of answer

tlfong01
  • 4,847
  • 3
  • 12
  • 24