Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Bug Reports
  3. Dallas DS18S20 Issue

Dallas DS18S20 Issue

Scheduled Pinned Locked Moved Bug Reports
3 Posts 3 Posters 2.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LaesQ
    wrote on last edited by LaesQ
    #1

    Hi,

    I've been experimenting with some sensors and decided to look at some temperature sensors. I knew I had some Dallas DS18... chips lying about, so thought I'd try them. It appears I have DS18S20's and not DS18B20's as you've specified. As it looks like you're using the standard Dallas 1-Wire library by Miles Burton which supports (amongst others) the DS18S20, I thought I'd give it a go.

    I'm pleased to report that it works fine, apart from the fact that the first temperature measurement sent back comes in at 85.00C. As you can imagine, with experimenting (powering on/off to move the sensor), this is adding some incorrect data to my logs/charts. The simplest thing I've found is to extend line that reads:

    if (lastTemperature[i] != temperature && temperature != -127.00) {
    

    to read as follows:

    if (lastTemperature[i] != temperature && temperature != -127.00 && temperature !=85.00) {
    

    This, as you can imagine, just ignores the 85.00C reading and doesn't send it. And so then now, mysensors now supports another temperature sensor :)

    I expect the code could be further expanded to cope with all of the DS18 chips that the library supports (DS18B20, DS1822, DS18S20, DS1820). It'd probably just need to testing to see what oddities these chips may have compared to each other. I assume the ignoring of -127.00 is another issue seen with this family of chips?

    The odd thing is that Miles' library page (http://milesburton.com/Main_Page?title=Dallas_Temperature_Control_Library) it states there are problems reported with the DS18S20 chips. I've done some searching, but can't find any information on what these problems may be. I'm only running one DS18S20 on "the wire" and this 85.00C temperature incorrect reading first time is the only issue I've found so far.

    Hope this helps someone :)

    LaesQ

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Gambituk
      wrote on last edited by
      #2

      I've seen this 85 degree value on the DS18B20's as well. I would assume it's common to the whole range, i normally solve this with a sensors begin call followed by a delay in the setup loop, but this addition would be a good add to the sketch imho !

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gonzalonal
        wrote on last edited by
        #3

        Hi, have you tried increasing the delay after the conversion command is send to the DSs? I have noted this behavior when the very first conversion of the DS is not waited long enought to finish, athts why its returning 85 Cº, wich is the power on state of the scratchpad.
        Let me know if you try it.
        Gonzalo

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        11

        Online

        11.7k

        Users

        11.2k

        Topics

        113.1k

        Posts


        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • MySensors
        • OpenHardware.io
        • Categories
        • Recent
        • Tags
        • Popular