Author Topic: A one wire temperature device  (Read 540 times)

0 Members and 1 Guest are viewing this topic.

Offline Qmavam

  • Regular Contributor
  • *
  • Posts: 130
  • Country: us
A one wire temperature device
« on: April 16, 2021, 10:31:13 pm »
Hi all, I bought this digital thermometer, https://www.amazon.com/dp/B01MSOI9Y4?psc=1&ref=ppx_pop_dt_b_product_details
It uses the DS18B20, which is supposed to have a specific digital address. I want to set it up to be switchable between 5 or 6 different DS18B20 devices, shown here. https://www.amazon.com/gp/product/B00M1PM55K/ref=ppx_yo_dt_b_asin_title_o08_s02?ie=UTF8&psc=1
 What I need to know is, "Do they program each unit to work with the DS18B20 that is wired to each unit or is it programmed to just work with whatever DS18B20 that is plugged in?"

DS18B20 pdf (over my head) https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

                                   Thanks for your help, Qmavam
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 5363
  • Country: nl
  • Current job: ATEX certified product design
Re: A one wire temperature device
« Reply #1 on: April 16, 2021, 10:36:10 pm »
I would be super surprised if they would do anything than burning the same code to all the microcontrollers in those displays. Image the overhead work in the production setting that up, and there is 0 benefit for doing so.
Former username: NANDBlog
 

Offline Qmavam

  • Regular Contributor
  • *
  • Posts: 130
  • Country: us
Re: A one wire temperature device
« Reply #2 on: April 16, 2021, 11:02:43 pm »
I would be super surprised if they would do anything than burning the same code to all the microcontrollers in those displays. Image the overhead work in the production setting that up, and there is 0 benefit for doing so.
That would seem logical, but I think every DS18B20 is manufactured with a different address.
I did find something that may pertain in Example Two on page 18, when "only one DS18B20 is connected". https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf
 I read it as, Master sends out reset pulse, Master only gets one presence pulse back and then, because only one pulse, Master skips ROM command and then Writes to scratchpad.
 So, I think it sends reset and go through several operations, reads scratchpad and displays temp. Then reset again and start over.  I think I can just switch in a different DS18B20 and it will run through its sequence and read that one.
 I'll try that. If anyone has other ideas then what I have please inform me, I know I don't have a good understanding.
                                           Thanks, Qmavam
 

Offline DrG

  • Frequent Contributor
  • **
  • Posts: 861
  • Country: us
Re: A one wire temperature device
« Reply #3 on: April 16, 2021, 11:09:43 pm »
Hi all, I bought this digital thermometer, https://www.amazon.com/dp/B01MSOI9Y4?psc=1&ref=ppx_pop_dt_b_product_details
It uses the DS18B20, which is supposed to have a specific digital address. I want to set it up to be switchable between 5 or 6 different DS18B20 devices, shown here. https://www.amazon.com/gp/product/B00M1PM55K/ref=ppx_yo_dt_b_asin_title_o08_s02?ie=UTF8&psc=1
 What I need to know is, "Do they program each unit to work with the DS18B20 that is wired to each unit or is it programmed to just work with whatever DS18B20 that is plugged in?"

DS18B20 pdf (over my head) https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

                                   Thanks for your help, Qmavam

It has been a while since I have worked with them and I should probably go look at some code first, but.....They don't have a "specific digital address" per se, they have a unique ID which you can read. You do not have to make use of it, however, to read the temperature. So, if you only have one sensor, there is no reason to mess with the ID...and I would guess that is what they are doing with the product that you bought.

So, no easy way to switch between device except by using hardware (not sure how smoothly that would go and I never tried it), if you wanted to stay with that device. If you write your own software, or use an existing software library, you could put together your own system fairly easy - see the billions of Arduino examples out there :)
- Invest in science - it pays big dividends. -
 

Offline Qmavam

  • Regular Contributor
  • *
  • Posts: 130
  • Country: us
Re: A one wire temperature device
« Reply #4 on: April 16, 2021, 11:34:31 pm »

[/quote]

It has been a while since I have worked with them and I should probably go look at some code first, but.....They don't have a "specific digital address" per se, they have a unique ID which you can read. You do not have to make use of it, however, to read the temperature. So, if you only have one sensor, there is no reason to mess with the ID...and I would guess that is what they are doing with the product that you bought.

So, no easy way to switch between device except by using hardware (not sure how smoothly that would go and I never tried it), if you wanted to stay with that device. If you write your own software, or use an existing software library, you could put together your own system fairly easy - see the billions of Arduino examples out there :)
[/quote]
 Yes, I did have a system I put together that monitored 12 chest freezers, it worked great.  I will say the wiring part was easy for me but the computer program install and setup was tedious for me. I liked the program I used because It had a large display and would change from white numbers to red at any preset temp as a warning. But it was not easy for me to setup. Every morning when I hit the computer mouse, I could see if any freezer was malfunctioning, before any damage was done.
  I just wanted a simple instrument to monitor the temperature stratification of the air in my sauna.  If I could just mount a 6 position switch and switch between sensors, that are mounted at different heights in the sauna that would be great.
Hmm, while looking for something else the other day I ran across a package of LM35s.
 

Offline DrG

  • Frequent Contributor
  • **
  • Posts: 861
  • Country: us
Re: A one wire temperature device
« Reply #5 on: April 16, 2021, 11:41:48 pm »

Quote

It has been a while since I have worked with them and I should probably go look at some code first, but.....They don't have a "specific digital address" per se, they have a unique ID which you can read. You do not have to make use of it, however, to read the temperature. So, if you only have one sensor, there is no reason to mess with the ID...and I would guess that is what they are doing with the product that you bought.

So, no easy way to switch between device except by using hardware (not sure how smoothly that would go and I never tried it), if you wanted to stay with that device. If you write your own software, or use an existing software library, you could put together your own system fairly easy - see the billions of Arduino examples out there :)

Quote
Yes, I did have a system I put together that monitored 12 chest freezers, it worked great.  I will say the wiring part was easy for me but the computer program install and setup was tedious for me. I liked the program I used because It had a large display and would change from white numbers to red at any preset temp as a warning. But it was not easy for me to setup. Every morning when I hit the computer mouse, I could see if any freezer was malfunctioning, before any damage was done.
  I just wanted a simple instrument to monitor the temperature stratification of the air in my sauna.  If I could just mount a 6 position switch and switch between sensors, that are mounted at different heights in the sauna that would be great.
Hmm, while looking for something else the other day I ran across a package of LM35s.

Yes a 3 pole, multi-position switch might work, BUT. You will probably need to power the unit off, turn the switch and power back up. That way, the unit initializes the sensor (sets the precision, which may not be at the default), AND you will only see one sensor at a time. Of course, you need to test all that out and the first thing would be to change the sensor, just to make sure (I am 99% certain that they are not relying on the ID, but who knows?).

With some of the libraries for the Arduino, you might find it easier than you think AND you could get a display that shows all 5 values all the time and could alert and so on.
« Last Edit: April 17, 2021, 12:02:29 am by DrG »
- Invest in science - it pays big dividends. -
 

Offline Qmavam

  • Regular Contributor
  • *
  • Posts: 130
  • Country: us
Re: A one wire temperature device
« Reply #6 on: April 17, 2021, 12:43:45 am »
I've never used an Arduino and this is just a one of, probably one test and done. If I can just wire a switch and take the measurements that would be great.
 

Offline Qmavam

  • Regular Contributor
  • *
  • Posts: 130
  • Country: us
Re: A one wire temperature device
« Reply #7 on: April 18, 2021, 04:44:58 pm »
OP here. I hooked up 5 DS18B20 temp sensors to the Digital thermometer listed in the op. Switching the data lines with a switch, it works just fine. The 5 sensors vary from 77.2*F to 79.7*F. For reference my K type thermocouple reads 77.8*F.

                                   Mikek
 
 

Offline DrG

  • Frequent Contributor
  • **
  • Posts: 861
  • Country: us
Re: A one wire temperature device
« Reply #8 on: April 18, 2021, 05:03:23 pm »
Good deal!
- Invest in science - it pays big dividends. -
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 907
  • Country: aq
Re: A one wire temperature device
« Reply #9 on: April 18, 2021, 05:56:49 pm »
OP here. I hooked up 5 DS18B20 temp sensors to the Digital thermometer listed in the op. Switching the data lines with a switch, it works just fine. The 5 sensors vary from 77.2*F to 79.7*F. For reference my K type thermocouple reads 77.8*F.

                                   Mikek

Some time back I dug into the temperature measurement thing since it seemed the inexpensive devices were not so accurate, ±2°C over the range.  Turns out it is hard to get accurate temperature measurement without calibration.  Even thermocouples require a known temperature reference (called the cold plate) which ultimately limits the temperature accuracy. 

Often they have a more narrow spec near room temperature. 

BTW, have I seen you post in sci.electronics.design?
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline MikeK

  • Frequent Contributor
  • **
  • Posts: 771
  • Country: us
Re: A one wire temperature device
« Reply #10 on: April 18, 2021, 07:23:19 pm »
OP here. I hooked up 5 DS18B20 temp sensors to the Digital thermometer listed in the op. Switching the data lines with a switch, it works just fine. The 5 sensors vary from 77.2*F to 79.7*F. For reference my K type thermocouple reads 77.8*F.

                                   Mikek

Maxim/Dallas had (has?) a problem with fake DS18B20 sensors.  I found that ones I got off eBay were indeed fake and not very accurate.  I resorted to buying from a reputable parts vendor.  Ways to identify fakes are shown online.
 

Offline DrG

  • Frequent Contributor
  • **
  • Posts: 861
  • Country: us
Re: A one wire temperature device
« Reply #11 on: April 18, 2021, 08:47:58 pm »
OP here. I hooked up 5 DS18B20 temp sensors to the Digital thermometer listed in the op. Switching the data lines with a switch, it works just fine. The 5 sensors vary from 77.2*F to 79.7*F. For reference my K type thermocouple reads 77.8*F.

                                   Mikek

Maxim/Dallas had (has?) a problem with fake DS18B20 sensors.  I found that ones I got off eBay were indeed fake and not very accurate.  I resorted to buying from a reputable parts vendor.  Ways to identify fakes are shown online.

The OP seems happy with the results and, for what he is doing and wants, calibration is unlikely to be easily implemented.

Nevertheless, your point is valid. We had a thread on fake DS18B20s https://www.eevblog.com/forum/projects/fake-ds18b20/msg3028660/#msg3028660 I tested out some of mine and...the "reputably sourced" ones and one of the 'cheap' ones were likely genuine, according to the checking code. Other cheapos came up as likely counterfeit.
- Invest in science - it pays big dividends. -
 

Offline Qmavam

  • Regular Contributor
  • *
  • Posts: 130
  • Country: us
Re: A one wire temperature device
« Reply #12 on: April 20, 2021, 01:41:59 pm »
I was disappointed in the accuracy/consistency, but one degree is not important for what I'm doing, at least for this measurement experiment. I still have a dozen Maxim DS18B20s (probably close to 13 years old) from my 12 freezer monitor project. I bought the Amazon units because I like the design, never thinking they may not be maxim parts and not be as accurate. Oh well!
 As a side note, when you switch from sensor to sensor it displays the old reading for about a one second, then displays the new reading. Looks like the reset pulse is about once a second.
                                 Mikek AKA Qmavam Not to be confused with MikeK
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf