not-matt / Systematic-LEDs

Audio reactive, all in one, room lighting for your computer.
MIT License
100 stars 35 forks source link

I simply can't get the LED's to work #45

Closed Cthulhu1992 closed 6 years ago

Cthulhu1992 commented 6 years ago

My Hardware: LED WS2812B (40 LED's), NodeMCU v3 ESP8266 CH340G, DC supply (5V, 20W)

I'm following the guide on youtube https://www.youtube.com/watch?v=W4jaAgjfvG8, and after many tries I can get the visualization to work. It detects sound on my PC and I can see the visualization on the program. Pings are ~100/60 in console output, program says ~60/60. So I guess the software runs as it should.

Now I was (still am) a total newb, this is my first real project with Arduino/python etc. So there might be things, not explained in the guide, that I missed.
Here's what I tried to troubleshoot:

  1. Checking Hardware. Wires are all connected to each other, tried it with and without 1000uF Capacity. LED strip works (tested directly on PC). DC supply works (can light up a single LED and power the board). Board works (can ping it with and without connected to the PC via USB).

  2. Board Output. Tested with a simple program to light up a LED periodically works. I connected it to the D7 pin (RX2 pin) as advised on another guide. Tested the actual program with different pins, but FastLED says they are invalid.

  3. general troubleshoot. (Re-)installing Firmware, Checking LEDnumbers/ports/IP's/MAC-adresses to match up in every file. Changing directories (Arduino IDE and Anaconda are on another drive than the actual code, is this a Problem?)

I don't know what else I can do, I'm pretty desperate right now.
My biggest concern is, that the tutorial says to use Pin number 5, whereas the Pinout https://github.com/opendata-stuttgart/meta/wiki/Pinouts-NodeMCU-v2,-v3 says that RX0 Pin is on Pin D9 (3). Tried Pin 3, but it still doesn't light up the Led's.

I don't know if this fit's in here, so feel free to delete this thread. I just don't know what to do anymore.
If it helps I can attach pictures of setup with more details.

blassbasti commented 6 years ago

@not-matt any guesses about the pin number here?

Cthulhu1992 commented 6 years ago

@not-matt any guesses about the pin number here?

I honestly don't know. I tried several Pins now, without any success (Error or no output again). Either my Rx0 Pin is faulty or the pinout is wrong/different somehow. I can't test the Rx0 pin, because I don't know how it outputs signals. It wouldn't be too far fetched to assume it's faulty, because my first NodeMCU board was faulty at arrival too.

I decided to tinker with my raspberry for now and get comfy with writing my own code and working with LED's. Once I have more knowledge I hope I can get back to this project. It might very well be, that I did some Rookie mistake not mentioned in the tutorial.

DTopp commented 6 years ago

I've made a few of these now and the only time I had a complete failure was when using a board made by Lolin. This board behaves in the same way as yours, seemingly everything is fine with it but it just will not output to the LED strip. All of my others are made with Amica branded boards such as this one and work fine.

I'm not sure why the Lolin board doesn't work as it is a v3 and supposed to be compatible so if yours is made by Lolin as well that might be the problem. Or maybe we were both unlucky enough to get dodgy boards.

The pin that your data cable should be connected to is marked RX on the board and as far as I can recall I didn't need to make any pin changes in the .ino file to get it to work with the Amica boards. I've attached an image of both boards with the RX pin underlined, you probably won't need it but it may come in handy if the labels on your boards are too small to read or smudged. Might prove to be helpful in comparing your board to what I have to see if they match.

Hopefully this will be of some use to you.

nodemcus

DTopp commented 6 years ago

Finally managed to get my Lolin board working and it turns out that my problem was with a difference between how the boards are made. I normally power my boards with one USB cable. The cable powers the NodeMCU via its micro USB socket and then I run two wires from VIN and GND on the NodeMCU to the power connector on the LED strip.

On the Lolin board it appears that the VIN pin only provides power one way, so it can be used to power the board but the board cannot power the strip.

The LED strip that I use has three wires running into a connector block (GND, D0, 5v) plus two extra wires to provide extra power if needed (these are soldered to the same points as the wires in the connector block). Providing power to these extra wires will power the strip and the NodeMCU. So now I have USB power going directly to the strip on the extra pigtail wires and then I connect the other connections to the NodeMCU as usual.

For the couple of minutes I tested it, it seemed to work fine. I've provided a couple of pictures and I apologise in advance for the quality. The Lolin NodeMCU is too large for a breadboard so as everything is connected directly to it, it made it difficult to get a decent shot as it wanted to flip over.

First image has the pins highlighted for GND, 5v and Data, second shows how to connect it. Those crocodile connectors are wired into a USB plug and it's all powered by a powerbank. I know it's recommended to have a resistor on the data line plus a capacitor for the power in the circuit as well but that wasn't really possible without a breadboard to hold it all.

nodemcu wiring 1 nodemcu wiring 2

Cthulhu1992 commented 6 years ago

I already tried different powering options, but nothing makes a difference. I honestly suspect it's just another faulty board (I went with the Lolin ones). My first one I purchased wasn't even recognised by anything. Then I got a 2nd one replaced for free with an extra USB-cable and it still appears to be faulty.

By now I didn't want to lose interest in working with LED's by some faulty boards or a mistake I did and can't find the solution for. I'm working now on my own LED program with a Pi 3B and it's working great so far. It's just shitty small animations and probably won't ever be reactive to anything, but I have fun with it.

Thanks for your input, I might try another board by a different manufacturer for the next time, or go straight with the Pi-variant maybe. Glad you got your Lolin fixed somehow!

not-matt commented 6 years ago

Hi,

I've had some issues with the board as well. I'm going to try setting them up using WLED rather than the Arduino code on my repo (doesn't work idk why). For a temporary fix, I switched the output pin to D8 on the firmware then used that instead. Doesn't work half as well as RX should though, hence the switch to WLED.

On Mon, Oct 22, 2018, 10:50 AM DTopp notifications@github.com wrote:

I've made a few of these now and the only time I had a complete failure was when using a board made by Lolin. This board behaves in the same way as yours, seemingly everything is fine with it but it just will not output to the LED strip. All of my others are made with Amica branded boards such as this one http://hiletgo.com/ProductDetail/1906570.html#invite0 and work fine.

I'm not sure why the Lolin board doesn't work as it is a v3 and supposed to be compatible so if yours is made by Lolin as well that might be the problem. Or maybe we were both unlucky enough to get dodgy boards.

The pin that your data cable should be connected to is marked RX on the board and as far as I can recall I didn't need to make any pin changes in the .ino file to get it to work with the Amica boards. I've included an image with the pin underlined on both brands of board. Lolin at the top which I can't get to work and Amica at the bottom.

Hopefully this will be of some use to you.

[image: nodemcus] https://user-images.githubusercontent.com/44050974/47285326-69411c00-d5e2-11e8-816f-03e935835287.jpg

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/not-matt/Systematic-LEDs/issues/45#issuecomment-431780481, or mute the thread https://github.com/notifications/unsubscribe-auth/Ae5azBflqG_1TD7vAQi_3CdMDCskSlbBks5unZT3gaJpZM4Wq9T8 .