Announcement

Collapse
No announcement yet.

How to Get 2 Relay SPDT Outputs and 3 Dry Contact Inputs On Raspberry Pi

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    I did exactly what you want to do, but only have 2 NO/NC dry contacts, but technique will work for 6-8. I put on a 3-relay hat, and a break-out board where I soldered the dry contacts to other GPIO pins rather than directly to the RPi. This makes it easy to take apart for servicing if the need arises.

    Here's my parts list:

    RPi 3 (runs cooler than 4) - I bought a Canakit from Amazon with the power adapter and heatsinks (which I don't even use, even in 100°F summers)
    https://www.amazon.com/CanaKit-Raspb...1697869&sr=8-6

    A microSD of your choice. Probably can get away with 16GB or even less, but I buy 32GB because they're not much more and you never know.

    I used this GPIO hat ($$, but great for benchtop experimentation because it allows you to move things easily, and it had through pins I could use to mount the relay board which I wanted on top, because the relays are tall-ish.
    https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

    This 3-relay board
    https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

    If you can find a way to get through pins, this breakout PCB could be used as a cheaper alternative to connect the dry contacts, then the relay could be mounted on top of it. I think you can use this on top if you don't mind the relay board being hidden behind it. It doesn't matter which order you stack things, unless the mechanics of the connectors prohibit you from doing it, or the board is too tall.
    https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

    All of that fits inside this clear-covered project box (I drilled a hole on the narrow side to run the power, dry contact inputs and relay outputs). The clear top gives you visibility to the Rpi status lights and relays without having to open the box to see.
    https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

    With the box mounted so the hole is pointing to the floor, it keeps everything dry, and you can put a little putty or insulation in the hole to keep bugs out. Note this box has some mounting holes outside making it easy to place, and some plastic bosses inside to mount a board. These are NOT in an official RPi pattern. I can't remember if I used one to mount the board but I did have to add some super-glued bosses to support the board elsewhere if not everwhere.

    Finally, there are other options for mounting like these (which I did not use):
    https://www.digikey.com/product-detail/en/keystone-electronics/9081/36-9081-ND/4499381

    Digi-Key and Mouser are good supply houses, but shipping can add up.

    Comment


      #32
      Awesome. Exactly what I was looking for. Thank you so much

      Comment


        #33
        I ordered pretty much everything on this list and it all showed up today, wow was it easy. I still have to wire it up in my garage but installing the raspberry pi and then setup and config of this plug in-was super easy. This was just released today which made the initial set up of raspbian easy.
        https://www.raspberrypi.org/blog/ras...aging-utility/ Good timing
        Thanks for the help and thanks spud for the great plugin.

        Comment

        Working...
        X