The Rack32 is an ESP32-based board with Ethernet and Power-over-Ethernet support built in, and connectors for an SPI display and I2C breakout.
The Rack32 can be powered in a few different ways. There are protection diodes on the board to allow multiple power sources to be connected simultaneously, so it should be very difficult to damage anything by connecting more than one power source. The exception is the selection of 12V vs 802.3af PoE.
Power options are:
- USB. Connecting to a host computer via USB will provide 5V to power the logic of the board, including the Ethernet connection. However, this will not provide the 12V that is typically passed through the I2C header to expansion boards that may be attached.
- Rear power connector. The 3.81mm pitch pluggable screw terminal on the back of the board allows 12Vdc to be connected. The polarity is marked on the PCB. A protection diode prevents power being back-fed.
- 802.3af Power-over-Ethernet. The onboard PoE regulator allows the Rack32 to be powered from a compliant 802.3af Ethernet switch or injector. Before doing this, the jumpers marked “POE BYPASS” must be removed!
- 12V Power-over-Ethernet. You can use a passive injector or a modified Ethernet cable to supply 12Vdc, with positive on pins 4 and 5, and negative on pins 7 and 8. For this to work, install the jumpers marked “POE BYPASS.” These jumpers bypass the PoE regulator and allow whatever voltage is supplied on the Ethernet cable to be sent directly to the 5V regulator on the board. Without them, the power you supply on the cable won’t reach the regulator.
I2C Breakout And Pullups
The I2C Breakout header allows external boards such as the I2C RJ45 Breakout to be connected.
The Rack32 has a pair of jumpers to enable I2C pull-ups. These should generally be left in place, because the Rack32 has an onboard I2C temperature sensor. However, they can be removed if you connect an external I2C board which also includes pullups.
The Rack32 supports an SPI display which can be connected using an 8-way IDC cable.
Because the Rack32 is based on the ESP32, you can write your own firmware using the Arduino IDE, PlatformIO, the ESP-IDF, or your preferred environment. It includes a USB-C connection with a CP2102 USB-to-serial converter and auto-reset circuit, so you can easily upload code directly to the board.
Several different “official” firmware builds are available as part of the OXRS (Open eXtensible Rack System) project, designed to set up the Rack32 for specific applications. Each of these firmwares provides different I/O features to support different I2C expansion boards.
All OXRS firmware is designed to be configured from a web-based GUI that is loaded from your local computer. There is no need to edit the configuration, recompile, and upload it in order to change configuration options. The options are all set via the GUI and saved to flash memory.
OXRS Firmware Options
These firmware builds are available pre-compiled and ready to install:
- OXRS-SHA-StateMonitor-ESP32-FW. Watches inputs and reports changes to an MQTT broker. Typically coupled with the I2C RJ45 Breakout to monitor events on light switches as part of a home automation system. Source and releases available from https://github.com/SuperHouse/OXRS-SHA-StateMonitor-ESP32-FW.
- OXRS-SHA-StateController-ESP32-FW. Listens to an MQTT broker for commands, and drives outputs based on those commands. Typically used to control relays or other output devices. Source and releases available from https://github.com/SuperHouse/OXRS-SHA-StateController-ESP32-FW.
- OXRS-SHA-StateIO-ESP32-FW. Flexible firmware that supports both inputs and outputs. Source and releases available from https://github.com/SuperHouse/OXRS-SHA-StateIO-ESP32-FW.
OXRS Firmware Installation
The Rack32 ships pre-loaded with the latest release of the StateMonitor firmware, because this is the one most commonly used on the board. If you want to replace the firmware, follow this procedure.
- Go to the firmware page on GitHub, and click on the latest release on the right side of the page under the “Releases” heading.
- Download the compiled “.bin” file for either Ethernet or WiFi, depending on your preference.
- Download and install “esptool“, the flasher program maintained by Espressif.
- In a terminal, run esptool with the arguments adjusted to suit your serial port and the name of the binary to install. If you don’t know the serial port, you can use the Arduino IDE to detect the connected device, or use your operating system’s tools to show the available USB devices. A typical command for esptool would be:
esptool.py --chip esp32 --port "COM9" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x10000 OXRS-SHA-StateMonitor-ESP32-FW.ino.esp32.bin
OXRS Firmware Configuration
The example OXRS firmware connects to your network and uses DHCP to obtain an IP address. You can then use the OXRS AdminUI to connect to the device and configure it.
If you have a display connected to your Rack32, you can read the IP address on the display.
If you don’t, you can use your router’s management interface to look up the list of DHCP leases and find the address of the Rack32. How you do this will depend on your router.
- Go to https://github.com/OXRS-IO/OXRS-IO-AdminUI-WEB-APP and download the file called “index.html” to your local computer.
- Open the file locally using a web browser.
- Enter the IP address of your Rack32.
- Select an action from the drop-down list.
- Click “Select.”