Go Down

Topic: Can this damage my led? (Read 1 time) previous topic - next topic

cjdelphi

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.

The_Oddler


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.)

cjdelphi

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

codlink

2n2222
2n3904
BCxxx

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

fungus



Quote
how much does the Arduino give

See reply #5


Ok :P 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.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

The_Oddler

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 :D

codlink

//LiNK

The_Oddler

#22
May 03, 2013, 07:15 pm Last Edit: May 03, 2013, 07:54 pm by The_Oddler Reason: 1

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.*

AWOL

Quote
'm hoping this is drawn correctly,
you may want to check the diode orientation
"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.

The_Oddler

#24
May 03, 2013, 07:42 pm Last Edit: May 03, 2013, 07:48 pm by The_Oddler Reason: 1

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.

AWOL

It depends whether the LED is connected to the Arduino according to the schematic.
"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.

The_Oddler


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

Yes, my Arduino should now be exactly like the schematic.

Go Up