HOME 
Modify your Raspberry Pi Relay board to an Opto-Isolator board

Modify your Raspberry Pi Relay board to an Opto-Isolator board

 

For my Raspberry Pi burglar alarm project my goal was to connect my 12V PIR to the GPIO pins of my raspberry Pi. Of course the GPIO input pins can’t handle this kind of current, so the best way to do this is do isolate the circuits of the 12V PIR and the GPIO pins of the Pi. This is easily done with the use of an electronic component called “Octocoupler”. You can buy this components and make a board yourself or you can buy these boards online. This octo-isolator boards are somehow pretty expensive comparing to the switching relay port board for the Pi or Arduino. You can buy an 8 port relay module everywhere online for approximate 10 euro, but a 1 port octo-isolatorboard is in the price range of 100 euro. This is strange because the electronics are pretty much similar. Actually when you look at the relay board, it is even less complicated. I found out the the “common” relay board also got octocouplers besides the relays. This makes it possible to simple modify you cheap relay board and change it into a opto-isolator board by removing the relays and reuse the other components. Only some wire and two resistors are needed for every port.

Take a good look at the two images and you know how to change the board. These are the steps:

  1. Remove the relays
  2. Remove the input pins from the board
  3. Solder the new 5V input pin. You can connect all the pins to supply every port with one connector.
  4. Solder a connection from the original input pin to one of the relay hole. Check image.
  5. Solder a 10 kOhm resistor shown in the image for every port
  6. Solder a 1 kOhm resistor shown in the image for every port

Thats it.. The 5V is switched by the octocoupler when for example a 12V current flows in the high voltage circuit. The can by measured by the GPIO pins. Remember that the board itself still needs to be powered with a 5-12V. Here is an example how to connect a 12V passive IR detector to the GPIO pins using the octo-isolator board:

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

NAME EMAIL Website URL