ESP32 Open IoT and IIoT Gateways
P01 & P02 Open IoT and IIoT Gateways documentation
- Data Sheet
- User Manual
- Peripherals
- Simplified Block Diagram
- RGB LED
- Switch
- RS232 and RS485
- Ethernet PHY
- MicroUSB
- I2C EEPROM
- WiFi/Antenna
- QSPI Flash
- QSPI RAM
- Expander
- I2C Sensors
- Examples
- Contact Us
- Common Resources
Data Sheet
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Open IoT Gateway is also called as a PAC (Programmable Automation Controller). PAC products combine the functionality and openness of a PC, the reliability of a programmable logic unit like PLC and the intelligence of I/O modules with flexible software tools for a wide range of applications from data acquisition, process control, motion control to energy and building management.
Our PAC family includes FreeRTOS PACs and MicroPython PACs for different requirements in OS, CPU and development platform.
The P01 and P02 Gateways are based on ESP32 Xtensa LX6.
P01 P02 |
Features
|
---|
Specifications
Redisage PN |
P01 |
P02 |
|
Ports |
RS232 |
- |
- |
RS485 |
- |
- |
|
RS232/RS485 |
2x |
2x |
|
Microcontroller |
ESP32 |
||
WiFi |
N/A |
802.11 b/g/n 150 Mbps / 2.4 GHz |
|
Bluetooth |
N/A |
v4.2 BR/EDR and BLE |
|
SMA socket connector for WiFi/BT antenna |
|
|
|
Tactile switch |
|
|
|
Power |
Voltage |
12-30 VDC |
|
Power |
< 1 W |
||
Frame ground protection |
yes |
||
Baud rate |
up to 115200 bps |
||
LED indicators |
power, link activity, programmable RGB |
||
RS485 termination |
120 ohm manually enabled |
||
Connector |
RS232/RS485 |
8-pin terminal block max. 2.5 mm2 wire |
|
Power |
3-pin terminal block max. 2.5 mm2 wire |
||
Ethernet |
RJ45 |
||
Transmission |
RS485 |
max. 1,200 m at 9.6 kbps; max. 400 m at 115.2 kbps |
|
RS232 |
max. 15 m at 115.2 kbps |
||
Mounting and enclosure |
DIN rail, plastic PA - UL 94 V0, black/green |
||
Temperatures |
-40°C to +75°C operating and storage |
||
Humidity |
10 - 90% RH, non-condensing |
||
ESD protection |
±4 kV contact discharge / ±8 kV air discharge |
||
Certification |
CE, RoHS |
Variants
P01 - Open IoT and IIoT Gateway 2 x RS232/RS485
In the P01 gateway user should use only RS232 or only RS485 interface of one port as they occupy the same internal bus of the device.
P02 - Open IoT and IIoT Gateway 2 x RS232/RS485 + WiFi
In the P02 gateway user should use only RS232 or only RS485 interface of one port as they occupy the same internal bus of the device.
Frame ground FG
Electronic circuits are constantly prone to electrostatic discharge ESD. Redisage Electronics modules feature a design for the frame ground terminal block FG. The frame ground provides a path for bypassing ESD, which provides enhanced static protection ESD abilities and ensures the module is more reliable. Connecting FG terminal block to the earth ground will bypass the ESD disturbances outside the device so will provide a better level of protection against ESD.
Frame Ground FG connection reference drawing is provided below.
If earth ground is not available FG can be left floating or it can be connected with the power supply GND.
Pin assignments
P01 |
P02 |
Enclosure dimensions
2U Module Enclosure
98 x 22.5 x 56.4
Units: mm
LED indicators
P01
- PW LED Blue - Power
- ETH LED Green - Network activity
- ST LED Red / Green / Blue - programmable LED
P02
- PW LED Blue - Power
- ETH LED Green - Network activity
- ST LED Red / Green / Blue - programmable LED
Additional notes
Related information and links |
||
Ordering information | Accessories | Similar products |
Products family sample photo
DISCLAMER NOTES
ALL PRODUCT, PRODUCT SPECIFICATIONS AND DATA ARE SUBJECT TO CHANGE WITHOUT NOTICE TO IMPROVE RELIABILITY, FUNCTION OR DESIGN OR OTHERWISE.
Datasheet-ID:
SR-D
User Manual
Introduction
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Open IoT Gateway is also called as a PAC (Programmable Automation Controller). PAC products combine the functionality and openness of a PC, the reliability of a programmable logic unit like PLC and the intelligence of I/O modules with flexible software tools for a wide range of applications from data acquisition, process control, motion control to energy and building management.
Our PAC family includes FreeRTOS PACs and MicroPython PACs for different requirements in OS, CPU and development platform.
The P01 and P02 Gateways are based on ESP32 Xtensa LX6.
If you want to get started, make sure you have complete set of:
- Tag-connect cable
- Tag-connect retaining clip board (optional)
- Open IoT and IIoT Gateway
- USB Programmer
Hardware
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Features
Frame ground FG
Electronic circuits are constantly prone to electrostatic discharge ESD. Redisage Electronics modules feature a design for the frame ground terminal block FG. The frame ground provides a path for bypassing ESD, which provides enhanced static protection ESD abilities and ensures the module is more reliable. Connecting FG terminal block to the earth ground will bypass the ESD disturbances outside the device so will provide a better level of protection against ESD.
Frame Ground FG connection reference drawing is provided below.
If earth ground is not available FG can be left floating or it can be connected with the power supply GND.
Specifications
Redisage PN |
P01 |
P02 |
|
Ports |
RS232 |
- |
- |
RS485 |
- |
- |
|
RS232/RS485 |
2x |
2x |
|
Microcontroller |
ESP32 |
||
WiFi |
N/A |
802.11 b/g/n 150 Mbps / 2.4 GHz |
|
Bluetooth |
N/A |
v4.2 BR/EDR and BLE |
|
SMA socket connector for WiFi/BT antenna |
|
|
|
Tactile switch |
|
|
|
Power |
Voltage |
12-30 VDC |
|
Power |
< 1 W |
||
Frame ground protection |
yes |
||
Baud rate |
up to 115200 bps |
||
LED indicators |
power, link activity, programmable RGB |
||
RS485 termination |
120 ohm manually enabled |
||
Connector |
RS232/RS485 |
8-pin terminal block max. 2.5 mm2 wire |
|
Power |
3-pin terminal block max. 2.5 mm2 wire |
||
Ethernet |
RJ45 |
||
Transmission |
RS485 |
max. 1,200 m at 9.6 kbps; max. 400 m at 115.2 kbps |
|
RS232 |
max. 15 m at 115.2 kbps |
||
Mounting and enclosure |
DIN rail, plastic PA - UL 94 V0, black/green |
||
Temperatures |
-40°C to +75°C operating and storage |
||
Humidity |
10 - 90% RH, non-condensing |
||
ESD protection |
±4 kV contact discharge / ±8 kV air discharge |
||
Certification |
CE, RoHS |
LED indicators
Pin assignments
P01 |
P02 |
Board overview
The complete Open IoT and IIoT Gateway kit consists of:
- developer module
- RJ45 network adapter
- hardware programmer
Power input pinout
- VCC - power supply input 9-30 VDC
- GND - power supply ground
- DI - digital input (used while there is no button mounted and it can be shorten only to GND)
- FG - frame ground
Test connectors
Provided test connectors can be used for board debugging.
- GPIO_38 - ESP32 general purpose input
- 3V3 - 3.3 VDC
- I2C_SCL, I2C_SDA - I2C connectors
- GND - ground
- NC - not connected
- FGC - frame ground connector
- BUT_EXT - button test line (default: high state)
- Q2 - Q2 output of parallel register (74HC595BQ)
- STCP - clock input of serial register (74HC595BQ)
- SHCP - clock input of buffer register (74HC595BQ)
- Q7S - output of serial register (74HC595BQ)
- CHIP_PU - chip power up line ('1' - powers chip up)
Button / antenna
The antenna connector can be replaced with a button which can be used for, for example, restoring device to the default configuration, saved in EEPROM.
In order to use the button instead of the antenna, the R52 resistor (near the microUSB connector, on the bottom side) has to be soldered to the board.
RS232 ports
The device has 2 independent RS485 ports.
RS485 ports
The device is equipped with two MAX481 transceivers that enable communication in the RS485 standard on two channels independently.
As the RS485_1 / RS232_1 and RS485_2 / RS232_2 standards use common microcontroller serial ports, it is possible to use only 1 interface from the pair at a time.
ETHERNET
In order to support the Ethernet network interface communication, the network adapter available in the kit must be installed on the module (pay attention to its correct installation). This interface is supported by the external IP101G physical layer which communicates with the ESP32 microcontroller.
Programming
The device can be programmed only with the external hardware programmer connected via Tag-Connect connector.
Programming
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Install IDE
Please, follow the instructions located here to install the ESP-IDF framework on your local machine. ESP-IDF is available both on Windows and Linux. It can also be installed through some popular IDEs: VS Code or Eclipse.
ESP-IDF is required to build the examples written in C for the device. However, it can be also programmed in MicroPython (Thonny).
Connect the programmer
ESP32 IoT and IIoT Gateways can be programmed only with the external hardware programmer (for example P03) connected via the Tag-Connect connector. After connecting it to the board and a PC, a new COM port should be available.
Connect the power supply
In order to successfully flash the device, it has to be connected to the power supply (9 - 30 VDC) using the VCC and GND connectors.
Create your own programs
After all of the above steps are done, the device should be ready to be programmed.
Build, flash and monitor the device
VS Code ESP-IDF extension
- Make sure that there is a ".vscode" folder in the project tree. If not, add it with the "F1" + "ESP-IDF: Add vscode Configuration Folder" command.
- Set your device target with "F1" + "ESP-IDF: Set Espressif Device Target". Then choose current workspace folder and then "esp32". Lastly choose "Custom board" and confirm it.
- Set port where the device is attached to with "F1" + "ESP-IDF: Select Port to Use (COM, tty, usbserial)".
- Finally select "UART" flash method with "F1" + "ESP-IDF: Select Flash Method".
- Build your project, flash it to the device and open a serial monitor with the "F1" + "ESP-IDF: Build, Flash and Start a Monitor on your Device". If everything was set properly the serial monitor should open after a successful flash.
Thonny
Other IDEs
ESP32 Open IoT and IIoT Gateways (P01 & P02)
The device can be programmed also in other development environments. Programming gateways is supported on every popular operating systems like Windows, Linux or MAC OS. This document was prepared in reference to Windows.
ESP-IDF framework
The main tool is ESP-IDF framework provided by Espressif. To get more information about installation, visit manufacturer’s
website: Get Started - ESP32 - — ESP-IDF Programming Guide latest documentation.
Manual Installation of ESP-IDF: Standard Setup of Toolchain for Windows - ESP32 - — ESP-IDF Programming Guide latest documentation.
During the ESP-IDF installation you might be asked for install Eclipse additionally.
After successful process it is necessary to add new enviroment variables.
Variables names:
- IDF_PATH - paste the path of the directory with ESP-IDF framework
- IDF_TOOLS_PATH - paste the path of the directory with ESP-IDF tools
Finally you can run ESP-IDF CMD and start to manage your project. There should be an icon on the desktop or easy access to ESP-IDF.
Create new project
idf.py create-project -p <name>
Build project
idf.py -p <port> build
Flash project
idf.py -p <port> flash
idf.py -p <port> flash monitor
Erase flash
esptool.py --port <port> erase_flash
MinGW
Download MinGW with GUI from MinGW - Minimalist GNU for Windows and install on your PC. After a successful installation run MinGW Installation Manager (GUI).
Now we need to install Basic Setup. Right click on every square fields in “Package” tab, then “Mark for Installation”. Next, in “Installation” tab click on “Apply Changes” and then “Apply”.
To check if the installation is successful, open Command line and type:
gcc --version
IDE
You can edit code in your preferred IDE as ESP-IDF is handling the final build and flash.
Recommanded IDEs:
Visual Studio Code
- Download the package with example projects for IoT Gateway.
- Select one of the demos and copy it to a new directory.
- Open Visual Studio Code and click on the extension tab.
- Install and configure C/C++ extensions.
- Open directory in VS Code.
- If errors occur, edit “includePath” settings.
- Add the line "${env:IDF_PATH}/**".
-
Now code is ready to be modified.
-
To build or flash project, use ESP-IDF CMD.
Visual Studio Code provides an extension “Espressif IDF” which has some issues at this moment. However it is not essential for editing code.
CodeBlocks
- Download the package with example projects for IoT Gateway.
- Select one of the demos and copy it to a new directory.
- Run ESP-IDF CMD, set the path to your project and then generate project for CodeBlocks:
cmake -G "CodeBlocks - MinGW Makefiles"
- Run CodeBlocks. Click on "File → Open…", find .cbp type file and click on “Open”.
- After this, there should be a project tree available and code is ready to be modified.
-
To build or flash project, use ESP-IDF CMD.
Thonny IDE
- Download and install Python interpreter.
- Download the package with example projects for IoT Gateway.
- Select one of the demos and copy it to a new directory.
- Run ESP-IDF CMD, erase flash using:
esptool.py --port <COMX> erase_flash
-
Download firmware which allows to run microPython.
-
Flash .bin file using:
esptool.py --port <COMX> write_flash -z 0x1000 <name_of_the_bin_file>
- Open serial port monitor like “Putty”, set COM port, baudrate, connection type to serial and click on “Open”.
-
Now you can run Python console on ESP32.
-
Download and install Thonny IDE.
-
Click on "Tools → Options → Interpreter". In this tab you can choose an interpreter and COM port.
-
After all the process Thonny IDE is ready to work.
-
To flash the demo, open file in Thonny IDE. Next click on green button to run the current script.
Uploading firmware
To upload firmware, you need to use external programmer with Tag-connect.
Pin Map
ESP32 Open IoT and IIoT Gateways (P01 & P02)
CGE2 rev. 4.1
Element | Connection |
LED |
|
Power LED7 (blue) | +3V3 |
ETHERNET LED1 (green) | ETH_LED3/PHY_AD3 |
RGB programmable LED5 (red) | Q6 |
RGB programmable LED5 (blue) | Q5 |
RGB programmable LED5 (green) | Q4 |
74HC595BQ shift register | |
VCC | +3V3 |
Q7S | Q7S |
Q0 | Q0 |
Q1 | Q1 |
Q2 | Q2 |
Q3 | RS485_TER_EN2 |
Q4 | Q4 |
Q5 | Q5 |
Q6 | Q6 |
Q7 | RS485_TER_EN1 |
MR/ | CHIP_PU (pull up) |
OE/ | GND |
DS | SERIAL_REG_DATA |
SHCP | SHCP |
STCP | STCP (pull down) |
GND | GND |
TPAD | GND |
MAX481CSA_1 UART RS485 transceiver | |
DI | UART1_TX |
DE | UART1_DIR |
RE/ | UART1_DIR |
RO | UART1_RX |
A | A_1 |
B | B_1 |
MAX481CSA_2 UART RS485 transceivers | |
DI | UART2_TX |
DE | UART2_DIR |
RE/ | UART2_DIR |
RO | UART2_RX |
A | A_2 |
B | B_2 |
ST3232BTR RS232 driver and receiver | |
C1+ | C1 (100 nF) |
C1- | C1 (100 nF) |
C2+ | C2 (100 nF) |
C2- | C2 (100 nF) |
T1IN |
UART1_TX |
T2IN |
UART2_TX |
R1OUT |
UART1_RX |
R2OUT |
UART2_RX |
V+ |
C3 (100 nF) |
V- |
C4 (100 nF) |
T1OUT |
TXD1 |
T2OUT |
TXD2 |
R1IN |
RXD1 |
R2IN |
RXD2 |
USBLC6-2SC6 ESD protection |
|
VCC |
USB_V |
GND |
GND |
IO1_A |
DATA- |
IO1_B |
CONSOLE_RX |
IO2_A |
DATA+ |
IO2_B |
CONSOLE_TX |
MicroUSB type B |
|
V_BUS |
USB_V |
D- |
DATA- |
D+ |
DATA+ |
ID |
GND |
GND |
GND |
M24C02-RMC6TG_1 I2C EEPROM |
|
E0 |
GND |
E1 |
GND |
E2 |
+3V3 |
VSS |
GND |
VCC |
+3V3 |
WC/ |
GND |
SCL |
I2C_SCL |
SDA |
I2C_SDA |
M24C02-RMC6TG_2 I2C EEPROM |
|
E0 |
+3V3 |
E1 |
+3V3 |
E2 |
GND |
VSS |
GND |
VCC |
+3V3 |
WC/ |
GND |
SCL |
I2C_SCL (pull up) |
SDA |
I2C_SDA (pull up) |
GD25Q64CSIGTR QSPI FLASH |
|
CS# |
SPICS0 |
SO |
SPIQ |
WP# |
SPIWP |
VSS |
GND |
VCC |
VDD_SDIO |
HOLD# |
SPIHD |
SCLK |
SPICLK |
SI |
SPID |
IP101GRI ETHERNET transceivers |
|
MDC |
ETH_MDC |
MDIO |
ETH_MDIO |
MDI_TP |
TXD+ |
MDI_TN |
TXD- |
MDI_RP |
RXD+ |
MDI_RN |
RXD- |
X2 | - |
X1 | GND |
RESET_N | ETH_RESET_N (pull up) |
ISET | ETH_ISET (pull down) |
LED0/PHY_AD0 | ETH_LED0/PHY_AD0 (pull up) |
LED3/PHY_AD3 | ETH_LED3/PHY_AD3 (pull down) |
TEST_ON | - |
REGOUT | C21 (100 nF), C35 (10 uF) |
VDDIO | +3V3 |
AVDD33 | +3V3 |
GND | GND |
TXEN | ETH_TX_EN |
TXER/FXSD | - |
TXCLK/50M_CLKI | ETH_CLK_IN |
TXD0 | ETH_TXD0 |
TXD1 | ETH_TXD1 |
TXD2 | - |
TXD3 | - |
RXDV/CRS_DV/FX_HEN | ETH_RX_CRS_DV |
RXCLK/50M_CLKO | - |
RXD0 | ETH_RXD0 |
RXD1 | ETH_RXD1 |
RXD2 | - |
RXD3 | - |
RXER/INTR_32 | - |
COL/RMII | ETH_COL/RMII (pull up) |
CRS/LEDMOD | - |
ESP32-DOWD | |
VDDA_1 | +3V3 |
LNA_IN | ANT |
VDD3P3_1 | VDD3P3 (+3V3) |
VDD3P3_2 | VDD3P3 (+3V3) |
SENSOR_VP (GPI36) | USB_DETECT (pull down) |
SENSOR_CAPP (GPI37) | UART2_RX |
SENSOR_CAPN (GPI38) | GPI_38 |
SENSOR_VN (GPI39) | P_DETECT (pull up) |
CHIP_PU | CHIP_PU (pull up) |
VDET_1 (GPI34) | BUTTON_IN (pull up) |
VDET_2 (GPI35) | UART1_RX |
32K_XP (GPIO32) | UART1_TX |
32K_XN (GPIO33) | SHCP |
GPIO25 | ETH_RXD0 |
GPIO26 | ETH_RXD1 |
GPIO27 | ETH_RX_CRS_DV |
MTMS (GPIO14) | UART1_DIR |
MTDI (GPIO12) | UART2_DIR |
VDD3P3_RTC | +3V3 |
MTCK (GPIO13) | I2C_SDA (pull up) |
MTDO (GPIO15) |
STCP (pull down) |
GPIO2 | I2C_SCL (pull up) |
GPIO0 | ETH_CLK_IN, SPICS1 |
GPIO4 | SERIAL_REG_DATA |
GPIO16 | ETH_CLK |
VDD_SDIO | VDD_SDIO |
GPIO17 | SPICS1 |
SD_DATA_2 (GPIO9) | SPIHD |
SD_DATA_3 (GPIO10) | SPIWP |
SD_CMD (GPIO11) | SPICS0 |
SD_CLK (GPIO6) | SPICLK |
SD_DATA_0 (GPIO7) | SPIQ |
SD_DATA_1 (GPIO8) | SPID |
GPIO5 | UART2_TX |
GPIO18 | ETH_MDIO |
GPIO23 |
ETH_MDC |
VDD3P3_CPU | +3V3 |
GPIO19 | ETH_TXD0 |
GPIO22 | ETH_TXD1 |
U0RXD (GPIO3) | CONSOLE_RX |
U0TXD (GPIO1) | CONSOLE_TX |
GPIO21 | ETH_TX_EN |
VDDA_2 | +3V3 |
XTAL_N | XTAL_N |
XTAL_P | XTAL_P |
VDDA_3 | +3V3 |
CAP2 | CAP2 |
CAP1 | CAP1 |
GND | GND |
Optional
Element | Connection |
Expander | |
1 | FGC |
2 | - |
3 | CHIP_PU (pull up) |
4 | Q7S |
5 | SHCP |
6 | STCP (pull down) |
7 | Q2 |
8 | BUT_EXT |
9 | GPI_38 |
10 | +3V3 |
11 | I2C_SCL (pull up) |
12 | I2C_SDA (pull up) |
13 | GND |
14 | GND |
15 | - |
16 | FGC |
Programmer |
|
1 | CONSOLE_RX |
2 | CONSOLE_TX |
3 | +3V3 |
4 | CHIP_PU |
5 | GND |
6 | P_DETECT |
7 | - |
8 | - |
9 | BOOT |
10 | I2C_SCL |
870-62WS5128 QSPI RAM |
|
CS# |
SPICS1 |
SO |
SPIQ |
WP# |
SPIWP |
VSS |
GND |
VCC |
VDD_SDIO |
HOLD# |
SPIHD |
SCLK |
SPICLK |
SI |
SPID |
Secure element |
|
SCL |
I2C_SCL (pull up) |
SDA |
I2C_SDA (pull up) |
VCC |
+3V3 |
IO |
- |
GND |
GND |
SI7006-A20/SI7020-A20 humidity and temperature sensor |
|
SDA |
I2C_SDA (pull up) |
GND |
GND |
DNC1 |
- |
SCL |
I2C_SCL (pull up) |
VDD |
+3V3 |
DNC2 |
- |
HTS221 humidity and temperature sensor |
|
VDD |
+3V3 |
CS |
+3V3 |
GND |
GND |
SCL/SPC |
I2C_SCL (pull up) |
SDA/SDI/SDO |
I2C_SDA (pull up) |
DRDY |
- |
LSM6DS33 accelerometer and gyro |
|
GND |
GND |
GND |
GND |
RES |
GND |
RES |
GND |
RES |
GND |
RES |
GND |
INT1 |
- |
INT2 |
- |
CS |
+3V3 |
SDO |
- |
SDA |
I2C_SDA (pull up) |
SCL |
I2C_SCL (pull up) |
VDDIO |
+3V3 |
VDD |
+3V3 |
RES |
GND |
NC |
- |
LIS3DH accelerometer |
|
VDD_IO |
+3V3 |
NC |
- |
NC |
- |
SCL/SPC |
I2C_SCL (pull up) |
GND |
GND |
SDA/SDI/SDO |
I2C_SDA (pull up) |
SDO/SAO |
- |
CS |
+3V3 |
INT2 |
- |
RES |
GND |
INT1 |
- |
GND |
GND |
ADC3 |
- |
VDD |
+3V3 |
ADC2 |
- |
ADC1 |
- |
IP101GRI ETHERNET transceivers |
|
ETH_RESET_N | Q1 |
P03 Programmer
ESP32 Open IoT and IIoT Gateways (P01 & P02)
P01 and P02 can be programmed via P03 USB RS232 RS485 Converters.
More info here.
Peripherals
Simplified Block Diagram
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Optional elements are marked with the dashed lines.
RGB LED
ESP32 Open IoT and IIoT Gateways (P01 & P02)
RGB LED is controlled by SIPO shift register 74HC595BQ.
- SHCP - shift register clock input
- STCP - storage register clock input
- DS - serial data input
Switch
ESP32 Open IoT and IIoT Gateways (P01 & P02)
The Open IoT Gateway P01 variant contains a tactile switch. The PCB has hardware pull-up designed into it so debouncing effect is eliminated.
If the switch is soldered to the PCB, make sure there is also a resistor R52 located on the bottom layer of the board.
RS232 and RS485
ESP32 Open IoT and IIoT Gateways (P01 & P02)
The gateway is equipped with 2 transceivers MAX481 that handle transmission in RS485 standard on each channel independently. Similar to RGB, each channel can be enabled by SIPO shift register 74HC595BQ.
To ensure transmission in RS232 standard there is also ST3232BTR IC which allows transmission on each channel independently.
It is possible to use only one pair of each interface at the same moment, because RS232 and RS485 use the same UART pins on the MCU.
Ethernet PHY
ESP32 Open IoT and IIoT Gateways (P01 & P02)
The Ethernet interface is provided by the IP101G physical layer. There is also an external board with RJ45 socket which ensures wired connection to the network.
MicroUSB
ESP32 Open IoT and IIoT Gateways (P01 & P02)
MicroUSB ensures access straight to UART interface (UART0). The Open IoT Gateway does not have inbuild FTDI converter so an external USB to UART FTDI converter is needed to run a serial port monitor on a PC.
I2C EEPROM
ESP32 Open IoT and IIoT Gateways (P01 & P02)
WiFi/Antenna
ESP32 Open IoT and IIoT Gateways (P01 & P02)
The Open IoT and IIoT Gateway P02 variant contains SMA connector for a WiFi/Bluetooth antenna.
QSPI Flash
ESP32 Open IoT and IIoT Gateways (P01 & P02)
QSPI RAM
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Expander
ESP32 Open IoT and IIoT Gateways (P01 & P02)
The female goldpin connector allows easy access to different signals. It might be useful during analysis of the board.
- GPI38 - general purpose input pin, connected directly to the MCU (might work only as an input pin)
- 3V3 - 3.3 V voltage
- I2C_SCL and I2C_SDA - main lines of the I2C interface
- GND - ground
- NC - not connected
- FGC - frame ground connection
- BUT_EXT - switch test line ('1' is set by default)
- Q2 - Q2 pin of the shift register
- STCP - storage register clock input
- SHCP - shift register clock input
- Q7S - serial data output pin of shift register
- CHIP_PU - chip power up signal ('1' - enables the chip)
I2C Sensors
ESP32 Open IoT and IIoT Gateways (P01 & P02)
- LSM6DS33 - 3D accelerometer and 3D gyroscope
- LIS3DH - 3-axis "nano" accelerometer
- HTS221 - capacitive digital sensor for relative humidity and temperature measurements
- SI7006-A20 / SI7020-A20 - humidity and temperature sensor
- Secure element
Examples
Hello World
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Link to repositories:
Description
This example use UART0 in the MCU which is reserved for the console. Simple string and device info is printed on the console and then the MCU restarts after 10 seconds.
Console output
RGB LED
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Link to repositories:
Description
This example shows how to use the programmable RGB LED via the 74HC595BQ shift register. After flashing the device, the RGB LED should change its color between red, green and blue. It can be used to check if the device was connected and flashed properly.
Console output
Switch
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Link to repositories:
Description
This example shows how to use the button located on the board. There is a simple interrupt handler implemented with a queue used to send a parameter from the handler to a main loop. The board should react on every button press or release with a communicate on the console log.
Console output
ADC
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Link to repositories:
Description
This example shows how to use the ADC (analog-digital converter) located on the board. In the beginning of the program there is an ADC calibration performed. Thanks to that a raw reading can be converted to a corresponding voltage level.
Console output
RS232
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Link to repositories:
Connection
Connect RS232_1 port to the RS232_2 port in the loopback configuration.
Description
This example shows how to handle the RS232 communication via UART. After flashing both ports should send and read data from each other.
Console output
RS485
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Link to repositories:
Connection
Connect RS485_1 port to the RS485_2 port in the loopback configuration.
Description
This example shows how to handle the RS485 communication via UART and UART-RS485 MAX481 converter. There is also a function implemented for each line termination via the 74HC595BQ shift register. After flashing both ports should send and read data from each other.
Console output
I2C Scanner
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Link to repositories:
Description
This example scans through the I2C adresses from 0x03 to 0x78 and lists all available devices. It can be used to detect new I2C devices connected to the board.
Console output
Ethernet
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Link to repositories:
Connection
ETHERNET adapter should be connected to WLAN with a RJ45 cable.
Description
This example demonstrates basic usage of ETHERNET driver. After flashing the CGE2 will try to obtain an IP address in a network it will be connected to. Once it will be done it will be possible to ping the device in this network. This example is a good base for developing own network solutions.
Console output
WiFi
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Link to repositories:
Description
This example shows how to create a Wi-Fi station or access point with CGE2. Access point is a device that hosts WI-FI network. Station is a device that can be connected to an existing Wi-Fi network. User can add their own network names, passwords and security features. Keep in mind that external antenna will extend the range of the device.
Console output
Access point
Station
More Examples
ESP32 Open IoT and IIoT Gateways (P01 & P02)
More examples from Espressif can be found here.
Also the ESP-IDF documentation can found here.
MicroPython examples and documentation can be found here.
Contact Us
- Main web page
- E-mail:
online@redisage.com - Phone number:
+48 71 70 00 140 - Address:
NSG 4L Sp. z o.o.
ul. Trzy Lipy 3B
80-172 Gdańsk
(POLSKA) - More information
Common Resources
Source of common resources used across the Open IoT and IIoT Gateways documentation
Tables
Specifications
Redisage PN |
P01 |
P02 |
|
Ports |
RS232 |
- |
- |
RS485 |
- |
- |
|
RS232/RS485 |
2x |
2x |
|
Microcontroller |
ESP32 |
||
WiFi |
N/A |
802.11 b/g/n 150 Mbps / 2.4 GHz |
|
Bluetooth |
N/A |
v4.2 BR/EDR and BLE |
|
SMA socket connector for WiFi/BT antenna |
|
|
|
Tactile switch |
|
|
|
Power |
Voltage |
12-30 VDC |
|
Power |
< 1 W |
||
Frame ground protection |
yes |
||
Baud rate |
up to 115200 bps |
||
LED indicators |
power, link activity, programmable RGB |
||
RS485 termination |
120 ohm manually enabled |
||
Connector |
RS232/RS485 |
8-pin terminal block max. 2.5 mm2 wire |
|
Power |
3-pin terminal block max. 2.5 mm2 wire |
||
Ethernet |
RJ45 |
||
Transmission |
RS485 |
max. 1,200 m at 9.6 kbps; max. 400 m at 115.2 kbps |
|
RS232 |
max. 15 m at 115.2 kbps |
||
Mounting and enclosure |
DIN rail, plastic PA - UL 94 V0, black/green |
||
Temperatures |
-40°C to +75°C operating and storage |
||
Humidity |
10 - 90% RH, non-condensing |
||
ESD protection |
±4 kV contact discharge / ±8 kV air discharge |
||
Certification |
CE, RoHS |
Pin assignments
P01 |
P02 |
Introduction
ESP32 Open IoT and IIoT Gateways (P01 & P02)
Open IoT Gateway is also called as a PAC (Programmable Automation Controller). PAC products combine the functionality and openness of a PC, the reliability of a programmable logic unit like PLC and the intelligence of I/O modules with flexible software tools for a wide range of applications from data acquisition, process control, motion control to energy and building management.
Our PAC family includes FreeRTOS PACs and MicroPython PACs for different requirements in OS, CPU and development platform.
The P01 and P02 Gateways are based on ESP32 Xtensa LX6.