DS18S20?

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looking for an example of using the DS18S20 temperature sensor. Using google to search the freaks, I find that there were 9 related projects in the project section in 2010. Alas, I can't seem to make the project searcher find any of them in 2015, but then, if you know me, I often can't find such things I have the DS18S20 datasheet. Perhaps I just need an example of doing 1 wire. I did find such an example using ASF, but there has to be a better way.

 

I'm figuring on using an xMega8E5 or maybe a Tiny4313.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, I didn't even bother to try the site search:

 

https://www.avrfreaks.net/comment...

 

https://www.avrfreaks.net/forum/o...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Note that the DS18S20 is different to the DS18B20.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

Note that the DS18S20 is different to the DS18B20.

 

Yes, and I'm wondering if the B is more suited to the idea. I'm still in the, "maybe I could..." phase of the project.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think you will find the B version is better endowed,   and easier to buy.

 

Mind you,   if you possess a drawer full of the S version,   I am sure that they should fulfill your needs.

 

The one-wire functions are fairly complex.     Especially distinguishing multiple devices on the bus.

There are some excellent libraries out there.   e.g. from danni / martin thomas

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The actual reading & writing functions are not difficult - they are in the Maxim docs.

 

Distinguishing devices, as such, is not difficult (and not necessary at all if there's only 1 device on the interface).

 

The tricky thing is autonomously discovering what devices are on the bus...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This one supports both B & S

 

http://siwawi.bauing.uni-kl.de/a...

 

 

/Bingo

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looks like he's done most of my project for mecheeky

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is Sylvain Bissonettes s version from 2003

 

Attachment(s): 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And here's one that I did many years back.  It's fairly well commented and should be easy to follow.  Works with both the "B" and "S" versions of the 1820 as well as one-wire RTC chips.

 

https://www.avrfreaks.net/projects/multitherm

 

[Actually it is at http://thebloughs.net/series/mul... Ross]

 

Cheers,

 

 

Tom

 

Cheers,

Tom

Last Edited: Wed. Jan 14, 2015 - 11:59 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tblough wrote:
[Actually it is at http://thebloughs.net/series/multi-therm-2/   Ross]

 

Actually it is at http://thebloughs.net/series/mul... - without the trailing whitespace [I hate it when that happens. Thanks Andy. Ross]

 

cool

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Thu. Jan 15, 2015 - 01:26 AM