DX  » Community » Forums
«See all threads (in Product Forum)
Product Forum

Aduino code

  • mrbill Friday, September 28, 2012 12:31 PM Reply
    For those interested, this works quite well on an Arduino.


    Here is the output from mine:

    ROM = 28 78 96 37 4 0 0 5C
    Chip = DS18B20
    Data = 1 3B 1 4B 46 7F FF 5 10 54 CRC=54
    Temperature = 19.69 Celsius, 67.44 Fahrenheit

    You will need a pull-up resistor - 4k7 does the trick.

    Posts(477) | Reviews | Tip post

    post edited by mrbill on 9/28/2012 at 12:33 PM
  • Martinewski Wednesday, October 10, 2012 2:00 PM Reply
    Hi !
    Could you help me with wire identification ?
    Red is +
    Green is -
    Yellow is data ?
    Correct me please, if it is wrong.

    Thank you
    Posts(15) | Reviews | Tip post

  • mrbill Wednesday, October 10, 2012 2:53 PM Reply
    That's I how I've it wired - with a pull-up resistor 4k7.

    Saying that, I'm having a bit of a problem with it intermittently showing 85c - but this is a common prolblem apparently.

    I may have it wired wrong or there is a grounding issue. Please let me know how it works for you.
    Posts(477) | Reviews | Tip post

    post edited by mrbill on 10/10/2012 at 2:55 PM
  • Martinewski Thursday, October 11, 2012 11:18 AM Reply
    Hi mrbill !
    I have tested my probe. It is ok here, working fine.
    http://milesburton.com/Dallas_Temperature_Control_Library code is working.
    DallasTemperature_372Beta and OneWire lib are necessary.
    Red is +
    Green is -
    Yellow is data
    And pull-up 4k7
    Working example:
    Dallas Temperature IC Control Library Demo
    Locating devices...Found 1 devices.
    Parasite power is: OFF
    Found device 0 with address: 28F007230400005B
    Setting resolution to 9
    Resolution actually set to: 9
    Requesting temperatures...DONE
    Temperature for device: 0
    Temp C: 23.50 Temp F: 74.30

    and goes... :)
    Posts(15) | Reviews | Tip post

  • mrbill Thursday, October 11, 2012 3:19 PM Reply
    How did you wire up the pull up resistor? Did you just use the default demo sketch?

    Mine works most of the time. Just occasionally get 85c.
    Posts(477) | Reviews | Tip post

  • Martinewski Thursday, October 11, 2012 3:56 PM Reply
    I have tested mine for 10 minutes, no failure.
    I wired up 4k7 from data to positive exactly like this (http://bildr.org/blog/wp-content/uploads/2011/06/DS18S20-hookup.png)
    Tomorrow I will install it and make other tests, if something unexpected happens, I will post.
    Posts(15) | Reviews | Tip post

«Reply to this thread (in Product Forum)
Product Forum



* 50 characters max


Please note: HTML codes are not allowed anywhere on this page (otherwise you will see an error).

Please note that DealExtreme Forums are not a sales or product support board. While we do constantly participate in this forum, please contact us via support ticket for a guaranteed fast response. We make every effort to make the quickest replies.

DX Everywhere