ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
Moderators: grovkillen, Stuntteam, TD-er
ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
Good afternoon.
I have an ESP-01 with mega-20230306 firmware.
The DS18B20 works when connected to the GPIO00 port.
I wanted to connect the DS18B20 to either of the TxD - GPIO01 or RxD - GPIO03 ports by disabling the ESPEASY serial port in the configuration and releasing the GPIO00 port for oter use (I2C bus on port GPIO00 and GPIO02).
I use it with a PCF8574 port extension on the I2C bus on the GPIO00 and GPIO02 ports. It works.
But this does not work on GPOI01 or GPIO03 (there is a pull-up resistor and a 3.3 power supply).
The contacts (GPIO01 and GPIO03) are free in the configuration (the "Equipment" tab).
What to do? Or is it impossible to work with GPIO01 and GPIO03 pins for DS18B20 in ESPEASY?
I have an ESP-01 with mega-20230306 firmware.
The DS18B20 works when connected to the GPIO00 port.
I wanted to connect the DS18B20 to either of the TxD - GPIO01 or RxD - GPIO03 ports by disabling the ESPEASY serial port in the configuration and releasing the GPIO00 port for oter use (I2C bus on port GPIO00 and GPIO02).
I use it with a PCF8574 port extension on the I2C bus on the GPIO00 and GPIO02 ports. It works.
But this does not work on GPOI01 or GPIO03 (there is a pull-up resistor and a 3.3 power supply).
The contacts (GPIO01 and GPIO03) are free in the configuration (the "Equipment" tab).
What to do? Or is it impossible to work with GPIO01 and GPIO03 pins for DS18B20 in ESPEASY?
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
Sounds like you don't have a pull-up resistor mounted for the 1-Wire data line.
GPIO-0 and -2 both have a pull-up resistor on the ESP board, since those pins need to be pulled-up at boot.
The others don't have such a pull-up resistor present.
See the documentation page: https://espeasy.readthedocs.io/en/lates ... #p004-page
GPIO-0 and -2 both have a pull-up resistor on the ESP board, since those pins need to be pulled-up at boot.
The others don't have such a pull-up resistor present.
See the documentation page: https://espeasy.readthedocs.io/en/lates ... #p004-page
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
I wrote - But this does not work on GPOI01 or GPIO03 (there is a pull-up resistor and a 3.3 power supply).
and this is external resistor is - 4.7k.
The main question - Is it impossible to work with GPIO01 and GPIO03 pins for DS18B20 in software ESP EASY?
and this is external resistor is - 4.7k.
The main question - Is it impossible to work with GPIO01 and GPIO03 pins for DS18B20 in software ESP EASY?
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
As long as the Serial0 is not used, I don't see any reason why it should not work.
Especially if you're using the ESP's RX pin, you can even be sure there is no boot logs etc. being sent to the pin which might put any sensor into some undefined state.
What you might want to try, is define just some bogus task which needs serial and put that one to use "Serial-0 swapped" and enable it.
This way you can be sure Serial 0 is no longer tied to use GPIO-1 & 3.
If this task may end up taking quite a lot of CPU time as it may be waiting for any response from the sensor, you could then later (via rules) disable the task. Just as long as it is enabled once, it will have swapped the pins for Serial0.
Especially if you're using the ESP's RX pin, you can even be sure there is no boot logs etc. being sent to the pin which might put any sensor into some undefined state.
What you might want to try, is define just some bogus task which needs serial and put that one to use "Serial-0 swapped" and enable it.
This way you can be sure Serial 0 is no longer tied to use GPIO-1 & 3.
If this task may end up taking quite a lot of CPU time as it may be waiting for any response from the sensor, you could then later (via rules) disable the task. Just as long as it is enabled once, it will have swapped the pins for Serial0.
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
Have you disconnected any (external) serial connection from the RX/TX pins?, as that might interfere with the communication with the sensor.
/Ton (PayPal.me)
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
I am using GPIO3 ( RX pin ) on Sonoff Basic for connecting two DS18B20.
No problem...
No problem...
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
Recent versions show the exact build filename and date in the right bottom corner of any page, but yours doesn't show that. What version are yiu running? Details are available in the Tools/Info page.
/Ton (PayPal.me)
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
I don't know what to think. My screens for this case.
Contacts GPIO00 and GPIO03 are free and not connected to others circuits. In both cases, an external lift (pull-up) 4.7 is used.
Contacts GPIO00 and GPIO03 are free and not connected to others circuits. In both cases, an external lift (pull-up) 4.7 is used.
- Attachments
-
- GPIO00
- 7.jpg (42.55 KiB) Viewed 2477 times
-
- GPIO00
- 6.jpg (66.54 KiB) Viewed 2477 times
-
- GPIO03
- 5.jpg (36.58 KiB) Viewed 2477 times
-
- GPIO03
- 4.jpg (64.83 KiB) Viewed 2477 times
-
- CONFIG hardware
- 2.jpg (59.27 KiB) Viewed 2477 times
-
- CONFIG advanced
- 1.jpg (32.5 KiB) Viewed 2477 times
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
How to do it? Step by step, please.What you might want to try, is define just some bogus task which needs serial and put that one to use "Serial-0 swapped" and enable it.
This way you can be sure Serial 0 is no longer tied to use GPIO-1 & 3.
P.S. It starts to seem to me that this is a problem with this version of the software, sorry.
Last edited by m.Bob on 11 Mar 2023, 14:44, edited 1 time in total.
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
Just add some task with a plugin that needs serial.
For example GPS, or whatever is present in the build you're using.
Then configure this task to use "Serial0 Swapped" and enable it.
This way GPIO 1 & 3 are not connected to Serial0 anymore.
For example GPS, or whatever is present in the build you're using.
Then configure this task to use "Serial0 Swapped" and enable it.
This way GPIO 1 & 3 are not connected to Serial0 anymore.
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
I see, thank you.Просто добавьте какую-нибудь задачу с помощью плагина, для которого требуется serial.
.....
Таким образом, GPIO 1 и 3 больше не подключаются к Serial0.
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
Thanks for this hint.
You can make it work without such a tricky hack?
You can make it work without such a tricky hack?
- Attachments
-
- 8.jpg (54.68 KiB) Viewed 2466 times
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
Latest Release is 20230306, and you are running 20221224, so you could try to update to this release, to see if it solves your issue. Lots and lots of fixes have been made since the December release, though that's not a guarantee your issue is resolved...
/Ton (PayPal.me)
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
That old version, while it may work perfectly, is not really supported any more, too many moons have past since (5 years...).
/Ton (PayPal.me)
Re: ds18b20 on serial pins TxD=GPIO01 or RxD=GPIO03
Yes, I know.
But it controls my floor heating for years...
And my motto:
"If it works, don't touch it"
)
Who is online
Users browsing this forum: Google [Bot] and 14 guests