🧊🚥3D printed cube light with WLED

Today we’re gonna explore a basic LED light setup you can use with WLED. This kind of setup is perfect for small projects which will not handle a lot of LEDs, like our cube light. So we don’t have to care much about fusing, cable thickness and heat dissipation.

cube light with effect in purple
The final cube light

Parts list

For this project we will use the following components

*Some links are affiliate links. If you use them to buy the parts for your project you will help me and my next project. These links will cause no extra fee or costs to you

all parts of the cube light
All components

Doing the math

Even if you’re working on a small LED light project you have to take care about electrical currents and voltages, especially if you want to power your LED’s from a plug socket like we do. So let’s answer some fundamental questions to ensure that our light cube will glow instead of blow, if we turn it on.

What voltage do we have to use?

To keep it simple, we’ll use the same voltage on all of our components. In our case, it’s 5V DC which is pretty secure in combination with low current. We ensure that all of our components use the same voltage, to prevent voltage conversion.

How many LED’s can we use?

The amount of LED’s depends on the amount of current our power supply can provide. The larger your power supply, the more LED’s we can use.

In our project we want to use 28 LED’s. To calculate how much current we will need, we have to sum up the “maximum current per LED” x “the LED amount”. This will give us the current consumption of our LED strip.

In our case, each led of the strip uses 0.06A at full power. This times the 28 gives us a current of 1.68A for the strip. If we now add 0.5A for the D1 Mini, because the controller also consumes power, to our calculation we will get the total current consumption for our cube light which is about 2.2A.

So our power supply has to deal with 2.2A if everything is maxed out. In reality it would be less because no component is perfect, but we wan’t to be super safe 😉.

What power supply do we have to use?

Our power supply has to match in two ways. In voltage and in the current. The voltage must be exact the voltage we want to use in your circuit. The provided current of the power supply can be higher but not lower, because our project will only draw as much current as it needs.

For our cube light we need 5V DC and it will draw a current of about 2.2A at max power usage. So we will use a 5V DC / 2.5A power supply.

Tip: Don’t run the power supply on max current all the time to increase the lifetime.

Prepare the cube light base

After the math we can now proceed building our cube light. We will start with the LED strip. To get a feeling of how the LED’s will fit in the case, lay them out on the sliding plate of the enclosure. The cables will start at the hole in the left down corner. Keep an eye of the direction of the strip. On the strip you will find small arrows which indicate the direction of the data signal. These arrows must point in the same direction so that the data signal for the last LED has to pass all the other LED’s before.

unsoldered led strips
Layout of the LED strip

Now that we know how to layout the strip, we can start soldering it. Start with presoldering all the pads of the strip pieces. This makes wire soldering more easy later on.

pre soldered led strips
Presoldered strips

Now grab some wire and presolder the ends. Take some longer cable for the start of the strip.

pre soldered cables
Presoldered cables

After that, solder the wires to the strip. Use red for 5V, black for GND and green for the data signal. Because we presoldered the strip and the wire we don’t need extra solder now, we just hold the wire on the pad and heat it up to get a strong connection.

3 cables soldered to led strip
Soldered strip

Repeat this process with all the pieces of the strip until you have the full square you lay outed before. During the soldering, check the layout couple times to ensure everything fits on the slide plate.

led strip in square shape
The complete soldered strip

Before we glue the strip to the sliding plate, we will pick our multimeter set it to continuity test mode and check if no connection is broken. Check the end against the beginning of the strip. You should get positive result on the 5V and the GND wire. Because of the LED internals, the data wire can’t be tested that way so this result will be negative.

If the tests are successful grab the sliding plate and glue the strip onto it with the double sided tape on the back.

led strip glued on plate
Strip glued to the plate

Prepare the case

Lets now have a look at the bottom of the enclosure. This will hold the D1 Mini and the barrel-jack, in which we will plugin our power supply. Start with the barrel-jack and presolder the ends. Then check which pin is 5V for the next step.

barrel jack without wires
Presoldered barrel-jack

With the polarity in mind, grab some wire and solder it to the barrel-jack, use the same technique as on the LED’s strips. To prevent shorts add some heat shrinks.

barrel jack with soldered wires
The finished barrel-jack

Now, flip the enclosure and drill a hole into it to mount the barrel-jack. I used a conical metal drill bit to find out the perfect size, but any large metal drill should work too. To secure the barrel-jack in the case use the screw it comes with or use some hot glue.

enclosure with drilled hole and barrel jack
The prepared enclosure

Prepare the D1 Mini

Let’s focus on the D1 Mini and the wiring we need to connect it to the LED strip. If you order a D1 Mini, it will come mostly unsoldered, so you have to solder some kind of pins to it. In my case I had a soldered one laying around, so I used that for the cube light. Besides of the D1 Mini you also need three male pins, two for power and one for the data connection.

d1 mini side view
D1 Mini with pins inside

If your D1 Mini is ready to go, take two of the three male pins and solder them to a piece of wire. These two pins will be used to power the D1 Mini with 5V. Don’t forget to add heat shrinks to prevent shorts.

d1 mini power cable soldered
D1 Mini power cable

Now grab the third pin a solder it to the green wire of the LED strip. This cable will transfer the data which will tell our LED’s in which color they have to light up.

data cable solodered
The data cable pin

Assemble the base

We can now finish up our assembly by soldering all the wires. So slide in the plate into the base and solder all the red and black cables together. This will connect the LED strip and the D1 Mini to the barrel-jack. As same as before, to protect the solder joints use some heat shrinks.

topview of the enclosure with all soldered cables
The complete base

Install WLED

Next up we will program the D1 Mini. So hook it up to micro USB cable an plug it into your PC. Open a Google Chrome based browser and go to the WLED Installer Page.

weld setup page v2
WLED install page version 2

Click on the install button and select your USB device which the D1 Mini is connected to. If your device does not show up you might need to install an additional driver. If so, please try to install the CP210x or the CH341 driver and retry this step.

chrome usb device selection
Connect your device

You have now to confirm that you really want to install WLED on the D1 Mini. After that, the installing process starts.

wled installation process
Installation process

After the installation has completed, click “NEXT” and enter your WiFi credentials. This will add WLED to your home network.

weld setup wifi config
Add WiFi credentials

You are now able to browse the WLED software in the browser. To jump to the main page, just click “VISIT DEVICE”. From that point, you can also find the device in the WLED App, which is available for Android and IOS.

wled finished installation message
Installation successful

Configure WLED for the cube light

Because WLED very versatile, we have to adjust a few settings to make it work for our LED project.

We will adjust:

  • The type of the strip
  • The LED count
  • The LED data pin
  • The power settings

Navigate to the main page of WLED and click on the config icon to enter the configuration menu. After that, click on “LED Preferences” to enter the “LED & Hardware setup”.

weld main page
Got to “Config”

We will now adjust all the required settings. First, change the “Maximum Current” value and set it to 2200mA. This is the value we calculated as we did the math. These setting prevents that our cube light will draw to much current from a software side.

brightness limiter settings
Brightness limiter

Then scroll down to the Hardware setup to change the LED details. Just follow the list below.

Todo list

  • Check the type of the LED strip: WS281x
  • Check the Color Order: GRB
  • Adjust the length of LED strip: 28
  • Set the GPIO pin for the data signal: GPIO 2 ( marked as D4 on the board)
wled hardware settings
Configure the LEDs

Light it up

After installing and configuring WLED, we will put in the D1 Mini back into the base of our cube light. Unplug it from the PC and put into the base. Connect the red / back cable to 5V / GND and the green cable to D4. Double check the 5V and GND connection before power it on.

hooked up d1 mini in case
The connected D1 Mini

We can now bench test the cube light. If we plugin the power supply, the LED strip should light up in” WLED orange”. We can also browse the WLED software and start changing the colors and effects.

bench test
Bench test the light

Last not least, put the transparent cube on top and enjoy the beautiful cube light.

final cube light
Your awesome cube light

Sum up

Yeah! 🤩 That’s it, we’re done! We build an awesome light and learned the basics of LED projects, like power calculation, LED strip orientation and WLED configuration. And that’s only the tip of the ice berg. You can do much more with LED’s and the WLED software, like matrices, sound reactive lamps or syncing effects over multiple WLED instances.

I hope you enjoyed this project as much as I did. If you want, feel free to share a picture of your cube light or the link of this post.

🔌💡DIY night light from a single smart bulb

As I bought my 3D printer I started searching cool stuff to print on Thingiverse. I found this cool night light with an LED bulb in it. My first idea was to use a smart bulb instead and integrate it into my smart home. So this article is about the build of this DIY night light and the traps I stepped into as start working on this alleged easy project 🙄.

The diy night light
The diy night light

Parts list

For this project we will use the following components

*Some links are affiliate links. If you use them to buy the parts for your project you will help me and my next project.
These links will cause no extra fee or costs to you.

All components
All components

Traps I ran into

So simple the 3D printed light body looks like, so tricky it is to print. My first print went quite well until it reached the arms. One of my supports got loose which ends up in a slightly deformed print. My second print got problems on the feet’s. Because the touch points to the bed are so small your print needs a really good adhesion to the bed. Otherwise it simply pops of if it starts to print the 45° angle of the leg. This happen to me several times until I got the settings for a successful print.

Slightly failed print
Slightly failed print

The following settings worked for me. You might experience other things, but if you have no clue where to start, try these:

  • Layer hight: 0.2mm – 0.28mm
  • Support type: tree
  • Build adhesion: brim or raft

Build this boy

Start with cutting the power cord to about 30cm including the plug and strip of the black layer of isolation. You should, at least in Germany, end up with 3 cables. Life (black/brown), neutral (blue) and earth (yellow).

cut cable
cut cable

For the E27 socket we only need life and neutral, so remove the isolation of these and add ferrules to make the connection to the socket easier. Protect the yellow cable with some electrical tape.

Prepared cable with ferrules
Prepared cable

Next, connect the cable to the E27 socket. Slide the cable through socket and connnect the life and neutral wire to it. The direction of the cables doesn’t matter, cause we’re using AC. If the the cables are in place close the E27 socket.

Connected socket
Connected socket

You should end up with something that slides easy into the light body. Slide it into the light body from the top and arrange the cable that it fits into the arms/hands of the body.

Prepared light body
Prepared light body

Use now some hot glue to hold the socket in place and also to glue the hands/arms of the body to plug.

Glued plug
Glued plug

Last not least, screw in your smart LED bulb and plug the night light into a power socket. Depending on your selected bulb configure it the way you have to do it and you are done 🤓.

Night light in action
Night light in action

And that’s it! Besides from the 3D printing part, a very simple project that looks just amazing 😍. I hope you had at least so much fun as I during the build (excl. the failed prints of cause 🙄) and I would love to see some images of your DIY night lights 😊.

🔦👧🧒DIY marmalade lamp you can build with your kids

Couple months ago my kids ask me to build something with them. So I started to think about a small project that is simple and teach them something about electricity and tinkering. I ended up with a rechargeable lamp based on a marmalade jar. As I posted the results on twitter I got some feedback and PM’s on how we built it and what components were used. This article is a complete walk trough of this project including an updated component list.

Marmalade lamp

Parts list

For this project we will use the following components

*Some links are affiliate links. If you use them to buy the parts for your project you will help me and my next project. These links will cause no extra fee or costs to you

All components

Time to teach the kids how to solder

Lets start with the battery. I use 3400mAh Li-ion battery with a voltage of 3.7V. This fits perfect to the charging unit and also lights up the cheap led strip pretty well. This battery comes with already soldered metal tabs, which makes wire soldering much easier. Take some wire and solder it to tabs. Keep an eye on the polarity and the cable colors. Is used red for positive / VCC and black for negative / GND.

Soldered wired on the tab

Next, secure the connections and the sides of the battery with electrical tape to prevent shorts.

Finished battery

Now grab the charging unit and presolder the pads on non USB-C side. The inner pads are for the battery the outer pads are for the load / the led strip in our case.

Presolder the battery and load pads

After presoldering the pad grab the battery and solder the wires to the inner pads. Double check the polarity and the markings on the board. The positive side is marked with B+ and the negative with B-

Connected charging unit

You can now test the charging unit by hooking up an USB-C cable. If it’s in charging mode you will see a red led light up. The battery is fully charged if the blue led will light up. In case you see both leds come up and one of them starts to flicker heavy, you might have a problem with you connection to the battery.

Charging process

Bring up the lights

Before we connect the charging unit to the led strip we have to prepare the wires and the jar lid. First drill a hole into the lid of the jar where the button fits in. I used a conical metal drill bit to find out the perfect size, but any large metal drill should work.

Ready to drill

Now take a piece of wire and separate the black and the read wire. Then cut the red in half and presolder all ends.

Prepared wires

After that solder the to read cables to the button and put it into the lid of the jar. To secure the soldering joints and preventing shorts apply some small heat shrink to the button.

Lid with button

Grab now the led strip and the black wire and solder it onto the negative pad on the led strip. Take then the jar lid and solder one red cables to the positive pad on the led strip. As well as on the button secure the soldering joint with a heat shrink

Led strip connected to the button in the lid

The two wires left over can now be soldered to load pads of the charging unit. Simply red to red and black to black. That completes the circuit and the marmalade lamp is ready for a first bench test. So press the button in the lid and the led strip should light up. If you want, you can wrap the charging unit in some kapton or electrical tape for more security.

Bench test

Last not least, put everything into the jar, screw on the lid and you’re done 🥳.

Final reslut

Some Mesurements

To teach the kids more about current you can calculate approx the life time and the charing time of the by measuring the current which is use by the led strip and which is provided from the charging unit during the charging process.

Current used from the strip

With a usage of 166mA on 3400mAh battery the strip should light about ~20h. The charging unit provides about 630mA. This results in a charging time of round about ~5h.

Charging current

Sum up

That was fun! Hope you enjoyed this project as much as me and my kids did. You could modify this project a bit to make it more secure for younger children, e.g. you could replace the marmalade jar with transparent plastic box from the dollar store. You can also let the kids more customize it. e.g. they could glue some colored transparent paper or sticker on it.

If you like this project, feel free to share the article or an image of the DIY marmalade lamp you built 😉