A
Arduino3w ago
NOZI

First Steps with Arduino and LEDs

Hi, as part of my retraining, I've decided to focus more on programming and electrical circuits. And I've bought an Arduino starter kit and a few components. School was a long time ago. My first project is a landing pad for Warhammer 40k, with illuminated LEDs. I've already put the principle together on the board and it works. I then took small LEDs, soldered them together, and tested them. And that's where the problem comes in. It seems to me that different pins on the Arduino boards have different voltages. I'm attaching a video with examples. I can't find a solution for my idea on Google; maybe it won't work, and then I'll have to rethink things.
21 Replies
Milo Heldix
Milo Heldix3w ago
thats really cool! im starting with arduino too! keep going, we are in this together
AnonEngineering
The GPIO pins on an Uno all use 5v logic and should all be 5v (plus or minus a few tenths) when set HIGH. The RGB LEDs above appear to be wired correctly with current limiting resistors, can't really say how the others are wired.
NOZI
NOZIOP3w ago
The yellow LEDs are soldered together in groups of four. i use these LEDs https://www.amazon.de/dp/B0BZGPGM3J?ref=ppx_yo2ov_dt_b_fed_asin_title
RUNCCI-YUN 100 Stück 3mm 3V-9V-12V LED diode,LED mit kabel 12v,mod...
Produktbeschreibungen: 20 cm 3mm led mit kabel 12v LED-Dioden Lampenperlendurchmesser: 3mm Kabellänge: 20 cm Durchlassspannung (V): 12VDC Durchlassstrom (mA): 20 mA Lebensdauer: 50.000 Stunden Farbe: Weiß/Rot/ Blau/ Grün/ Gelb Packungsinhalt: 20 Stück x 3 mm 12 V mit kabel LED-Dioden (gr...
NOZI
NOZIOP3w ago
the Code i Use is int LedPin1 = 7,LedPin3 = 4,LedPin2= 2; void setup(){ pinMode(2, OUTPUT); pinMode(4, OUTPUT); } void loop(){
digitalWrite(LedPin1, HIGH); digitalWrite(LedPin2, LOW); digitalWrite(LedPin3, LOW); delay(500); digitalWrite(LedPin1, LOW); digitalWrite(LedPin2, HIGH); digitalWrite(LedPin3, LOW); delay(500);
digitalWrite(LedPin1, LOW); digitalWrite(LedPin2, LOW); digitalWrite(LedPin3, HIGH); delay(500); }
AnonEngineering
4 in series? in parallel? what current limiting is used?
NOZI
NOZIOP3w ago
No description
No description
AnonEngineering
it's possible to connect 4 in parallel, but each must have it's own current limiting resistor
NOZI
NOZIOP3w ago
each one has a resistor prepared
NOZI
NOZIOP3w ago
No description
AnonEngineering
ok, that's good next thing to consider is that you should only draw about 20mA per pin
NOZI
NOZIOP3w ago
so i neeed for all 4 80mA, cause i sold them toghether? This was a Test with one Led
AnonEngineering
if you try to draw 80mA from a pin the voltage will drop, and you risk permanently damaging the pin what is the value of the series resistor? from that the current can be calculated
NOZI
NOZIOP3w ago
for the prepared LEDs i dont know, and i dont find a notice in the shopß-site the board example has every LED a 220 resistor i can remove the shrink tube from one
AnonEngineering
since they are advertised as "12v" i assume they are 1K if they are 1K then each LED will draw about 3mA at 5v, so 4 should be fine
NOZI
NOZIOP3w ago
okay did i crash some of my arduino pins? or there is there a another issue?
NOZI
NOZIOP3w ago
NOZI
NOZIOP3w ago
re upload of the test with one LED first PIN 7 then PIN 4 then PIN 2 the higher pins are lower in the light, or should i use lower resistors in higher pins?
AnonEngineering
all pins, 2 - 13 (and the "analog" pins too) are the same, they should be 5v when high, and able to deliver 20mA safely
c++
void setup(){
pinMode(2, OUTPUT);
pinMode(4, OUTPUT);
}
c++
void setup(){
pinMode(2, OUTPUT);
pinMode(4, OUTPUT);
}
it looks like you only set pins 2 and 4 as OUTPUT
NOZI
NOZIOP3w ago
i feel very desillusioned..... i add pin 7 als OUTPUT and it works..... wow I broke the solder connection on one group at the test.... the hole day was full of try and error thank you so much and i learned a lot about electric stuff today 😄 good night
NOZI
NOZIOP2w ago
NOZI
NOZIOP2w ago
IT works

Did you find this page helpful?