Page 1 of 1

[solved] Problem with DS18b20

Posted: 20 Mar 2016, 18:37
by vinceducat
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

Re: Problem with DS18b20

Posted: 20 Mar 2016, 21:45
by kr0815
Are you sure it´s really a b-version ? I had the same problems with DS1820 and DS18S20

Re: Problem with DS18b20

Posted: 21 Mar 2016, 17:42
by vinceducat
i dont no exactly because it is a waterproof probe ...

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

Re: Problem with DS18b20

Posted: 21 Mar 2016, 17:47
by vinceducat
extract of my Ebay bill....

DS18B20 Digital Thermometer Température Etanche Waterproof Sensor Probe NEUF

Problem with DS18b20 - output = 0.00

Posted: 21 Mar 2016, 22:20
by JR01
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 17727 times

Re: Problem with DS18b20

Posted: 21 Mar 2016, 23:01
by kr0815
Sorry, i can´t help,
but the port number is wrong

DS18b20 should start with 28 hex
DS18s20 starts with 10 hex

Re: Problem with DS18b20

Posted: 22 Mar 2016, 19:12
by JR01
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.....

Re: Problem with DS18b20

Posted: 22 Mar 2016, 19:19
by vinceducat
@kr

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

Re: Problem with DS18b20

Posted: 22 Mar 2016, 21:05
by BobS
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 +.

Re: Problem with DS18b20

Posted: 23 Mar 2016, 18:17
by vinceducat
@ bobs

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

any idea

Re: Problem with DS18b20

Posted: 23 Mar 2016, 18:55
by JR01
BobS wrote:The resistor must be between D and +.
Oops, got the 4k7 at the wrong place, now working, thanks!!!

Re: Problem with DS18b20

Posted: 23 Mar 2016, 19:08
by vinceducat
@ jr01,

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

Re: Problem with DS18b20

Posted: 23 Mar 2016, 20:14
by BobS
@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 17770 times

Re: Problem with DS18b20

Posted: 23 Mar 2016, 20:17
by vinceducat
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

Re: Problem with DS18b20

Posted: 23 Mar 2016, 21:40
by BobS
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.

Re: Problem with DS18b20

Posted: 26 Mar 2016, 18:43
by vinceducat
with a 4.7k it will be ok ....

thanks

Re: [solved] Problem with DS18b20

Posted: 16 Sep 2016, 16:41
by Haggycz
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?

Re: [solved] Problem with DS18b20

Posted: 17 Sep 2016, 12:42
by Haggycz
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

Re: [solved] Problem with DS18b20

Posted: 26 May 2020, 11:19
by vrsho
Hi,

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