Announcement

Collapse
No announcement yet.

Adding an additional DS-18B20 Sensor

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

    Adding an additional DS-18B20 Sensor

    Hi,

    I currently have 4 DS-18B20 sensors hooked into an Arduino Mega and Arduino Ethernet. I am running 3 wires to each sensor (pwr, gnd and data line). Everything was working fine until I tried to add another sensor. When I added the sensor, one of my existing sensors started to display 32 degrees and the new sensor did not show up. So I replaced the sensor, still same problem. Then I tried to add a sensor with a short wire (4 ft), still one sensor displays 32 degrees and did not recognize the new sensor. Then I added a 4 ft wire to the data line without hooking it up to anything else and one sensor displayed 32 degrees. I am using the 4.7K resistor at the Arduino mega and my longest run is about 25 ft. Does anyone have any ideas??

    Thanks in advance,

    Ronnie

    #2
    What version of the plugin are you using? There are updates to the one wire in the Beta version available in the updater.
    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
      I am running 1.0.0.131. I did notice that 1.0.0.161 is available but it is still in beta.

      Comment


        #4
        The Fibaro Z-Wave binary sensor states in their manual that only a maximum of 4x DS-18B20 are supported. Is that perhaps some generic limit to avoid issues?

        Digging into their datasheet, I see they are using a 64-bit unique ID consisting out of an 8-bit family code header, 48-bit serial number, and then 8-bit CRC. Communication is 8-bytes total. That means there is technically not a limit to how many sensors can go on the 1-wire bus, except when the unique serial numbers run out (that's a lot of sensors).

        Does the program you loaded on the Arduino have a limit? or perhaps the HS Plugin? Worth a shot to try the beta version.

        Comment


          #5
          Originally posted by RoChess View Post
          The Fibaro Z-Wave binary sensor states in their manual that only a maximum of 4x DS-18B20 are supported. Is that perhaps some generic limit to avoid issues?

          Digging into their datasheet, I see they are using a 64-bit unique ID consisting out of an 8-bit family code header, 48-bit serial number, and then 8-bit CRC. Communication is 8-bytes total. That means there is technically not a limit to how many sensors can go on the 1-wire bus, except when the unique serial numbers run out (that's a lot of sensors).

          Does the program you loaded on the Arduino have a limit? or perhaps the HS Plugin? Worth a shot to try the beta version.
          In my early testing, the Arduino would reliably handle 4 DS18B20 sensors and only by reducing the pull up resistor to 3.3K. I got a 5th to work, but not reliably and only with very short lead lengths. Systems like OWServers that can handle 20+ devices on a loop use a special constant current driver or bridge chip for the data line, allowing the OneWire devices to more effectively time their responses, by varying the pseudo pull up from 5 ohms to 1k. I also think the Arduino library does not make it a true master inasmuch as it cannot detect and react to collisions. Without properly maintaining the data line as more devices are added, collisions and unreadable data become a problem as does noise and reflections caused by longer loops and especially by star topology.
          HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

          Comment


            #6
            Thanks for the responses. I think I am going to update to .161 and add the sensors to a ESP8266. I have several but have not used them yet. Now would be a good time. Thanks again.
            Ronnie

            Comment


              #7
              If you are using Tasmota with ESP8266 then assure you have a binary that includes the DS18B20 or if you compile from source then enable it it the user confit file.

              Comment


                #8
                As a side note with 1 wire I have found capacitance and not resistance to be the culprit. Capacitance is primarily is function of wire construction and wire length. Assumption is that there is termination at the end of the wire run opposite the interface to the controller. Star configurations are even more problematic with reflections.

                Comment


                  #9
                  Originally posted by Michael McSharry View Post
                  Assumption is that there is termination at the end of the wire run opposite the interface to the controller. Star configurations are even more problematic with reflections.
                  That brings back horrible memories for me on 10Base2 networking with BNC termination, and if you forgot one or worse it was not fully connected then you'd waste hours diagnosing weird network issues.

                  Comment


                    #10
                    Originally posted by RoChess View Post

                    That brings back horrible memories for me on 10Base2 networking with BNC termination, and if you forgot one or worse it was not fully connected then you'd waste hours diagnosing weird network issues.
                    Wow BNC... that brings back some memories.
                    Billy

                    Comment

                    Working...
                    X