Addressable LEDs erratic behaviour

Hi all,

This is my first post, so please let me know if this is the wrong forum and I will move the topic. I am using an Elegoo Mega 2560 to control a fairly long chain of interactive LEDs.

The chain is illuminating a periodic table shaped cabinet, and throughout the strip there are groups of 5 LEDs on, then a few off, then 5 on, a few off... That way each group of 5 LEDs is centred in one element of the periodic table, with LEDs off until the next element.

Due to the irregular shape of the Periodic Table I don't have a continuous long strip, but several different sections, so I have to run signal cable between the different sections. Most of these cables are 10-15cm long, but there is one section that is about 250cm in length. The problems seem to start after this cable. LEDs before this longer cable work fine but after this cable, I have my 5 LEDs on correctly, and a further LED on in green that shouldn't be on.

It seems that this long cable is causing the issues. I have tried with shielded cable, with thick cable, and no luck. Altering the voltage to the Arduino seems to have an impact, but I can't establish a clear pattern. At the moment both the LEDs and the Arduino are running from a powerful Meanwell PSU that outputs a steady 5V to all the LEDs. Power to the arduino passes through a step-up DC/DC converter where I can adjust the voltage reaching the arduino to anywhere between 5V and 19V.

My first thought was that a weak voltage to the arduino meant a weak data signal which lost power as it went through the LEDs and eventually failed. But the step up converter should eliminate that possibility. I tried feeding the arduino with a separate 12V AC-DC power supply, and with that, the data didn't reach the end of my chain of LEDs and only the first 20% of them lit up. So power supplied to the Arduino definitly is a factor.

I'm at a loss as I've just basically copied a system designed by someone else. No idea if I should alter power to the Arduino, install more resistors (at the moment there is one between the pin on the arduino and the start of the data signal) or what to do.

Thanks in advance for any help and suggestions, and if you need further information please let me know and I will post it.

Marcos

If you have the proper 5 V which the Arduino actually requires, why are you not using it connected to the "5V" pin? :roll_eyes:

That sounds quite bizarre!

Thanks Paul. I am not feeding the Arduino with the 5V because when problems started, the guy who designed the system thought the solution may be feeding the Arduino with a higher voltage to produce a stronger data signal. That may be complete nonsense though!

I have spoken to a friend who knows nothing about Arduino but a lot about electronics, and he thinks that the length of the data cable is clearly the issue and that we can install a buffer to avoid the drop in signal strength. His reasoning sounds solid to me and we'll test tomorrow. If it works it should also eliminate the need for the step up converter, which may well be adding problems of its own, and at best is another component that could fail.

I'll report with updates and welcome further input meanwhile :smiley:

marksaus:
Thanks Paul. I am not feeding the Arduino with the 5V because when problems started, the guy who designed the system thought the solution may be feeding the Arduino with a higher voltage to produce a stronger data signal. That may be complete nonsense though!

It most certainly is the most shocking nonsense! :roll_eyes: You have a 5 V supply, you feed it to the Arduino via the "5V" pin.

While there is some tolerance in the supply voltage, you really do not want to stray too far from 5 V. For reliability and safety, you most certainly want the addressable LEDs to be powered from the same supply as the Arduino generating the data, or you will be asking for trouble.

Powering "Vin" or the "barrel jack" from anything over 12 V definitely is asking for trouble. Consider these power inputs quite useless, avoid them completely. :astonished:

There is just one concern with the design of the UNO and Mega 2560. You need to disconnect the "5V" pin from your power supply whenever you connect the USB to a PC for programming.

If you want to try a buffer, use a 74HC14 with two gates in tandem; the other gates need their inputs tied to ground. A 74HC04 will also do, you can use one inverter to drive the other five put in parallel.

Note that the addressable LEDs "regenerate" the data. The fact that the first section works correctly indicates that there is no problem with the logic levels from the Arduino.

Perhaps you should post your code according to the instructions (point 7) to see whether this could be part of the problem.

Thanks again for your comprehensive reply. I am a total newb and eager to listen and learn. Your points all seem logical and I will take good note of using the same PSU for Arduino and LEDs.

Also about disconnecting the power when uploading programs. I was told to disconnect the bluetooth module while uploading, but I didn't know about the power. It's a wonder I haven't fried more Arduinos!

Regarding my lighting issue, we did some troubleshooting and it does seem that the issue is with the longer data cable section picking up interference. When this cable was far from the PSU things worked, when it was nearer or resting on the PSU, problems. I thought a shielded cable did its thing by virtue of having a magical shield, and a friend pointed out it wasn't doing anything much if I didn't connect the shielding to a negative line of my circuit! I tried connecting the shielding to the negative line (with a resistance in between) and it seems to have removed the problem. Tomorrow I'll pretty it up, leave the offending data cable shielded and far from the PSU and try turning on/off a few hundred times to make sure. I'll post results in case you're curious.

Thanks again for your tips which I will definitely note for future installations.

marksaus:
I tried connecting the shielding to the negative line (with a resistance in between) and it seems to have removed the problem.

What is the point of the resistance?

Shielded cable has a very high capacitance, not usually a good idea for data cables. "CAT 5"/ "Cat 6" data cable is usually not shielded for this reason though SATA cables are but of course have much shorter range.

If you do use shielded cable, you can of course (and usually would) use the shield itself as the ground wire and only need two cores inside the shield.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.