Announcement

Collapse
No announcement yet.

ADIO-100 Analog Input Loading

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

  • ADIO-100 Analog Input Loading

    I connected some ATS2000A temperature sensors to the ADIO-100 analog inputs to monitor temperatures in several locations. But, the sensors were not reading correctly, about 10% low. After troubleshooting, I found that the ADIO is loading the sensor. The ADIO analog inputs use a resistor divider with two 560 ohm resistors, which presents a load of 1120 ohms to ground on each input.

    Question: was it designed to use such a low resistance, or is mine built wrong.

    Some analog devices (such as a self-powered current sensor that I wanted to use) require a minimum load resistance of 1M ohm. They will not work with the ADIO-100 at all.

    I would think that a voltage divider using two 560 kohm resistors (rather than 560 ohm) would be a much better design because it would present >1M ohm load to the analog source.

    For my purposes, I would actually prefer to have no divider (straight 5v inputs) so that I could have full 10 bit accuracy on my 5volt analog devices. If I want to measure something greater than 5 volts I can add an external voltage divider.

    Would appreciate some input from the HS designers (or anyone else) as to whether it was designed for 560 ohm divider, or if mine has an assembly fault.

    Thanks!
    Last edited by Burrington; December 24th, 2011, 02:46 PM.

  • #2
    ADIO-100 Analog Input Loading Modification - Fixed it!

    In the absense of any input from HS, I fixed this myself. All you need to do is open the box and remove resistor pack R7. This removes the load-to-ground side of the voltage divider on all 8 analog inputs. Although there is still a 560 ohm resistor in series with each input, it is negligible to the >1Mohm input resistance of the chip.

    Since doing that, the ADIO-100 now works flawlessly. This changes the operating parameters as follows:

    1) VERY IMPORTANT - this changes the input voltage range to 0 to 5 VDC, (NOT 0 - 10 VDC as per the specs). However, in my opinion, 0 to 5 VDC is more useful anyway. If you have any 10 volt devices, install a resistor divider externally to cut the voltage in half.

    2) It now has a full 10 bit resolution for 5 volt devices (original design only provides 9 bit resolution for 5 volt devices). For a 5 volt temperature sensor like the ATS2000A that I'm using, that gives 1/4 degree F sensitivity (Use the sensor's T20 output and have HomeSeer divide the input value by 4 to get degrees F in 0.25 degree increments).

    3) Input impedance is > 1Mohm, so it works accurately with high impedance devices. Also important if you have long cable runs on low impedance devices.

    4) Any unused inputs will be floating and causing random input value changes, so any unused inputs should be wired to ground.

    5) The ADIO-100 has NO input protection. So, it is very important to protect the inputs from any reverse voltages, negative voltages, voltages over 5 VDC, lightning surges, relay kick-backs, etc. If possible, use the on-board 5VDC supply to power devices that are connected to the inputs. In that way, the input can not be driven higher than 5 VDC, or negative. You should be ok without any external protection if your device is powered strictly by the ADIO-100's 5VDC line.

    6) Removing R7 is a relatively simple procedure if you are at all handy with a soldering iron and a solder sucker. If not, take it to any TV/radio repair place and they can do it for you. R7 is a long thin 9 pin strip that is clearly marked on the circuit board. Took me about 5 minutes to do the whole mod. Be sure you take precautions against static while you have the case open. Check carefully that you didn't get solder anywhere it's not supposed to be.

    7) Making this mod likely voids the warranty...

    8) Additional info added March 19, 2013: I should have mentioned that Homeseer still reports the voltage on a scale of 0 to 10 volts (value = 0 to 1000), which is double the actual input voltage after the resistor divider is removed. So, any readings need to divided by 2 in a script to provide the correct voltage reading. So, as delivered each digit of value is 0.010 volts, after the mod each digit is 0.005 volts. For example, a reading of 6.20 volts (value = 620) is actually 3.10 volts after the mod.

    I have been using my modified ADIO-100 for 4 months now and it has worked flawlessly. Simple, easy setup. No lockups, hickups, errors, or anything. It seems to just work perfectly every time! So, with the exception of the resistor divider, and the lack of any input protection, it is a very sweet design, both hardware and software. Buy it, make the mod, and you will be very happy with it.
    Last edited by Burrington; March 20th, 2013, 01:52 AM. Reason: Additional info added

    Comment


    • #3
      The HomeSeer techs rarely visit this message board so if you need help from them put in a help desk request if you are within your free 30 day support window. If you want or need immediate help you can sign up for priority support here as well.
      http://board.homeseer.com/forumdisplay.php?f=990
      -Rupp
      sigpic

      Comment


      • #4
        Originally posted by Burrington View Post
        In the absense of any input from HS, I fixed this myself. All you need to do is open the box and remove resistor pack R7. This removes the load-to-ground side of the voltage divider on all 8 analog inputs. Although there is still a 560 ohm resistor in series with each input, it is negligible to the >1Mohm input resistance of the chip.

        Since doing that, the ADIO-100 now works flawlessly. This changes the operating parameters as follows:

        1) VERY IMPORTANT - this changes the input voltage range to 0 to 5 VDC, (NOT 0 - 10 VDC as per the specs). However, in my opinion, 0 to 5 VDC is more useful anyway. If you have any 10 volt devices, install a resistor divider externally to cut the voltage in half.

        2) It now has a full 10 bit resolution for 5 volt devices (original design only provides 9 bit resolution for 5 volt devices). For a 5 volt temperature sensor like the ATS2000A that I'm using, that gives 1/4 degree F sensitivity (Use the sensor's T20 output and have HomeSeer divide the input value by 4 to get degrees F in 0.25 degree increments).

        3) Input impedance is > 1Mohm, so it works accurately with high impedance devices. Also important if you have long cable runs on low impedance devices.

        4) Any unused inputs will be floating and causing random input value changes, so any unused inputs should be wired to ground.

        5) The ADIO-100 has NO input protection. So, it is very important to protect the inputs from any reverse voltages, negative voltages, voltages over 5 VDC, lightning surges, relay kick-backs, etc. If possible, use the on-board 5VDC supply to power devices that are connected to the inputs. In that way, the input can not be driven higher than 5 VDC, or negative. You should be ok without any external protection if your device is powered strictly by the ADIO-100's 5VDC line.

        6) Removing R7 is a relatively simple procedure if you are at all handy with a soldering iron and a solder sucker. If not, take it to any TV/radio repair place and they can do it for you. R7 is a long thin 9 pin strip that is clearly marked on the circuit board. Took me about 5 minutes to do the whole mod. Be sure you take precautions against static while you have the case open. Check carefully that you didn't get solder anywhere it's not supposed to be.

        7) Making this mod likely voids the warranty...

        I have been using my modified ADIO-100 for 4 months now and it has worked flawlessly. Simple, easy setup. No lockups, hickups, errors, or anything. It seems to just work perfectly every time! So, with the exception of the resistor divider, and the lack of any input protection, it is a very sweet design, both hardware and software. Buy it, make the mod, and you will be very happy with it.
        I can confirm this solution. It works great.

        Comment


        • #5
          I'm using an LM335 and experienced the same problem. I've removed D7 and I think its working now. Following the instructions here:
          http://www.ontrak.net/LM335.htm

          It says that 'C is:
          C= ( reading-558.6)/ 2.048

          So homeseer reports my device as 6.09V (which i now assume to be bogus) but a value of "609", applying the formula above i get (609-558.6)/2.048=24.6 Degrees.
          Which seems about right.

          My question is how do I actually have a status value which is updated with the temperature based on the above formula?

          Comment


          • #6
            The ADIO-100 as shipped has a resolution of 10 volts / 1024 bits = 0.009766 volts per bit. They round it off to 0.01 volts so that a value of 609 = 6.09 volts (which is actually off by 2.4%). I forgot to mention that after the resistor divider is removed, the resolution changes to 5 volts / 1024 = 0.0048828 volts per bit. So a value of 609 = 2.97 volts.


            The LM355 outputs 0.01 volts per degree Kelvin. 0 degrees kelvin = -273.15 degrees Celcius.


            The formula you want for the LM355 after the divider mod is as follows:
            Degrees C = (Value x 5 volts / 1024 bits / 0.01 volts per degree Kelvin) - 273.15 degrees Kelvin


            Or shorten to:
            Degrees C = (Value x 0.48828) - 273.15


            Your example of 609 value = 24.21 degrees C


            For those who want degrees F:
            Degrees F = (((Value x 0.48828) - 273.15) x 9 / 5) + 32

            Comment


            • #7
              Thanks for the reply.
              I was stuck on how I actually do the maths inside Homeseer, but have since read up on scripting (which i've not done so far). With a bit of searching, I come up with this:

              Created a virtual Device called ADIO-CHAN8-TEMP with a Lettercode of A10

              Created an event called "ADIO100-Chan8-CalcTemp", which triggers on device value change of the analogue input channel, with an action to run the following script (I'm sure it could be done on one line, but I wanted it all broken out, to aid learning / debugging)

              sub main()
              dim chan8value
              dim chan8temp
              chan8value = hs.devicevaluebyname("ADIO-100 A8-1")
              hs.WriteLog chan8value,"ADIO 100 chan8 value"
              chan8temp = (chan8value - 550)/2.048
              hs.WriteLog chan8temp,"ADIO 100 chan8 temp"
              hs.setdevicevalue "A10",chan8temp
              hs.SetDeviceString "A10",chan8temp, True
              end sub


              the value of "550" has been manually tweaked/calibrated by comparing to a digital thermometer - but I'm still not overly happy with the accuracy, so I've just ordered an LM35 which is calibrated directly in 'c and doesn't require any external calibration circuits - so i'm going to see how i get on with that.


              I also have the speaker client "talking the temperature" with the following speak command "it is $$DV:a10 centigrade"

              Thanks.

              Comment


              • #8
                Couple points:

                1) The value saved by "Setdevicevalue" is an integer, so it is rounded off to the nearest whole number. That loses some of the accuracy and will cause the temperature to appear to wander.

                If you need the temperature accurate to a decimal point, you can save it x10, and divide by 10 whenever you want to use it. For example, 24.6 degrees would be saved as 246 so Homeseer doesn't round it off to 25. You can still save the string as "24.6" for easy visual reference.

                2) You can use the "Math" function (a windows scripting function) to round off the number you want saved. For example, I use the following line to round off my temperatures to 1/4 degree F:

                dim BedroomTemp as object = Math.Round((hs.DeviceValue("[9")/3.92*1.014*1.020*4),0)/4
                'Calibration is "VoltageReading/2/100/0.0196*SensorCalibrationadjustment*AtoDCalibrationAdjustment "
                'Rounding process above is to round the temperature to even 1/4 degrees F - ie 70.00, 70.25, 70.50, 70.75, etc.

                Note: My device uses a different formula than yours does.

                3) You should use my formula as it is more accurate than the one you have for the combination of devices you are using.

                4) I just used a multiplier factor in the formula to calibrate my temperature sensors.

                5) If you find the sensor outputs are wandering by a couple degrees when there is no temperature change, make sure you are using shielded wire, especially if the wire run is more than a few feet, and if it runs near other wires that can induce noise. You can also place a small capacitor across the a/d input (about 0.01uF) to stabilize the slow moving voltage.

                6) When I first tried to calibrate my sensors I found that none of them matched my digital thermometer. Turned out my thermometer wasn't as accurate as I had assumed...

                Good luck!

                Comment


                • #9
                  Thanks for the tips!. I've swapped over to your formula along with a little spreadsheet i used to calculate the calibration figure and the results now seem to me more accurate.

                  The fact the devicevalue is an integer comes in handy - as i use that for the text to speak, but will use the string value when i require more accuracy (central heating if i can get wife approval)

                  So far this is all on the end of 4 foot of wire. I was hoping to use my cat6 infrastructure to locate some of the remote sensors. I noticed on the spec sheet for the LM35 it shows twisted pair for remote sensing - but there's no mention of expected distances.

                  Comment


                  • #10
                    My original 2013 post was for HS2. Here is the script I use now for HS3 (which is slightly modified due to changes from HS2). This only works if you modify the ADIO-100 as per my 2013 post above.

                    Dim BedroomTemp As Double = Math.Round((hs.DeviceValueEx(299) * 25.51 * 0.985 * 1.02 * 4), 0) / 4
                    'Calibration is "VoltageReading/2/0.0196*SensorCalibrationadjustment*AtoDCalibrationAdjustment "
                    'Rounding process above is to round the temperature to even 1/4 degrees F - ie 70.00, 70.25, 70.50, 70.75, etc.
                    hs.writelog("Bedroom Temp =", CStr(BedroomTemp) + "F")
                    hs.SetDeviceValueByRef(318, BedroomTemp, 1)

                    Device 299 is the raw input from the ADIO-100 using an ATS2000 sensor. Virtual Device 318 is where I hold the actual readable temperature in degrees F. HS3 shows a value of 70.25 for example.

                    The voltage reading has to be divided by 2 because the ADIO is multiplying by 2 because it thinks its getting a 0 to 10 volt input, but after my mod its really 0 to 5 volts.

                    25.51 comes from: 1/2/0.0196 = 25.51

                    I got the AtoDCalibrationAdjustment by using an accurate digital voltmeter on the ADIO input and comparing the raw voltage reading from HS3 to the voltmeter. My ADIO was reading slightly low, so I adjust it up by 1.02.

                    I got the SensorCalibrationAdjustment by placing a certified accurate thermometer next to the sensor and adjusting the reading to be accurate. This particular sensor was slightly high, so I adjust it down by 0.985.

                    Depending how accurate you need it to be, you don't need to go to all that trouble if a couple % error is ok.

                    If you are using an ATS3000 wide temperature range sensor (Works down to -40F) use this script:

                    Dim OutsideTemp As Double = Math.Round((((hs.DeviceValueEx(299) * 25.51 * 0.985 * 1.02) - 40) * 4), 0) / 4
                    'Calibration is "VoltageReading/2/0.0196*SensorCalibrationadjustment*AtoDCalibrationAdjustment-40"

                    Hope that helps! Bill

                    Comment


                    • #11
                      James,

                      Here is the complete script that should work for you. I'm sure a real programmer would come up with something better, but this works for me:

                      -----------------------------------------------------------------------------------------------------

                      Sub Main(parm as object)

                      Dim PlenumTemp As Double = Math.Round((hs.DeviceValueEx(299) * 25.51 * 0.985 * 1.02 * 4), 0) / 4
                      'Calibration is "VoltageReading/2/0.0196*SensorCalibrationadjustment*AtoDCalibrationAdjustment "
                      'Rounding process above is to round the temperature to even 1/4 degrees F - ie 70.00, 70.25, 70.50, 70.75, etc.
                      hs.writelog("Plenum Temp =", CStr(BedroomTemp) + "F")
                      hs.SetDeviceValueByRef(318, PlenumTemp, 1)

                      End Sub

                      ----------------------------------------------------------------------------------------------------

                      Just put all that into a file in the HS3 "scripts" folder using Windows Notepad and give it a name that ends with .vb such as "PlenumTempSensor.vb". You will need to replace 299 and 318 with the correct reference numbers that your system has assigned to your devices.

                      The ADIO plugin created devices for each of the analog inputs when you set it up, so the one that corresponds to the plenum sensor is the one you need to replace what is called "299" above.

                      Create a new virtual device called say "Plenum Temperature F" to hold the actual calculated temperature.

                      Create an event to run the PlenumTempSensor.vb script whenever the ADIO sensor input changes, such as:
                      IF HVAC ADIO-100 A2-1 Plenum Temperature Sensor (Raw) has a value that just changed.
                      Then Run the script: C:/Program Files (x86)/HomeSeer HS3/scripts/PlenumTempSensor.vb

                      You can leave the "Sub or Function" and "Parameters" fields blank since you are not passing any parameters to the script.

                      On the device management view, you should see the ADIO device voltage change as the temperature changes. With the script running you should also see the calculated real temperature in your Virtual Plenum Temperature device show the real temperature and change along with the temperature.

                      If you find that the voltage is not changing, the ADIO might not be responding. There is a bug in HS3's ADIO plugin that seems to confuse the baud rate. If you change the baud rate to the highest value it works for reasons unknown... There are other threads that deal with this issue so search those for more info.

                      I set my ADIO poll interval to 10 seconds, and sensitivity threshold to 10. You can adjust those higher or lower as needed for your application, but that's a good place to start.

                      Re your rounding question: All I've done is multiply the value by 4, round it off to zero decimal places, then divide by 4 to get the original value rounded to 1/4 degrees F. So if you want it rounded to 0 decimal places, just leave out the "*4" and "/4" in the Math.Round function above and it will round to 0 decimal places. (Or replace the "0" with "1" for one decimal place, etc).

                      Hope that helps!

                      Ps. I'm placing all this on the public thread as well since it may be of interest to others.

                      --------------------------------------------------------------------------------------------------------------------------------
                      [QUOTE=Techvet]

                      Bill,

                      Thanks for the response. I understand what you're doing now. I use my ATS 2000 to monitor the plenum temp of my HVAC. Our HVAC is a 4 zone dual fuel system and I like to know if the system is actually working and if so which component (heat pump or gas furnace). The difference in plenum temps is pretty obvious and offers quick insight as to what is going on when we are away from home. That said, I'm not particularly bound by accuracy, so the calibration corrections probably won't be necessary in my case.

                      I have two additional questions if you don't mind:

                      1) Can you share any specifics of the HS2 script you used to use for the ADIO-100/ATS2000 set-up? Right now I am using HS2 and am doing so because of some legacy hardware that I am gradually upgrading out of (including a Stargate controller that is not supported with a HS3 plug-in.) The acquisition of the ADIO-100 is part of the upgrade path to wean me off of the Stargate and into HS3. However, I want to play with the set-up in HS2 until I am comfortable that I'm getting what I need off of it. I have a HS3 Pro license and if this works I anticipate moving over pretty quickly.

                      3. Is there a way to use the math to get a whole integer verses the integer plus the tenths of a degree? This is not a deal breaker per se, but the measurements I am am taking don't need that degree (no pun intended) of resolution. I am still learning the magic of scripting.

                      Many Thanks!

                      James

                      Comment

                      Working...
                      X