Relays

To control the status lights and the non-permanent power outlets in the room, we use a number of relays, in this case four relays:

Relay

Function

0

Power status of non-permanent outlets

1

Green status light

2

Yellow status light

3

Red status light

The idea here is that the power status relay is connected to a switch that controls the mains power to outlets that are not powered when the club status is off. The status lights indicate the current club status. The next section provides the details on the implementation of this concept.

To simplify the design, we will use a ready-made relay board containing four relays, which are driven by an NXP PCAL9535A I/O port chip (GPIO expander) connected to the I2C bus of the Raspberry Pi SBC:

This particular board is the Seeed Studio Raspberry Pi Relay Board v1.0: http://wiki.seeedstudio.com/Raspberry_Pi_Relay_Board_v1.0/. It offers the four relays we require, allowing us to switch lights and switches up to 30 VDC (direct current) or 250 VAC (alternating current). This allows one to connect practically any type of lighting and further relays and kin.

The connection with the SBC is made by stacking the relay board on top of the SBC using its GPIO header, which allows us to add further boards on top of the relay board. This allows us to add the debounce functionality to the system, as indicated in the wiring plan diagram.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.62.103