Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Announcements
  3. 💬 Relay

💬 Relay

Scheduled Pinned Locked Moved Announcements
139 Posts 47 Posters 33.7k Views 45 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • drradkinD drradkin

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

    hekH Online
    hekH Online
    hek
    Admin
    wrote on last edited by
    #5

    @drradkin

    Have you tried reading the code?

    drradkinD 1 Reply Last reply
    3
    • hekH hek

      @drradkin

      Have you tried reading the code?

      drradkinD Offline
      drradkinD Offline
      drradkin
      wrote on last edited by
      #6

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

      1 Reply Last reply
      0
      • hekH Online
        hekH Online
        hek
        Admin
        wrote on last edited by
        #7

        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?

        1 Reply Last reply
        0
        • stockenS Offline
          stockenS Offline
          stocken
          wrote on last edited by
          #8

          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

          1 Reply Last reply
          0
          • hekH Online
            hekH Online
            hek
            Admin
            wrote on last edited by
            #9

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

            1 Reply Last reply
            0
            • pepsonP Offline
              pepsonP Offline
              pepson
              wrote on last edited by
              #10

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

              Boots33B 1 Reply Last reply
              0
              • pepsonP pepson

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

                Boots33B Offline
                Boots33B Offline
                Boots33
                Hero Member
                wrote on last edited by
                #11

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

                1 Reply Last reply
                0
                • fdojuradoF Offline
                  fdojuradoF Offline
                  fdojurado
                  wrote on last edited by
                  #12

                  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.

                  1 Reply Last reply
                  0
                  • Puneit ThukralP Offline
                    Puneit ThukralP Offline
                    Puneit Thukral
                    wrote on last edited by
                    #13

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

                    sundberg84S 1 Reply Last reply
                    0
                    • Puneit ThukralP Puneit Thukral

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

                      sundberg84S Offline
                      sundberg84S Offline
                      sundberg84
                      Hardware Contributor
                      wrote on last edited by
                      #14

                      @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).

                      Controller: Proxmox VM - Home Assistant
                      MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                      MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                      RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                      Puneit ThukralP 1 Reply Last reply
                      0
                      • sundberg84S sundberg84

                        @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).

                        Puneit ThukralP Offline
                        Puneit ThukralP Offline
                        Puneit Thukral
                        wrote on last edited by
                        #15

                        @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)

                        1 Reply Last reply
                        1
                        • Javier RubioJ Offline
                          Javier RubioJ Offline
                          Javier Rubio
                          wrote on last edited by
                          #16

                          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

                          Puneit ThukralP 1 Reply Last reply
                          0
                          • Javier RubioJ Javier Rubio

                            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

                            Puneit ThukralP Offline
                            Puneit ThukralP Offline
                            Puneit Thukral
                            wrote on last edited by
                            #17

                            @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.

                            1 Reply Last reply
                            0
                            • GizmohG Offline
                              GizmohG Offline
                              Gizmoh
                              wrote on last edited by
                              #18

                              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

                              korttomaK 1 Reply Last reply
                              0
                              • GizmohG Gizmoh

                                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

                                korttomaK Offline
                                korttomaK Offline
                                korttoma
                                Hero Member
                                wrote on last edited by
                                #19

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

                                • Tomas
                                GizmohG 1 Reply Last reply
                                0
                                • korttomaK korttoma

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

                                  GizmohG Offline
                                  GizmohG Offline
                                  Gizmoh
                                  wrote on last edited by
                                  #20

                                  @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.

                                  korttomaK 1 Reply Last reply
                                  0
                                  • GizmohG Gizmoh

                                    @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.

                                    korttomaK Offline
                                    korttomaK Offline
                                    korttoma
                                    Hero Member
                                    wrote on last edited by
                                    #21

                                    @Gizmoh ok so it seems like the voltage regulator on the arduino cannot handle the load the relays produce when activated. You need to power the relay board directly from your batteries either trough another 5V regulator or if your relay board already can handle a higher voltage you can connect it directly.

                                    • Tomas
                                    GizmohG 1 Reply Last reply
                                    0
                                    • korttomaK korttoma

                                      @Gizmoh ok so it seems like the voltage regulator on the arduino cannot handle the load the relays produce when activated. You need to power the relay board directly from your batteries either trough another 5V regulator or if your relay board already can handle a higher voltage you can connect it directly.

                                      GizmohG Offline
                                      GizmohG Offline
                                      Gizmoh
                                      wrote on last edited by
                                      #22

                                      @korttoma Ah, okay, thank you. I'll give it a try.
                                      Maybe connecting a Decoupling-Capacitor could also fix this problem?

                                      1 Reply Last reply
                                      0
                                      • Rodolfo VieiraR Offline
                                        Rodolfo VieiraR Offline
                                        Rodolfo Vieira
                                        wrote on last edited by
                                        #23

                                        hello one doubt
                                        if a use this sketch: /mysensors/MySensorsArduinoExamples/examples/RelayWithButtonActuator/RelayWithButtonActuator.ino

                                        when i press the button home assistant knows if switch was turned or off? its change the stat?

                                        1 Reply Last reply
                                        0
                                        • riochickenR Offline
                                          riochickenR Offline
                                          riochicken
                                          wrote on last edited by
                                          #24

                                          Hi,

                                          First of all Merry Xmas to all of you!

                                          I want to use this sketch with three LEDs to present the status of the alarm at home, so with a multicolored LED I have a green status, a red and a blue status, but I just want one color at a time, is there a way to alter the code a little to make sure that is a color is activated, the other one is turned off?

                                          mfalkviddM 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          15

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular