⚙️🎃💡Automatic Halloween pumpkin light

Recently we went out to carve some pumpkins for Halloween. After we finished our beautiful work my son asked me: “Dad, will they glow in the dark like my marmalade Lamp?”. My first answer was “no”, but then I thought, “Hey, why not 😄?” and on the same day I went to tinkercad to design a circuit.

The automatic Halloween pumpkin light in action

The Idea

I wanted to have a light which turns on automatically when it dark outside. This light must be kinda watertight because it will be used outdoor inside a pumpkin and the circuit should be easy to build. I ended up with this circuit designed in tinkercad.

Image of the circuit from tinkercad
Basic circuit (image from tinkercad)

The circuit works as follows. The N-Channel MOSFET works as a switch. If the voltage on the gate (left pin) is higher than 2V, current can flow from the drain (center pin) to source (right pin). This turns on the LED. The gate is controlled by two resistors. One fixed value and one LDR which has a high resistance in the dark and a low resistance when its exposed to light. These two resistors form a voltage divider and control the voltage at the gate.

So during the day the resistance of the LDR is low which decrease the voltage at the gate and turns the MOSFET including the LED off. From dawn on the resistance of the LDR is getting higher which increases slowly the voltage at the gate. This also slowly turns on the MOSFET and the LED, perfect 😁.

In the real circuit I changed some parts because they weren’t available in tinkercad. The red LED incl. the dropping resistor will be replaced with an cheap white LED strip. The batteries will be replaced by an Li-ion battery incl. changing controller. Last not least I added a switch to the battery to turn everything off if its not in use for a longer time.

Parts list

For the automatic Halloween pumpkin light 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 fees or costs to you

All components needed for the project
All components

Breadboard time

Before I fired up my soldering iron I hooked put together on a breadboard, because I wanted to know which resistor value works best for my LED strip and MOSFET. First I started with a 100K resistor but using that value the gate voltage was only 2.2 volts, if there was no light on the LDR. Because I wanted to have a higher voltage at the gate, to turn the MOSFET completely on, I went with an 86K resistor. That increases the voltage at the gate to about 2.9 volts which turns the MOSFET nearly complete on.

Besides of finding the right resistor value I was also able to measure the current used by the whole circuit. ~130 mA incl. the 20 LED’s, not bad🤓.

Circuit from tinkercad on a breadboard
Circuit on a breadboard

Start soldering the power unit for the Halloween pumpkin light

I started with the battery and soldered the wires to it. If you’re like me, add some electrical tape for extra safety.

Top view, battery with wires
Battery with wires

After that, I cut the positive wire in half, added heatshrinks and soldered the switch to the wire.

Front view of the soldered switch to the battery
Soldered switch

To complete the “power unit” I added the USB-C charging unit to the battery by soldering the wires to the battery pads on the circuit board.

The charging unit wired to battery
Wired charging unit for the Halloween pumpkin light

Move on to the transistor circuit

Then I moved to the tricky part. Even if the circuit looks simple it kinda confused me during soldering, so I had my tinkercad circuit next to me and double checked every wire if I had to add a hearshrink or not.

With that preparation I continued soldering wires to the LDR. Because it will be exposed to the weather, I added some transparent heatshrink to protect the LDR from the rain.

top view of LDR with wires and heatshrink
LDR with wires and heatshrink

After that step I soldered some wires to the LED strip and drilled two holes in my enclosure to put the wires from the strip and LDR trough it. It’s important to do that before soldering the other components to the wires! Trust me, I did that mistake about 100 times 😄.

Top view of LED strip and LDR wires inside the enclosure.
LED strip and LDR wires inside the enclosure

With my tinkercad drawing next to me I added heatshrinks to the LDR wires and soldered them to the gate (left pin) and the source (right pin) of the MOSFET.

LDR wires soldered to the gate and source of the MOSFET
LDR soldered to the MOSFET

To create the voltage divider I added the 86K resistor to the gate (left pin) of the MOSFET.

86K resistor soldered to the gate of the MOSFET
86K resistor added to the gate

Then I soldered the negative LED strip wire to drain (center pin) of the MOSFET. Same as before, don’t forget the heatshrink 😉.

Topview of the negative wire soldered to the drain of the MOSFET
Negative wire soldered to the drain of the MOSFET

To create a connection for the “power unit” I cut off a piece of wire and soldered it to the positive wire of the LED strip. Then I slid a heatshrink over the two wires and moved the heatshrink from the LDR up to the MOSFET before I soldered the two wires to the resistor.

Deatil view of the positive wires connected to the resistor
Positive LED strip wire and spare wire connected to the resistor

Almost done

After finishing the voltage divider I slid up the heatshrink from the drain of the MOSFET and soldered a negative spare wire to the source of the MOSFET. This wire will be also connected to the “power unit”.

Image of the complete soldered MOSFET
The finished MOSFET

In the last step I secured all connections, heated up all heatshrinks and added a big one which fit over the MOSFET. So I ended up with a nice little package.

Front view of the MOSFET with all heatshrinks shrinked
MOSFET with all single heatshrinks
MOSFET with large heatshrink
MOSFET with large heatshrink

The final steps

To complete the wiring I soldered the two spare wires from the MOSFET to the “power unit”.

Image of the final soldering
MOSFET soldered to the “power unit”

Now it was time to put everything into the enclosure and wrap the LED strip into the transparent heat shrink. Last not least I added some hot glue to the holes of the enclosure to prevent moisture inside the pumpkin 🎃.

Image of the finihed project while its charging
The finished automatic light during charging

Sum up

And that’s it, the automatic Halloween pumpkin light is done🎉. If you turn on the switch and cover the LDR with your hand, the LED strip starts to light up.

This was a really fun project; from the idea to tinkercad over to the breadboard till the final soldered result.

As always, if you like this project feel free to share it. If you have any questions, just write a comment or ping me on twitter 🐦.

🖼️ 💡🎨Baroque picture frame lamp

Combining old and new things is something I really like. I often see things and think: “Woaw, how would that look with LED’s on it?” I also like to be inspired by others and try to rebuild projects they built. That happened to me lately as I saw the frame lamp, Paulus from the Home Assistant team built. The idea was so cool that I wanted to build my own version of this frame lamp, so I started to look for the components I needed for this project.

Frontview of the finished baroque lamp
The finished lamp with rainbow effect

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

Top view off all parts
All components

Start building this thing

Start with centering the Dig Uno case in middle of the backside of the frame and screw it down. The case and the two angles will work as stands for the frame later on. Alternatively you can skip this step if you want to hang the frame.

Top view of the open case screwed on the backside of the frame.
Dig Uno case screwed on the backside of the frame

Next up, solder three cables to the beginning of the led strip. If your strip is brand new you can simply snip off the connector because the wires will be connected directly to the Dig Uno.

Top view of three cables soldered to the beginning of the LED strip
Soldered cables on the LED strip

Cut the strip

In this step, the strip will be cut and lined up with the frame. Check the dimensions of the frame and cut the strip in parts so that it fits on the backside including the corner connectors. This step is just to find the right dimensions for the strip, don’t glue it down yet.

Backside of the frame lined up with the cut LED strip
Aligned strip on the backside of the frame

If the strip has a good length for the frame, connect the strip using the corner connectors. If you’re using IP65 strips like I do, you have to cut off a bit of the silicone coating.

View of the connection with corner connector and LED strip
Strip connected to the corner connector

Testing and hot glue

Before you glue down the strip to the frame, give it a test using a multimeter in continuity test mode. You should test the positive and negative rail to ensure that both have a good connection. Keep in mind that this will not work on the data-rail of the strip. If one of the two rails don’t work, check the connections on the corner connectors.

Image of the continuity test
Testing the connections

Next up, pull off the blue PVC from the double sided tape on LED strip and glue it to the frame. Then heat up you hot glue gun and hot glue the heck of it 😅 ensure that all corner connectors are glued down to the frame so that nothing can fall apart or loose connection.

Top view of corner connector glued to the frame
Corner connector glued down

If you have so much trust into the double sided LED strip tape than I have, you can add some extra hot glue to the strip.

Image of LED strip glued to the frame
Double secured LED strip 😬

Connecting the Dig Uno

In the final section we will connect the Dig Uno to the strip and place it into the case. If you don’t know what a Dig Uno is, no problem! You can find all information about it on the quinled.info website. You can either buy a pre-assembled board with WLED installed or, if you’re a DIY lover like me, you can build the DIY version and get your hands dirty, which is a lot of fun 🤩

So grab the Dig Uno and place it into to case mounted on the frame. Then connect the LED strip to the controller board.

Dig Uno connected to the LED Strip.
Connected LED Strip

Last not least connect the power supply to the Dig Uno as well.

Power connected to the Dig Uno
Connected power supply to the Dig Uno

Build the stand

This step is optional, if you want to hang your frame lamp. But if you want to stand up the frame the angles on corners of the frame will give the whole construction more stability. So take the angles and screw them to the corners of the frame.

Angle screwed on the backside of the frame
Angle stand for the frame

Final test

That it! So turn the frame and power it up to the the awesome result 😎 The frame works best on a white background, cause this will reflect the LED light better than a dark background.

Front view of the finished frame lamp
The final result

Sum up

I really like this project, because its easy to build, requires nearly no soldering and it just looks beautiful. Big thx again to Paulus form Home Assistant for this idea and stunning result. 🤗

🧊🚥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.