Saturday, November 28, 2020

LED Mood Light

I built a funky mood light!

A little while back I wrote about a "crate" subscription service that I had tried out.  It was certainly a lot of fun putting together the ukulele that came with my first kit, but I found out that the neighborhood kids were also quite keen about them too, so I have ended up pretty much giving away a lot of my recent kits to them. I don't really mind - It's very refreshing to see kids tackling something that doesn't involve a screen. 😀

However, once I started getting the kits, I was starting to regularly see online ads for another kit from a company called Creation Crate. I really like how those Facebook algorithms know how I would be interested in these things... 

The particular spin with Creation Crate was that they were almost all electronic projects with a focus on teaching you electronics. 

This actually has a more direct appeal to me since the only formal training I had in electronics was with the course I took to get my amateur radio license - even then it was very much focused on theory.  So far all my hands-on learning with electronics has been at an experimental level. While I can make a few interesting gadgets, I don't really have a full understanding of how things work. The thought of being able to build something and learn why it works was certainly quite appealing. 

Of course, I ordered a crate and in a few weeks, my first project arrived - an LED Mood Light based on an Arduino. 
The crate came with an Arduino Uno, a breadboard, and all the parts needed to build the mood light. 

The mood light went together with not too many issues thanks to the online course that came with it  and soon I had a nice color changing light 

It glows!

The actual circuit itself is very simple with a red, green, and blue LED connected to 3 digital output ports on the Arduino and a resistor and optical sensor connected to an analog input pin on the board. 

The optical sensor is used to tell the Arduino to shut the LED's off when the room is too bright, 

All the LED's are powered by 5 volts supplied by the Arduino. 

As I just mentioned, the kit also included an online course, which required a software key to access, that stepped you through the code required to tell the Arduino how to operate the mood light. 

Since I am not going to spell out how the Arduino was programmed (that would be not fair to the folks at Creation Crate) - but I do encourage everyone to check out the course and the code on their website. 

Electronically, the physical circuit is very basic. 

Circuit Diagram


I was quite pleased with the color-changing effects that the light was making, but I thought it deserved to be a little more jazzed up - make look like something that would be at home on a bookshelf or a nightstand - something a bit classier than a bunch of parts and wires on a breadboard. 

I figured that the perfect solution was to make the light into a snow globe that would be mounted in a solid wooden base. 

The idea would be to have the Arduino and the other electronics live inside the wooden base, with the LEDs and the optical sensor protruding into the snow globe.  

The first roadblock was with the Arduino. I didn't really want to use the Uno that came with my kit since I suspect that I would be needing it for any future kits that I made get.  Also, I didn't want to use the Uno since it seemed a little too big to fit into the wooden base that I had in mind. 

I did however had a bunch of Arduino Nano's on hand that are definitely much smaller 

Arduino Uno and Nano

The only question I had was whether the Nano had the same exact functionality as the UNO despite its much smaller size. 

The only way to find out was to load in the code that I had on the Uno into the Nano and hook up the Nano to the circuit board using the exact same Input / Output pins that I used on the Uno. 

Plugging it in and powering it up confirmed that I had the exact same functionality - I was now able to stuff everything into my wooden base. 

To start the build, I first cut out a 4" x 4" inch block of 2-inch thick piece of oak that I had lurking in my scrap woodpile. 


Cutting out a piece of oak
Block of oak

With the block cut out, I then applied a decorative edge to the top of my woodblock with a round-over bit on my router table 

Round over bit
Adding the edge
Edge applied

For a snow globe, I used a small glass jar that I had picked up at my local dollar store. The jar had a metal screw-on lid which I will use to attach the globe to the wooden base. 

However before I got too far, I needed to make some sort of cavity into the wooden base to store the electronic innards for the light. To make this cavity I decided to use the lid of my jar and drew an outline of the lid on the bottom of the wood base. 

Drawing an outline
Drawn circle

Next, I took my trusty Dremel Trio with a 3/8 inch straight bit and I carved a 1-inch deep cavity into the bottom of the wooden base by following the outline that I had just drawn 

Creating a cavity
Finished cavity

The next step in the process was to create an access hole from the top of the base to allow for access from the globe to the electronics which will be stored in the base. I started off by drawing a straight line from each corner on the top of the base so that I had an "X" in the center of the base. 

Taking a 1.5-inch hole saw bit I then cut a hole in the of the block's top through to the cavity I had cut in the bottom  

Marking the center
Cutting a hole
Hole in the center

As a final step in the construction of my base, I drilled a 3/8 inch hole in the side about a half-inch from the bottom of the base. I made sure that the hole was drilled through to the inside cavity of the base. 

The purpose of the hole is to allow access to the power cable for the light. 

This completed the woodworking part of the build, so I finished the base off with a couple coats of varnish.

Drilling a hole in the side

As I mentioned earlier, I intend to use the jar's lid as the method to attach the globe to the wooden base. To do this I first took the jar lid and drilled a 1-inch hole into the middle of the lid. 

I then centered the lid over the top of the wood base and I punched two indents into the lid's bottom with an awl, making sure that the indents had also transferred into the wood on the base, 

Lid and base
Centering the lid
Marking screw locations

Next, I installed two 1 inch screws at the locations that I had marked with the awl, making sure that the lid was secured as tightly as possible to the wooden base.

Secured with screws

After that, I screwed the jar into the lid and the building part of the Mood light was complete. 

The next step was to install the lights and electronics.

Ready to add electronics

To build the circuit, I all merely did was a direct transfer of the circuit that I had built on the breadboard as per the instructions that Creation Crate had provided to a small perf board that I had on hand.

The components were directly soldered to the perf board and connected with small insulated wires in place of the jumper wires that I had on the breadboard. 

The wire connectors for the Arduino Nano were a short length of jumper wire with pin connectors to plug into the I/O pins on the Nano 

Transferring the circuit to the breadboard
Perf board and Nano connected

To install the electronics into the globe, I first started by mounting the perf board part of the light inside of the jar lid making sure to feed the wires for the Arduino through the hole in the lid down into the cavity in the wood base. I then secured the perf board in place with some hot glue, making sure that I didn't get any glue on the lid's threads 

Perf board installed

Next, I put the Nano inside the cavity of the wooden base and plugged in all the wires from the perf board. 

I then secured the Nano to the base with some hot glue, 

Nano installed

Finally, I fed in a USB cable through the hole in the side of the base and plugged it into the Nano 

USB cable

The final step was to screw the jar back onto the lid and plug in the light. 

Trying it out

I find the effect that the light makes to be quite soothing.


Not a bad result for my first kit from Creation Crate - I suspect that I probably went a little beyond what they would have expected from their average user, but I learned a lot and I am really stoked about the end result. 

1 comment:

  1. You should find the best <a href="https://solderingironguide.com/brands>brands</a> for soldering irons. All the items are stored in a nice plastic box to keep everything organized, and additionally you get an extra small box provided to keep widgets.

    ReplyDelete