- //pinout
- #define USB_TX 1 //Programming Port Connected to FT231XS
- #define USB_RX 3 //Programming Port Connected to FT231XS
- #define TEMPA_BUS 4 //DS18B20 Bus
- #define TEMPC_BUS 12 //DS18B20 Bus
- #define ELEMENT2_SSR_RELAY 13 //Connected by wire to a 40A SSR
- #define ELEMENT1_SSR_RELAY 14 //Connected by wire to a 40A SSR
- #define PUMP1_RELAY 15 //Songle 5v Relay
- #define DEBUG_TX 16 //Pin for connecting a USB/Serial Device for debugging
- #define DEBUG_RX 17 //not really used...
- #define ELEMENT1_CONTACTOR_RELAY 18 //Songle 5v Relay
- #define ERROR_RELAY 19 //Songle 5v Relay
- #define SDA 21 //I2C Bus
- #define SCL 22 //I2C Bus
- //On I2C bus, there are 2 ADS1015 ADCs and 1 BME280 with 3.3k pullup resistors in place.
- #define TEMPB_BUS 23 //DS18B20 Bus
- #define ELEMENT2_CONTACTOR_RELAY 25 //Songle 5v Relay
- #define DISPLAY_TX 26 //Connected to Nextion Display
- #define DISPLAY_RX 27 //Connected to Nextion Display
- #define PUMP2_RELAY 33 //Songle 5v Relay
sanity check for connected peripherals
sanity check for connected peripherals
This is a code excerpt from my Arduino based project for an ESP32-WROOM-32U. I think I have address all my GPIO issues on the current revision of my board, and would like someone to verify my pinout is ok before I order new boards.
does anyone see any issues or have any questions?
Re: sanity check for connected peripherals
This might be problematic since the default state of a onewire bus is high. GPIO12 is a strapping pin which determines flash voltage, with high meaning 1.8V; while the module you are using has 3.3V flash.TEMPC_BUS 12 //DS18B20 Bus
You can overcome this by either using a different pin, or burning VDDSDIO Efuse to 3.3V. The latter is explained in https://github.com/espressif/esptool/wi ... e-vdd_sdio.
Re: sanity check for connected peripherals
for the sake of testing, a onewire device connected to GPIO12 will NOT allow it to be programmed.
I can do 1 of 2 things.
1. move it to GPIO5 and get rid of my "on" led
2. do the fuse thing.
How do I determine if burning to 3.3v is the right thing to do? what considerations should I take?
thank you for putting that out there!
I can do 1 of 2 things.
1. move it to GPIO5 and get rid of my "on" led
2. do the fuse thing.
How do I determine if burning to 3.3v is the right thing to do? what considerations should I take?
thank you for putting that out there!
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: sanity check for connected peripherals
You can switch around the LED and the onewire pin if you want to. Just make sure to connect your LED from +3.3V through a resistor to GPIO12. That way, the pin is default-high (but note that you need to make the GPIO *low* in order to light the LED.)
*EDIT* Oops, that's wrong, it needs to be low. See Igrrs post under this.
*EDIT* Oops, that's wrong, it needs to be low. See Igrrs post under this.
Re: sanity check for connected peripherals
Efuse solution will work, but if you plan to produce a lot of devices that would be an extra step to account for during production (although an easily scriptable one).
Swapping the LED as suggested by ESP_Sprite will also work if you wire the LED between GPIO12 and GND (you need GPIO12 to be low at reset for 3.3V strapping, not high).
Swapping the LED as suggested by ESP_Sprite will also work if you wire the LED between GPIO12 and GND (you need GPIO12 to be low at reset for 3.3V strapping, not high).
Re: sanity check for connected peripherals
and after the esp boots, I dont need to manually pull it high, or do anything else to it?
Re: sanity check for connected peripherals
Yes, like that, but flip the LED polarity, and you also need a resistor in series with the LED (usually around 1kOhm) — this applies to any other LEDs you have. If you want the LED to turn on you can set the pin as output and set level to high.
Re: sanity check for connected peripherals
yes, the resistor was what I was wondering. Thank you, Ill go this route.
Who is online
Users browsing this forum: No registered users and 183 guests