Controlling W2812 RGB LED diode with Elegoo Uno r3

Hi,
this is my very first project with an Arduino / Elegoo.
I want to control a 12v RGB LED with a common anode with my Elegoo Uno r3 but I do not know how and I surely do not want to destroy something.
Therefore I would be grateful for your help!

This is the LED diode I am using: https://asset.conrad.com/media10/add/160267/c1/-/en/002102589DS01/datenblatt-2102589-tru-components-t1810o093-led-sortiment-rgb-rund-3-mm-1000-mcd-4000-mcd-2000-mcd-30-25-st.pdf

(They wrote in the Description that because of the
series resistance the LED can be directly plugged in to a 12v power source As they wrote it:"Dieses Set besteht aus 25 hochwertigen Leuchtdioden mit angelöteten 30 cm langen Litzen. Durch den Vorwiderstand ist die LED direkt an den Anschluss einer Gleichspannung geeignet. Die eng Helligkeit- und Farbwiedergabe-selektierten Leuchtdioden eignen sich hervorragend für Modellbau, Modellbahn, Schalttafeln, Frontplatten oder Beleuchtung.")

And this is the diagram I made (don't know if it is any good): Pasteboard - Uploaded Image

Thanks for your help!

Luis


But your UNO R3 does not operate on 12 V!

You would almost get away with those connections - until you powered the LEDs up with 12 V but not the UNO which would then be damaged.

You need three transistors to control the LED strip. Nowadays we generally use FETs - even the 2N7000 would do if it is only a single LED strip requiring 20 mA. What is good about the FET is that it does not require a base resistor.

So what I understood from your reply is that if have to connect the anode with an external 12v power source and then put your mentioned transistors between the cathodes and the arduino? Is that correct?

And the thing is that is is not a Led strip but a single diode. Also i want to control three in a row. Does this still fit with your mentioned Transistors?

In that case (OK, I actually took a closer look at your link), this is a very poor choice indeed for operation by an Arduino.

I am not sure just what the intended application for these LEDs might be, but it clearly is not to be controlled by a microcontroller. Forget it, just go and get an ordinary RGB LED and three resistors (won't go into the actual values at this point).

And before someone else gets to it, even more sensible would be to get a WS2812-type LED.

This will perform the same function and more, with complete control of colour shades, using a 5 V supply, one Arduino pin and no resistor unless mounted at some significant distance from the Arduino.

Precisely what do you mean by that? :thinking: Did you propose to put them in parallel? If you us the abovementioned LEDs, you can individually control their colour, still with only one Arduino pin.

So i just bought the leds you said. Not specificly the ones you send a link to but of the ws2812 type so i guess this should work. Could you maybe create a diagram of how I can hook them up to my Elegoo?

And yes i want the to be parallel so that i can control each set of parallek less individualy.

Again, not clear. Just how many actual LEDs do you want to have? Using the addressable LEDs, you can individually control each and every LED, all connected in a chain and controlled by a single Arduino pin. If you wish a certain group to indicate the same colour, you arrange that in software.

The LEDs all do of course connect in parallel to the 5 V and ground wires. You require a 5 V supply capable of providing 55 mA per LED as well as the UNO itself.

Ok. I want to control 7 leds.
So my problem is: I have 4 pins (DIN, VDD, GND, DOUT) wich pin gets connected to what?

This is the diagram i made from your tips (The one led is representative for the chain of 7):


Please tell me if this would work and which specific values is should use for the capacitor and resistor.

Interesting use of symbols. :grin:

Yes, that wodul be the general setup. 5 V goes to VCC on the first LED and all successive, "GND" similarly goes to GND on the first LED and all successive.

The data wire goes to DIN on the first LED, DOUT goes to DIN on the next LED and so on.

The capacitor should connect across VCC and GND of the first LED and the resistor also connected at the first LED. 100 µF would probably suffice, no harm in more but the capacitor and resistor are probably only necessary if you mount the LED strip some distance (say, more than 20 cm) from the Arduino.

Keep the wires bundled together between one part and the next.

Yeah i am a beginner in this whole world xD.
So i take from your picture that i do not need the external 5v?
And i should be fine if i take 200microF and 33o Ohm?

Wouldn't prevent you from googling OPA4134UA.

Hi,
Can I make a suggestion, that until you get used to component symbols, you draw your circuits and post an image of it, your hand has ALL the symbols pre programmed.

If you Google;

tri colour LED arduino common anode
You will get many hits with examples and tutorials on how to connect tri-colour LEDs.

Tom.... :grinning: :+1: :coffee: :australia:

That is merely some diagram I grabbed to illustrate chaining of the LEDs, nothing more.

You need a proper 5 V supply to power both the Arduino and the LEDs. 7 such LEDs may require about 390 mA for full white.

220µF and 330 Ohm are just fine.

Ok, then I will take my diagram and try to build it with your suggestions.

Thanks for your help!

But don't close the topic yet if i get some errors i will ask for help right here.

EDIT: I got three of the four LEDs working but now the problem is that the 4th one won't light up. The 4th one does not have the following LED! If that is the problem where should I connect the out of the last LED?

Problem SLOVED!!! Thank you guys!

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