For this Halloween, I'm fusing the creative blocky world of Minecraft with the spooky glow of the colorful RGB LEDs in a fun and simple Halloween project.
A "Color Adjustable Minecraft Lantern" is a project that recreates the iconic lantern from the video game Minecraft. It allows the user to change the light's color to any hue, rather than being limited to the standard yellow or orange glow.
Thanks ----------- Thanks again for checking my post. I hope it helps you. If you want to support me subscribe to my YouTube Channel: https://www.youtube.com/@CrazyCoupleDIY
For this Halloween, I'm fusing the creative, blocky world of Minecraft with the spooky glow
of the colorful RGB LEDs in a fun and simple Halloween project. A Color Adjustable Minecraft
Lantern is a project that recreates the iconic lantern from the video game Minecraft. It allows
the user to change the light's color to any hue rather than being limited to the standard yellow
or orange glow. This video is sponsored by PCBWay. PCBWay specializes in manufacturing
of very high quality, low volume colored PCBs at a very budgetary price. In addition to standard
PCBs, you can also order advanced PCBs, aluminum PCBs, rigid flex PCBs. They also provide PCB
assembly and other related services which can meet your need to the greatest extent.
For this project, we need 1 Arduino Nano, 2 NeoPixel rings, 400kΩ potentiometers,
1,000μF capacitor, 1 100Ω resistor, 1 SPST switch, 1 18650 battery and a holder,
1 TP4056 battery charging module, a DC to DC buck converter, jumper wires and breadboard,
and a 3D printer to print the enclosure. All these components are available through the
The setup consists of three simple circuits. First, the power circuit, a battery that charges
and runs the Arduino Nano. Second, the control circuit, a potentiometer feeding signals to the
Arduino. And third, the light circuit, the NeoPixel which lights up based on the instructions received
from the Arduino. The Arduino reads the potentiometer via its analog pins, generating
values from 0 to 1023. The range is then mapped to 0 to 255 to comply with the Arduino library.
The converted signal is then sent sequentially to the LEDs, lighting them up one by one from
the first to the last. Two key components are required for signal integrity, a 1,000μF capacitor
close to the load to stabilize the voltage and a 100Ω resistor on the data line to protect it
against current surges and dampen signal noise. The code begins by including the Adafruit NeoPixel
library and by defining the necessary pins and global variables. In the setup section,
we initialize the NeoPixel library and immediately run a rainbow cycle across the entire LED ring
to confirm its working. The loop section continuously reads the potentiometer value,
mapping it from a 0 to 1023 range to 0 to 255. You'll notice I commented out the brightness
control section. This is because during my testing, I found that the NeoPixel library's
brightness setting proportionally scales all the RGB values, which significantly alters the LED's
perceived color and intensity. Finally, the code uses the mapped potentiometer values to set the
This creates a direct, real-time control between the potentiometer and the LED's output.
Before putting everything into the enclosure, I hooked them up on a breadboard to test the code.
When I powered it on, you can see that the NeoPixel ring plays a little rainbow animation
and then they are ready to go. Now, when I turn these knobs, the color changes smoothly as the
reads the potentiometer values and updates the LEDs in real time.
I designed a custom 6-part enclosure in Microsoft 3D Builder for this project. You can download the
STL files from my GitHub repository and have them professionally printed from PCBWay. The assembly
includes a base for the main component like the battery, Arduino, and the battery charger,
a TP4056 stopper to secure the charging module, 4 stands to mount the switch and potentiometers,
4 Perspex panels to diffuse the LED light and to hide the electronics,
2 stand covers to conceal the sides, and a top lid to finish the enclosure.
After finalizing the design, I proceeded to 3D print all the required components for the assembly.
These are the custom components I'll need to assemble the final unit.
With all the 3D models printed, I began assembling the electronic components.
I soldered wires to each potentiometer and the SPST switch, then mounted them on their
designated stands. Each potentiometer was secured by tightening its screw with the wires routed
through a small hole in the side of the stand. Similarly, the switch was pressed into its hole
and its wire was fed through the corresponding wire channel. Next, I focused on the battery
charging bit of the circuit. I soldered the battery to the B plus and B minus port of the
TP4056 charging module. A blue wire was used to connect the OUT minus of the TP4056 to the VIN
minus of the buck converter, while the SPST switch was wired to control the connection between the
OUT plus and the VIN plus terminals. Once these connections were complete,
I installed the power components into the base of the unit. The TP4056 module was secured by
supergluing a stopper behind it after sliding it into its place. For the control system,
I soldered all the necessary components for the Arduino on a perf board. While the setup may appear
a bit messy, the final assembly will be fully enclosed. I then hot-glued the two NeoPixel rings
into their positions, the first one to the base and the second one to the top. After supergluing
the second stand, I concealed the electronics by supergluing the side covers on it. Before
installing the Perspex panels, I painted the body of the lantern with black acrylic color.
After the paint dried, I inserted the Perspex panels and superglued the top into place to
complete the build. So, this is how my final setup looks like. This is a classic way to create an
interactive project where you turn a knob to change the behavior of the light. The microcontroller
reads the potentiometer position, converts it into a value and then uses the value to change
something about the NeoPixel, which could be brightness, color or speed. This project encourages
children to experiment with the primary colors to see what new shades they can create. Let me know
what you think. Feel free to like, share and comment if you have any suggestions for improvement.