[solved] Problem with DS18b20

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
vinceducat
Normal user
Posts: 25
Joined: 20 Mar 2016, 17:38

[solved] Problem with DS18b20

#1 Post by vinceducat » 20 Mar 2016, 18:37

hello i try to connect ds18b20 to a esp01 gpio2, but i cant select device nr in this config page ....

and in log the system always retruen 0.00

any idea why i cant select a device number during config


config

Device: ds18b20
Name: 0
IDX / Var: 240
1st GPIO: gpio-2
Device Nr: <- empty ?????
ROM: <- empty
Send Data: select

log

DS : Temperature: 0.00 (ce-2a-22-40-e0-ff-ff-ff)
578447 : WD : Uptime 9 ConnectFailures 0 FreeMem 26064
586540 : DS : Temperature: 0.00 (ce-2a-22-40-e0-ff-ff-ff)
596541 : DS : Temperature: 0.00 (ce-2a-22-40-e0-ff-ff-ff)
606542 : DS : Temperature: 0.00 (ce-2a-22-40-e0-ff-ff-ff)
608448 : WD : Uptime 10 ConnectFailures 0 FreeMem 25984
616543 : DS : Temperature: 0.00 (ce-2a-22-40-e0-ff-ff-ff)
626544 : DS : Temperature: 0.00 (ce-2a-22-40-e0-ff-ff-ff)
636545 : DS : Temperature: 0.00 (ce-2a-22-40-e0-ff-ff-ff)
638449 : WD : Uptime 10 ConnectFailures 0 FreeMem 25992


thanks
Last edited by vinceducat on 26 Mar 2016, 18:49, edited 1 time in total.

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: Problem with DS18b20

#2 Post by kr0815 » 20 Mar 2016, 21:45

Are you sure it´s really a b-version ? I had the same problems with DS1820 and DS18S20

vinceducat
Normal user
Posts: 25
Joined: 20 Mar 2016, 17:38

Re: Problem with DS18b20

#3 Post by vinceducat » 21 Mar 2016, 17:42

i dont no exactly because it is a waterproof probe ...

any chance to vork with ds1820 if it is this type ???

vinceducat
Normal user
Posts: 25
Joined: 20 Mar 2016, 17:38

Re: Problem with DS18b20

#4 Post by vinceducat » 21 Mar 2016, 17:47

extract of my Ebay bill....

DS18B20 Digital Thermometer Température Etanche Waterproof Sensor Probe NEUF

JR01
Normal user
Posts: 260
Joined: 14 Feb 2016, 21:04
Location: South Africa

Problem with DS18b20 - output = 0.00

#5 Post by JR01 » 21 Mar 2016, 22:20

Hi all, I see many posts around above problem, however, I did not find a solution for me. My setup:
- ESP12E
- DS18b20
- MQTT (to OpenHab) - but I do not yet have OpenHab installed. (But before I changed from Domoticz - it was the same...)

I have a 4k7Ω between GPIO14 and D of the DS18b20. I have tried GPIO16, 14, and 12. All still reads out 0.00 (I am in South Africa, upper 20C°'s :roll: ), but for all I get 0.00 value, see the screen below.
Also, you can see it picks up the port number, thus it is communicating with the DS18b20....

Q1: Any ideas?
Screen Shot 2016-03-21 at 11.15.22 PM.png
Screen Shot 2016-03-21 at 11.15.22 PM.png (44.57 KiB) Viewed 17596 times
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: Problem with DS18b20

#6 Post by kr0815 » 21 Mar 2016, 23:01

Sorry, i can´t help,
but the port number is wrong

DS18b20 should start with 28 hex
DS18s20 starts with 10 hex

JR01
Normal user
Posts: 260
Joined: 14 Feb 2016, 21:04
Location: South Africa

Re: Problem with DS18b20

#7 Post by JR01 » 22 Mar 2016, 19:12

kr0815 wrote:...but the port number is wrong, DS18b20 should start with 28 hex, DS18s20 starts with 10 hex
Thanks! I wonder where it gets that port number, it gives me an idea to do further hunting down.....
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.

vinceducat
Normal user
Posts: 25
Joined: 20 Mar 2016, 17:38

Re: Problem with DS18b20

#8 Post by vinceducat » 22 Mar 2016, 19:19

@kr

how can we change the port number ???? inthe device config ???

BobS
Normal user
Posts: 15
Joined: 18 Jan 2016, 21:29

Re: Problem with DS18b20

#9 Post by BobS » 22 Mar 2016, 21:05

The port number is a device specific ID and is burned in the device at the factory.
The most likely reason the device ID is wrong is a problem in the hardware connections.

+ must be connected to the 3.3v at the esp, - to the ground.
D must be connected to the gpio pin you want to use.
The resistor must be between D and +.

vinceducat
Normal user
Posts: 25
Joined: 20 Mar 2016, 17:38

Re: Problem with DS18b20

#10 Post by vinceducat » 23 Mar 2016, 18:17

@ bobs

my wiring is correct works with standard firmware of mcu and program in lua ....

any idea

JR01
Normal user
Posts: 260
Joined: 14 Feb 2016, 21:04
Location: South Africa

Re: Problem with DS18b20

#11 Post by JR01 » 23 Mar 2016, 18:55

BobS wrote:The resistor must be between D and +.
Oops, got the 4k7 at the wrong place, now working, thanks!!!
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.

vinceducat
Normal user
Posts: 25
Joined: 20 Mar 2016, 17:38

Re: Problem with DS18b20

#12 Post by vinceducat » 23 Mar 2016, 19:08

@ jr01,

my ds is a waterproof probe with 4.7 resistor in it, i will try to add this resistor .. too ...

BobS
Normal user
Posts: 15
Joined: 18 Jan 2016, 21:29

Re: Problem with DS18b20

#13 Post by BobS » 23 Mar 2016, 20:14

@vince

It looks like there is always some data in the portnumber field even when no device connected at all.
When you go to the device page and edit the device it should look like the image below.

When the correct gpio is selected a device number should appear like ROM: 28-...........
Then save the configuration and the rom number will also appear in the port number field.

When no device number appears there is something wrong with the hardware or it's not a ds18b20.
DS18B20.jpg
DS18B20.jpg (44.6 KiB) Viewed 17639 times

vinceducat
Normal user
Posts: 25
Joined: 20 Mar 2016, 17:38

Re: Problem with DS18b20

#14 Post by vinceducat » 23 Mar 2016, 20:17

thanks ... i will try ...

but for me no device nr no rom number .. and waterproof so no chance to verify without destroy the probe ... i cant check

BobS
Normal user
Posts: 15
Joined: 18 Jan 2016, 21:29

Re: Problem with DS18b20

#15 Post by BobS » 23 Mar 2016, 21:40

I did the test shown above with a waterproof ds18b20.
The resistor value isn't critical so it won't hurt to add an external one.

vinceducat
Normal user
Posts: 25
Joined: 20 Mar 2016, 17:38

Re: Problem with DS18b20

#16 Post by vinceducat » 26 Mar 2016, 18:43

with a 4.7k it will be ok ....

thanks

Haggycz
New user
Posts: 4
Joined: 30 Aug 2016, 08:28

Re: [solved] Problem with DS18b20

#17 Post by Haggycz » 16 Sep 2016, 16:41

Hello everyone...

im new here... but really interested in ardion and ESPEasy project... ... i dont want to open new thread, as my issue is very similar.
Im currently using 2x Wemos D1 mini with R120 ESPEasy.
My Domoticz is running on Win7 - without any problem.

Im currently in point of getting to know all the things around ... im more or less successfuly running DHT-11 and 2 PIR sensors reporting to Domoticz server. to get to this point, i lost almost all my hair :D but...it's working somehow.

I ordered 37sensors in one pack ... including DS18B20 on board with resistor and some shiny diode.
Image

so there should be no resistance to be added.


i tried almost all the pins, but still with same result - no ROM address, and in log there is visible this: DS:Temperature: Error! (0-0-0-0-0-0-0-0) and providing read value: zero

Can anyone please help me?

Haggycz
New user
Posts: 4
Joined: 30 Aug 2016, 08:28

Re: [solved] Problem with DS18b20

#18 Post by Haggycz » 17 Sep 2016, 12:42

ok guyes, i dont know why, but after i came back home from work, i attached sensor to GPIO-2, set it in Device tab, and everything was running... this exactly i did day before and it was not working...

and this is happening to me every damned day :D

vrsho
New user
Posts: 1
Joined: 26 May 2020, 11:18

Re: [solved] Problem with DS18b20

#19 Post by vrsho » 26 May 2020, 11:19

Hi,

you need to change the PIN Mode under Hardware to input for the DS18b20. Only then its working.

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests