💬 Relay

  • Admin

    This thread contains comments for the article "Relay" posted on MySensors.org.

  • how convert a relay 2 channel to roller shutter ?!
    in site , there is not a sketch.
    please put a sketch for roller shutter

  • Both sketch not working giving me "error: 'saveState' was not declared in this scope

      saveState(CHILD_ID, state);"

  • How can I edit the sketch to make this work with a double (multiple) relay board instead of a single?

  • Admin


    Have you tried reading the code?

  • @hek yes. I changed the line for the number of relays but it didn't work. I don't know anything about the code.

  • Admin

    Stating "It didn't work" doesn't give enough information for anyone to help you.

    What have you tried? What steps did you go through to determine that it doesn't work?

  • greetings, i have an idea to use a 12volt fan to move some air from one room to the room next to it (the first room has a stove for heating).
    and i was thinking a relay would do the trick so i dont manually have to start it (and a nice script in domoticz that uses the data from the temp sensor + the ability to manually turn it on/off in domoticz).
    now to my question: which relay should i get?
    I looked at the ones in the store but it seems they are either for 230VAC or 5VDC

  • Admin

    The control signal is 5VCD... The "other side" can be anything (up to 230VCD).

  • Can you show converted sketch with 2 buttons and 2 relays ? I dont know how convert this sketch bersion with buttons...

  • Hero Member

    @pepson Have a look at this thread for some ideas to get you started.

  • I would like to ask about ack. Does the library have a specific timeout? Does the library resends the message when ack is not received? Thank you.

  • Cam I use an arduino pro mini 3.3V 8 Mhz to trigger the relay - or do I need a 5v arduino?

  • Hardware Contributor

    @Puneit-Thukral - it depends on the relay.
    If you read the datasheet for intended relay you will see what is needed. Most relays i have seen requiers 5v and a good current (which Arduino sometimes fail to deliver).

  • @sundberg84 I used a 3904 transistor between the relay and arduino and it works just fine with 3.3 V Arduino pro mini 8 HMz.
    (2N2222 also works, but I have many pieces of 3904 and just a few 2N2222, hence using 3904)

  • I have my gateway and my relay, I believe is working fine, I just want to know what set of caracters do I need to send in the serial monitor to turn on the relay? I will like to use the info in order to use a controller like Vantage or C4, is that possible? Regards

  • @Javier-Rubio I m not an expert- a complete novice.
    I would suggest one of the following - trigger the relay through a controller or use one the the arduino relay example sketch in which relay is programmed to turn on and off every 1 second. This would help you validate if your wiring is correct or not.

  • I tried the relay sketch on my arduino mini pro (5v), step down converter for the NRF module and a two channel relay. It's conecte to a Raspi GW wirh the 2.0.0 beta and FHEM as controller. The switching works as expexted. but the relay switches continuisly on and off on its own after a certain time. I tried removing the loop-block but with no effort. Is there anything i can do to get a stable state? Thanks

  • Hero Member

    @Gizmoh sounds like the relays are not receiving enough power to remain on. How are you powering all this?

  • @korttoma
    I'm powering this with 6 x AA Batteries into the RAW Input from the Arduino and the 5v output from Arduino to the Relay.

Log in to reply

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.