Needing some information from someone experienced in data signals :)

Needing some information from someone experienced in data signals about the ws2812 and ws2815

First off all thanks for taking your time to read this and possibly help me through this (English isn't my first language sorry for any mistake)

For context, I am running a 8leds ws2812 stick, stick is connected to a power source (5.10V) Arduino mega is powered by my pc currently (4.9V I believe), both have a common ground, data is connected to pin 30 (no PWM) on arduino mega without any more components.

So, I was currently experimenting with some ws2812 LEDs and have already gone through some problems about the data signal being lower than 0.7Vcc so it creates errors and LEDs stutter and stuff, after adding a diode to the power source going to the LEDs, it got better but any value above 150 for brightness makes errors occur again, i don't know if I need to make the Arduino run from the 5.10V source too or if i have to add another diode to lower even more the voltage so the signal is above 0.7Vcc.

This is one of my current problems, now just another fast thing,

For this one every time I search I get even more confused,
The datasheet for ws2815 (we are talking about these now) states that it has the same min 0.7Vcc for the high data input, but these run in 12V so it must be at least 8,4 right? but there is this
"(TA=-20~+70°C, VDD=4.5~5.5V, VSS=0V)"
And I have read that ws2815 reads 5V data? I am so confused because if I am struggling to send data to a 5V strip minimum 3,5 (0.7Vcc) how is it possible to make it work on a 12v strip without any more components,
I didn't believe this until I saw this video:

(TURN ON ENGLISH SUBTITLES)

i am even more confused now because as you can see it is actually running in a base Arduino Uno without any more componets.

Never had an issue running WS2812 12V LEDs with a 5V arduino. Only added an inline 470 Ohm Resistor on the data line, and connected the GNDs together.

How is your strip wired up? Vcc open, or with caps to Gnd?

The datasheet does seem to indicate 0.7 x 12V = 8.4V is needed for a high - but at the same time, it does not provide any timing for when VDD = 12V, only for 5V.

I think the problem may be more with the timing generated. The WS2812B timing looks to be different than the WS2815.

missdrew:
Never had an issue running WS2812 12V LEDs with a 5V arduino. Only added an inline 470 Ohm Resistor on the data line, and connected the GNDs together.

does the 470 Ohm Resistor make a difference? or is it just to make sure there is no noise?(I am assuming it is connected in series between Arduino and strip)

probably I am having problems because I'm powering the arduino from the PC instead of the Power supply, i will try that tomorrow its late here

CrossRoads:
How is your strip wired up? Vcc open, or with caps to Gnd?

Have no idea, I am using these sticks

"https://www.ebay.com/itm/8-Channel-WS2812-5050-RGB-8-LEDs-Light-Strip-Driver-Board-for-C4X7/154225760595?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2648"

The datasheet does seem to indicate 0.7 x 12V = 8.4V is needed for a high - but at the same time, it does not provide any timing for when VDD = 12V, only for 5V.

That means it should work with a simple arduino signal voltage as missdrew said it does?

Btw I don't have a WS2815 strip, I was thinking on buying one but I need to get this clear first

Ah. Ok, I misread part of the first post.
What library are you using? I used 43 of WS2812B in these rings with FastLed.h library, no resistor, no problems.
But I also had a 5V/10A power supply for them.

Make sure the PC Gnd, Power Supply Gnd, and Strip Gnd are all connected together.

CrossRoads:
Ah. Ok, I misread part of the first post.
What library are you using? I used 43 of WS2812B in these rings with FastLed.h library, no resistor, no problems.
But I also had a 5V/10A power supply for them.

FastLED too, just to make sure where is my setup code about the leds

#include <FastLED.h>
#define NUM_LEDS 8
#define LED_PIN 30

(in setup)
FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(50);

(in loop)

for (int i = 0; i < NUM_LEDS; i++) {
leds = CRGB::White;
}
Works good from 0 brightness to 130 full white
after 130 starts showing yellow leds and green blinking and some other random stuff, the middle (4 or 5) leds kinda still work
> Make sure the PC Gnd, Power Supply Gnd, and Strip Gnd are all connected together.
already made sure it was all properly grounded, and btw i noticed that grounding the Strip or not grounding it made no difference some times, if i set brightness to 50 , connect 5v and the data pin it still lights up properly, if i turn up the brightness it makes all the errors but grounding it at this point makes no difference

added some text that was missing in the last reply (idk why it didn't go through )

Isn't this needed at some point?

FastLED.show();

I had this code to send data to my rings to set them one color each.

  for (int i = 0; i < NUM_LEDS_PER_STRIP; i++) {
    leds[0][i] = CRGB::Yellow;
    leds[1][i] = CRGB::Red;
    leds[2][i] = CRGB::Red;
    leds[3][i] = CRGB::Yellow;
  }
}

FastLED.setBrightness( halfBright );
FastLED.show();

CrossRoads:
Isn't this needed at some point?

FastLED.show();

yeah, I had that too, forgot to mention it,
I will test something tomorrow and post here if I get any results on powering the Arduino through the power supply instead of the pc
btw, as I mentioned, is this normal? or no idea what is causing this xD

already made sure it was all properly grounded, and btw I noticed that grounding the Strip or not grounding it made no difference some times, if I set brightness to 50, connect 5v and the data pin it still lights up properly, if I turn up the brightness it makes all the errors but grounding it at this point makes no difference

I will post some pictures tomorrow too.

This seems to have become confused!

As I gather it, you are using a 5 V LED strip with an unnecessarily expensive 5 V Arduino; there is no problem with logic levels. The resistor in series with the data line has two purposes; to protect against the Arduino being powered when the strip is not and to suppress transient effect when there is significant cable distance between Arduino and strip.

On a 12 V strip, the logic voltage is still 5 V levels, the chips self-regulate their individual Vcc to this with resistors dropping from the 12 V.

For a UNO or Mega 2560, you power it with the same 5 V as you would use for the strip through the "5V" pin but only when it is not connected via USB to a PC.

Paul__B:
As I gather it, you are using a 5 V LED strip with an unnecessarily expensive 5 V Arduino;

I use a Mega cause i am using most of those extra pins xD

Paul__B:
The resistor in series with the data line has two purposes; to protect against the Arduino being powered when the strip is not and to suppress transient effect when there is significant cable distance between Arduino and strip.

Oh ok ok,ill buy some since i dont have 470 Ohm Resistors

Paul__B:
On a 12 V strip, the logic voltage is still 5 V levels, the chips self-regulate their individual Vcc to this with resistors dropping from the 12 V.

Okk this makes much more sence, thanks for clarifying

Paul__B:
For a UNO or Mega 2560, you power it with the same 5 V as you would use for the strip through the "5V" pin but only when it is not connected via USB to a PC.

yeah i already had some bad moments conecting an arduino through usb and 5V at the same time hahaha,
Thank yall for helping me through this btw :slight_smile:, before i do something stupid should i conect the 5V powersuply directly to the 5V pin or is it better to connect it through the round conector where normaly people conect 9V batery?
(i dont usualy power it like this sorry for the dumb question)

A very real danger is that the obsolete tutorials on the Arduino site and others misleadingly imply that the largely ornamental "barrel jack" and "Vin" connections to the on-board regulator allow a usable source of 5 V power. This is absolutely not the case. It is essentially only for demonstration use of the bare board back in the very beginning of the Arduino project when "9V" transformer-rectifier-capacitor power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.

If you are asking this question, it is highly likely that you will wish to connect something else. In which case, the answer is regulated 5 V.

This is because the on-board regulator is essentially capable of powering only the microcontroller itself and no more than a couple of indicator LEDs. The on-board regulator might be able to power a few other things if it had a heatsink, but on the (older) Arduinos, it does not.

Powering via the "barrel jack" or "Vin" connections is asking for trouble. The "5V" pin is not by any means an output pin, if anything a "reference" pin but most certainly the preferred pin to which to supply a regulated 5 V.

A practical power supply for the Nano (or UNO, Pro Mini, Leonardo etc.) is a "phone charger" with a USB output connector for 5 V, generally up to a couple of Amps though you can not feed more than 500 mA through the USB connection.

If you want to power it from 12 V or a car system, you need a 5 V switchmode "buck" regulator to supply the 5 V.

So I did some tests powering both arduino and the led stick ( arduino through the 5v pin (5.09v)) with the same supply and there is still no diference, even comecting the stick to 3v makes no diference so I think that the data is not the problem
Still if I disconect or connect a ground to the led stick there is no diference and it still lights up, flickering ( happens with my 2 led sticks)
Both arduino and the leds have comun grounds,
Here is a video showing the leds flickering and showing that disconecting ground makes no diference
https://streamable.com/2wl11o

Is there some possibility that the data pin is making doing the ground? And that is causing the flicker?

How to connect these 'strips' you have :

Strip VCC -> 12VDC +Ve
Strip GND & Arduino GND -> 12VDC Supply GND
Strip Data In -> Arduino Data Pin

You will have a ground connection if using a non-isolated 12V supply & you power the Arduino through the computer, as they both have the same ground reference through your wiring.

Power the Arduino from a battery pack, with NO connection to the computer and retry.

missdrew:
How to connect these 'strips' you have :

Strip VCC -> 12VDC +Ve
Strip GND & Arduino GND -> 12VDC Supply GND
Strip Data In -> Arduino Data Pin

They are ws2812, not ws2815,
They are supposed to take 5v

And i already tryed to power both arduino and the strip from the same power supply as i stated in my post above :l

And i already tryed to power both arduino and the strip from the same power supply as i stated in my post above :l

Where did I say to power the Arduino from the same supply?
OK

Same advice

Strip VCC -> 5VDC +Ve
Strip GND & Arduino GND -> 5VDC Supply GND
Strip Data In -> Arduino Data Pin

Power the Arduino from your PC or from a battery plugged into the barrel jack or VIN, or from a different 5V supply on the 5V pin.

What power supply are you using to power this strip? can you post a picture of the label, or give us the specifications.

missdrew:
Where did I say to power the Arduino from the same supply?
OK

Same advice

Strip VCC -> 5VDC +Ve
Strip GND & Arduino GND -> 5VDC Supply GND
Strip Data In -> Arduino Data Pin

Power the Arduino from your PC or from a battery plugged into the barrel jack or VIN, or from a different 5V supply on the 5V pin.

I'm sorry if I'm being repetitive

That was my original setup,

For context, I am running a 8leds ws2812 stick, stick is connected to a power source (5.10V) Arduino mega is powered by my pc currently (4.9V I believe), both have a common ground, data is connected to pin 30 (no PWM) on arduino mega without any more components.

I am using one of those car lighter 12v to 5v, a decent one, outputs 5.09v and max 2.5A

Then I have no further ideas! With a 12V Battery reduced to 5V, and an Arduino run from a laptop/PC with only a common Ground (DON'T disconnect this from a live circuit by the way, this will damage the components at some point.) this should work.

I think I found the problem,
I cant even display something on a 4digit "screen" ( tm1637driver)
I think the final conclusion is that my arduino is somehow damaged, it has about 3 years, I never see any problem with it but I never tryed something using data through the pins.
Well, I think it's time to get another one
Any sujestions? I need about 30 i/o pins for the hole project, is there any option better than the arduino mega?