I am developing a board that is based on an ESP32-WROOM-32U. I have a lot of little peripherals attached to it, and during my design phase, I attached 4 onewire devices to GPIO 34, 35, 36, and 39. They are DS18B20 Busses (yes I have 4 different busses). After that, I got to testing and my inputs keep coming back 0. I checked the voltage at the pins, and its right at 3.9-4v (which I dont think it's supposed to be happening, but i think is unrelated). I did some googling and found that even though they are input only, they are "analog" and not digital, and in order for them to be digital, they need a 10k pullup on each line to the 3.3v rail. Because they are onewire devices, they currently have a 4.7k pullup in place. will that not work? do I have another issue?
here is a snippet of the schematic. I can provide any other info you might need, just let me know.
disclaimer: i have about a year of home-schooled EE experience.
GPIO34-39 as Digital Inputs
Re: GPIO34-39 as Digital Inputs
Resolved the issue with the 4v input. I made a booboo with the wiring. now it's at 3.31v but still shows the same issue.
-
- Posts: 9711
- Joined: Thu Nov 26, 2015 4:08 am
Re: GPIO34-39 as Digital Inputs
Onewire is not input-only; it's a master-slave protocol, like e.g I2C is. The ESP32 is supposed to actively ask the DS18B20 devices for their temperature, and they will then respond. As the GPIOs you picked are input-only, the ESP32 can't do the asking, and as such the DS18B20 devices won't ever respond.
Re: GPIO34-39 as Digital Inputs
I didnt think of it like that... back to the drawing board
Re: GPIO34-39 as Digital Inputs
Thank you for pointing that out. this has been real frustrating because I actually have boards made and I am cutting traces and hacking everything (this wasnt my first problem).
If i move 3 of them to 4,5,and 12 would that be an issue? I currently have 5 to an LED, but I can move that.all other GPIOs are used. The only thing i can use only a TX for UART3 (only used for debugging) and that will free up my pin 17 (16 TX, 17 RX). not sure if the arduino code will support that.
If i move 3 of them to 4,5,and 12 would that be an issue? I currently have 5 to an LED, but I can move that.all other GPIOs are used. The only thing i can use only a TX for UART3 (only used for debugging) and that will free up my pin 17 (16 TX, 17 RX). not sure if the arduino code will support that.
-
- Posts: 9711
- Joined: Thu Nov 26, 2015 4:08 am
Re: GPIO34-39 as Digital Inputs
Why don't you move all sensors to one single GPIO? Onewire bus is intended to support lots of devices on a single wire.
Re: GPIO34-39 as Digital Inputs
because there is no way for the end user to know what sensor is plugged into where. They are not going to know the address of the sensor, or the index, and each bus is 25-50 ft long to that sensor. I tried everything I could to keep them on the same bus.
-
- Posts: 9711
- Joined: Thu Nov 26, 2015 4:08 am
Re: GPIO34-39 as Digital Inputs
Ah, that makes sense. Theoretically you could work around that by labeling the sensors during manufacture and programming the IDs into the NVS, but having separate buses probably is easier indeed.
Re: GPIO34-39 as Digital Inputs
I thought about that too, but I discovered that "What if the end user needs to replace one?" And All I was intending to sell was the board itself. all the peripherals, the end user can obtain independently.
Who is online
Users browsing this forum: No registered users and 30 guests