====== ItSilesia ESP32 Mobile Laboratory Node Hardware Reference ======
In general, these laboratory nodes share the same physical configuration as the [[en:iot-open:practical:hardware:sut:esp32|ESP32 laboratory of the SUT]] but differ in IP addressing. For this reason, all laboratory hands-on-lab scenarios for SUT are valid for ItSilesia's mobile lab, still keep in mind different services and addressing.
===== Introduction =====
Each laboratory node is equipped with an ESP32-S3 double-core chip. Several peripherals, networks and network services are available for the user. The UI is necessary to observe results in the camera when programming remotely. Thus, a proper understanding of UI programming is essential to successfully using the devices.
Note that each node has a unique ID built into the chip, as well as unique MAC addresses for the WiFi and Bluetooth interfaces.
===== Hardware reference =====
The table {{ref>esp32itsilesianodehardware}} lists all hardware components of ItSilesia's ESP32-S3 node and hardware details such as connectivity, protocols, GPIOs, etc. Please note that some pins overlap because buses such as SPI and I2C are shared among multiple components.\\
The node is depicted in the figure {{ref>esp32itsilesianode1}} and referenced by component numbers in the table {{ref>esp32itsilesianodehardware}}.
{{:en:iot-open:practical:hardware:sut:vrel_nextgen_sut_motherboard.png?560|}}
ESP32-S3 ItSilesia Node
ESP32-S3 ItSilesia Node Hardware Details
^ Component ID ^ Description ^ Hardware model (controller) ^ Control method ^ GPIOs (as connected to the ESP32-S3) ^ Remarks ^
| 1A | 12V PWM controlled fan | Pe60251b1-000u-g99 | PWM | FAN_PWM = 35 | Fan blows air into the pressure chamber (yellow container) to stimulate air pressure changes. |
| 1B | Pressure and environmental sensor | BME 280 | I2C, address 0x76 | SDA=5, SCL=4 | Spinning of the fan causes air to blow inside the yellow chamber and thus causes air pressure to change. |
| 2 | Digital potentiometer | DS1803-100 | I2C, address 0x28 | SDA=5, SCL=4, analog input (A/D)=7 | Digital potententiometer's output is connected to the A/D input of the MCU. |
| 3 | Temperature and humidity sensor 1 | DHT11 | proprietary protocol, one GPIO | control on GPIO 47 | |
| 4 | Temperature sensor 2 | DS18B20 | 1-Wire | 1-Wire interface on GPIO 6 | |
| 5 | 2x16 LCD | HD44780 | Proprietary 4 bit control interface | EN=1, RS=2, D4=39, D5=40, D6=41, D7=42 | 4-bit, simplified, one-directional (MCU->LCD) communication only |
| 6 | ePaper, B&W 2.13in, 250x122 pixels | Pico-ePaper-2.13 | SPI | SPI_MOSI=15, SPI_CLK=18, SPI_DC=13, SPI_CS=10, SPI_RST=9, EPAPER_BUSY=8 | Memory size is 64kB (65536ul) |
| 7 | OLED, RGB colourful 1.5in, 128x128 pixels | SSD1351 | SPI | SPI_MOSI=15, SPI_CLK=18, SPI_DC=13, SPI_CS=11, SPI_RST=12 | 64k colours RGB (16bit) |
| 8 | RGB Smart LED stripe | 8*WS2812B | Proprietary protocol, one GPIO | NEOPIXEL=34 | |
| 9A | Light intensity and colour sensor | TCS 34725 | I2C address 0x29 | SDA=5, SCL=4, Interrupt=16 | The sensor is illuminated by RGB LED (9A) |
| 9B | RGB LED PWM controlled | | PWM | LED_R=33, LED_B=26, LED_G=21 | Each colour can be independently controlled with PWM. The LED is integrated with another, illuminating the colour sensor (9B) so that controlling this RGB LED also directly impacts the other. |
| 10 | Standard miniature servo | SG90 or similar | PWM | SERVO_PWM=37 | Standard timings for micro servo: PWM 50Hz, duty cycle:\\ - 0 deg (right position): 1ms,\\ - 90 deg (up position): 1.5ms,\\ - 180 deg (left position): 2ms. |
The MCU working behind the laboratory node is ESP32-S3-DevKitM-1-N8 made by Espressif ((https://docs.espressif.com/projects/esp-idf/en/v5.2/esp32s3/hw-reference/esp32s3/user-guide-devkitm-1.html)), present in figure {{ref>esp32s3minidevkit}}:
{{:en:iot-open:practical:hardware:sut:20231213_154426.jpg?200|ESP32-S3-DevKitM-1-N8 development kit}}
ESP32-S3-DevKitM-1-N8 controlling the laboratory node
A suitable platformio.ini file for the correct code compilation is presented below. It does not contain libraries that need to be added regarding specific tasks and hardware used in particular scenarios. The code below presents only the typical section. Refer to the scenario description for details regarding case-specific libraries needed for the implementation:
[env:vrelnextgen]
platform = espressif32
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
board_build.f_cpu = 240000000L
framework = arduino
platform_packages =
toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
lib_ldf_mode = deep+
===== Network configuration and services =====
Users connect to the WiFi Access Point provided by the laboratory module. This WiFi is shared for both users (NATed to the Internet) as well as for IoT devices and services.
Figure {{ref>itsilesiavrelnextgeninfrastructure}} represents ItSilesia's VREL Next Gen IoT remote lab networking infrastructure and services. Details are described below.
{{ :en:iot-open:practical:hardware:itsilesia:vrel_mobile-networking.drawio.png?600 |VREL Mobile Lab network configuration}}
VREL Next Gen IoT remote lab networking infrastructure and services
==== Networking Layer ====
The WiFi network for users and for IoT experimentation is available for all nodes:
* SSID: VRELlab
* PASS: VRELlab123
All clients get an IP address from the range of 192.168.0.100 to 192.168.0.200
Gateway is 192.168.0.1, and it is also the address of the IoT VREL management service for accessing devices: [[http://192.168.0.1]].
Note, even if available, the system WILL NOT work using the public IP address.
In this laboratory module, for simplicity and portability of the solution, all clients connect to a single, private, NATed network, including IoT devices and clients (developers/students).
All IoT integration services are also available via this network.
==== Application Layer Services ====
There are currently 2 application-layer services available, accessible for IoT nodes when connected to the VRELlab network:
* MQTT broker:
* IP addresses: 192.168.0.1;
* Port: 1883 (TCP)
* Security: plain text authentication
* User: vrel
* Pass: vrel1234
* CoAP server with two endpoints:
* IP addresses: 192.168.0.1;
* Port: 5683 (UDP)
* Endpoints:
* GET method for coap://192.168.0.1/ that brings you a secret code in the message's payload,
* GET method for coap://192.168.0.1/hello that brings you a hello world welcome message in the payload.