ds18b20 temp sensor

adafruit.io wippersnapper BETA support, discussions, and more!

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
embeddedprogrammer
 
Posts: 9
Joined: Fri Jan 29, 2021 10:11 am

ds18b20 temp sensor

Post by embeddedprogrammer »

Is there a way to read multiple ds18b20s daisy chained. I have this setup and am getting the one device fine on an esp32 but can't figure out how to get another sensor without using another pin on the ESP32.

Thanks in advance for any help here.

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: ds18b20 temp sensor

Post by Franklin97355 »

Can you post your code? According to the datasheet
"General Description
The DS18B20 digital thermometer provides 9-bit to
12-bit Celsius temperature measurements and has an
alarm function with nonvolatile user-programmable upper
and lower trigger points. The DS18B20 communicates
over a 1-Wire bus that by definition requires only one
data line (and ground) for communication with a central
microprocessor. In addition, the DS18B20 can derive
power directly from the data line (“parasite power”),
eliminating the need for an external power supply.
Each DS18B20 has a unique 64-bit serial code, which
allows multiple DS18B20s to function on the same 1-Wire
bus. Thus, it is simple to use one microprocessor to
control many DS18B20s distributed over a large area.
Applications that can benefit from this feature include
HVAC environmental controls, temperature monitoring
systems inside buildings, equipment, or machinery, and
process monitoring and control systems.

User avatar
embeddedprogrammer
 
Posts: 9
Joined: Fri Jan 29, 2021 10:11 am

Re: ds18b20 temp sensor

Post by embeddedprogrammer »

hi,
Thanks for your quick response. I have used these sensors for many projects so I have them functioning well using one-wire and a 4.7K resistor.

I have this working with multiple sensors in a normal arduino sketch with temperatures uploaded ot adafruit io but this question pertains to getting the same devices to work with wippersnapper which is a codeless development method. I want to move to this method because it seems like a simplified way to work with IOT for sensors and control.

User avatar
barshatriplee
 
Posts: 200
Joined: Wed Mar 22, 2023 10:11 am

Re: ds18b20 temp sensor

Post by barshatriplee »

It is possible to daisy-chain multiple DS18B20 with Arduino..You can do the same with ESP32.

https://www.theengineeringprojects.com/ ... duino.html

User avatar
embeddedprogrammer
 
Posts: 9
Joined: Fri Jan 29, 2021 10:11 am

Re: ds18b20 temp sensor

Post by embeddedprogrammer »

I agree and have the devices working on the ESP32 dev board.

What I don''t have working is more than one sensor per pin working in the Adafruit WipperSnapper development environment.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: ds18b20 temp sensor

Post by adafruit2 »

not daisy chained - we have no plans to add that because its really really hard to know which one is which. you can use one-per-pin instead

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: ds18b20 temp sensor

Post by brubell »

Is there a way to read multiple ds18b20s daisy chained
No, not in this configuration. The current ds18x20 class (source code) is here: https://github.com/adafruit/Adafruit_Wi ... s18x20.cpp). WipperSnapper only allows ONE DS18x20 sensor PER PIN.

As mentioned above, there is no planned (official) support for this configuration. However, WipperSnapper is an Open Source project and we will accept an enhancement (issue) that may be implemented by a community member who wants to tackle it. You may file an issue requesting this functionality here: https://github.com/adafruit/Adafruit_Wi ... .md&title=

User avatar
embeddedprogrammer
 
Posts: 9
Joined: Fri Jan 29, 2021 10:11 am

Re: ds18b20 temp sensor

Post by embeddedprogrammer »

adafruit2 wrote: Wed May 03, 2023 11:25 am not daisy chained - we have no plans to add that because its really really hard to know which one is which. you can use one-per-pin instead
Ok, thanks for the response. I moved them to individual pins.

User avatar
embeddedprogrammer
 
Posts: 9
Joined: Fri Jan 29, 2021 10:11 am

Re: ds18b20 temp sensor

Post by embeddedprogrammer »

brubell wrote: Wed May 03, 2023 11:49 am


As mentioned above, there is no planned (official) support for this configuration. However, WipperSnapper is an Open Source project and we will accept an enhancement (issue) that may be implemented by a community member who wants to tackle it. You may file an issue requesting this functionality here: https://github.com/adafruit/Adafruit_Wi ... .md&title=
Thanks a lot Brubell. I am looking over the repository and issues now.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Adafruit IO Wippersnapper Beta”