The design currently contains four modules, including:

  1. Base module (with NodeMCU, breakout headers, 74HCT125N level shifter and external connectors/spots for DHT22 sensor)
  2. Power Supply module (with AC/DC, DC/DC and POE-level power supply options, to provide the 5V power for the stack)
  3. Analog/Digital IO module (offering expansion of Digital I/O up to 128 signals and 4 channels of 16-bit ADC analog)
  4. OLED/AmbiMate sensor module (offering a 0.96" OLED screen for local sensor data display and support for the multiple sensor AmbiMate MS4 board from TE Connectivity)

The different boards can be stacked in any order (with OLED board on top, of course), and multiple ADIO boards can be stacked together to expand I/O up to 128 channels.

The Kube v2 supports typical ESP8266 firmwares, including ESPEasy, as well as my original Kube firmware (with minor changes for pin layout). With ESPEasy, the different sensors and OLED screen can be easily connected to home automation platofrms like openHAB or HomeAssistant via MQTT.

Boards

This section will describe the currently available Kube module boards in detail, including schematics and any jumper settings required for each board, as well as links to the parts required to build each module.

1. Kube Base Module

The Kube Base module is the only required board in the Kube stack. It contains the headers for a NodeMCU v0.9, v2 (LoLin v3 works, but won't fit the enclosure), as well as breakout headers for all of the NodeMCU pins. With just the Kube Base module, a NodeMCU, a DHT22 sensor, and an OLED screen, you can create this sensor:

The base module contains the following features/headers:

TOP: (NodeMCU side)

DeviceUsageNotes
EXTUsed for external sensor connections, e.g. HC-SR501 PIR motion sensor (D5 NodeMCU pin)VCC pin is tied to JP1, sourcing either 3.3V or 5V DC
JP1Selects 5V or 3.3V supply voltage for the EXT headerDoes not affect D5 pin voltage range
IC174HCT125N 4-channel fast level shifterUsed for I2C/LED and EXT signal pins; Great for LED pixels
D1BAT43 Schottky DiodeUsed between RST and D0 pins on the NodeMCU to prevent boot-up issues during flashing
DHTDHT22 Temperature/Humidity sensorUsed when base baord is used as a remote temperature/humidity sensor; uses D6 pin on NodeMCU
I2C/LEDI2C bus connector header, to allow daughter-boards to connect to the Kube base board and to each otherHas both 5V and 3.3V pins, GND, SCL (D1) and SDA (D2), as well as an additional digital I/O pin (D4), commonly used in LED strip controller firmware

BOTTOM:

DeviceUsageNotes
D1BYP, D2BYPUsed to shift (to 5V via IC1) or bypass (3.3V from the NodeMCU) the I2C Clock (D1, SCL) and Data (D2, SDA) pins within the I2C/LED headerSolder middle pad to either the SHFT (for 5V) or BYP (for 3.3v) pads.
D4BYPUsed to shift (to 5V via IC1) or bypass (3.3V from the NodeMCU) the D4 LED pin within the I2C/LED headerSolder middle pad to either the SHFT (for 5V) or BYP (for 3.3v) pads.
D5BYPUsed to shift (to 5V via IC1) or bypass (3.3V from the NodeMCU) the D5 EXT pin within the EXT sensor headerSolder middle pad to either the SHFT (for 5V) or BYP (for 3.3v) pads.

The full schematic for the Kube baseboard is shown below:

2. Power Supply Module

The Kube Power supply submodule offers several options to provide the 5VDC power required to run the NodeMCU and the entire Kube stack. It is generally not required, since it's perfectly fine to power the Kube with just a USB power supply via the NodeMCU's micro-USB port (accessible via a hole in the base module's enclosure), but if you're going to use more sensors, IO boards, or other external devices, it is recommended to supply power to the Kube stack via this PSU board module.

The Kube PS board module provides three possible configurations, each allowing different input voltages, with 5V DC output.

  1. Using a MeanWell IRM-03-5 AC/DC power supply (110VAC in, 5VDC out) for a wall-pluggable unit
  2. Using MeanWell SLC03x series DC-DC power supplies for multiple input options (12j/24VDC, Power-over-Ethernet, etc)
  3. Using a Rectifier and a Buck Converter to convert low-voltage AC (e.g. a door bell transformer or HVAC thermostat power) to power the kube stack.

NOTE: BE EXTREMELY CAREFUL WHEN USING THE KUBE PS MODULE WITH AC POWER. THE PCB TRACES ON THE BOTTOM OF THE BOARD WILL HAVE LIVE AC VOLTAGE ON THEM. IT IS BEST TO KEEP THE UNIT UNPLUGGED WHILE ASSEMBLING/DISSASEMBLING THE KUBE STACK.

Regardless of which of the 3 power methods you're using, the power input wiring will go through the 2-pin screw terminal(X1), with Line or DC+ on the left terminal, and Neutral or DC- on the right terminal. The line/DC+ line is fuse-protected prior to going to the power supplies. Secure the input wiring with a zip-tie through the two holes drilled below the X1 connector.

The full schematic for the Kube Power Supply submodule is shown below:

3. Analog/Digital I/O module

The ADIO Kube submodule can be used when more I/O is required than the NodeMCU GPIO pins provide, or for a more precise way to bring in analog inputs into the Kube sensor.

The ADIO submodule provides space for the MCP23017 16-channel digital I/O expander, as well as a ADS1115 4-channel 16-bit analog ADC module. In addition, the MCP23017 address pins have been broken out into three headers (AD0, AD1, AD2), which allow addressing up to 8 different MCP23017 chips. In theory, you could stack 8 ADIO submoodules in the Kube stack, for a total of 128 digital I/O pins!

Testing a full Kube stack with an analog differential pressure sensor connected to the ADIO submodule.

The MCP23017 addressing is handled via jumpers on the AD0, AD1 and AD2 headers. Jumpering the left pin to the middle pin sets that address bit HIGH (1) and jumpering the right pin to the middle pin sets it LOW (0). The following table shows the complete I2C address scheme based on jumper settings:

AD0AD1AD2I2C Address
0000x20
1000x21
0100x22
1100x23
0010x24
1010x25
0110x26
1110x27

The rest of the devices on the ADIO submodule are described below:

DeviceUsageNotes
IC1MCP23017 I/O Expander16 channel digital I/O expander
ADS1115ADS11154 channel 16-bit analog ADC module (can also use ADS1015, 12-bit ADC)
X1Channels 1 through 4 (top to bottom) of the MCP23017Wired in using 4-pin screw terminals
X2Channels 5 through 8 (top to bottom) of the MCP23017Wired in using 4-pin screw terminals
X3Channels 9 through 12 (top to bottom) of the MCP23017Wired in using 4-pin screw terminals
X4Channels 13 through 16 (top to bottom) of the MCP23017Wired in using 4-pin screw terminals
X5Channels 1 through 4 (top to bottom) of the ADS1115Wired in using 4-pin screw terminals
X6 & X7GND terminals for the I/O signalsWired in using 4-pin screw terminals
X85V power terminals for the I/O signalsWired in using 4-pin screw terminals
I2C/LEDI2C bus connector header, to allow daughter-boards to connect to the Kube base board and to each otherHas both 5V and 3.3V pins, GND, SCL (D1) and SDA (D2), as well as an additional digital I/O pin (D4), commonly used in LED strip controller firmware

The full schematic for the Kube IO submodule is shown below:

4. OLED/AmbiMate MS4 module

The OLED/AmbiMate submodule serves a dual purpose. It can provide a local display of all the Kube sensor values (if the OLED screen is installed), and with the optional TE AmbiMate MS4 sensor board installed, it can read values such as temperature/humidity/light/audio level/motion/CO2 level/VOCs level, and provide them via I2C to the NodeMCU.

The OLED display used (0.96") provides a good canvas for displaying local sensor data. However, the boards used with these displays are not always standard. I have seen multiple versions of these boards, with different pinouts for the 4 pin i2C interface, e.g. GND/VCC/SCL/SDA or VCC/GND/SCL/SDA. To allow both boards to be installed on the submodule, there are 4 jumpers on the back of the board, that allow swapping of the GND/VCC pins, and SCL/SDA pins, to hopefully match any combination of pins on the widely available modules.

The devices that fit on this board are as follows:

TOP:

DeviceUsageNotes
OLEDOLED 0.96" Display16 channel digital I/O expander
TE AmbiMate MS4 SensorFull Version or Base Version(Temp/Humidity/Light/Motion only)Multi-sensor from TE, with temperature/humidity/motion/light/CO2/VOCs and audio level measurements
I2C/LEDI2C bus connector header, to allow daughter-boards to connect to the Kube base board and to each otherHas both 5V and 3.3V pins, GND, SCL (D1) and SDA (D2), as well as an additional digital I/O pin (D4), commonly used in LED strip controller firmware

BOTTOM:

DeviceUsageNotes
SJ1First OLED pin selectorMatch GND or VCC with your OLED screen's first pin, and solder that side to the middle pad
SJ2Second OLED pin selectorMatch GND or VCC with your OLED screen's second pin, and solder that side to the middle pad
SJ3>td >Match SCL or SDA with your OLED screen's third pin, and solder that side to the middle pad
SJ4Fourth OLED pin selectorMatch SCL or SDA with your OLED screen's fourth pin, and solder that side to the middle pad

The full schematic for the Kube OLED/AmbiMate submodule is shown below:

Software

Use ESPEasy firmware to easily connect the different sensors to the NodeMCU, and send them to your favorite database, or home automation program.

BOM

Full, up to date BOM is available here.

Get the PCB Boards directly from PCBWay!