Introduction: Synesthesia LED Strip
First of all, sorry for my bad English. I'm an INTP with minimal social skills.
This strip of 150 addressable LED-s shows colors in 24 bit resolution. My control software assigns colors with the sounds of music played on a PC or recorded with a stereo line input, and displays them on the LED strip. I feel the sounds like colors since I was born. With this gadget I wanted to give a similar experience for those people who can't imagine this. I tried to put together an effective and simple thing at the same time. I divided the strip into 3 parts: two 2 meters long vertical sections, and one 1 meter long horizontal part between them.
On the horizontal part, the LED-s are illuminated to match a sound's tone. Their brightness also varies with the sound's some properties. Shiny or pale lights appear on the horizontal strip at different locations depending on their stereo spatial position, and they slowly go out.
Vertical parts display colored fountains or flame-like splashes, flowing, running lights, depending on the 'emotional' :-D charge of the music. Sometimes it shows pleasant, soothing, and sometimes raw and dazzling colors. It's not black magic. It works based on buffering spectrum data, averaging and comparison, and averages comparison and comparisons of differences over time and averaging this, and combining theese variables. There was a little brainless experiment under the influence of some alcohol. Please, somebody help me to understand my code:-) .
Total brightness changes sharply with the dynamics of music. This is also based on buffering, averaging for short a long times, and comparing theese with new samples.
The main program, which generates color data from audio is written in processing/java. The system uses an Arduino UNO with a simple and fast code to transfer the data to the LED strip. The maximum refresh rate is 60 FPS, but can be reduced during operation.
Step 1: Parts
330 Ohm resistor
2x 10cm jumper wires
small shrink tube to cover the resistor
RGB addressable LED strip with WS2812 LED-s
Power supply for the LED-s:
U=5V well filtered
I=150x3x20mA=9A minimum current load
DC connector socket, if needed for your power supply
PC and soundcard with recording from STEREO mixer, or STEREO linein
Step 2: Software
Step 3: Tools
Hot air gun or lighter
Small wire cut pliers
Step 4: Safety
Before start any work: sit down, and think about safety!
If you do not have soldering practices, ask someone who can help you. If you are a child, always be there an adult with you who is experienced in electrical work, and make sure that no accident occurs. If you drill, cut, file, solder something, or go to power up an unboxed experiment device, always wear eye protection!!! An eye will never be the same,if once injured, and your life go to trash with your project. If a small bad capacitor launches from a board with the speed of sound, you can't protect yourself, even if you're a ninja. Keep away flammable materials from your workplace. For example, the power supply used here can deliver up to 15 amps in case of a short-circuit. This can easily light up a jumper wire and its insulation is splashed out when burned. You need protective goggles and a non-flammable work tray, plus a closed garment or a cloak.
Step 5: Protected Jumper Wire
You need to cut one jumper wire to 2 half, strip cutted ends about 5mm long. Cut the resistor's wires about 5mm long too. Pull on a small shrink tube first to one wire. Now solder the two
wires to the resistor's two ends. Pull the tube to the resistor, and shrink it with hot air or a lighter. Now you have a short circuit protected jumper wire, that you can use in several projects. You need one here, because the circuit have two power supplies (USB 5V to Arduino and a big 5V supply to LED-s). The two devices do not start at the same time, and there is a voltage
difference between the Arduino data output and the LED data input during switching on. The resistor limits current and protects from LED-chip burnout.
Step 6: Identify Connectings of LED Strip
You need to identify the wires of the led strip. There must be silk printed texts GND, DATA-IN, and +5V near the solder pads. My ledstrip's Power wires are duplicated (for PSU and controller), but has only one data wire, for controller. If no wires, you must solder them to the pads. The other end of the strip has Data-OUT, and power and GND lines, but you don't need them now. Seal them with some shrinktube.
Step 7: Connect Together
Hook up the Arduino with the strip! Arduino's GND goes to LED strip's GND with an unmodified jumper wire. Arduino's D12 goes to the LED strip's Data IN with the resistor protected jumper wire. I twisted them to make more noise resistant. There is a 800kHz very time critical data bus, and long cable kills the data.
Hook your power supply to the LED strip with a DC connector, or with screw terminals, if you have that type PSU. The connector need soldering. PSU GND goes to LED GND and PSU +5V goes to LED +5V.
Do NOT connect the LED +5V to the Arduino +5V, because it can burn your PC-s motherboard via USB cable!
Step 8: Load Code
Now we need load the code to the Arduino. Connect the UNO with an USB cable to the PC, open the IDE, open the .INO file, select board type and com port, and press download.
. You can check the working by open the serial monitor. You need to switch 57600Baud. The Arduino sends a capital K letter for every 2 secs.( I was thinking Hungarian while programming. K=Kérek adatot ! It means: I request data!). If an array of data arrives from the PC, the Arduino processes it immediately,and instantly send a new K letter. It's speed is 70-80 times per second. I set the max framerate to 60 FPS in processing, so no need to wait for data request. The K arrives to the buffer, before I go check it.
Step 9: Start
Now switch on the led power supply! Initially there is darkness. Start the PDE program. A green display shows COM X OK. If there is a red COM ERROR instead, your arduino's port is used by another program. Fix it! The bigger FPS Jitter scope's line must be smooth, or if not, the PC can't stand the speed. Free up memory, or restart the machine with a clean bootup.
Search for your volume control settings, choose recording settings, select mixed output. Set the level about 80%. Set the playback volume to a mild level. Open your favourite media player or webradio, etc. If you hear the sound, the program also must detect it. The Red-yellow No signal lamp disappears, and the LED strip starts to work. If you need any help, please write a comment.
Participated in the
Make it Glow Contest 2018