Announcement

Collapse
No announcement yet.

DSC Motion Sensor tied to Arduino?

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

    DSC Motion Sensor tied to Arduino?

    Any of you guys think there would be much of an issue tying a DSC LC-100-PI motion sensor to an Arduino Mega?


    http://www.dsc.com/index.php?n=products&o=view&id=94

    #2
    I used PIR's for a number of years on PIC based interfaces with HS but the principle is the same, other than the output being opposite to what you may expect (which the spec eludes to - ie they will be held high when there is no motion and then drop when there is motion) I imagine they will be just fine.

    I don't know how the Arduino plugin works internally and I don't imagine this will be an issue but the only thing to be mindful is of the pulse time, when I was using some PIR's the pulse time was low and if the interface did not check the inputs it was possible to miss the pulse. As I say I imagine the Arduino is cleverer than some of the interfaces I was using and as such this may not be a problem but it might be best if you set the longest pulse possible if you have any issues.

    Comment


      #3
      Fantastic! I ordered one to just try out. If it works out I'll buy more and have the wiring in place and ready to hook it up.

      Comment


        #4
        Originally posted by mrhappy View Post
        I used PIR's for a number of years on PIC based interfaces with HS but the principle is the same, other than the output being opposite to what you may expect (which the spec eludes to - ie they will be held high when there is no motion and then drop when there is motion) I imagine they will be just fine.

        I don't know how the Arduino plugin works internally and I don't imagine this will be an issue but the only thing to be mindful is of the pulse time, when I was using some PIR's the pulse time was low and if the interface did not check the inputs it was possible to miss the pulse. As I say I imagine the Arduino is cleverer than some of the interfaces I was using and as such this may not be a problem but it might be best if you set the longest pulse possible if you have any issues.
        The DSC LC-100-PI one I posted works slick! It has two outputs one for tamper and one for motion. In order to save analog pins on the Arduino I may just omit the use of EOL resistors and wire in the output for motion on one pin and tamper on another. Then tie all the motion detector tampers on one pin of the Arduino and each motion will have their own dedicated digital pin.

        In essence the Arduino will function as a DSC alarm panel to which I can tie all my sensors and outputs to. This is awesome!

        Comment


          #5
          So I have an Arduino Mega that will be for the garage and another that will be for the house. I figured I have enough analog pins, so each motion detector will be tied to an analog pin to monitor each sensor for motion and tamper (with EOL resistors installed).

          The only question I have is with the plugin/HS3 itself. When I uploaded it to the Arduino it had the analog input come in as a % value (0-100%). Which is fine as I have recorded:

          0% = wiring issue at Arduino
          49% = no motion detected
          67% = motion detected
          100% = motion detector tampered with (wire cut or cover removed)

          Now I am trying to set up the status graphics for each of these with a range (due to it being an analog signal), however I cannot create a range to capture it due to the "%". So do I have to disconnect the Arduino and reprogram it to not have the % or is there an easy way to change it in HS3?

          Also if I have custom status graphics for all the inputs/outputs and then decide to add another input or output, or have to change an input/output, would I have to reprogram the Arduino which would then wipe out all this manually entered info in HS3?

          Comment


            #6
            Originally posted by Conrad_Turbo View Post
            So I have an Arduino Mega that will be for the garage and another that will be for the house. I figured I have enough analog pins, so each motion detector will be tied to an analog pin to monitor each sensor for motion and tamper (with EOL resistors installed).

            The only question I have is with the plugin/HS3 itself. When I uploaded it to the Arduino it had the analog input come in as a % value (0-100%). Which is fine as I have recorded:

            0% = wiring issue at Arduino
            49% = no motion detected
            67% = motion detected
            100% = motion detector tampered with (wire cut or cover removed)

            Now I am trying to set up the status graphics for each of these with a range (due to it being an analog signal), however I cannot create a range to capture it due to the "%". So do I have to disconnect the Arduino and reprogram it to not have the % or is there an easy way to change it in HS3?

            Also if I have custom status graphics for all the inputs/outputs and then decide to add another input or output, or have to change an input/output, would I have to reprogram the Arduino which would then wipe out all this manually entered info in HS3?

            I am not to sure what the problem is here. You can set up the status graphics on the device page as normal as the % is created by the plugin and sets it in the device so should not effect it.

            Custom graphics should not be changed by the plugin. Once you have uploaded the Sketch to the board you should never have to do it again unless adding a onewire device or there is an update that requires it as you can add all other pins on the fly at any time in the plugin config page and it will update the board.

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


              #7
              Originally posted by enigmatheatre View Post
              I am not to sure what the problem is here. You can set up the status graphics on the device page as normal as the % is created by the plugin and sets it in the device so should not effect it.

              Custom graphics should not be changed by the plugin. Once you have uploaded the Sketch to the board you should never have to do it again unless adding a onewire device or there is an update that requires it as you can add all other pins on the fly at any time in the plugin config page and it will update the board.

              Greig.
              Makes sense Greig! Sorry I was thinking the % was passed to the arduino when writing the initial sketch, but instead it's added by the plugin from the data passed from the arduino.

              I was under the impression that the board had to have an updated sketch written if I was to add another input/output etc... That is so slick you can add or remove them on the fly! This plugin is incredible thanks Greig! I got it to work, now to order a pile of sensors.

              Comment


                #8
                Originally posted by Conrad_Turbo View Post
                Makes sense Greig! Sorry I was thinking the % was passed to the arduino when writing the initial sketch, but instead it's added by the plugin from the data passed from the arduino.

                I was under the impression that the board had to have an updated sketch written if I was to add another input/output etc... That is so slick you can add or remove them on the fly! This plugin is incredible thanks Greig! I got it to work, now to order a pile of sensors.
                Good news.
                The one thing I wanted was to make it easy and uploading to the board is the worst part. If I could find a way to upload the sketch from the plugin then that would make it very easy but there are to many variables to do this so I made it a one time thing and then the plugin handles the rest.

                When you get it all up and going with the sensors I would you be willing to do a write up for others to see what you have done with the plugin?

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


                  #9
                  Originally posted by enigmatheatre View Post
                  Good news.
                  The one thing I wanted was to make it easy and uploading to the board is the worst part. If I could find a way to upload the sketch from the plugin then that would make it very easy but there are to many variables to do this so I made it a one time thing and then the plugin handles the rest.

                  When you get it all up and going with the sensors I would you be willing to do a write up for others to see what you have done with the plugin?

                  Greig.
                  Ya and here I was thinking ahead of all the sensors I will be adding and creating them before uploading the sketch. Since I can add on the fly that makes this plugin 10x better as I won't have to take a laptop out and reprogram the Arduino anytime there is a change. I like the fact that the plugin basically makes the Arduino a "dumb" slave and the plugin and HS3 dictate the commands. Awesome!

                  As for a write up, it's actually quite simple now that you helped me through that little hiccup! I searched for many different ways to connect the DSC motion sensor and the best method I found was here:

                  http://practicalarduino.com/projects/security-sensors

                  The only change I made was tying Pin/Wire #4 to the ground on Pin #2. So I am effectively only using 3 wires, so in the future I have the possibility of running 5v or another sensor in the same proximity of the motion sensor. Future proofing. Haha.

                  Then for the analog input setup it's exactly how your plugin creates it but with omitting the "%" in the unit field. Then custom graphics put in to cover all the ranges that can be seen by the Arduino.

                  With my setup I am seeing:
                  0% (0v~ish) = wiring issue at Arduino
                  49% (2.52v) = no motion detected
                  67% (3.38v) = motion detected
                  100% (5v) = motion detector tampered with (wire cut or cover removed)

                  So if there is slight variances in resistance or temperature the status output should fall within those ranges and be used to trigger events. And if for some reason it falls outside it wouldn't be that hard to adjust.

                  I am just getting used to dabbling with sensors but now that I have done one, all the rest should be very similar. From additional motion sensors to simple magnet door/window sensors.
                  Attached Files

                  Comment


                    #10
                    Looks good.

                    Have you tested it fully to make sure it always reports? The only reason I ask is that the analog inputs are only updated every x seconds to the plugin so if the sensor only triggers for a short time this could be missed. The reason for this is that an analog sensor could flood the plugin with always changing values. All the other inputs report instantly on a value change.

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


                      #11
                      Originally posted by enigmatheatre View Post
                      Looks good.

                      Have you tested it fully to make sure it always reports? The only reason I ask is that the analog inputs are only updated every x seconds to the plugin so if the sensor only triggers for a short time this could be missed. The reason for this is that an analog sensor could flood the plugin with always changing values. All the other inputs report instantly on a value change.

                      Greig.
                      I have it set up in a pantry for testing purposes right now. But have created a simple event to turn on the kitchen light. And walking past it trips it every time. I will be doing testing with sensor location and will also keep in mind that short triggers could be missed. I could check with the o-scope to see the duration the output is when motion is tripped as well. Worse case is that I'll have to use two digital pins, but I hope not. Thanks for the feedback Greig!
                      Attached Files

                      Comment


                        #12
                        Originally posted by enigmatheatre View Post
                        Looks good.

                        Have you tested it fully to make sure it always reports? The only reason I ask is that the analog inputs are only updated every x seconds to the plugin so if the sensor only triggers for a short time this could be missed. The reason for this is that an analog sensor could flood the plugin with always changing values. All the other inputs report instantly on a value change.

                        Greig.
                        Greig, just an update I attached an o-scope and it seems the output is just shy of 2 seconds. I haven't had any missed triggers yet with having it in the closet, however I have just begun to wire in a few of these into the house and will be testing them on a larger scale. If I find it's missing triggers then I will just eliminate the tamper portion and have it be a simple digital input to the Arduino. I am not that concerned that someone will tamper with these sensors to avoid their detection, but if I can utilize it...why not?

                        This is one awesome plugin you have created. I hope you can create an NFC interface in the future.
                        Attached Files

                        Comment


                          #13
                          Thread hiJack alert: Want to do same thing...sort of

                          I have ~12 DSC motion sensors already installed with wiring right next to my Arduino (Mega) board. I have not been able to get my DSC system working with HS3, so this would be a much better option. Question is, would my arduino have enough pins & power for that many PIR sensors? If not, what expansion board would you guys recommend?

                          Conrad - I'm about as noob as it gets w/Arduino - would you mind taking a few minutes and walking me through how you set it up, both the connections on the Arduino, and how you configured that in the plugin? I imagine I could do a few of them at least now, to get it figured out before getting more hardware (if needed at all).

                          thanks!

                          Ian
                          Plugins:
                          BLLogMonitor, BLGarbage, BLBackup, BLOutGoingCalls, BLUps, BLRfid, JvEss, DooMotion, Applied Digital Ocelot, AC RF Processor, UltraMon, PJC AVR 430, UPB, Rain8net, DSC Panel, JRiver Media center, Windows Media Player, SageMediaCenter, SnevlCID, MCSTemperature.

                          Comment


                            #14
                            I have 8 of those sensors attached and working fine and will be installing another 16. They are working perfectly. I chose to use digital inputs for the NC contacts to detect motion. No motion holds the Arduino input low and Motion allows it to go high. I am not concerned about tamper at this time, but the tamper contacts work the same. In a couple of zones I have two sensors using the same Arduino input, just wiring the "contacts" in series. The reason I put quotes around contacts is that it is actually a solid state device that brings the connection down to about 20 ohms. With the Arduino pull up resistors, there is no need for termination. The Arduino will detect a low on a digital input with as much as 1K of resistance, so the DSC sensors never fail to trigger the Arduino input. The duration of a "high" is about 2 seconds, plenty of time to get completely reliable inputs. The tamper contact is a micro switch and works the same it is closed when OK and opens when the cover is removed. There may be some zones where I wire tamper connections,but so far I don't see the need.

                            I did this first as a two week test in known motion areas and the system has been 100% reliable and acceptably fast. The sensors have about a 1 second lag and the Arduino is virtually instant. I have also tested the Bosch PIR and the Bosch Tritech sensors. They work the same with digital inputs. I will be using Bosch Tritech on the driveway for more reliable detection of vehicles.

                            These sensors with the Arduino are great since they provide fresh motion triggers every few seconds, making it easier to detect whether a room is actively or passively occupied. We can have different behavior if a room is occupied than if someone passes through.

                            I am not sure why you would use analog detection unless it is to save wires or pins. I am using Arduino Megas and all of the motion sensors are using Analog inputs configured as Digital inputs. The devices are binary in function and that is the way a DSC panel would treat them.

                            Below the Media Room is a large and unusually shaped room, so there are four sensors with two per zone, wired in series. The Exercise Room has two wired in series.
                            Attached Files

                            Comment


                              #15
                              Most security panels are not digital, but analog as they also measure the impedance of an EOL resistor to detect tampering (such as a cut wire). Of course it's unlikely someone is going to tamper with your PIR in the bathroom so the point is academic.
                              Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                              Comment

                              Working...
                              X