GPIO34-39 as Digital Inputs

theskaz
Posts: 22
Joined: Mon Feb 13, 2017 5:22 pm

GPIO34-39 as Digital Inputs

Postby theskaz » Wed Feb 06, 2019 5:01 pm

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.
Capture1.PNG
Capture1.PNG (9.71 KiB) Viewed 13235 times
disclaimer: i have about a year of home-schooled EE experience.

theskaz
Posts: 22
Joined: Mon Feb 13, 2017 5:22 pm

Re: GPIO34-39 as Digital Inputs

Postby theskaz » Wed Feb 06, 2019 10:10 pm

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.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: GPIO34-39 as Digital Inputs

Postby ESP_Sprite » Thu Feb 07, 2019 4:42 am

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.

theskaz
Posts: 22
Joined: Mon Feb 13, 2017 5:22 pm

Re: GPIO34-39 as Digital Inputs

Postby theskaz » Thu Feb 07, 2019 3:24 pm

I didnt think of it like that... back to the drawing board

theskaz
Posts: 22
Joined: Mon Feb 13, 2017 5:22 pm

Re: GPIO34-39 as Digital Inputs

Postby theskaz » Thu Feb 07, 2019 4:02 pm

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.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: GPIO34-39 as Digital Inputs

Postby ESP_Sprite » Sat Feb 09, 2019 10:42 am

Why don't you move all sensors to one single GPIO? Onewire bus is intended to support lots of devices on a single wire.

theskaz
Posts: 22
Joined: Mon Feb 13, 2017 5:22 pm

Re: GPIO34-39 as Digital Inputs

Postby theskaz » Mon Feb 11, 2019 7:27 pm

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.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: GPIO34-39 as Digital Inputs

Postby ESP_Sprite » Tue Feb 12, 2019 1:35 am

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.

theskaz
Posts: 22
Joined: Mon Feb 13, 2017 5:22 pm

Re: GPIO34-39 as Digital Inputs

Postby theskaz » Tue Feb 12, 2019 3:55 pm

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 103 guests