audio-reactive-led-strip
audio-reactive-led-strip copied to clipboard
Leds turn on with constant white light
Follow the instructions how to wire and upload everything up with ESP8266 ESP-12 NodeMCU. Uploaded the code and seems like its working fine and the device has ping from my pc. connected the leds to 10A 5V external power source and started the visualization.py this is the SS from my pc: https://image.ibb.co/e2Gqfx/Untitled.png
buy the leds keep having the bright white light and seems like not been responding
As well if i disconnect the ESP board from the usd cable and only the DC is connected it still light up the leds.
Any idea how shell i check what is wrong?
@Yariv-h For your first question: this is a grounding issue, the LEDs and your NodeMCU have to share a common ground or else you will get these "artifacts". And as for your second question: the LED strip will "remember" the last command send to it, meaning it will stay on even if the ESP is turned off (if the last thing send was to light some of them up), This will also occur when you suddenly stop the visualization in the middle of a song. I think to avoid this you have to edit the Python code to automatically set all LEDs to "off" before closing the window.
@ItsTheJetstream Thanks for the quick answer, here is my setup:
-
5V 10A power source that connected to the leds with capasitor of 1000mf.
-
leds GND connected to the GND on the board second from the right of RX1 pin.
-
leds DL connected to the RX1 pin.
-
Board is connected to the PC using USB cable
Did i miss anything?
@Yariv-h Sorry for answering so late, I think you should use the same power supply for the ESP and the LED strip. I built mine like this:
I used Vin and GND as the power source of the ESP and also connected the LED strip to those pins. However when you do that I would suggest not powering the ESP whilst it is connected to your PC as these two pins are connected to the USBs GND and 5V power. I then connected the RXD0 pin to the LED as written in the guide of @scottlawsonbc and it works fine for me.
But I still have 1 question: what do you need the capacitor for?
@ItsTheJetstream Thanks for the answer!
I added the capacitor via this tutorial for best practice - https://learn.adafruit.com/adafruit-neopixel-uberguide/best-practices
Just to make sure i understand you correctly -
RX pin is connected to the led data External power source is connected to +5v and GND of the led strip The same External power is connected to the board?
Something like that? without connecting the USB
Should i connect the USB as well?
@Yariv-h This setup is how I set up my LEDs, however I am not using such a large power supply but you can still try this as the ESP and LEDs will only draw as much current as they need. Right now I do not have access to my setup so I cannot test your previous attempt and figure out what might be the problem as it should also work. At least the image you sent is what I set up (which works for me with 44 LEDs, this is my testing setup). The only things different are that I do not have the resistor and capacitor but this should not affect the circuit so drastically.
So if it is not an extreme hassle to set up this "alternate" circuit you could try it out. When doing this you do not need to connect USB as the power needed comes from GND and Power 5,0V. When I come home I will set up your previous attempt and check if the error also occurs.
Edit: Another thing you could try is turning the powersupply of the LEDs on before powering the ESP (if you did not already do that), following this guide
@ItsTheJetstream Thanks! the above setup is working! worth to edit the wiki @scottlawsonbc
Thanks for the help!
Just last one question, can you emphasize which file I should edit according to your first comment?
"you have to edit the Python code to automatically set all LEDs to "off" before closing the window"
Thanks again!
@Yariv-h
Edit The basic principle is to check if the "X" (close) button is pressed for the window and then set all LEDs to off before exiting the program. Right now if you close the window it still runs the visualization. This means in order to turn the LEDs off you have to write an event for the used GUI (PyQT) and check if the window gets closed, then send a new packet to the ESP to turn all LEDs off. Right now I do not know how to achieve that as I haven't worked with PyQT yet. The files that you need to look at are visualization.py
and maybe led.py
.
The easiest way to do it would be to add a specific button on the window that first turns all LEDs off and then closes the program completely. This wouldn't be very "beautiful" but it would work.
When I found a way to do that I will let you know. Also maybe there is a way to modify the code of the ESP to detect if there was no change for x seconds and after that turn all the LEDs off, but I guess this is a little bit harder to achieve.
@Yariv-h Good point. Would you be interested in starting the wiki?
@not-matt I have thought about it and have already written a more detailed guide for the ESP but this repository is very inactive and I don't think it will get a lot of attention.
@ItsTheJetstream can you share the other / more active repo?
Thanks, Yariv
@Yariv-h a more active repo with way more features than the current one would be this one. The last commit was 15 days ago. If this repo gets inactive as well I will be starting my own one, until then this is the place to go.
I am also right now writing a detailed guide for this new repo. I will either make a wiki entry or try to merge the .md file into the master branch.
@ItsTheJetstream cool looking forward for the giude. BTW, just ran into these product and was wondering if it would be possible to somehow use the ESP8266 ESP-12 NodeMCU and let it be controlled from android application. I mean to play music from the phone and as well send the signals to the ESP8266 ESP-12 NodeMCU to light up the leds, could be handier than the pc application
https://www.superlightingled.com/dc524v-multifunction-spectrum-dream-color-horse-race-music-controller-1000-kinds-of-pattern-choice-custiom-combination-for-programmable-2811-6803-1812-1903-led-strip-lights-p-883.html
https://www.superlightingled.com/dc724v-new-style-dream-color-led-wifi-music-dmx-cascaded-controller-control-by-android-smart-iphone-device-for-680318122811led-light-strips-p-438.html