Any tips and tricks for relay modules?

Hey everyone, I finally got around to setting up my diy kit, with my main boards on the way soon, and one of the things I am most excited about is the relay modules and the other things that can be done with them. The ones on my list are my garage door opener and a sprinkler system (to be determined model/brand). First and foremost, what is everyone doing with theirs? Anything exciting? Second, I was a bit curious about how they work. I bought a multi-channel in addition to the single channel ones that came with the boards, but I cannot find much info about setup of how to use them (I suspect more documentation is incoming). Also, does each channel on the module attach to a pin, or can I use the multi-channel on a single pin? Thanks for the tips and advice.
  • Also very keen to hear about this...


  • We are working on some more documentation including a garage door setup. But in the meantime. . .


    Here is how to set up the DIY board for a 5V relay which can be used as Momentary Switch to trigger things like older garage doors - https://docs.konnected.io/security-alarm-system/wiring/siren/5v-hi-lo-level-relay-1


    And here is the info on how to set it up to trigger a 12V item like a light - 

    https://docs.konnected.io/security-alarm-system/wiring/siren/5v-hi-lo-level-relay-2


    One note: the only high level relay we sell is the single. The rest are low-level triggers and need to be designated so in the 'thing' in SmartThings. The single is the only one that should be used for alarms. Also if you are going to use the high level set it up on Pin R8. It is already set for high level triggers and will cause issues with low-level triggers. 


    Watch for more documentation oncoming . . .


  • I have an 8-channel 5V relay (https://amazon.com/gp/product/B00KTELP3I/ref=oh_aui_detailpage_o08_s00?ie=UTF8&psc=1) that is working fine with Konnected but I've come to realize that its power off behaviour is to close the relay. That's fine most of the time, but if the power to the relay goes out but the garage door opener is powered, the garage door will open. Similarly for alarms and noisemakers that are powered independently.


    I've learned that cheaper relays are normally closed and will open when pulled to GND. But that there are relays with ULN2803 that inverse that logic so that the relay will maintain its present state if there is a loss of power. Does anyone have any recommendations or alternative workarounds?


    I do realize that battery backup will solve the issue in the short term, but an extended power outage followed by recovery while we are away has happened before and will happen again. I'd like for things to default to closed and quiet.

  • Look at the specs on the relay. If it is low-level trigger you need to change the default in the Thing (settings gear in upper right corner). This should change this behavior. 

  • Fascinating. The behavior of the relays closing when power is removed from it is a property of the relays and I've tested it by removing the VCC pin on the relay board. That is, it really doesn't involve Konnected or SmartThings at all.  Having said that, when I did as suggested as set to low-level trigger in the Thing, it did behave slightly differently. I'm going to have to do some additional testing and thinking.


    The 8-channel relay I am using looks identical to the 4-channel relay you sell - same relays, same silkscreen. I *think* the relays I would want would be ones that are normally open when not connect to anything, but only close when VCC is applied to the input pin. And I *think* the one I have (and the one you sell) are normally closed and only open when GND is applied. Now, one might think it doesn't matter since you can wire either them NO or NC side of the output. and it doesn't matter as long as there is power. But when power is not present, the relays remain closed. [Thinking about this is making my head hurt]

  • Ah! I just had a eureka moment about your suggestion. Making the thing low-level is only half of what is needed. The other half is to switch the other side of the relay from NO to NC. Those two things will cancel each other out, but also change the power off behavior to the opposite. On my way to test that ..

  • Yes, this worked just fine. Thanks! Now that I've come to know exactly what low and high level triggering means, it all makes sense. So let me see if I can summarize correctly:


    If a zone is set to low-level trigger, then it will assert +5V at all times except when the SmartThings switch is turned "on". Then it will assert GND.


    If a zone is set to high-level trigger, then it will assert GND at all times except when the SmartThings switch is turned "on". Then it will assert +5V.

  • Not exactly.


    You may want to look at this article. It explains a little more about how a relay works. Basically it's just a switch you can control. https://help.konnected.io/support/solutions/articles/32000022827-using-relay-modules-with-konnected

  • Right. What I came to realize with your help is that whether the zone pulls the relay low or high was software configurable, and you could therefore change the sense of the relay's operation.


    I think my summary is correct if you substitute "above the certain voltage level" for +5V, and "below the certain voltage level" for GND.


  • Just to be clear .. what I was summarizing was the behavior of the zone output .. not the relay. But understanding what happens there is key to making the relays work the way you want. Your suggestion to reverse the logic of the zone output (and also the logic of the relay output) was a brilliant solution to the power off behavior. Thanks again.

  • I had another realization about using relays with Konnected as I continue this learning process. As I mentioned above, I bought an 8-channel relay from Amazon because I have three connected boards and a 4-channel didn't seem like enough for my purposes.


    Now that I've started populating the relays, I realized that two 4-channels would have been better. Why? Because the 5V VCC/GND for the relay board itself comes from one of the three boards. And a board has a maximum of five zones capable of triggering relays. I was thinking (without thinking) initially that I could drive the remaining three from another board. But then I got thinking about how that would be mixing power supplies .. the input from one board, and board voltage from another. I can't really articulate why that would be a bad idea, but from a basic knowledge of physics and electronic devices, it would seem ill-advised to mess around with the voltage references like that. 


    Moral of the story is to associate a relay board with a single Konnected board, and don't intermix power or inputs to the relay from another board. (Please correct me if I'm wrong).

  • Is there anything in the way of documentation coming in the way of setting up with AC power?  Particularly for the sprinkler controller, such as was done in the earlier video.


    I have been unable to find info for how to wire the 24V AC to the relay, which is the only thing preventing me from moving forward.


    Additionally, Nate shows a handy power adapter in the original video that outputs both AC and DC.  Is there any info on to how to find something similar?  I have looked but been unable to even find anything like it at all.

  • I would look at this article. https://help.konnected.io/support/solutions/articles/32000022827-using-relay-modules-with-konnected


    Basically you would take the hot side to the Com on the relay (switch side). You would take a Wire out of the NO side of the relay to the sprinkler valve. Out of the valve you would go back to the Neg side of the supply (to complete the circuit). That's the basics. 


    However (I don't have hardly any experience with sprinklers). I've heard some value systems need to have 2 different parts energized to open. So it may take some experimentation.

  •  Thanks Andy,


    I believe that I have it wired correctly, but the issue is the power, and that I need to power it with AC current (24V), whereas the konnected board has 5/12V DC power.  I am not sure how I would add the AC power just to the relay, but this was done by Nate in this video on youtube: https://www.youtube.com/watch?v=nlv3w3IvJ44

    Unfortunately there is no closeup of where the power goes on the relay (everything anywhere close is actually from the other side of the relay), and I dont want to blow anything up :)

Login or Signup to post a comment