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!
(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.")
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? 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.
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?
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.
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?