Wireless Music Reactive Floor Lamps

39,547

417

25

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

Share

Recommendations

  • Pie Contest

    Pie Contest
  • Pocket Sized Contest

    Pocket Sized Contest
  • Trash to Treasure

    Trash to Treasure

25 Discussions

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

Question 4 weeks 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 26 days 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

3 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 weeks ago

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

0
None
Pagan Wizard

Question 3 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.

2 answers
0
None
cdfixer1Pagan Wizard

Answer 6 weeks 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 weeks 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
gsaini687

6 weeks 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.

1 reply
0
None
cdfixer1gsaini687

Reply 5 weeks ago

Here are a couple of items to double check, code wise:
1. Did you change the number of clients in the master code to equal the number of slaves?
2. Did you change the slave code for each slave to give it a unique ID (1-4 for example)?
3. Did you verify the output pin used in the code is the correct pin you wired your LED's to? You should have the first LED in the strip going green upon power up/Wemos running, and then blue as that slave connects. (This is very important!)
4. Check the pins used for the button and microphone match what the code is expecting.
5. I added an extra LED to use as a logic voltage level shifter, might verify the number of LED's used matches what the code is expecting, in my case I changed 144 to 145.
6. I added output to the serial console in various places (one at a time) to help troubleshoot as I modified/played with the code, perhaps this would help catch where things are stopping? See the serial.print() lines in the code for examples (like serial.print (OpMode) helped verify my button presses were working).
7. NUMBER_OF_CLIENTS must equal the number of working slaves. If you have 2 slaves, then NUMBER_OF_CLIENTS 2 This is very important. The master will not work without the proper number of slaves responding. You will see activity in the serial console, but the slaves will do nothing/freeze.

0
None
prof955

2 months ago

Thanks for sharing but i advice you to work on software and mic side more...
how awful to see it doesnt react the music in sync. i didn't understand how it didn't bother you.

3 replies
0
None
cdfixer1prof955

Reply 6 weeks ago

I am wondering if it has something to do with the controllers used? Or perhaps the microphone module? If it helps in tracking this down, I am using 4 Wemos D1 mini version 2.2 and I am unable to detect much if any latency. They are snappy enough I would have to setup a phototransistor, microphone, and my oscilloscope to detect the difference.

0
None
prof955cdfixer1

Reply 6 weeks ago

I don't think it's about controller.
It seems a software issue to me.
It's about tracking a beat and reflect that

0
None
cdfixer1prof955

Reply 5 weeks ago

I'm just speaking on my experience with the project and code as-is. Mine works and tracks a beat with no perceptible lag. If it was truly a software issue, my setup would show lag/latency.
I have since modified the code a bit to better filter out base room noise as my setup seemed to be pretty sensitive. Which pointed towards my microphone module as being sensitive.

0
None
gevans13

8 weeks ago

If I just wanted a single strip to respond to sound, can I just remove the wifi connect parts of your software listing? Not an arduino expert.....yet ;-)

2 replies
0
None
cdfixer1gevans13

Reply 6 weeks ago

In the code you specify how many clients. Set it to 1. As I built mine, I built the master and then 1 slave at a time, adding one more slave as I finished each and increasing the "NUMBER_OF_CLIENTS " number. In the downloaded code, the author has 3 clients specified. Probably due to his failed LED strip. I can attest this project does work with 4 just fine.

0
None
gevans13cdfixer1

Reply 6 weeks ago

Thanks for the pointer, I'll have another good look at the code.

0
None
AWSW2019

2 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. :)

1 reply
2
None
cdfixer1AWSW2019

Reply 6 weeks 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
MikeK270

Question 3 months ago on Step 15

Great instructable, can’t wait to try it. I’m curious what kind of drill press are you using in those pics? I’m shopping for one and haven’t seen anything like that one.

0
None
winneremerald12

3 months ago

Voted. Also, this is legit awesome.