scottlawsonbc / audio-reactive-led-strip

:musical_note: :rainbow: Real-time LED strip music visualization using Python and the ESP8266 or Raspberry Pi
MIT License
2.67k stars 642 forks source link

Help for a total noob #316

Closed banch7 closed 3 years ago

banch7 commented 3 years ago

The amount of Google Chrome tabs I've had open researching this project is insane! But even as a novice to all this stuff, I'm trying my best and hoping to get a bit of help on the final steps.

I bought a NodeMCU v3 off Amazon (in a 3 pack, https://www.amazon.com/gp/product/B0828L4743/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1), and have a WS2812B LED strip (https://www.amazon.com/gp/product/B086BJ8XMF/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1). The LED strip works fine, as I originally planned on using it with the addressable header on my motherboard. The music sync wasn't overly impressive, hence why I am trying to get this project working instead. I am running this with a computer and ESP8266, not RaspberryPi.

I followed all instructions, and am at the stage where I have uploaded the sketch to ESP8266 via Arduino, and run the visualization.py in Spyder (I am running Anaconda as I am on Windows). I am getting a readout in the serial monitor on Arduino image

and as well as getting FPS and visualization in Spyder when I run visualization.py

image

So I believe all that is running correctly. However, I can not get any power to my LED strip. I have tested it a few times using the JST connector into the addressable header on my motherboard, and the lights work when I use something like OpenRGB.

I was initially following this tutorial (https://salvadorvalverde.com/blog/music-led-strip/) which seems slightly different to the one on this Github in terms of wiring connections. Again, I am a complete novice with this electrical stuff. I have a micro USB cable going from USB port on my computer into the ESP8266 which is powering the ESP8266 fine, and then I was following the tutorial I linked above by connecting power cable on JST connector for LED strip to VIN on my breadboard, ground cable on my JST connector to G on breadboard, and then a resistor from the RX on ESP8266 to another spot on the breadboard, where I'd then plug in the data cable from LED strip opposite. No power was going to the LED strip however I don't have a multimeter at the moment so can't test voltages etc.

What is the best way to power the LED strip? If the ESP8266 is plugged into the USB on my computer, would there be enough power to also light up the strip? Totally confused at the moment.

joeybab3 commented 3 years ago

There is not enough power from usb to power 150 leds.

You might be able to get away with 30 if you have a decent motherboard but you should really be using an external 5v power supply.

krjan02 commented 3 years ago

i would stay away from powering the led's with the esp, i did blow 2 of my boards, trying to power a few 5V's. I suggest using an external power supply with an shared ground with the esp

It would look like this:

d is data

LngOO0b

banch7 commented 3 years ago

Appreciate all the help! It's amazing how taking a break after working on this so long, sitting back and going over everything again slowly has great effect. Conveniently at sunset last night, I got power to the strip and not even 30 mins later, after adding in a few grounds to my breadboard, it was fully functioning.

As a novice with practically no experience with circuits, python, etc, it was extremely satisfying watching the strip light up and pulse to my music. I'm going to do some clean up the next day or so and then fine tune everything and see if there is anything else I may need a hand with, but I think for the most part this was a success!

Thanks again :)

RomainWeber commented 3 years ago

Appreciate all the help! It's amazing how taking a break after working on this so long, sitting back and going over everything again slowly has great effect. Conveniently at sunset last night, I got power to the strip and not even 30 mins later, after adding in a few grounds to my breadboard, it was fully functioning.

As a novice with practically no experience with circuits, python, etc, it was extremely satisfying watching the strip light up and pulse to my music. I'm going to do some clean up the next day or so and then fine tune everything and see if there is anything else I may need a hand with, but I think for the most part this was a success!

Thanks again :)

Can you send a picture of the final connection please because i have the same problem

krjan02 commented 3 years ago

@RomainWeber

image

banch7 commented 3 years ago

@RomainWeber

image

I also had to ground the other side of my NodeMCU also, to the breadboard. Not sure why.

joeybab3 commented 3 years ago

Closing this as the original question/issue seems to have been solved.

Khushal-dalal commented 8 months ago

The amount of Google Chrome tabs I've had open researching this project is insane! But even as a novice to all this stuff, I'm trying my best and hoping to get a bit of help on the final steps.

I bought a NodeMCU v3 off Amazon (in a 3 pack, https://www.amazon.com/gp/product/B0828L4743/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1), and have a WS2812B LED strip (https://www.amazon.com/gp/product/B086BJ8XMF/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1). The LED strip works fine, as I originally planned on using it with the addressable header on my motherboard. The music sync wasn't overly impressive, hence why I am trying to get this project working instead. I am running this with a computer and ESP8266, not RaspberryPi.

I followed all instructions, and am at the stage where I have uploaded the sketch to ESP8266 via Arduino, and run the visualization.py in Spyder (I am running Anaconda as I am on Windows). I am getting a readout in the serial monitor on Arduino image

and as well as getting FPS and visualization in Spyder when I run visualization.py

image

So I believe all that is running correctly. However, I can not get any power to my LED strip. I have tested it a few times using the JST connector into the addressable header on my motherboard, and the lights work when I use something like OpenRGB.

I was initially following this tutorial (https://salvadorvalverde.com/blog/music-led-strip/) which seems slightly different to the one on this Github in terms of wiring connections. Again, I am a complete novice with this electrical stuff. I have a micro USB cable going from USB port on my computer into the ESP8266 which is powering the ESP8266 fine, and then I was following the tutorial I linked above by connecting power cable on JST connector for LED strip to VIN on my breadboard, ground cable on my JST connector to G on breadboard, and then a resistor from the RX on ESP8266 to another spot on the breadboard, where I'd then plug in the data cable from LED strip opposite. No power was going to the LED strip however I don't have a multimeter at the moment so can't test voltages etc.

What is the best way to power the LED strip? If the ESP8266 is plugged into the USB on my computer, would there be enough power to also light up the strip? Totally confused at the moment.

bro i'm also a novice in using anaconda and i'm facing a hell lot of difficulties trying to setup the libraries. i installed anaconda, made a virtual environment, then installed packages

  1. numpy, scipy, pyqtgraph installed with no problem
  2. but pyaudio made error but i somehow installed it

fyi i'm not familiar with jupyter so i'm using vs code to run the codes

  1. when i tried to run visualization.py i got this error (pyqtgraph.Qt.QtGui' has no attribute 'QApplication)
  2. i looked for it, i got a few suggestions - like using pyqt5 or downgrading pyqtgraph to 0.11.0
  3. after downgrading i got some other errors

i completely lost, now i've some quarries:

  1. becuase the project is a few years old, i think the packages installed could be of older version
  2. and i also don't know if i should put all the files in my virtual env

Screenshot 2023-11-10 160019

  1. or should i just put the python files

Screenshot 2023-11-10 160029

  1. and i don't know why vs code is not recognizing "from functools import wraps", like which package it is from?

and btw i'm on a windows machine 64 bit

Khushal-dalal commented 8 months ago

plz help someone!!! 😭

joeybab3 commented 8 months ago

plz help someone!!! 😭

Can you open a new issue? I would rather avoid pinging a bunch of unrelated people if possible, thanks