Table of Contents

The Result

The HueCube is a cube that contains 4 RGB LEDs (WS2812B), a WiFi capable, Arduino programmable microcontroller (ESP8285-M3), and additional components for charging and voltage regulation.
This is what the cube looks like. A cube. If you have a 3D printer you can replace the cube with a different shape. See here for examples from the previous version.

The Parts

Note: If you order the PCB from you can also select most of the parts, to simplify the ordering. Aisler provides a service where I can upload my PCB design, and you can order it directly from them. The order/billing has nothing to do with me.

For the complete list of parts see below:

Amount Part Type Datasheet Links
1 Β HueCube V4 PCB Β PCB Β  πŸ’Ύ πŸ›’
1 HueCube V3 3D Print Β STL Β  Β πŸ’Ύ
1 Β Wireless Charger Module Β Module Β  πŸ”Ž aliexpress
1 Wireless Charger Pad Module Β  Β πŸ”Ž aliexpress
1 esp8285-m3 U πŸ”Ž google πŸ”Ž aliexpress
1 TPS2115APWR U πŸ”Ž google πŸ”Ž aliexpress
1 MCP73831 U πŸ”Ž google πŸ”Ž aliexpress
1 MT3608 U πŸ”Ž google πŸ”Ž aliexpress
1 MCP1700 3.3V U πŸ”Ž google πŸ”Ž aliexpress
4 WS2812B D πŸ”Ž google πŸ”Ž aliexpress
2 AO3400 U πŸ”Ž google πŸ”Ž aliexpress
1 SMD LED 1206 D Β  πŸ”Ž aliexpress
1 SS14 D πŸ”Ž google πŸ”Ž aliexpress
6 0.1u C Β  πŸ”Ž aliexpress
2 4.7u C Β  πŸ”Ž aliexpress
2 22u C Β  πŸ”Ž aliexpress
2 1u C Β  πŸ”Ž aliexpress
30 Pins J Β  πŸ”Ž aliexpress
1 22uH L Β  πŸ”Ž aliexpress
1 510 R Β  πŸ”Ž aliexpress
1 470 R Β  πŸ”Ž aliexpress
1 R_PROG (10k*) R Β  πŸ”Ž aliexpress
1 7.5k R Β  πŸ”Ž aliexpress
1 1k R Β  πŸ”Ž aliexpress
4 1.5k R Β  πŸ”Ž aliexpress
1 Switch SW Β  πŸ”Ž aliexpress

The Schematics

Click on the image on the left for the big picture.

I suggest you look at the explanations below first, and then return to the big picutre for it to make more sense.
Lets start with the "Hue" part of the HueCube:

Each WS2812B LED has four pins: 5V, GND, Din, Dout
Which means we need to create a series of LEDs, and attach the power source.
Because the ESP8285 operates at 3.3V we need a level shifter to talk to the LEDs working at 5V. This is not optimal, but works reliably (for me) with 1.5k pullups. Otherwise signal degradation will distort the signal. See this post for more details
The ESP8285 works with 3.3V, so we need a regulator to drop the 3.7-4.2V form the LiPo. The MCP1700 provides 250mA which is just about enough for the microcontroller.

Look at the MCP1700 datasheet (p.2) for details.
The WS2812B work best with 5V, so we need to boost the 3.7-4.2V from the LiPo.

Look at the MT3608 datasheet (p. 1) for details.
To charge the LiPo, I chose the MC73831, because it is very small and simple to add to your circuits.

Look at the MCP73831 datasheet (p. 1,18) for details.
This chip joins two power inputs to a single output. This way it is set to switch to the one with the higher voltage. This means if we connect USB/Wireless at 5V, it will be higher than 3.7-4.2V and the circuit will be driven from this source.
This way we can charge the LiPo without anything connected to it.
Look at the TPS2115APW datasheet (p. 1) for details.

If you look at the single schematics listed above, there is no magic involved. You take the schematics given by the datasheets and join them on a single PCB.


This is what the PCB looks like in REV 3.

I aligned all the pins to one side, so I can use it as a break out board. To get it to work you need to do add a few wires.

(Note: I might update this.)
The parts are placed in the following:
  • Green: the ESP8285
  • White: the WS2812B
  • Red: the 3V3 LDO
  • Blue: the LiPo charger
  • Yellow: the power source selector
  • Orange: the 5V booster
  • Pink: the level shifters
This is the detailed overview on where to place all parts.
To get things started, you need to connect:
  • EN to 3V3, to enable the ESP8285
  • IO13 to J5.1, to connect the ESP8285 GPIO (3V3) to the levelshifter
  • J3.1 to J5.2, to connect the LEDs to the levelshifter output

I recommend you to start doing this on a breadboard to get familiar with the circuit.

The 3D Print

I printed all parts with PLA, using a layer height of 0.2mm. All other settings depend ony our printer ;).

The base of the cube, that holds all the components.
The top/cube of the cube, that is holds the base in the bottom.
The base of the charger, that holds the wireless charger transmitter.
The top part of the charger. I glued it onto the base after inserting the wireless charger module. Make sure to align them as shown in these picutres (above).

The Code

Minimal Setup / Smoke Test

The code example below quickly fades through the hue color space:

#include "FastLED.h"
#define NUM_LEDS 4
#define DATA_PIN 13


void setup() {

  FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);

uint8_t count = 0;

void loop() {
  count ++;

  Serial.println("It still works!");

  for (uint8_t i = 0; i < NUM_LEDS; i++) {
    // set each LED
    leds[i] = CHSV((count) % 255, 255, 255);

The autoconnecting HueCube Network

// TODO :)