Wireless Music Reactive Floor Lamps

43,470

455

35

About: We are a couple that loves creative projects, and retro gaming. We will be posting anything that we make related to it, with DIY videos, crafts, projects, retro gaming, build logs and showcases. Make sure t...

In this instructable we'll be making some centrally controlled wireless RGB lamps, that responds to music and sounds in the environment! In addition to instructions, the instructable contains:

  1. Schematics
  2. List of components
  3. Link to the code so you can make and modify your own project

Step 1: Planning Ahead

Here are the major components I have used:

LAMPS:

  1. 4x LED-strips: http://bit.ly/144ledstrip
  2. 4x 5v Power Supply: http://bit.ly/5v50wpower
  3. 4x WeMos Wifi Board: http://bit.ly/5v50wpower
  4. Power plug: http://bit.ly/5v50wpower

CONTROLLER:

  1. Sound Sensor: http://bit.ly/dynosound
  2. Wi-Fi board, I used NodeMCU as I didn't have another WeMos D1. Wemos should work.
  3. Push Button: http://bit.ly/push1button
  4. Power Switch: http://bit.ly/powerswitch32
  5. Colored Diodes (blue): http://bit.ly/powerswitch32
  6. Li-ion battery: http://bit.ly/powerswitch32
  7. Battery holder: http://bit.ly/powerswitch32
  8. Charger module: http://bit.ly/powerswitch32

So I had this very clear idea in my head of what I wanted to create. I wanted a central (but portable) sound detector that could pick up surrounding sounds, and transmit them to lamps that could be placed anywhere inside a room, or even a house. Because all audio will be picked up by the same mic, the lamps should stay synchronous. Moreover, I decided to use a sound detector and not an audio jack (albeit I know many would prefer that option), because I wanted it to be completely wireless and also be able to pick up people singing, clapping, or whatever.


The pictures shows my first initial plans, and the schematics that I ended up using for the lamps, and the one I used for the controller.

Step 2: Creating the Lamp Fixture

The lamp "fixture" consist of two basic components:

* Aluminium channel to hold the LED-strip

* Acrylic glass to diffuse the light

The aluminium channels were 1 meters each, and bought at a hardware store. The acrylic glass I cut on my table saw to the width of the aluminium channel. To get the acrylic to diffuse the light, it had to be sanded down to get that frosted look, and also to smoothen the edges the table saw made. I started on 80 grit and gradually moved up to 600 grit.

Step 3: Adding the LED-strips

For this special purpose I am using an Individually Addressable LED-strip, which is also called a Neopixel. If you're not familiar with it, it's a type of LED-strips that lets you reference each diode separately. This allows for some fancy stuff, like giving different diodes different colors, or only lighting up parts of the strip.

I used the adhesive that comes on the back of the strip to fasten it to the aluminium channel, along with some hot glue to make sure it really stuck in there!

Step 4: Fastening the Acrylic Light Diffuser

Now we have to fasten the acrylic light diffuser to the aluminium light diffuser. This step is harder than it sounds, as the edges of the aluminium channels are quite thin. The best way I found was to use some quick drying epoxy on the edges, and hold it steady for about 5 minutes before attaching some clamps to hold it in place until it was completely cured.

Step 5: Beginning the Wood Base

The wood base will be made out of a slab of glued oak wood I bought at the hardware store. As it is quite thin, I will glue several layers together to make a block. I ripped strips of it on the table saw, and used the miter saw to cut 10x10 cm large squares of wood. Then I glued together pieces of two and pieces of 3 together. Once the glue was dry, I could take the 3-pieces high block and use a chisel to create a hole like a mortise for the light fixture. Here it is important to get a nice and snug fit so the lamp wont have much room to wiggle around.

Step 6: Finishing the Wood Base

For the second half of the wood base, the piece with 2 layers glued together, I used the drill press to cut hols in each corner. This is so I could fit the jigsaw and cut out a square in the room, as to make room for the electronics later in the process.

When I had finished the cutting in the upper and lower part, I glued them together before sanding them on the belt sander. Lastly I applied some oil to get the grain to pop.

Step 7: The Lamp Electronics 1

Wiring the electronics with the WeMos D1 Mini according to the schematic I have made, and then putting most of it on a perf board. I am using a LED-connector to simplify the connection to the LED-strip later.

Note: to get the most reliable signal from the Wemos to the LED strip, there is actually good to use a signal level shifter to up the signal from 3.3 volts to at least 3.5 volts. You can read more about it here: https://hackaday.com/2017/01/20/cheating-at-5v-ws2...
Personally it seemed to work fine without it, but I thought I might mention it in-case somebody runs into issues with my schematic.

Step 8: Power Supply

I will use a 40watt, 5 volt power supply. I used a set of connectors wired to the WeMos and to a power plug, so that power could be connected without any soldering, after the plug is inserted into the wooden base in the next step.

Step 9: Adding the Power Plug

Using a drillbit with the same size as the bottom part of the power plug, I drilled into the bottom of the lamp base. using a mallet i pushed it in place. Now you can see it will be quite easy to connect the power, as we have the power connector already soldered to the plug!

Step 10: Final Touches to the Lamp

Okay, time to add the lamp fixture to the base of the lamp. For this I used some quick drying epoxy around the entire fixture, before placing it into the wooden socket. To fasten the electronics I put a small amount of hot glue on the underside of the perfboard, and mounted it with the USB port facing downwards so it would be easy to program later. I connected the power connectors to each other, and the lamps are done! Next up is the controller!

Step 11: The Controller

The first picture shows all the components I used for the controller. They are all listed in the beginning. I used the same techniques as in the lamp base to create the controller box, except there are only 3 layers of wood, where the bottom 2 are hollowed out, and the top one is solid. It's important that the hole in the controller is big enought to fit the battery holder!

In the top plate I traced the microphone holder and drilled a hole with wings that could fit it smoothly!

Step 12: The Pushbutton

To change modes of the lamps, and to indicate if the controller is on or of, we will use a push button lit by a blue led diode. For this I used a push button component to provide the electrical interface to the Wi-Fi chip, but for the actual thing to push on I used a clear gameboy button. I filed away all unevenness from its surface, and drilled a hole in the middle of it. Then I used some hot glue to attach the led diode. With the drill press I drilled a hole big enough to comfortably fit the button. After soldering the electronic push button component to a piece of perfboard (and according to the schematic in the top), I attached the gameboy button with the LED-diode on top of the push button. This way one can click the gameboy button to trigger the button it is glued to!

This assembly was glued into the hole attaching it from the perfboard, on the underside so that the gameboy button would stick up from the hole.

Step 13: Charger Module and Sound Detector

I wanted the charging module to stay flush with the base of the lamp, so I marked its outline and traced it with a pencil. Then I used the chisel to make it sit flush against the wood. In accordance with the schematic,the battery is wired to the charging module, and connected to the Wi-Fi board through the power switch. The LED and push button is connected to the Wi-Fi board. For the sound detector I used some jumper cables, and also soldered it to the correct pins on the Wi-Fi board.

I put all of this inside the box, and glued the charging module in place using some quick drying epoxy.

Step 14: Finalizing the Controller

On the top of the controller I drilled a large dimple in the wood around the microphone module. I will add some fabric there later to hide the module. To cover up the electronics I traced piece of thin veneered balsa to the size of the wooden block. I marked the corners where I would put some legs for it to stand on. I also traced the outline of the power switch, and chiseled out a hole for it. It was very satisfying to plop the power switch in place!

For legs I am actually using some nice looking drawer knobs. To connect the power switch to the power cables, I used some good old cables shoes and crimped them to the cables. This makes it easier to disconnect the entire bottom plate if there is need for maintenance! I used two small screws to hold the bottom in place, which can easily be removed for quick access to upload new pieces of code to the Wi-Fi board.

Finally I added some oil, and cut 3 layers of insect net to fit into the little dimple I drilled in the beginning. And the controller is complete, all that remains is to upload the code to the lamps and the controller!

Step 15: Code and Finished Pictures!

The code I wrote for this can be viewed here: https://github.com/hansjny/Natural-Nerd/tree/maste...

There is one program for the controller, and one for the lamps. It's not perfect, so feel free to improve it and come with pull requests!

The basic operation procedure is like this:
1. The controller creates a new wireless network and waits for connections.

2. The lamps connect, one by one.

3. The controller detects that all lamps have connected, and begins sending out data. It has different operation modes, which can be changed with the button click. In the sound reactive mode, it sends data from the sound detector.

4. The lamps receive the data, process it and dance a bit. It works pretty good. I'm not all too happy about the colours, so I will probably update it and make it behave a bit more interesting if I have time!

Make it Glow Contest 2018

Second Prize in the
Make it Glow Contest 2018

3 People Made This Project!

Recommendations

  • Beauty Tips Contest

    Beauty Tips Contest
  • Games Contest

    Games Contest
  • DIY Summer Camp Contest

    DIY Summer Camp Contest

35 Discussions

0
None
ticasso

3 months ago

Hi and thanks a lot for this EXCELLENT project.

I'm just having a little trouble.

The connection is OK between my NodeMCU (master) and the Wemos (slave).
I added a “print” and the wemos detects the change of the button.

By cons, I have no blue or green led to the connection ... and the LEDs do not light. I tested
D2 and D4, for the D-IN led, but nothing n done.

How is it possible to verify that the microphone send well a value in case it would come
from the input ... and not from the output

The wemos serial show in loop : Sending heartbeatReturned: 8, also sizeof hbm: 8

Thanks Again

5 replies
0
None
cdfixer1ticasso

Reply 3 months ago

Make absolutely sure the syntax your WEMOS is using to refer to its pins matches what you are using, plus matches what pin is in use. The schematic shows one pin, but the code is using another. My WEMOS had to modify the syntax of the command for the pin slightly too, plus the pin.

If all of that checks out, you may have to add the level shifter mentioned in the middle of the project:

https://hackaday.com/2017/01/20/cheating-at-5v-ws2...

0
None
ticassocdfixer1

Reply 2 months ago

Thinks a lot in responding :)
It works now after having restarting from scratch about 10 times !
i'm working now to adjust the input level because it'is depending a lot of the "master box" location.
i've also add 2 bouttons (1 for + and 1 for -) on the slave to slide the "mic" low and high value. it ' s the only way that i've found to adjust the "led volume"
thanks again for this project
0
None
cdfixer1ticasso

Reply 2 months ago

Good to hear you got yours going. I must have gotten a REALLY good microphone, mine is very sensitive, yet still reacts well to loud environments. Maybe it is because I still have not covered the microphone. Exciting modifications you have made! I am in the process of adding an encoder switch to my master so I can select between 1 and up to 8 slaves along with perhaps a test mode. I have also played around with some of the analog leveling commands in the WEMOS module with good results, although my setup seems to work really well.

I did not designer of this project, I am just another person who made it like you.

0
None
ticassocdfixer1

Reply 2 months ago

i've also try to add an Oled Display on the NodeMcu to show the Micro Level input and the Number of clients connected but it seems to be to eavy for the cpu and it didn't react very well after trying it.
U8G2Lib seems to be more liter then Oled Library but doesn't work well to.
It is also maybe i'm writting a code that call the oled screen to many times in the void loop.

0
None
Nerdforgeticasso

Reply 2 months ago

Glad to see you guys helping each others out and figuring stuff out. I'm sorry I can't help everyone, I get so many requests on this project.

One thing: adding a lot of slaves may increase the delay, as this is using the very inefficient wifi protocol. Maybe moving away from wifi, and more into another type of RF communication would be better.

0
None
Tburt321

Question 2 months ago on Step 13

Hello everybody.

I am having problems following the schematics and tutorial for creating the controller. Can anybody provide any detailed photos of the controller wiring?

2
None
AWSW2019

6 months ago

Hello, thanks for this great project tutorial. I have a question about the wiring plan for the controller. Is the wiring of the LED and button in the schematic correct? It looks like the resistor, LED and push button all are connected to the D1 port. Can you confirm that the same connectors can be used on the D1 mini for the controller? Thanks in advance. :)

2 replies
0
None
ekunz83AWSW2019

Reply 3 months ago

I am also very confused by this. I think I would need to see the wiring completed. It doesn’t make sense that the resister is between the D1 and 3v but the 3v is connected to that line and powering it fully.. makes no sense.. but that’s just me.. can someone uploaded images of the final product wired?

3
None
cdfixer1AWSW2019

Reply 5 months ago

The LED is between the 3.3V and GND terminals of the Wemos controller. The 10k resistor is between the 3.3V terminal and D1 of the Wemos controller. The button is between D1 and GND terminals of the Wemos controller. So you will have 3.3V feeding the LED, one leg of the 10K resistor, and the microphone module. Likewise, the GND terminal will be feeding the other leg of the LED, the other side of the N.O. pushbutton, and the microphone module. The LED the author specifies is apparently spec'd to operate at 3.3V. When I built mine, 3.3V would result in a bit too much current, so I had to add another resistor in series with the LED to drop the LED current down to where it needed to be.

0
None
Ghloo

3 months ago

Wonderful instructable, thanks a lot! Have been checking out a couple of similar ones to see different approaches (including audio signal pushed to a custom PCB over a jack splitter directly from the phone, i.e. without a microphone), but yours is hands-down the neatest, most comprehensible and sexiest, if I may say so. Just like seeing a juicy burger in an image and instantly feeling like having one. ;o)

0
None
Pagan Wizard

Question 7 months ago

Is it possible to use epoxy resin to fill the aluminum piece instead of just covering it with acrylic?

You might want to invest in some kind of dust collection, even if it is just an inexpensive wet/dry vacuum and you have to move the hose from one tool to the next. Not only will it keep your workshop much cleaner, but it will also keep your air cleaner too.

3 answers
0
None
GhlooPagan Wizard

Answer 3 months ago

I am going for a testdrive with alu LED channels bought along with proper difusor for cheap in China (check out eBay). They are 50cm only but I am sure you can buy longer ones in your local LED shop. And hey, a shorter strip means lesser current requirements and a cheaper adapter, just in case I fail. At least it made me learn a bit about the LED stripes. ;o)

Also, I may actually try going with nRF24L01 modules first as the Wemoses are still on their way. To that point, I am actually also considering of having two lamps only, one of them being master with microphone and the other a slave, and switch modes over bluetooth (HC06 would do) from my mobile.

0
None
cdfixer1Pagan Wizard

Answer 5 months ago

For me, the gluing the acrylic part down was the WORST part. A local glass shop supplied and cut the acrylic for me for $6, so I skipped cutting it myself. But I tried 3 different glues and 2 epoxies and none worked great. I thought about filling the channel with the resin used in counter tops, but I was a bit worried about heat dissipation. If I had to do it again, I think I would try your idea :)

0
None
cdfixer1cdfixer1

Reply 5 months ago

I purchased some clear shrink tubing as it was much cheaper (am I looking at the wrong resin?) than the resin. Very happy with how that turned out. Plus it protects the acrylic and the aluminum channels I had painted.

0
None
АлексашкаМ

Question 5 months ago on Step 15

good day
I ask for help and I do not know who to contact.
I am from Russia and I don’t know English well, I translate via google translator .. I hope the problem will be clear))
At the moment I have implemented a project on a breadboard and with one lamp (1m of tape), spreading all the “guts” on the floor.
Actually, the problem I have is that with the inclusion of additional modes, for example, a static color or iridescent (most likely even the music main mode too, just that it is not visible there)
The tape begins to gliching with a non-periodicity, after a time the diodes “blink”, then these are 5pcs. then there are 3pcs. which is completely unacceptable especially for slowly iridescent colors, at first glance it seems as if the power connection is bad somewhere, but began to exclude everything in order, (well, as I could):
The tape / block is OK: I filled in the LED demo sketch on arduino nano, connected the tape - it works perfectly
Wemos d1 mini is normal, changed to another. Also poured on it a demo sketch tape, plugged in works perfectly.
Actually, that's why I stopped at the fact that somewhere that is clumsily spelled out in the code, I beg you to help with this, I myself practically do not know how to work ... I was able to add a maximum of additional different backlight modes. Hands down .. and now it would seem to take it and buy a box to all this but no.
Thank you very much in advance for the answer. Link to the codes I use https://github.com/OneDrag/SoundReactive2

1 answer
0
None
cdfixer1АлексашкаМ

Answer 4 months ago

Did you remember to change LED_PIN 2 to the pin your controller is using? I don't know if it is due to version differences in the Wemos modules or a typo, but the author is using pin #D2 in his diagram and PIN 2 in his code. Pin 2 in the code would refer to D4. On my Wemos (version 2.2) modules pin #D2 is GPIO4 and so I changed LED_PIN 2 to LED_PIN 4.

It might be better to change your wiring to use D4 as it will flicker the on board blue LED to show data going to the lamps. It also has a pull up resistor that may help with stability. I used a level converter mod so I didn't have to worry about the Wemos pulling up the data line.

0
None
JakubP41

7 months ago

Hello
great project because I wanted to duplicate it for myself but unfortunately it does not work or you can check the code?

1 reply
0
None
cdfixer1JakubP41

Reply 5 months ago

Code on github works but be sure to make the changes or verifications needed in the slave and master code blocks.

0
None
gsaini687

5 months ago on Step 15

Beginner with Arduino boards. Tried building the project. I seem that master board is not getting connected with the slave board, as slave board does not respond to sound or button commands from led_master board. Any comment/advise will be highly appreciated.