Announcement

Collapse
No announcement yet.

Pressure monitoring with Arduino

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

  • Pressure monitoring with Arduino

    Been on the lookout for good value pressure sensors for quite a while now and finally found these:
    http://www.ebay.co.uk/itm/181110950113

    This 80 psi device gives a linear output between 0.5v and 4.5v for the pressure. I subtract 0.5v from 4.5v to get a 4 volt swing for the full range. I divide 4 volts by 80psi to get 0.05 volts per PSI.

    5 volts on the Analogue input gives a count of 1023, so I divide 5 by 1023 to get 0.0048 volts per AD count.
    I subtract the 0.5v offset from the reading to account for the fact that 0psi on the sensor gives out 0.5v (an ADC count of approx. 100)





    They come with a 1/8npt thread, a quick rummage around in my fittings box got it working quickly, then I ordered the correct tap and made a brass fitting on the lathe for it.

    Changed the settings for the Analogue device as shown in the pictures so I end up with the raw ADC count for the value. I then created a new virtual device that would receive the water pressure that's calculated from the following script:

    Code:
    Public Sub Main(ByVal Parms As Object)
            Dim adc As Double = hs.DeviceValue(338) 'Get the ADC count using the device reference ID
            Dim psi As Single
            psi = (adc * (5 / 1023) - 0.5) / (4 / 80)
    '        hs.WriteLog("AD Count=", adc)
    '        hs.WriteLog("Water pressure PSI=", psi)
            hs.SetDeviceValueByRef(339, Math.Round(psi, 0), True) 'Update Virtual Device ID 339 with the calculated pressure
        End Sub
    Attached Files

  • #2
    Very nice.. What's the accuracy on this?
    RJ_Make On YouTube

    Comment


    • #3
      I'm not sure yet - the analogue pressure gauge is showing about 60 psi, whereas i'm getting 51psi. But of course I have no idea how accurate my analogue gauge is - it was just something I had in my box of bits.

      Comment


      • #4
        What is the pipe size of the device? The spec says 1/8"; that cannot be right! In your photo it looks like it has 1/2" or 3/8" NPT male connection.

        Steve Q


        Sent from my iPad using Tapatalk HD
        HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
        2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

        Comment


        • #5
          Definitely 1/8th NPT taper thread on it.

          Comment


          • #6
            Just curious, what is the need for this? Also 50 - 60 psi seems a little high. Not sure how they do things in the UK but here boiler blow off valves can start releasing pressure closer to 40 psi indicating that the expansion tank has met it's maker.
            Originally posted by rprade
            There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

            Comment


            • #7
              Originally posted by S-F View Post
              Just curious, what is the need for this? Also 50 - 60 psi seems a little high. Not sure how they do things in the UK but here boiler blow off valves can start releasing pressure closer to 40 psi indicating that the expansion tank has met it's maker.
              I don't see how that can be right. According to the IRC (P2903.3), 40psi is the minimum pressure you should have, with 80psi being the maximum (P2903.3.1).

              Comment


              • #8
                Originally posted by NeverDie View Post
                I don't see how that can be right. According to the IRC (P2903.3), 40psi is the minimum pressure you should have, with 80psi being the maximum (P2903.3.1).
                S-F is correct about Hydronic systems. My system is designed with a cold fill pressure of 17 psi and my pressure relief valve is rated at 30 psi. The This is pretty normal for a hydronic system in the US. Fill pressure regulators are usually set at 12 psi from the factory. The pressure tank is rated at a maximum working pressure of 100 psi, but with the factory pre-charge of 12 psi, it typically would be partially filled with water at 15-20 psi. I *think* at 30 psi it would be slightly over 1/2 full of water. While there is no minimum pressure rating on the tank itself, math does dictate a minimum. To fill a typical 2-story system takes a minimum of 10 psi to "lift" the water 20 feet, you generally add 2 psi to properly "burp" the system. The general rule of thumb it to fill the system to 17-20 psi so that it is slightly overfilled, allowing the water in the expansion tank to make up for volume loss as air is released from the system.

                If the pressure is higher than 20 psi, you begin to lose the acceptance capacity of the tank. The factory pre-charge of 12 psi can be increased to compensate for higher pressures, but that is uncommon.

                Potable water systems are different and generally start with a pre-charge of 45 psi. I think the OP is talking about a potable water system which would generally operate at a nominal pressure of 60 psi.
                Randy Prade
                Aurora, CO
                Prades.net

                PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

                Comment


                • #9
                  I'm running an unvented cylinder (known as a megaflow in the uk), which is heated via a normal coil to a gas boiler. I think you maybe getting confused with the hot water boiler pressure which runs between 1 and 2 bar.

                  The 52psi value is measured at my main incoming mains feed from the street - which I believe is an expected value for a good feed.

                  The cold feed goes via a pressure reducing value to feed the cold inlet of the tank.
                  I've fitted the hot water sensor on the hot water outlet of the tank and that's reading 36psi (which is located about 7Meters from ground level) - the PRV is think is supposed to be 3 bar (~44psi) - but I don't know for sure. The external expansion vessel is pressured to 35psi.

                  The safety pressure relief valve on the hot water tank opens at 90psi.

                  I might make another adapter for the hot side which takes two gauges so I can see what the calibration is like.

                  Comment


                  • #10
                    Originally posted by ecuboss View Post
                    I think you maybe getting confused with the hot water boiler pressure which runs between 1 and 2 bar.

                    Yes you're correct. I had just assumed that you were masuring the pressure in a hydronic system because I personally have never thought of monitoring mains pressure. Do you have concerns about the mains pressure getting too low or too high?
                    Originally posted by rprade
                    There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

                    Comment


                    • #11
                      Originally posted by S-F View Post
                      Yes you're correct. I had just assumed that you were masuring the pressure in a hydronic system because I personally have never thought of monitoring mains pressure. Do you have concerns about the mains pressure getting too low or too high?
                      Not particularly - When i'm in the shower in the mornings is seems a little more powerful than having a shower in the evening - so that combined with finding a cheap sensor and having an abundance of ADC channels and the usual "because I can" interest.
                      To be fair, I do want to monitor the boiler pressure too - so I'll probably order another sensor.

                      I do like monitoring the hot water side, because failures could be dangerous - so if the pressure goes over expected levels I would get an early warning way before even the manual overpressure devices kicked in.

                      I also want to fit a 1-wire sensor to monitor the cold water feed temperature just to see how that changes throughout the year - again no particular need to do so.

                      Comment


                      • #12
                        I love this!
                        It's a wonderful mix of "because I can" and "I need the data because of... reasons".
                        HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                        Running on Windows 10 (64) virtualized
                        on ESXi (Fujitsu Primergy TX150 S8).
                        WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                        Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                        Comment


                        • #13
                          I do like my instrumentation - every single room has a temp sensor, the hot water cylinder has two (one in the middle, one at the top). If any room gets particularly hot it will send alerts for potential fire.

                          The house smoke alarm has a feed into HS, again I get alerts if the smoke detectors trigger.

                          I track water flow and get alerts for high flow (hose pipe left on) and very slow usage overnight and when un-occupied (dripping taps and a slight leak)

                          I track gas flow in the same manner, I control the boiler via HA and have feedback to know when the boiler is running - which means I have alerts for gas flowing when the boiler is not running - which has successfully alerted me to a very slow gas leak.
                          Attached Files

                          Comment


                          • #14
                            That gas flow sensing is pretty slick. How'do you swing that?
                            Originally posted by rprade
                            There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

                            Comment


                            • #15
                              Originally posted by S-F View Post
                              That gas flow sensing is pretty slick. How'do you swing that?
                              I have something called a pulse block attached to my gas meter - in reality its just a very sensitive reed relay that sends a simple on/off pulse to homeseer. On each pulse, I run a script that increments several virtual devices and starts timers to calculate the flow. (My water meter is done the same way)

                              Many meters dials have little magnets inside them and you can track them. Mine has both a magnet and a shiny "1" which you can use an opto-sensor on. Bit of googling will find people using varios tricks to track your dial going round on the meter:
                              http://www.hekkers.net/domotica/howt...rgasusage.aspx
                              (I tried the this one first, but wasn't reliable enough for me)
                              http://www.bwired.nl/How_rfxcom.asp

                              In the end I found this proper attachment for my meter which gives a very reliable clean on/off signal and doesn't look like i'm defrauding the supplier!

                              Click on METUR007 for my one:
                              http://www.thecodestore.co.uk/shop/details/678/481/energy-and-co2-emissions/ene3-energy-display-devices/accessories/pulse-block.html

                              I can start another thread somewhere more appropriate if desired.
                              Attached Files

                              Comment

                              Working...
                              X