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. Troubleshooting
  3. Multiple Relay Problems

Multiple Relay Problems

Scheduled Pinned Locked Moved Troubleshooting
8 Posts 3 Posters 2.3k Views 3 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.
  • P Offline
    P Offline
    patchmaster
    wrote on last edited by
    #1

    I am having difficulty when running nodes with multiple relays (up to 4). The first relay (pin x) runs properly, but remaining relays (pin x+1, pin x+2, etc.) only pulse on for a half or second or so. Vera indicates it is still on, as well as the debug. An "OFF" command from Vera, causes it pulse again, while Vera and the debug report it off. Things I have tried include:

    • running the relays on a separate power supply -no difference.
    • tried many different versions of multi-relay sketches found on the forum here, including main example
    • swapped out arduinos (both nano and pro-mini)
    • wiped eprom of arduino between reprogramming
    • deleted node and re-included on Vera multiple times
    • limited total number of relays to 2, 3, or 4 - no difference.
    • used single 5 volt relay boards as well a quad board - no difference

    Anyone have any other ideas I can try....I am about out. Thanks.

    TheoLT 1 Reply Last reply
    0
    • P patchmaster

      I am having difficulty when running nodes with multiple relays (up to 4). The first relay (pin x) runs properly, but remaining relays (pin x+1, pin x+2, etc.) only pulse on for a half or second or so. Vera indicates it is still on, as well as the debug. An "OFF" command from Vera, causes it pulse again, while Vera and the debug report it off. Things I have tried include:

      • running the relays on a separate power supply -no difference.
      • tried many different versions of multi-relay sketches found on the forum here, including main example
      • swapped out arduinos (both nano and pro-mini)
      • wiped eprom of arduino between reprogramming
      • deleted node and re-included on Vera multiple times
      • limited total number of relays to 2, 3, or 4 - no difference.
      • used single 5 volt relay boards as well a quad board - no difference

      Anyone have any other ideas I can try....I am about out. Thanks.

      TheoLT Offline
      TheoLT Offline
      TheoL
      Contest Winner
      wrote on last edited by
      #2

      @patchmaster Good it be a power problem? How did you power the relays? Directly from the Arduino? Als it would help if you'd add the output of a serial monitor.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        patchmaster
        wrote on last edited by
        #3

        Well I have seemed to figure it out. You evidently should not skip over any digital output pins on the arduino in the sketch. Once I moved the first relay to D3 (D2 is used by the radio), it has worked flawless. Unused pins after the used ones are okay. Hope it may help someone else out having similar problems.

        TheoLT 1 Reply Last reply
        0
        • P patchmaster

          Well I have seemed to figure it out. You evidently should not skip over any digital output pins on the arduino in the sketch. Once I moved the first relay to D3 (D2 is used by the radio), it has worked flawless. Unused pins after the used ones are okay. Hope it may help someone else out having similar problems.

          TheoLT Offline
          TheoLT Offline
          TheoL
          Contest Winner
          wrote on last edited by
          #4

          @patchmaster I'm not sure, but I've allways thought that D2 is currently not in use by the radio (according to the build section of the MySensors website)

          1 Reply Last reply
          0
          • P Offline
            P Offline
            patchmaster
            wrote on last edited by
            #5

            I am not sure either. I have always wired up D2 to the radio in case it is used in the future. All I know is once I moved the first relay from pin D4 to D3 and of course revised the sketch, it began to work perfectly every time.

            martinhjelmareM 1 Reply Last reply
            0
            • P patchmaster

              I am not sure either. I have always wired up D2 to the radio in case it is used in the future. All I know is once I moved the first relay from pin D4 to D3 and of course revised the sketch, it began to work perfectly every time.

              martinhjelmareM Offline
              martinhjelmareM Offline
              martinhjelmare
              Plugin Developer
              wrote on last edited by
              #6

              @patchmaster

              Hi!

              Did you change the defines in the beginning of the main example sketch?

              #define RELAY_1  3  // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
              #define NUMBER_OF_RELAYS 1 // Total number of attached relays
              
              1 Reply Last reply
              0
              • P Offline
                P Offline
                patchmaster
                wrote on last edited by
                #7

                Yes I did. As I mentioned in a couple of posts back, it is working now. Seemed to be solely a problem of skipping over pin D3. All of my previous attempts started on D4 and skipped over D3. Once I moved it back, it has been flawless. Thanks.

                1 Reply Last reply
                0
                • martinhjelmareM Offline
                  martinhjelmareM Offline
                  martinhjelmare
                  Plugin Developer
                  wrote on last edited by
                  #8

                  But then it's interesting why it didn't work beginning at D4.

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


                  7

                  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