![]() |
![]() |
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:
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
You must be logged in to post a comment.