BrewPiLessGx: BrewPiLess with Touched TFT display

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Just found this: the way I interpret it, I can assign ADC to any pin 4-14 (and a few others).

GPIO pins​

ESP32-S3 has 45 GPIO pins, where a subset can be used as ADC channel and as low-power digital input/output in deep-sleep mode, the so-called RTC GPIOs. Some of them are used by special SoC components and are not broken out on all ESP32-S3 modules. The following table gives a short overview.

PinTypeADCRTCPU / PDSpecial functionRemarks
GPIO0In/Out-XX-Bootstrapping
GPIO1In/OutXXX--
GPIO2In/OutXXX--
GPIO3In/OutXXX-Bootstrapping
GPIO4In/OutXXX--
GPIO5In/OutXXX--
GPIO6In/OutXXX--
GPIO7In/OutXXX--
GPIO8In/OutXXX--
GPIO9In/OutXXX--
GPIO10In/OutXXX--
GPIO11In/OutXXX--
GPIO12In/OutXXX--
GPIO13In/OutXXX--
GPIO14In/OutXXX--
GPIO15In/OutXXXXTAL_32K_PExternal 32k crystal
GPIO16In/OutXXXXTAL_32K_NExternal 32k crystal
GPIO17In/OutXXX--
GPIO18In/OutXXX--
GPIO19In/OutXXXUSB D-USB 2.0 OTG / USB-JTAG bridge
GPIO20In/OutXXXUSB D+USB 2.0 OTG / USB-JTAG bridge
GPIO21In/Out-XX--
GPIO26In/Out--XFlash/PSRAM SPICS1not available if SPI RAM is used
GPIO27In/Out--XFlash/PSRAM SPIHDnot available
GPIO28In/Out--XFlash/PSRAM SPIWPnot available
GPIO29In/Out--XFlash/PSRAM SPICS0not available
GPIO30In/Out--XFlash/PSRAM SPICLKnot available
GPIO31In/Out--XFlash/PSRAM SPIQnot available
GPIO32In/Out--XFlash/PSRAM SPIDnot available
GPIO33In/Out--XFlash/PSRAM SPIQ4not available if octal Flash or SPI RAM is used
GPIO34In/Out--XFlash/PSRAM SPIQ5not available if octal Flash or SPI RAM is used
GPIO35In/Out--XFlash/PSRAM SPIQ6not available if octal Flash or SPI RAM is used
GPIO36In/Out--XFlash/PSRAM SPIQ7not available if octal Flash or SPI RAM is used
GPIO37In/Out--XFlash/PSRAM SPIQ8not available if octal Flash or SPI RAM is used
GPIO38In/Out--XFlash/PSRAM SPIDQSnot available if octal Flash or SPI RAM is used
GPIO39In/Out--XMTCKJTAG interface
GPIO40In/Out--XMTDOJTAG interface
GPIO41In/Out--XMTDIJTAG interface
GPIO42In/Out--XMTMSJTAG interface
GPIO43In/Out--XUART0 TXConsole
GPIO44In/Out--XUART0 RXConsole
GPIO45In/Out--X-Bootstrapping (0 - 3.3V, 1 - 1.8V)
GPIO46In/Out--X-Bootstrapping
GPIO47In/Out--XSPICLK_P-
GPIO48In/Out--XSPICLK_N-
PSRAM - Stands for pseudo-static RAM and refers to the SPI RAM.

ADC: Pins that can be used as ADC channels.
RTC: Pins that are RTC GPIOs and can be used in deep-sleep mode.
PU/PD: Pins that have software configurable pull-up/pull-down functionality.

Strapping pins​

GPIO0, GPIO3, GPIO45 and GPIO46 are bootstrapping. GPIO0 and GPIO46 pins are used to boot ESP32-S3 in different modes:

GPIO0GPIO46Mode
1XSPI Boot mode to boot the firmware from flash (default mode)
01Download Boot mode for flashing the firmware


If EFUSE_STRAP_JTAG_SEL is set, GPIO3 is used to select the interface that is used as JTAG interface.

GPIO3Mode
1USB-JTAG bridge at GPIO19 and GPIO20 is used as JTAG interface
0GPIO39 to GPIO42 are used as JTAG interface


NoteIf EFUSE_DIS_USB_JTAG or EFUSE_DIS_PAD_JTAG are set, the interface selection is fixed and GPIO3 is not used as bootstrapping pin.
GPIO45 is used to select the voltage VDD_SPI for the Flash/PSRAM interfaces SPI0 and SPI1.

ADC Channels​

ESP32-S3 integrates two 12-bit ADCs (ADC1 and ADC2) with 20 channels in total:

  • ADC1 supports 10 channels: GPIO1 ... GPIO10
  • ADC2 supports 10 channels: GPIO11 ... GPIO20
Source: https://doc.riot-os.org/group__cpu__esp32__esp32s3.html
 
I've been playing with the WT32-SC01 Plus to get it running on this project but cannot seem to get past a Pressure Monitor error when trying to build. I added the build flag mentioned in the ReadMe file but to no avail.

src/bpl/PressureMonitor.cpp: In member function 'int PressureMonitorClass::_readInternalAdc()':
src/bpl/PressureMonitor.cpp:63:28: error: 'ADC1_GPIOPressureAdcPin_CHANNEL' was not declared in this scope
#define ConcateChanel(pin) ADC1_GPIO ## pin ## _CHANNEL
^~~~~~~~~
src/bpl/PressureMonitor.cpp:64:34: note: in expansion of macro 'ConcateChanel'
#define AdcChannelFromPinNr(pin) ConcateChanel(pin)
^~~~~~~~~~~~~
src/bpl/PressureMonitor.cpp:86:37: note: in expansion of macro 'AdcChannelFromPinNr'
adc_reading += adc1_get_raw(AdcChannelFromPinNr(PressureAdcPin));
^~~~~~~~~~~~~~~~~~~
src/bpl/PressureMonitor.cpp:63:28: note: suggested alternative: 'ADC1_GPIO7_CHANNEL'
#define ConcateChanel(pin) ADC1_GPIO ## pin ## _CHANNEL
^~~~~~~~~
src/bpl/PressureMonitor.cpp:64:34: note: in expansion of macro 'ConcateChanel'
#define AdcChannelFromPinNr(pin) ConcateChanel(pin)
^~~~~~~~~~~~~
src/bpl/PressureMonitor.cpp:86:37: note: in expansion of macro 'AdcChannelFromPinNr'
adc_reading += adc1_get_raw(AdcChannelFromPinNr(PressureAdcPin));
^~~~~~~~~~~~~~~~~~~
src/bpl/PressureMonitor.cpp: In member function 'void PressureMonitorClass::_initInternalAdc()':
src/bpl/PressureMonitor.cpp:154:13: error: 'PressureAdcPin' was not declared in this scope
pinMode(PressureAdcPin, INPUT);
^~~~~~~~~~~~~~
src/bpl/PressureMonitor.cpp:154:13: note: suggested alternative: 'PressureDecode'
pinMode(PressureAdcPin, INPUT);
^~~~~~~~~~~~~~
PressureDecode
src/bpl/PressureMonitor.cpp:63:28: error: 'ADC1_GPIOPressureAdcPin_CHANNEL' was not declared in this scope
#define ConcateChanel(pin) ADC1_GPIO ## pin ## _CHANNEL
^~~~~~~~~
src/bpl/PressureMonitor.cpp:64:34: note: in expansion of macro 'ConcateChanel'
#define AdcChannelFromPinNr(pin) ConcateChanel(pin)
^~~~~~~~~~~~~
src/bpl/PressureMonitor.cpp:157:31: note: in expansion of macro 'AdcChannelFromPinNr'
adc1_config_channel_atten(AdcChannelFromPinNr(PressureAdcPin),ADC_ATTEN_DB_11); // 3.9v scale
^~~~~~~~~~~~~~~~~~~
Compiling .pio/build/WT32_SC01_PLUS/src/bpl/TiltListener.cpp.o
src/bpl/PressureMonitor.cpp:63:28: note: suggested alternative: 'ADC1_GPIO7_CHANNEL'
#define ConcateChanel(pin) ADC1_GPIO ## pin ## _CHANNEL
^~~~~~~~~
src/bpl/PressureMonitor.cpp:64:34: note: in expansion of macro 'ConcateChanel'
#define AdcChannelFromPinNr(pin) ConcateChanel(pin)
^~~~~~~~~~~~~
src/bpl/PressureMonitor.cpp:157:31: note: in expansion of macro 'AdcChannelFromPinNr'
adc1_config_channel_atten(AdcChannelFromPinNr(PressureAdcPin),ADC_ATTEN_DB_11); // 3.9v scale
^~~~~~~~~~~~~~~~~~~
*** [.pio/build/WT32_SC01_PLUS/src/bpl/PressureMonitor.cpp.o] Error 1

This is the text output in VScode. I don't need pressure monitoring... From my research, ADC pins are not available on this display module unless you disable WiFi which I do not want to do.

For reference, this is my addition to the pindef.h file:

#if WT32_SC01_PLUS
#define oneWirePin 21
#define actuatorPin1 10
#define actuatorPin2 11
#define actuatorPin3 12
#define actuatorPin4 13
#define actuatorPin5 14
#endif

WT32 SC01+ is a ESP32S3 device, so add
-DCONFIG_IDF_TARGET_ESP32S3=true
to the
build_flags
in platformio.ini
.

Moreover, only GPIO 10, in this case, is good for ADC.
 
I've been fermenting for five days now and found that if there's a gap in logging (my power supply was connected to the smart switch I use for Christmas tree lights :) then when you start up again there's a gap in the log. That's as expected. But if it happens a second time (because I am slow and it took me another day to figure out what was going on :) then the first gap disappears, the data to the right of where the gap was moved to the left. So it appears to allow only a single concurrent gap in the log and concatenates to the left if there's a second gap when power is applied again. This is admittedly a niche case as one would normally keep the power on. (I'll transfer to cask in a couple of days then I'll dismantle the breadboard to check if there's anything interfering with the parasite glycol switch).

A separate observation: if I tap the graph in the web interface, all the plots disappear until the next update. I think the xy axes may get transposed when you tap the graph, as all the square green icons (indicating profile, or constant temp) along the x-axis flip to the y axis. This happened in both the web and android mobile interface. If you wait for the next data update then it appears again.
 
Last edited:
For pressure measurement, is there any advantage in using a separate ADC chip when using an esp32 or is that only really necessary for an esp8266 (when the adc analogRead() is occasionally interrupted when used by wifi). I understand the esp32 ADC is nonlinear but it appears to be reproducible; I've not noticed any obvious offset at returning to 0 psi at least.
 
I ran test build with the flag "-DSupportPressureTransducer=false" with a fresh clone into VScode. For some reason this is what throws the build into failing. I don't know if anyone else has ran into this issue. Of course, my build with the SC01 + has other issues besides this, but I thought I'd bring it up.
 
I see in the esp32_smartdisplay.h file that the #ifdef ESP32_3248S035R display is listed.

I have this board,is it now just a matter of setting up the build flags in platformio.ini file to compile for my board ,or is it not that simple ?

If so,could someone advise what should be added.

First time using platformio ,thanks for any assistance.

Cheers
 
I see in the esp32_smartdisplay.h file that the #ifdef ESP32_3248S035R display is listed.

I have this board,is it now just a matter of setting up the build flags in platformio.ini file to compile for my board ,or is it not that simple ?

If so,could someone advise what should be added.

First time using platformio ,thanks for any assistance.

Cheers
I don't have that display and haven't tested on it. It is supported by SmartDisplay library. However, I've ditched SmartDisplay library and change to LGFX library for more drivers.
 

Latest posts

Back
Top