Announcement

Collapse
No announcement yet.

Switch Open Closed

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

    Switch Open Closed

    Trying to get a doorswitch status in my motor home, has tried with digital and analog in but no open or closed status. The problem is that I need a resistor between the arduino otherwise the lamp is on even the doorswitch is off.
    The only working results is with value on analog in.
    Attached a Picture on the working results.
    My English is not the best, but i hope the Picture can explane better..


    Best Regards
    Attached Files
    Last edited by christian6b; March 14, 2016, 02:20 PM.

    #2
    Changed the resistor to 1k and now it show status on the digital ports. Any advice to the right value on the resistor..

    Comment


      #3
      I probably shouldn't respond since I don't know anything about ardrino's, but here's how I would approach it.

      I'd replace the resistor with a diode, and make sure there is a pull-up resistor like I show. It maybe already on the board. Is the ardrino 12vdc powered? I only bought a relay board once and it's 5vdc.

      This will work either way as long as the pull up resistor is setup like my drawing.

      Good luck!
      Attached Files
      -Tim

      HSPro - 3.XXX - Dell mini W7 x32
      Way2 Call
      Elk M1 Gold
      UPB HAI switches
      HAI RC2000 Thermostat

      Comment


        #4
        Why not just use a 12v relay?
        Attached Files
        Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
        X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
        Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
        Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
        Scripts =
        Various

        Comment


          #5
          A relay would work as would the drawing above, but you really don't need the 10K pull-up resistor as the Arduino's pull-ups are on by default. All you need is the diode to isolate the input from the +12V supplied through the light, or allow a current path to ground when the switch is on. The diode can be a very low current fast switching diode.
          .
          Attached Files
          HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

          Comment


            #6
            The 12v relay works perfect with the ground from arduino, but the diod should also work. i only tested diod with high values and it works sometimes. I buy some diods today with low value and test

            Comment


              #7
              now its working with the diod also, very fast response. The only problem now with the diod is that homeseer dont switch image status, but the rest works events, etc... Any idea?
              Many thanks for the help.....

              Comment


                #8
                In the device setting you will need to select an image that corresponds to the device value....
                Attached Files
                HS 2.2.0.11

                Comment


                  #9
                  Changed back to the 12v relay and Everything works perfect again, i think the best is not to mess with the 12v system...
                  Last edited by christian6b; March 16, 2016, 05:18 PM.

                  Comment


                    #10
                    The relay is a HUGE overkill, the diode will do the job...though if you are using the digital inputs using a relay or diode should be no different to the status values...
                    HS 2.2.0.11

                    Comment


                      #11
                      I agree its overkill, and the diode should work, but the relay works perfect and a leave the 12volt system by itself. My next switches is front in the truck and there is 24 volt so i go with the relays with same setup. Thanks

                      Comment


                        #12
                        Good work mate, you got it going, that's most important :-)
                        HS 2.2.0.11

                        Comment

                        Working...
                        X