Close

ESP32 pin assignments

A project log for Ventbot: warm side cool, cool side warm

A DIY register booster project to even out the temps around my home.

wjcarpenterWJCarpenter 08/17/2022 at 01:500 Comments

I haven't figured out the complete picture of what I want for the controller, but it's almost a certainty that I'll use an ESP32. As I write this, the pin assignments are a bit arbitrary and only intended to convince me that I have enough of whatever pins I need. I'll be updating this table over time.

Although I expect to only use 3 fans, I have enough GPIO pins to design for 4 fans (and even a few left over). I expect to use a PWM pin and a tachometer pin separately for each fan (F1, F2, F3, F4). Most PWM fans don't stop completely even at a 0% duty cycle, so I'll use a MOSFET to explicitly control the power lines for each fan. I'll use the I2C interface for a temperature sensor. I'm not sure yet what button, rotary encoders, LEDs, or display I'll use.

This table is based on the more or less standard ESP-WROOM-32 development boards with 30 or 38 pin headers. I plan to use the 38 pin variant. The I/O recommendations in the Specialization column are based on the chart from here (I've seen similar charts on other web sites; this is the one I consult). "I" means OK for input; "(I)" means OK for input with some caveat. Similar notation for outputs.

Pin (30)Pin (38)GPIOSpecializationMy usage
-250adc11 - touch1 [(I)(O)]
28351tx0 [(O)]
19242adc12 - touch2 [I O]
27343rx0 [(I)]
20264adc10 - touch0 [I O]
23295VSPI CS [I O]
-206SPI flash CK-
-217SPI flash D0-
-228SPI flash D1-
-169SPI flash D2 - rx1-
-1710SPI flash D3 - tx1-
-1811SPI flash CMD-
121312HSPI MISO - adc15 - touch5 [(I) O]F3-PWR
131513HSPI MOSI - adc14 - touch4 [I O]F2-PWR
111214HSPI CLK - adc16 - touch6 [I O]F1-PWR
182315HSPI CS - adc13 - touch3 [I O]F3-PWM
212716rx2 [I O]F1-PWM
222817tx2 [I O]F2-PWM
243018VSPI CLK [I O]F4-PWM
253119VSPI MISO [I O]F4-tach
--20--
263321I2C SDA [I O]I2C SDA
293622I2C SCL [I O]I2C SCL
303723VSPI MOSI [I O]F4-PWR
--24--
8925adc18 - dac1 [I O]F1-tach
91026adc19 - dac2 [I O]F2-tach
101127adc17 - touch7 [I O]F3-tach
--28--
--29--
--30--
--31--
6732adc4 - touch9 [I O]
7833adc5 - touch8 [I O]
4534Input only - adc6 [I]
5635Input only - adc7 [I]
2336Input only - adc0 [I]
--37--
--38--
3439Input only - adc3 [I]
161-3.3v
12-enable/reset
1414-gnd
1519-Vin 5v
1732-gnd
-38-gnd

Discussions