Skip to content
rstrouse edited this page Nov 19, 2021 · 2 revisions

Multi-Relay Board

A number of I2c multi-relays are supported in REM. Their configuration is fairly straightforward and allows you to easily configure them for use. First you must consider the type of relay you are installing. Relays are typically low level or high level triggered. The way they are triggered determines what signal is required to close the contacts. The reason why this is important is that you need to set up your relays so that you have the expected relay position when the power is off.

So for a relay that is low level triggered, these relays are often closed when a signal is not being supplied to the relay controller. This means that the relay will be engaged during boot up. Changing this behavior often involves applying pull-up resistors and inverting the normally open/closed behavior of the relay in question. The reason why some relays are designed this way is because it requires less power for relays that are typically in the closed position.

As a general rule of thumb relays that are hats attached to your raspberry pi are high level triggered and those that are controlled via MCP or PCF interfaces are low level triggered. In the end either will work but if you want your relays to be in the open position when there is no power or the pi is booting up it will require additional work not covered here to make that happen with a low level triggered relay board.

Setup

To configure your relay board you must know the I2c address that the board resides. The easiest way to do this is RTFM for your relay board or relay controller. You also can call i2cdetect -y 1 to list all the devices on I2c bus number 1. If you have configured another I2c bus change the 1 to the bus number you created. From there you will see the device listed.

REM will most often detect the all the I2c devices on the bus but there are conditions where is may not detect the hardware. This is because some devices do not report when REM asks them if they are there. If it doesn't auto-detect simply hit the + symbol on the devices list and enter the decimal value for the I2c address. NOTE: i2cdetect will output hex addresses you must convert the hex address to decimal. If you don't know how to do this google Hex to Decimal.

Once you have determined the address for the multi-relay board simply select that address from the devices list. Check the Is Active checkbox and choose Multi-Relay board from the Device dropdown. Then press Save Device.

image

The screen will change and allow you to select the controller type for your relay board. Once you have made your selection press Save Device. The individual relays will then be displayed on the screen.

image

Configuring Individual Relays

Initially all relays on the board are disabled. This allows you to only enable the relays that are actively controlled in REM. REM will not manage the relay states if you do not explicitly enable them.

To configure each relay click the gears icon. This will open a configuration screen allowing you to set the options for the specific relay.

  1. Name: Name your relay so that you remember what it is connected to.
  2. Enabled Checkbox: If you do not enable the relay then REM will not control it.
  3. Startup State: In most cases you should leave this on No Change. However, when REM is first starting up, you can set the state of the relay.
  4. Invert Output Signal: This allows you to change a high level trigger to a low level trigger or vice versa.
  5. On/Off Delays: Relays that are used for such things as IntelliBrite switching may sometimes be too fast for the internal controller. You can use these settings to delay the on/off sequencing if the attached light does not land on the correct theme.

IMPORTANT: After you change the properties of a relay you must press the Save Device button.

image

Once you have Saved the device you can click on the Relay and it should toggle on and off.

Clone this wiki locally