Hi. I have a arduino mega connected to index rgb led strip . The fact is that the connectors and works properly. turn on and off the LEDs I want but while running a few minutes go crazy and it do not respond. The code is ok because I try and test the codes and woks fine about 30 minutes and then crash.
What happen?
thanks
Have you checked the power supply
Are you overloading it?
Yes a checked the power supply. Its ok .
i use a 200W 5V 0-40A power supply to 4 meters 5050 rgb leds.
thanks
Why don’t you post the code - and see if someone can help you
Without seeing your code it will be difficult to know for sure what is happening.
Does the crash affect the entire strip or just part?
How is the power connected up to both the strip and the Mega?
Or better, could you provide a sketch of the connections?
When it ‘crashes’, is the Mega still running normally?
You say both your code and the example code(s) crash (eventually), is this correct? If so, it does indicate a power problem - most likely. You don’t indicate how many LEDs there are in the strip. Although you have a 200W power supply, it is unlikely the strip can distribute this - hence the question of how the power is all connected up.
It is correct Adam. The crash affect the entire strip.
I connected the strip to power supply and data to mega and the other data pin to land in mega.
The mega running normally when crashes.
All code work correct but eventually crash alls codes and i need wait a day to it work correct.
The strip have 224 leds.60 leds per meter.
Sorry but my enghlis is very bad. Thanks
Don’t worry about your English. Probably a lot better than my Spanish.
Not sure what to suggest. Don’t know why it would latch up for a day. Most things, if you turn the power off/on, come straight back to life.
Have you tried a 100R series resistor on the data in pin of the LEDs? You could also try a 1K pull up or a 1K pull down., with and without the series resistor. Might stop some signal ringing that could corrupt the data stream.
Have you a short strip (say 12 LEDs) that you can test with, without cutting what you have already. See if that works OK.
You said you connected the strip to power, and the data lines to the Mega. You don’t say how the Mega is powered. If it’s powered separately from the strip, they must share a common ground. Connect an additional wire from the strip’s ground to the Mega’s ground.
ok thank you all.
I tried a 1k resistor to ground and series. I’ll try putting it to 5v.
if I disconnect all plugs still the same problem until after some time.
I have a smaller strip led only have this.
The mega is powered by the computer. And the LED strip with a power supply. It is a LED strip with input and output. One end connected to the pin data from the arduino and the other end to GND in Arduino. is it ok?
thanks
You don’t say what LED strip, which drivers, how many connections. Without proper information all any of us can do is guess till the moon turns blue. All strips have two wires for power and at least one (or two) wire for data (and clock). If you are powering the controller separate from the LED string, then you must connect a ground wire between the controller and the LED string as well as the data (and clock) line. So the LED string gets power from the supply, the mega from the computer. You should have a data and ground wire from the LED string going to the mega (and maybe also a clock like, I don’t know.)
Hello! today been functioning properly. I will continue doing tests.
The only difference is that I have put additional ground wire of the power supply to the arduino. I think the problem was the static electricity …
That’s not static, that’s because you didn’t have a common ground, something that is required when you are using multiple power sources. If both the Mega and LED strips were powered from the same supply, then you wouldn’t need the extra wire.
Ok i understand. Thank you for your comment.
I often put a serial.print"working"; at the beginning of the sketch, and if all goes pear shaped I can look at the serial monitor and see if it’s the sketch, or the LEDs that have gone wrong.