SHT31 with D18B20 doesn´t work

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
kopfnuss
New user
Posts: 3
Joined: 15 Jan 2024, 18:48

SHT31 with D18B20 doesn´t work

#1 Post by kopfnuss » 15 Jan 2024, 19:08

Hello,
i´m sorry for my bad englsih ;)

espeasy (20231225 CollectionA 4M [ESP8266,ESP32,ESP32-S2/S3/C3]) run at a Wemos D1 mini.
The SHT31 works fine but the Dallas D18B20 doesn´t have a adress or a value.
Both sensors connected on the same pin D2 and the SCL from the SHT31 is connected to the pin D1.
Between 5V and D2 is a 4K7 pullup.
At the I2C Scan i can only find the SHT31.

What is my mistake?
(i cant select pin D2 at the config of the Dallas Sensor is that correct?)
Screenshot 2024-01-15 at 18-59-58 espSensor1.png
Screenshot 2024-01-15 at 18-59-58 espSensor1.png (78.16 KiB) Viewed 2011 times
Screenshot 2024-01-15 at 19-00-30 espSensor1.png
Screenshot 2024-01-15 at 19-00-30 espSensor1.png (78.3 KiB) Viewed 2011 times
Screenshot 2024-01-15 at 19-00-53 espSensor1.png
Screenshot 2024-01-15 at 19-00-53 espSensor1.png (80.76 KiB) Viewed 2011 times
Screenshot 2024-01-15 at 19-00-54 espSensor1.jpg
Screenshot 2024-01-15 at 19-00-54 espSensor1.jpg (182.28 KiB) Viewed 2011 times
Screenshot 2024-01-15 at 19-03-00 espSensor1.png
Screenshot 2024-01-15 at 19-03-00 espSensor1.png (103.18 KiB) Viewed 2011 times

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SHT31 with D18B20 doesn´t work

#2 Post by TD-er » 15 Jan 2024, 19:27

You can't share 1-Wire with I2C using the same pins.
I2C needs 2 pins which are exclusively used for I2C devices.
You can have multiple 1Wire devices on the same 1Wire bus, but not other kinds of devices.

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SHT31 with D18B20 doesn´t work

#3 Post by TD-er » 15 Jan 2024, 19:28

Also you really should not pull up pins to 5V as you likely will destroy other sensors connected to the pin.

kopfnuss
New user
Posts: 3
Joined: 15 Jan 2024, 18:48

Re: SHT31 with D18B20 doesn´t work

#4 Post by kopfnuss » 15 Jan 2024, 19:43

But both sensors are I2C Sensors with diffent adress´s!
And for the SHT31 i can select the adress. But i can only took the 0x45, when a took the 0x44 it´s not possible to enable the sensor after submit.
It´s little bit confuse :lol:
Screenshot 2024-01-15 at 19-37-54 espSensor1.jpg
Screenshot 2024-01-15 at 19-37-54 espSensor1.jpg (163.81 KiB) Viewed 2004 times

kopfnuss
New user
Posts: 3
Joined: 15 Jan 2024, 18:48

Re: SHT31 with D18B20 doesn´t work

#5 Post by kopfnuss » 15 Jan 2024, 20:09

Ok i have changed the Dallas to Pin D4 and now it works.
Thx :D
Screenshot 2024-01-15 at 20-08-11 espSensor1.png
Screenshot 2024-01-15 at 20-08-11 espSensor1.png (80.74 KiB) Viewed 1999 times

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests