Announcement

Collapse
No announcement yet.

Pressure Transmitter

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

    Pressure Transmitter

    I am wondering has anyone setup a working sensor - does not need to be pressure. (please include the range of your sensor if different)

    I have a 0-300 PSI sensor which is 5vdc, and has an output of 0.5 - 4.5 volts

    I can not seem to get a good read on the sensor in HomeSeer. If anyone has some input on the exact setup for this type of sensor I would appreciate it as I am sure others might have the same question. I have put a meter on it and the sensor is working as expected.

    Thoughts?

    #2
    Please tell us more.

    what is the make of sensor you are using?
    Are you using the Analogue inputs?
    Are you using the API or the normal Sketch?
    What is not working about your setup?
    What results are you getting?

    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


      #3
      Setup

      Originally posted by enigmatheatre View Post
      Please tell us more.

      what is the make of sensor you are using?
      Are you using the Analogue inputs?
      Are you using the API or the normal Sketch?
      What is not working about your setup?
      What results are you getting?

      Greig.
      Sensor is a Generic Chinese Sensor.
      I am using Analog input A2
      Normal Sketch
      I am showing 0 psi, even with approx 150 psi on the unit. I suspect that I can't seem to get the formula correct. I deleted my old formula that should have worked taken into account the offset Zero.

      Example:

      First, using the Y=MX+B formula, we determine what each value is in order to calculate for Y.
      X = 4 (since .5-4.5V has a span of 4 volts. If it was a 0-10Vdc output, X would be 10)
      M = 75 (use divide the Units by the Voltage or Current - 0-300/.5-4.5 = 75) which results in PSI/Volts
      B = -37.5 ( since the output starts at .5 volt, there is an offset. We calculated a value of 75 PSI/Volt, therefore, .5V = -37.5) If the output of the sensor was 0-5Vdc, then there would be no offset.

      I can't seem to get the above formula to process. I suspect it is the format in which I am putting it into the plug-in.

      Comment


        #4
        Originally posted by mlconti View Post
        Sensor is a Generic Chinese Sensor.
        I am using Analog input A2
        Normal Sketch
        I am showing 0 psi, even with approx 150 psi on the unit. I suspect that I can't seem to get the formula correct. I deleted my old formula that should have worked taken into account the offset Zero.

        Example:

        First, using the Y=MX+B formula, we determine what each value is in order to calculate for Y.
        X = 4 (since .5-4.5V has a span of 4 volts. If it was a 0-10Vdc output, X would be 10)
        M = 75 (use divide the Units by the Voltage or Current - 0-300/.5-4.5 = 75) which results in PSI/Volts
        B = -37.5 ( since the output starts at .5 volt, there is an offset. We calculated a value of 75 PSI/Volt, therefore, .5V = -37.5) If the output of the sensor was 0-5Vdc, then there would be no offset.

        I can't seem to get the above formula to process. I suspect it is the format in which I am putting it into the plug-in.
        ok so you are getting results in Homeseer but not the correct ones as the Formula is wrong or not being calculated properly by the plugin.
        In this situation I would say to create a virtual device and the run a script with the sensor calculations in it and the load the result in to the virtual device. Then run a script when the value is updated from the plugin.

        I would offer to update the plugin to calculate the script but I have found that to perform all the maths that everyone wants would be a very big chalange so it only performs basic maths.

        I hope this helps you.

        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


          #5
          Originally posted by enigmatheatre View Post
          ok so you are getting results in Homeseer but not the correct ones as the Formula is wrong or not being calculated properly by the plugin.
          In this situation I would say to create a virtual device and the run a script with the sensor calculations in it and the load the result in to the virtual device. Then run a script when the value is updated from the plugin.

          I would offer to update the plugin to calculate the script but I have found that to perform all the maths that everyone wants would be a very big chalange so it only performs basic maths.

          I hope this helps you.

          Greig.
          I am revisiting this from months ago. I had given up, because I could not keep that Arduino connected = which you pointed out the unused Analog inputs were causing. That board is now solid so I decided to revisit this issue.

          At that time I was getting odd readings - Let me rework the formula and see what results I get. I will post the results. I have done no scripting and not sure I would know where to start. Let me see what I can do and post the results and we can proceed form there. I would think this is a simple math formula that should not need lots of scripting to work. If so we might need to go back to the drawing board...lol

          Comment


            #6
            Update

            Using the following formula:

            Value*75-37.5

            I get a reading of approx 3078 PSI

            With a voltmeter I have approx 2.03 Volts on the A2 input.

            I have modified the input to add order to the formula to

            ((Value*75)-37.5)

            and after about 4 min - I still have no reading...

            UPDATE - Putting Value*1 yields a reading of 410

            Thoughts?
            Last edited by mlconti; April 2, 2016, 11:26 AM.

            Comment


              #7
              Ok looking at this again I think you are forgetting that the Arduino analogue values are from 0 to 1023 and I think you think the value will be 0 to 5.

              if you use a script it would be something like this. Store it as a .vb file.

              PHP Code:
                  Sub Main(ByRef params As Object)
                      
              Dim AnalougeDevice As Integer 1234 'The Reference of your Arduino Device
                      Dim VirtualDevice As Integer = 4321 '
              The Reference of your virtual device
                      Dim Calc 
              As Double 'used to store values when performing the calculations.

                      Calc = hs.DeviceValue(AnalougeDevice) * 75 ' 
              this is the Analogue value x 75
                      Calc 
              Calc 37.5                          ' this is the result of above calculation - 37.5
                      hs.SetDeviceValue(VirtualDevice, Calc)      ' 
              this sets the calculated value in to the virtual device.

                  
              End Sub 
              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


                #8
                Originally posted by mlconti View Post
                Using the following formula:

                Value*75-37.5

                I get a reading of approx 3078 PSI

                With a voltmeter I have approx 2.03 Volts on the A2 input.

                I have modified the input to add order to the formula to

                ((Value*75)-37.5)

                and after about 4 min - I still have no reading...

                UPDATE - Putting Value*1 yields a reading of 410

                Thoughts?
                Arduino doesn't return volts, it returns 0-1023 for the configured analog reference (5V here).
                410/1023*5V = 2.004V.

                You need to do your calculation based on this.

                EDIT: Greig beat me to it. But Value*0.366569-37.5 should get you what you want.

                Comment


                  #9
                  Originally posted by AllanMar View Post
                  Arduino doesn't return volts, it returns 0-1023 for the configured analog reference (5V here).
                  410/1023*5V = 2.004V.

                  You need to do your calculation based on this.

                  EDIT: Greig beat me to it. But Value*0.366569-37.5 should get you what you want.
                  Yep that should work. I was not thinking properly when I started looking at this.

                  Thanks Allan.

                  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


                    #10
                    Originally posted by enigmatheatre View Post
                    Yep that should work. I was not thinking properly when I started looking at this.

                    Thanks Allan.

                    Greig.
                    Thanks guys - I had adjusted my actual value , no formula to get to a value that I could live with. I have plugged in the above and I am getting a reading also close enough to call acceptable. I think my only issue now is the fact that the calibration of the transmitter is off - I am going to adjust the offset to correct the value. Which should be good enough for this application.

                    This is reading the pressure of the air in my tank - compressed air.

                    Thanks to both of you for your input.

                    Mike
                    Last edited by mlconti; April 2, 2016, 12:25 PM.

                    Comment

                    Working...
                    X