ds18b20

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
edstobi
Normal user
Posts: 39
Joined: 28 May 2020, 20:33

ds18b20

#1 Post by edstobi » 12 Feb 2023, 12:48

Hello
I have a wt32 eth01 with ESP_Easy_mega_20221224_normal_ESP32_4M316k_ETH.
I have temperature sensors connected to GPIO5, GPIO4 and GPIO2. This works and I can see that the sensors are all OK.
ESP reports that Parasite Powered is false. I have 4.7 k Ohm between DQ and VDD (3.3V).

Now I want to add a 4 string.
However, I can't get any success on any other GPIO.

I have tried on a test environment all combinations with a working temperature string to get the other GPIO to work, but without success.
GPIO 12 would have worked, but then prevents the ESP from booting because of the 4.7 k Ohm (Must be at 0V during the BOOT).

What am I missing? Why can't I get the other GPIO's to work? Unfortunately, I am reliant on the cable-bound network and cannot switch to a d1 mini or somethingelse.

User avatar
Ath
Normal user
Posts: 3481
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ds18b20

#2 Post by Ath » 12 Feb 2023, 13:27

How many ds18b20 do you have on each GPIO? As each task can have up to 4 sensors per GPIO pin.

For Ethernet enabled ESP32 units, there are only a limited number of GPIO pins available for general use.
/Ton (PayPal.me)

edstobi
Normal user
Posts: 39
Joined: 28 May 2020, 20:33

Re: ds18b20

#3 Post by edstobi » 12 Feb 2023, 13:35

I am running 3-4 DS1820 per GPIO.
You can also use more than 4 per GPIO, then you have to open a new task in espeasy with the same GPIO to read the remaining sensors

Yes, I know that only some GPIO are available, but 14, 15, 32 and 33 should work.
Or do I have to enter the optional RX GPIO as well? I've never done that before, and I can't find any information about it.

User avatar
Ath
Normal user
Posts: 3481
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ds18b20

#4 Post by Ath » 12 Feb 2023, 13:59

The RX gpio doesn't need to be set, only on some Shelly devices that's to be used.

Those GPIOs should actually work, but if they don't...

Have you tried a recentGithub Actions build? That probably uses a newer ESP32 platform version, that will most likely improve things.
/Ton (PayPal.me)

edstobi
Normal user
Posts: 39
Joined: 28 May 2020, 20:33

Re: ds18b20

#5 Post by edstobi » 12 Feb 2023, 14:30

I am using the latest version of GITHUB,
I could try to use older versions

User avatar
Ath
Normal user
Posts: 3481
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ds18b20

#6 Post by Ath » 12 Feb 2023, 16:58

Do you need the SPI interface? If not you can also use the GPIO pins that are normally used by SPI, and similarly the serial pins GPIO 1 and 3, by disabling the Enable Serial port option (Tools/Advanced). The log can be viewed in the web log, if required.
/Ton (PayPal.me)

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

Re: ds18b20

#7 Post by TD-er » 12 Feb 2023, 17:43

GPIO-12 should not (!!!!!!) be used via a pull-up or pull-down resistor as the state of this pin on ESP32 does set the flash voltage.
So either you render the ESP running extremely unstable due to too low flash voltage, or destroy the flash chip due to too high voltage.

See also: https://espeasy.readthedocs.io/en/lates ... e-on-esp32

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

Re: ds18b20

#8 Post by TD-er » 12 Feb 2023, 17:46

Also why would you want to use several 1-wire busses on different GPIO pins?
Upto 16 sensors can be read in 12-bit mode with 1 sample per second before you're running out of "time".
But I'm not sure it makes any sense to use different GPIO pins to add more 1wire busses as the CPU is already busy 100% of the time communicating on that single pin if you reach the limit of nr. of sensors per pin.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 30 guests