This multi-coloured cube consists of six 5 X 5 WS2812 LED dots, which are connected to each other by reserved soldering points. Each dot plane is driven by a RP2040 chip. Theoretically, you can make this cube bigger and have more cubes to build bigger and more polyhedra.
Through this project, you can learn the following:
1.understand how the basic RP2040 MCU circuit works.
2.Assembly skills of electronic devices.
3.Skills to implement a colourful dot matrix using WS28xx LEDs.
It would be great if you can get more creative inspiration from this project to create your own exclusive works!
Component List
RP2040 microcontroller × several
Soldering pad × 1
Soldering iron × 1
Low temperature solder paste × 1
Squeegee × 1
Design Circuit
Firstly choose the right components to design the circuit. I am using RP2040 MCU from Raspberry Pi Foundation
https://datasheets.raspberrypi.com/rp2040/hardware-design-with-rp2040.pdf
Create a circuit design on Altium Designer as shown in the figure and then upload the circuit schematic.
The schematic is divided into four main blocks:
1. RP2040 chip
To visualise the components required around the microcontroller, it is strongly recommended not to overlook the decoupling capacitance of the MCU power line and to bring it closer to the pins of the power supply in the PCB design, a capacitance of 100nF is recommended for each power supply pin.
2. Memory chip
I use a QSPI memory chip to load the programme code, and recommend the W25Q128JVS.
3、Voltage regulator
As shown in the figure, the MCU needs 1.1V generated internally by itself and 3.3V supplied externally by a voltage regulator.
4、USB C interfaceAs shown in the figure, Type C is used as the connector. I connected 25 WS2812 RGB LEDs in series with some 100nF decoupling capacitors.Regarding the PCB design, you can choose your own shape. In my project, it is a 40mm x 40mm cube shape.
The PCB design GERBER file can be downloaded from the project file library:
https://make.quwj.com/project/428
Assembly PCB Motherboard
1. Solder the electronic components at the top and bottom one by one, and then solder the five RGB LED panels at the bottom, so that the total six sides form a cube. Note that the solder paste should be evenly distributed when soldering.
2、For those who are not familiar with PCB soldering, you can refer to the GERBER document, especially the BOM and P&P documents. The information can be found in the document library of this project.
3、Using a hot plate to assemble the cube parts, I used low temperature solder paste due to the low temperature of my hot plate.
Note: Don't forget to clean the flux from the assembly board after finishing the assembly.
Burning code
Programming it through the Arduino IDE, presetting the APIs in the Neopixel library and controlling the WS2812 LEDs through an output pin is the advantage of this type of RGB LEDs, we can connect them in series and control them through an output. This project uses one pin to control 150 LEDs.
I used an animation to sort the functions and then added the Pico board to the IDE in the Board Manager.
Note: The first time you run it, the board will not appear in the Arduino's port list when you connect it via the USB port, but it will appear in the port list after simply clicking Upload to accept the code.
The Rubik's Cube code is available for download in this project's file repository:
https://make.quwj.com/project/428
3D Printing CAD Enclosure
As you can see in the picture, you can now 3D print the enclosure. In the enclosure, I used Solidworks to design a nice stand which can be used to hold the Rubik's Cube.
All STL files can be downloaded from this project's file library:
https://make.quwj.com/project/428
Final assembly and testing
The PCB is designed with one side pin connecting VDD, VSS, Din and Dout as follows:
First block --> Second block
VDD --> VDD
VSS --> VSS
Dout --> Din
This is then connected to the Din side of the next block via a Dout side, and so on. Note that the first piece starts with the board with the microcontroller.
Once this is done, add the power switch and power jack connector to the 3D printing bracket and connect the power cables to VDD and VSS on the Tes
Make sure the power adapter is capable of supplying 5V 2A, which may drop to 1.3A when the LEDs are running at full brightness.
Once this is done, the RGB Cube is complete. When the switch is turned on, the cube glows with a wonderful colourful picture