Skip to content

Generic Relay Board

Calin Crisan edited this page Apr 9, 2020 · 1 revision

About

This page will help you install and use a relay board with Raspberry Pi running qToggleOS.

Instructions

  1. Connect your relay board pins to the Raspberry Pi board pins. Make sure you connect the VCC, GND and all inputs to your desired GPIOs.

  2. Follow the instructions from qtoggleserver-rpigpio to enable and configure the selected GPIOs as outputs (the add-on package comes preinstalled with qToggleOS).

  3. Restart qToggleServer:

     # service qtoggleserver restart
    

    The GPIO ports should show up in your qToggleServer.

Troubleshooting

No corresponding ports show up in qToggleServer

The log file may indicate what went wrong:

# tail -n 100 /var/log/qtoggleserver.log

Relays cannot be controlled via the qToggleServer exposed port

  • Make sure the relay board is properly powered from your Raspberry Pi board.
  • Make sure the relay board power voltage corresponds to what you're supplying it (3.3V or 5V).
  • Make sure the relay board control voltage is 3.3V.
  • You may have chosen a GPIO that's in use for other functions/purposes; select a different one.

Relays have an unwanted state before qToggleServer starts

  • Consult the Raspberry Pi Peripherals documentation (see page 102) and choose a GPIO with a "pull" that corresponds to your needs.
  • Ensure the def_value and def_output settings correspond to your needs.