Announcement

Collapse
No announcement yet.

Current One-Wire Temp Sensors

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

  • Current One-Wire Temp Sensors

    So I have had 5 of those waterproof DS18B20 temp sensors strapped to my domestic hot water and heating system piping terminated to my Brultech GEM for a few years now. Worked flawlessy. As winter season approaches I noticed the sensors have not been reporting for a while now. I reset, checked the wiring and sensors, and even updated the GEM COM and ENG firmware's. Still no go. The GEM electrical monitoring works fine but wont scan and list the temp sensors.

    I disconnected the loop of 5 sensors and installed just one new spare DS18B20 temp sensor directly to the GEM input and rebooted it. I heated and cooled the sensor but nothing, it will not detect. When I get time I will reach out to Brultech.

    In the meantime I have an Arduino in my oil burner room monitoring the circulator pumps' status so I thought why not pull back the 50' of 18/3 cable heading to the Brultech GEM and hook up the 1-Wire loop to the Arduino 15' away from the sensors. Using Greig's Arduino HS3 PI Ver 1.0.0.142, I used a 4.7K resistor as shown in examples and opened input pin 5 for One Wire. Again nothing...overnight nothing

    Now my question. How do I determine the correct resistor to use for a length of 15' with 5 sensors wired in parallel? I am reading that others use different values. I will look through my old electronics boxes for a variable up to 10K but is there an easier way instead of keep trying different values all day long?

    Maybe I missing something else?

    Thanks for any help

  • #2
    Here have utilized the DS18B20 temperature sensors for some 20 years plus. Well started in the 1990's with them.

    I have never seen one go bad. Historically here used a star shaped configuration using cat5e punched down and a connection to a Temp05 or Temp08.

    Over the years it has been said to utilize one wire and just connect the sensors along the length of the wire.

    It's been only with the Arduino / Tasmota software that I have used a 4.7k pull up resistor between VCC and DQ.

    Testing here now with Espurna firmware and noticed that the DS18B20 is much more sensitive with said firmware than the Tasmota firmware. Here tested 3 extended run (up to 30 feet) for almost 6 months with no issues.

    Maybe try using one cabled DS18B20 first without extending the cable and see if it works. There is really no correct resistance and typically I have read to just utilize a 4.7k or 10k resistor or just one under 10K.

    If you have an old Dallas / Maxim USB/Serial hub you can test the DS18B20 with it easy enough.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
    Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

    Comment


    • #3
      Originally posted by will40 View Post
      Now my question. How do I determine the correct resistor to use for a length of 15' with 5 sensors wired in parallel? I am reading that others use different values. I will look through my old electronics boxes for a variable up to 10K but is there an easier way instead of keep trying different values all day long?

      Maybe I missing something else?

      Thanks for any help
      I have never found a formula published, but I did experiment with Arduinos prior to going with EDS OneWire servers. While 4.7K is recommended for one sensor, I found 5 would work but frequently errored. I went down to 3.3K and they were reliable with 5 hooked up within a few meters of the Arduino. I have read that others have gone down to 2.2K and have read that more than 8 without a constant current supply is unreliable. I have also read that some just enable the Arduino pull-up resistors and use no external.resistor at all. The pull-up resistor between the power and the data line holds the bus high unless either the master or one of the slaves is actively pulling it down. This is handy because multiple devices can pull the bus low at the same time and nothing bad happens. There is a protocol that all the sensors follow that lets them carry on orderly communication on this shared wire. In theory, this should allow you to use a 4.7K for any number, but that didn't work in practice for me. If you have a 4.7K try it and see if you get read errors. If you do, try a 3.3K. It is my understanding that going below 2.2k has a chance of damaging the sensors, though I have not needed to try it.
      Randy Prade
      Aurora, CO
      Prades.net

      PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

      Comment


      • #4
        Guys thanks for the quick replies. I swapped out the 4.7K for a 2.7K earlier this evening and no difference.

        Randy I will try the 3.3K first to see if that makes a difference.

        Pete if the 3.3K is a no go, I will try the 4.7K with a single temp sensor as you suggest to at least try and at least see one of them show up.

        Comment


        • #5
          Originally posted by will40 View Post
          Guys thanks for the quick replies. I swapped out the 4.7K for a 2.7K earlier this evening and no difference.

          Randy I will try the 3.3K first to see if that makes a difference.

          Pete if the 3.3K is a no go, I will try the 4.7K with a single temp sensor as you suggest to at least try and at least see one of them show up.
          If a 2.7 didn’t work a 3.3 won’t. Do try what Pete suggested to get a baseline. All 4 of my Arduinos have a single DS18B20 with a 4.7K as does my GEM. My Arduinos are using the standard sketch with V148 of Greig’s plug-in. They have been in place since V16
          Randy Prade
          Aurora, CO
          Prades.net

          PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

          Comment


          • #6
            Thank you Randy and Will.

            Here have been transitioning from old 1-Wire analog which used Midon Temp-05, Temp-08, DS9097 hubs with separate serial ports to HS2 way long time ago.

            The above was multiple star shaped runs using cat5e punched down to one dedicated punch down panel. This endeavor started in the 1990's and went to the 2000's and eventually went to using xAP for the multiple serial ports connectivity.

            Initial testing here was using an RPi with Node Red / OWFS /MQTT. Worked fine with a DS9097. All of this testing was with no pull up resistors and worked fine with whatever what was defined in OWFS library.

            Next test here was with upgrading the firmware on a SonOff WiFi basic (with Tasmota firmware) and only for DS18B20 sensors. Here used one pull up resistor which was 4.7k with 4 runs of DS18B20 sensors. All of these were extended up to around 30 plus feet with one 4.7k resistor at the terminal side of the SonOff basic in a star shaped topology. This was using mcsTasmota firmware Version G which was custom made by Michael for his mcsMQTT plugin / ITead projects.

            The idea here is to move to a hub and spoke topology with multiple wireless 1-wire devices all speaking MQTT. (just temperatures for now).

            Recently switched the Sonoff WiFi hardware modded device to having two sets of terminals - IE: GPIO14 (DQ), 3.3VDC, ground plus GPIO4 (DQ), 3.3VDC and ground for 4 DS18B20 sensors and one DHT22 sensor.

            With the above also upgraded firmware from Tasmota to ESPurna. Initial testing of extended runs did not work with ESPurna firmware; then after a while it did work with same said star topology and one 4.7k ohm resistor. I am getting good values now except seeing some wierd errors in the debug logs. Note this is with two of the cabled type of DS18B20 sensors (extended) and two DS18B20's with soldered leads to chips extended. Testing here with old AAG, Midon and Hobby Boards DS18B20 sensors plus cabled DS18B20 sensors and just the DS18B20 sensors. Wanting to take all of this now to MQTT and wireless.

            The ESPurna allows for multiple WAP connections plus static IP addressing and a cold boot allows for a total network setup versus having to adjust the firmware long math way (Tasmota).

            Click image for larger version  Name:	Espurna.jpg Views:	1 Size:	27.1 KB ID:	1262355

            Except here I see errors which do not affect the output above and cannot figure this out yet.

            [012772] [SENSOR] -> ERROR 7
            [022777] [SENSOR] Initializing DHT22 @ GPIO14
            [022780] [GPIO] Failed getting lock for GPIO14
            [022781] [SENSOR] -> ERROR 7
            [030953] [SENSOR] Error reading data from DHT22 @ GPIO14 (error: 3)
            [032778] [SENSOR] Initializing DHT22 @ GPIO14
            [032780] [GPIO] Failed getting lock for GPIO14
            [032782] [SENSOR] -> ERROR 7
            [042786] [SENSOR] Initializing DHT22 @ GPIO14
            [042789] [GPIO] Failed getting lock for GPIO14
            [042790] [SENSOR] -> ERROR 7
            [052788] [SENSOR] Initializing DHT22 @ GPIO14
            [052790] [GPIO] Failed getting lock for GPIO14
            [052792] [SENSOR] -> ERROR 7

            Using the Tasmota software console never showed any errors with same 4.7k ohm resistor at base with star topology and extended runs.

            11:50:34 MQT: /1Wire/SENSOR = {"Time":"2018-11-06T11:50:34", "DS18x20":{"DS1":{"Type":"DS18S20", "Address":"10AE56130008007B", "Temperature":69.7}, "DS2":{"Type":"DS18S20", "Address":"10A52F47000800CB", "Temperature":71.4}, "DS3":{"Type":"DS18B20", "Address":"280D7E5B04000049", "Temperature":81.8}}, "TempUnit":"F"}

            My only issue which was resolved was using a JSON template in Home Assitant for reads here.

            I have not read about using different values of resistors other than 4.7k or 10k and more than 4 DS18B20 sensors at one time.

            I have also wired a 5 VDC output on the SonOff WiFi boards but it is unregulated. It is just moving a jumper pin here to use the 5VDC power.

            The Garage GDO multiple function SonOff WiFi basic here has one temperature sensor with one 4.7k resistor extended only 3 feet and it has worked fine for months now which is the same as the initial SonOff Wifi basic with 4 extended sensors both using Tasmota firmware.

            Here also adding DS18B20's to my test MagicHome (upgraded firmware) RGB controllers.

            Just saw a response on my reported error above. It is just removing the DHT reference in the code for the firmware. Next though wanted to modify the code such that I can utilize one extended DHT22 and multiple DS18B20 sensors on same said SonOff wifi basic using two GPIO pins.

            xxx
            Last edited by Pete; November 27th, 2018, 08:56 AM.
            - Pete

            Auto mator
            Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
            Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

            X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

            Comment


            • #7
              Got 5 DS18B20 sensors working. 2 are extended cabled sensors and 3 are extended DS18B20 chips.

              Using two 4.7k ohm resistors now. One at the terminal end and one at the furthest test cabled DS18B20 (tested with a 50 foot cable).

              Next test is to connect one then two DHT22 sensors on different GPIO pins and extend these.

              Fixing the error in the firmware relating to seeing or not seeing a DHT sensor on GPIO 14. Moving the sensor to GPIO 4 and changing the firmware such that it sees that sensor on GPIO pin #4.

              Note that the Sonoff WiFi basic is 120VAC powered.

              You can use a tiny magichome device or Sonoff SV which can be 12VDC powered and do the same. (all have ESPXXX / WiFi built in).

              Click image for larger version  Name:	Espurna-5 sensors.jpg Views:	1 Size:	39.9 KB ID:	1262417

              Relating to using mcsMQTT or Home Assistant the HASS piece shows the Mosquitto stuff.

              sensor:
              - name: ICS_SonOff1_temperature
              platform: mqtt
              state_topic: SonOff-1Wire-1/temperature/0
              unit_of_measurement: °F


              sensor:
              - name: ICS_SonOff1_temperature
              platform: mqtt
              state_topic: SonOff-1Wire-1/temperature/1
              unit_of_measurement: °F


              sensor:
              - name: ICS_SonOff1_temperature
              platform: mqtt
              state_topic: SonOff-1Wire-1/temperature/2
              unit_of_measurement: °F


              sensor:
              - name: ICS_SonOff1_temperature
              platform: mqtt
              state_topic: SonOff-1Wire-1/temperature/3
              unit_of_measurement: °F


              sensor:
              - name: ICS_SonOff1_temperature
              platform: mqtt
              state_topic: SonOff-1Wire-1/temperature/4
              unit_of_measurement: °F


              xxxx
              - Pete

              Auto mator
              Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
              Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

              X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

              Comment


              • #8
                Originally posted by rprade View Post

                If a 2.7 didn’t work a 3.3 won’t. Do try what Pete suggested to get a baseline. All 4 of my Arduinos have a single DS18B20 with a 4.7K as does my GEM. My Arduinos are using the standard sketch with V148 of Greig’s plug-in. They have been in place since V16
                ok, I agree and will save me a step. hmmm...I know I should have asked this yesterday but just jogged my poor memory when I see your note "4.7K as does my GEM". I never had any resistor on my existing loop from the GEM since I installed it about 2 years ago. In fact as I search the web the past week I cannot find any details as to how to install the temp sensors on the GEM. Just that is supports up to 8 of DS18B20 and the terminals are clearly marked 5V, GND, Data. Randy you had or have a 4.7K on your GEM?

                Pete - I appreciate your testing and reporting the results. That is interesting about using two 4.7K's. I am going to dive into this shortly and test out the single sensor 4.7K first.

                If this continues to fail I will look into upgrading Arduino plugin to .148 As I recall trying this before and had a lot of mismatches with the other 3 Arduino boards in the house I have running over Ethernet but that is for another topic I guess...

                Be back soon

                Comment


                • #9
                  Originally posted by will40 View Post

                  ok, I agree and will save me a step. hmmm...I know I should have asked this yesterday but just jogged my poor memory when I see your note "4.7K as does my GEM". I never had any resistor on my existing loop from the GEM since I installed it about 2 years ago. In fact as I search the web the past week I cannot find any details as to how to install the temp sensors on the GEM. Just that is supports up to 8 of DS18B20 and the terminals are clearly marked 5V, GND, Data. Randy you had or have a 4.7K on your GEM?

                  Pete - I appreciate your testing and reporting the results. That is interesting about using two 4.7K's. I am going to dive into this shortly and test out the single sensor 4.7K first.

                  If this continues to fail I will look into upgrading Arduino plugin to .148 As I recall trying this before and had a lot of mismatches with the other 3 Arduino boards in the house I have running over Ethernet but that is for another topic I guess...

                  Be back soon
                  That was poor sentence structure on my part. I should have written Arduinos have a single DS18B20 as does my GEM. The Arduinos with a 4.7K pull up resistor. The GEM has a built in power supply for the data line. I think Ben said it was a true master setup, but it has been a long time. A OneWire Master has a little more than a simple pull-up resistor. A true OneWire master listens, requests and manages the collisions among multiple devices. If I am not mistaken the Arduino only sends the reset pulse and an enumeration command and waits for each device to report. That is why the Arduino needs a temperature change to identify the devices. I could be wrong as it has been years since I looked at the entire OneWire protocol and the different ways it can be implemented. I know my OWServers identify devices immediately and I think the GEM did as well.

                  When you contact Ben or Paul at Brultech, they can verify. I think Ben was unsure of how many devices his bus would support, but he thought it was 8.
                  Randy Prade
                  Aurora, CO
                  Prades.net

                  PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

                  Comment


                  • #10
                    Thanks for clearing that up Randy, I just pulled the sensors off the piping and checked the loop for a resistor anyway. Its been a while and can't remember things like I used too. I did reach out to Ben earlier today to help me troubleshoot why GEM One-Wire stopped. He is looking into it.

                    Just pulled the loop off and put one temp sensor on the Arduino with 4.7K resistor. Heated and cooled off sensor, cycled power to board, tried changing inputs on board and in PI. Still no go with Arduino temp device.

                    I am going to try the board updates next. I do notice that my other boards will leave that "Stop Creating New One Wire Devices" unchecked but this board #3 in my burner room always defaults back to checked each time I uncheck it.

                    If this doesn't work I am going to look into the EDS Onewire server. I don't have a lot of confidence in this heat system monitoring setup now that I lost the GEM One-Wire. I like to travel to warm and sunny over the winter months and heating system updates while I am gone is a must. I'll report back. Thanks for the help!

                    Comment


                    • #11
                      Take a look at this thread I started in 2014, especially post #3. It may convince you to go with the OWServers. I have a total of 52 sensors on 3 OW servers and not one error or failure ever.
                      Randy Prade
                      Aurora, CO
                      Prades.net

                      PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

                      Comment


                      • #12
                        I had a OWServer in an unconditioned space, but protected from the elements and it failed after about a year. I suspect it was not designed for a space that did not have heat/cooling or means to limit humidity.

                        Comment


                        • #13
                          Originally posted by rprade View Post
                          Take a look at this thread I started in 2014, especially post #3. It may convince you to go with the OWServers. I have a total of 52 sensors on 3 OW servers and not one error or failure ever.
                          Impressive Randy. I may end up going the OWServer and Ultra's 1-Wire Plug in route to boost my confidence on my setup. I will give the Arduino board plug in updates a shot first.

                          Michael thanks for the feedback on your premature server failure. My oil burner room is usually dry year round but I will add a humidity sensor in there just in case.

                          Comment


                          • #14
                            Randy one question I hope you can answer for me for a sanity check. If you add an arduino one wire pin using the plug-in to any of your boards does the HS device show up right away even if a sensor is connected or not? I upgraded all my boards and still cannot get by board 3 to generate a HS device.

                            Thanks

                            Comment


                            • #15
                              Originally posted by will40 View Post
                              Randy one question I hope you can answer for me for a sanity check. If you add an arduino one wire pin using the plug-in to any of your boards does the HS device show up right away even if a sensor is connected or not? I upgraded all my boards and still cannot get by board 3 to generate a HS device.

                              Thanks
                              A OneWire temperature device will not show up in HS unti it is connected and its temperature changes. I usually just grab it tightly in my hand to raise the temperature. It will do this on each new OneWire device until you check the box on the config to stop creating new devices. When tat box is selected it will not recognize any new devices.
                              Randy Prade
                              Aurora, CO
                              Prades.net

                              PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

                              Comment

                              Working...
                              X