Are there any pin restrictions on ESP32 other than those specified by the board manufacturers? I ask as I have moved some temperature sensors from multi-drop on pin 2 to different pins (32-35) and they don't seem to work. So I need to find pins that do work, or discover if I have done something silly. I'm using an ESP32-WROOM-32D.
thanks
ESP32 pin availability
- PeterN
- Posts: 375
- Joined: Mon Feb 08, 2021 7:56 pm
- Location: Krefeld, Germany
- Has thanked: 176 times
- Been thanked: 212 times
- Contact:
Re: ESP32 pin availability
Hi Stuart,
There are some helpful hints in the online help:
[Local Link Removed for Guests]
Especially GPIO 34 to 39 are input only, but as I understand you do need inputs(?)
There are some helpful hints in the online help:
[Local Link Removed for Guests]
Especially GPIO 34 to 39 are input only, but as I understand you do need inputs(?)
-
- Posts: 222
- Joined: Mon Feb 15, 2021 1:44 pm
- Has thanked: 123 times
- Been thanked: 132 times
Re: ESP32 pin availability
I've always found this useful : https://randomnerdtutorials.com/esp32-p ... nce-gpios/
32 to 35 shouldn't be a problem, although I have had issues using the higher numbers on a different device where it should have worked. I didn't investigate at the time, just changed pins.
As Peter implies, 34 and 35 may be a problem depending on what sensors you're using. If they're anything which requires bi-directional data you'll have problems.
32 to 35 shouldn't be a problem, although I have had issues using the higher numbers on a different device where it should have worked. I didn't investigate at the time, just changed pins.
As Peter implies, 34 and 35 may be a problem depending on what sensors you're using. If they're anything which requires bi-directional data you'll have problems.
- cicciocb
- Site Admin
- Posts: 1966
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 422 times
- Been thanked: 1310 times
- Contact:
Re: ESP32 pin availability
Hi Andy,
the pin32 and the pin33 are associated with the TFT so cannot be used except if you select "NO TFT" in the config page.
The pins 34 to 39 are input only and in most of the cases will not work with the sensors (for example the DS18B20) as the pin is used as an I/O.
the pin32 and the pin33 are associated with the TFT so cannot be used except if you select "NO TFT" in the config page.
The pins 34 to 39 are input only and in most of the cases will not work with the sensors (for example the DS18B20) as the pin is used as an I/O.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 222
- Joined: Mon Feb 15, 2021 1:44 pm
- Has thanked: 123 times
- Been thanked: 132 times
Re: ESP32 pin availability
Thanks guys, it's a bit of a minefield. Especially where pins are described by manufacturers as GPIOs when they are actually GPIs. Still hunting for some usable pins! Quite a few already in use this end as well as reserved. Unfortunately my cable lengths are too long for multi-dropping more than a couple of DB18S20s.
- Electroguard
- Posts: 846
- Joined: Mon Feb 08, 2021 6:22 pm
- Has thanked: 272 times
- Been thanked: 320 times
Re: ESP32 pin availability
Stuart, an alternative possibility could be to use remote bluetooth temp & humidity sensors which don't need connecting by local pins.
Bluetooth range should exceed the dallas 1-wire sensors anyway, but is easy to use additional more distant esp32's sending back data from many other bluetooth sensors much further away.
EDIT:
The sensors can be reflashed with custom code so they broadcast their info to any nearby BLE listening devices without pairing.
My Thermostatic script already monitors 3 sensors, but I will be adding a couple more as Inside and Outside backup sensors.
sensors$ = "ATC_9AFEA8.Data=Inside ATC_BEF7AB.Data=Outside ATC_BACFA8=Freezer" 'list of ble sensor ID=name pairs
Bluetooth range should exceed the dallas 1-wire sensors anyway, but is easy to use additional more distant esp32's sending back data from many other bluetooth sensors much further away.
EDIT:
The sensors can be reflashed with custom code so they broadcast their info to any nearby BLE listening devices without pairing.
My Thermostatic script already monitors 3 sensors, but I will be adding a couple more as Inside and Outside backup sensors.
sensors$ = "ATC_9AFEA8.Data=Inside ATC_BEF7AB.Data=Outside ATC_BACFA8=Freezer" 'list of ble sensor ID=name pairs
-
- Posts: 34
- Joined: Sat Feb 20, 2021 9:36 am
- Location: Sindelfingen, Germany
- Has thanked: 139 times
- Been thanked: 10 times
Re: ESP32 pin availability
Hello,
"to use remote bluetooth temp & humidity sensors" ... this is highly intersting.
I would appreciate any hint, which sensors are suitable for this, being tired wiring DS18B20...
"to use remote bluetooth temp & humidity sensors" ... this is highly intersting.
I would appreciate any hint, which sensors are suitable for this, being tired wiring DS18B20...
- Electroguard
- Posts: 846
- Joined: Mon Feb 08, 2021 6:22 pm
- Has thanked: 272 times
- Been thanked: 320 times
Re: ESP32 pin availability
Hi, do a search on eg: Aliexpress for XIAOMI Mijia Bluetooth Thermometer.
I just call them a 'Gizmo' cos I don't know how to pronounce XIAOMI or Mijia
Check the following thread from CiccioCB and the subsequent replies...
[Local Link Removed for Guests]
Also see one of his BLE examples in the ESP32 Online Help which is actually for reading these sensors - his original article was using an Epaper device, whereas I am using TFT touchscreen, but the received temp and humidity and battery % could be displayed on anything (they also transmit an incrementing count).
They cost about a fiver each, which is not bad considering they are completely self-contained in a case with battery and LCD display.
The original proprietary firmware encrypts the data, and the senders must be paired with the receiving device... but custom firmware is available which causes them to broadcast unencrypted data to any and all BLE receivers within range.
If a sender stops sending for any reason it is easy to swap it out and change the script to the new senders ID... or for the sake of a fiver a spare backup could already be in-situ for the script to automatically switch over to if/when the primary sender fails.
I just call them a 'Gizmo' cos I don't know how to pronounce XIAOMI or Mijia
Check the following thread from CiccioCB and the subsequent replies...
[Local Link Removed for Guests]
Also see one of his BLE examples in the ESP32 Online Help which is actually for reading these sensors - his original article was using an Epaper device, whereas I am using TFT touchscreen, but the received temp and humidity and battery % could be displayed on anything (they also transmit an incrementing count).
They cost about a fiver each, which is not bad considering they are completely self-contained in a case with battery and LCD display.
The original proprietary firmware encrypts the data, and the senders must be paired with the receiving device... but custom firmware is available which causes them to broadcast unencrypted data to any and all BLE receivers within range.
If a sender stops sending for any reason it is easy to swap it out and change the script to the new senders ID... or for the sake of a fiver a spare backup could already be in-situ for the script to automatically switch over to if/when the primary sender fails.