1

I am doing a temperature control project and am utilizing the GEEEK Pi 4 Channel Relay hat for Raspberry Pi.

I do not know if this is the right question to ask but what GPIO pins would correlate to each channel for this specific relay.

I am fairly new to electronics so please bear with me.

3
  • 2
    look up the meaning of the word bare
    – jsotola
    Commented Oct 9 at 3:02
  • 1
    @jsotola: good point... that is definitely off topic
    – Seamus
    Commented Oct 9 at 5:28
  • You ask about I2C GPIO pins and device channel numbers; its not 1-to-1. I2C is a two-wire bus interface. An I2C bus connects multiple devices and is used to pass messages between two devices on the bus. So the same two GPIO pins are used to pass messages to the relay to control all of the relay channels. Basically, there are two protocol layers. An I2C hardware layer allows communication. A device-specific protocol defines the messages and what they mean. I2C devices often have Linux device drivers that provide an API for controlling that device. This driver calls the I2C bus driver. Commented Oct 12 at 5:14

1 Answer 1

0

Hopefully this is the same HAT, or at least (functionally) the same as the GeeekPi 4 channel relay hat - it looks the same...

Clone of GeeekPi 4 Channel Relay Hat Board

... and the link below also references the GeeekPi Github repository.

From EP-0099

Register Map

Register Address Function Value
0x01 Relay 1 0(FULL OFF) - 1/255(ON)
0x02 Relay 2 0(FULL OFF) - 1/255(ON)
0x03 Relay 3 0(FULL OFF) - 1/255(ON)
0x04 Relay 4 0(FULL OFF) - 1/255(ON)

Note that this is relative to the base address, which is set by jumpers:

Base address

DIP switch status icon Device Address
0x10 DIP switch position 0x10
0x11 DIP switch position 0x11
0x12 DIP switch position 0x12
0x13 DIP switch position 0x13

The hat uses I2C, and so, from I2C - Inter Integrated Circuit, it uses pins 3 (GPIO2) and 5 (GPIO3) of the GPIO:

Top of GPIO bus

In addition, there is a repo with some demo code: dockerpi. In the 4channelRelay directory, the product link, on wiki.52pi.com, is broken. However, after some precise googling, the linked to product page would appear to be the EP-0099 link posted above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.