Page 1 of 1

DS18b20

Posted: 03 Dec 2022, 14:47
by joost d
I can't get a DS1820 to work.
I use:
ESPEasy-mega-20221105
ESP32 with only a DS1820.
See attachment for configuration.
What strikes me is that in the log only the following appears 1 time at "Submit":
1325715: EVENT: TaskExit#Tempsensor=1.0
1325815: EVENT: TaskInit#Tempsensor=1.0
No more! While I expect such a log entry every second!

Also I don't see anything under "Device Address:"
I have two DS1820 sensors. This is a problem with both.

Am I doing something wrong....

Re: DS18b20

Posted: 03 Dec 2022, 15:04
by Ath
Do you have a pull-up resistor (4.7k) installed from data to 3.3V? That's required for this sensor to work.

Re: DS18b20

Posted: 03 Dec 2022, 19:21
by joost d
I tried that resistant too without result.

BTW: Is it correct, if I say that even without a sensor, every second there must be log entry like:
243398: EVENT: TaskExit#Temp=1.0.
If yes, then maybe there is something wrong with the _P004 plugin ....

Re: DS18b20

Posted: 03 Dec 2022, 19:52
by joost d
Solved :-)
Instead of GPIO-14, as indicated in the documentation (ESP8266) I have now used GPIO-4 for my ESP32........

Re: DS18b20

Posted: 03 Dec 2022, 19:58
by Ath
Ah, GPIO-14 can be configured to be used for SPI devices, causing all kind of trouble when SPI is enabled (though you shouldn't be able to select it), or maybe another device on the ESP you're using is hardwired to GPIO-14?

Re: DS18b20

Posted: 03 Dec 2022, 20:08
by joost d
The 18b20 is the only divice connected to the ESP32.
SPI is disabled.

Btw: Resistance is necessary! Contrary to what is said elsewhere on the internet.

Re: DS18b20

Posted: 03 Dec 2022, 20:18
by Ath
joost d wrote: 03 Dec 2022, 20:08 The 18b20 is the only divice connected to the ESP32.
SPI is disabled.
Ok
joost d wrote: 03 Dec 2022, 20:08 Btw: Resistance is necessary! Contrary to what is said elsewhere on the internet.
Yes, that's also explicitly mentioned in the plugin documentation. The only reason multiple sensors can share 1 wire is because they use an open collector output, so a pull-up resistor is mandatory. And none have that built in, or it would limit the number of devices that can share that wire. The 1-wire protocol supports at least 100 devices on a single wire (but that would be a hell of a job to configure), ESPEasy supports up to 4 sensors per task, and has 32 tasks available on ESP32, to, it *should* be doable :lol:

Re: DS18b20

Posted: 03 Dec 2022, 20:37
by joost d
@Ton:Thanks for the explanation.

Re: DS18b20

Posted: 03 Dec 2022, 21:54
by TD-er
But having loads of those on the same wire would also limit the sample interval per sensor.
You can approximately read upto 12 Dallas sensors each second (12 bit resolution -> 750 msec per measurement) because we're sending the start measurement commands in a row and 750 msec later collect the data of each.
Maybe you can read upto 24 - 30 sensors with a 2-sec interval each, but then the ESP is almost 100% busy reading these sensors and can't do much else.

Re: DS18b20

Posted: 03 Dec 2022, 22:38
by joost d
Don't worry, I have only one sensor :)