Pages: 1 [2]   Go Down
Author Topic: Can this damage my led?  (Read 1196 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Faraday Member
**
Karma: 30
Posts: 2501
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes the digital pin.

Step 1. The easiest way to do it is look at the datasheet of the transistor you have, find out what the transistor is.

Step 2. Find the collector, base, emitter pins, careful which way round the transistor is (Generally, Base is middle)
Step 3. place a wire from arduino digital pin 2 to the breadboard, connect a 1k-10k resistor, then in series through that resistor and into the base pin.
Step 4 & 5, depending on if it's an NPN or PNP, you have to take different steps, refer to Step 1. then get back to us.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes the digital pin.

Step 1. The easiest way to do it is look at the datasheet of the transistor you have, find out what the transistor is.

Step 2. Find the collector, base, emitter pins, careful which way round the transistor is (Generally, Base is middle)
Step 3. place a wire from arduino digital pin 2 to the breadboard, connect a 1k-10k resistor, then in series through that resistor and into the base pin.
Step 4 & 5, depending on if it's an NPN or PNP, you have to take different steps, refer to Step 1. then get back to us.

Thank a lot for this. Though I currently don't have any transistors. I'm going to the store in a minute, so what kind should I get? (I'm not sure what they'll have, but generally they have quite a lot.)
Logged

Offline Offline
Faraday Member
**
Karma: 30
Posts: 2501
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

get one of each or a couple cheapest one will handle 200-300ma  npn is more useful in my opinion. but get both and play... npn/pnp
Logged

USA, FL
Offline Offline
God Member
*****
Karma: 14
Posts: 689
A life? Where can I download one of those?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

2n2222
2n3904
BCxxx

Should be the common ones.  Pretty sure someone else will list some others.
Logged

//LiNK

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5666
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
how much does the Arduino give
See reply #5

Ok smiley-razz So basecly no I'm not damaging my leds, nor my Arduino. Though since my setup wants 130mA it's getting less than a third of what it wants.

No, 40mA is the point where Atmel says damage will start happening but the chip has no built-in limiting.

It will give you 130mA ... right up until the pin burns out.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, so I just went to the store. I get myself some of those 2n2222(A)(NPN) and 2n3904(NPN), two each.
They both look like this:

So now I'm following cjdelphi instruction. And I have a 2.2k resistor (this was the nearest one, I have a bunch of other ones also in the 1k to 10k range if an other one is preferable.) So now I'm at step 4/5, I'm using the 2n2222a (NPN) transistor and I'm back for more help.

Thanks a lot smiley-grin
Logged

USA, FL
Offline Offline
God Member
*****
Karma: 14
Posts: 689
A life? Where can I download one of those?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm back for more help.

What's the problem?
Logged

//LiNK

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What's the problem?

Well, not really a poblem, though I'm a little scared to damaged stuff.
So, here's what I've got now:
Digital3 -> 2200ohm resistor -> transistor B
Transistor E -> GND
Transistor C -> IR Led negative
5V -> 33ohm resistor -> IR Led positive

*Edit: removed schematic, was wrong and confusing me.*
« Last Edit: May 03, 2013, 12:54:08 pm by The_Oddler » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26519
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
'm hoping this is drawn correctly,
you may want to check the diode orientation
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
'm hoping this is drawn correctly,
you may want to check the diode orientation
Yes, I just flipped it because I thought it was wrong.
I'm sure the positive side is connected to my 5v source, via a resistor. Should I flip it back (on the drawing) or should I flip it on my Arduino?

Edit: So I think this should be correct now:
Positive is connected to 5V, via resistor. And negative to my transistor.
« Last Edit: May 03, 2013, 12:48:31 pm by The_Oddler » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26519
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It depends whether the LED is connected to the Arduino according to the schematic.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It depends whether the LED is connected to the Arduino according to the schematic.
Yes, my Arduino should now be exactly like the schematic.
Logged

Pages: 1 [2]   Go Up
Jump to: