Post# 1591777654

10-Jun-2020 2:27 pm


How to turn ON/OFF stair lights using a Raspberry Pi.

Pi have GPIO pins.

  • These are normal pins that output a 3V when turned ON.
  • You can turn these pins ON/OFF from software. By running a command from within PI OS.
  • There are about 40 such pins. At least 25 of those are usable.

    Use this 3 V from the pin to turn ON/OFF an optoisolator. These are Tk. 5 a piece. The optoisolator will turn ON/OFF 12 V.

    Use 12 V from optoisolator to turn on a mechanical relay which will turn ON/OFF 220V AC. Mechanical relays are available at Tk. 80 per piece.

    This 220V switches the light or motor ON/OFF.
    So whenever you type in a command in Raspberry PI to turn on a pin, it will turn on the optoisolator connected with it, which will turn on the relay, which will turn on the light.

    When exactly you want the switch to turn on can be controlled by a software, that will take input from other sensors to decide. It's upto you to put the logic there.

    10-Jun-2020 2:27 pm

  • Published
    10-Jun-2020