Transistor - How to use?

Hello,
first of all I want to tell you that I'm really a bloody newbie on electrics and Arduino, but I try the best and learn a lot. Anyway I have a question about transistors and hwo to use them to increase current from Arduinos digital pin.

I have heart that an Arduino digital PIN can only return 20mA current which is too low for my IR LED I have attached to it. I need about 100mA current. So I read about transistors....

My circuit looks like this:

But I don't understand where to put these wires (on the right of the picture)? Just to +5V and GND on Arduino? I tested this but this did not increase my current...

I would really prefer a solution without adding another battery or external power source. What possibilities do I have to get 100mA out of arduino?

Could you please help me - but please try to stay as simple as possible :slight_smile:

Thank you very much!

Hi,

if you don't measure any current increase this could have different reasons.

It would be easier to answer if you post the sketch and the type of the transistor. How did you calculate the base resistor for the base? Does the IR LED still work (single test with digicam or webcam)?

markbee

Thanks for the reply.
I'm currently not at home but as far as I could remember I was using BD137 and I also tried another transistor (cant remember that name, but starting with BC...) with same results.

I just used "Blink" sample sketch, modified to Arduino PIN 9, nothing special. IR led still works. I did not calculate base resistor. In a lot of tutorials I saw that you have to use a resistor > 1kOhm.

So in general my current shoudl increase if it connect these wires to Arduino 5V and GND??

Thank you

Maybe you can put in a normal red LED (take 330 ohms as resistor) and check the circuit again. It should be working. You get about 4.5mA with 1k resistor to the base, that might be more than enough to drive the LED (it needs about 9mA with 330 ohms).

Pay attention to the wiring in respect to the IR LED (Anode, Kathode) and type of IR LED. I'm not quite sure about that, maybe the hFE for the BD137 is not enough with 4.5mA on the base to drive the IR LED.

How did you measure current and what source did you use (USB) for the Arduino board?

markbee

I think I remember that I got these results, too. About 3 or 4 mA in base circuit and about 9 mA C->E current. But for my IR LED this is really too low. I need at least 90mA current for my IR led.

I was measuring current in series between transistor and IR led for example.

Power source is USB, yes.

...and now you know what a resistor is good for...

Hi,

that does not really help me to solve my problem. My output current is 9mA... I need 90ma...

Thanks,

You have to change the value of the series resistor to the IR LED. This is the current limiting factor.

markbee

ok so I will hook up the the wires (the right two ones) to Arduinos +5V and GND and try to replace IR LED resistor this evening.

I'll post my feedback later.
Thanks so far

Ohm's law is your friend. Google it, and remember you have to account for the forward voltage drop across the LED when determining your voltage.

The IR LED resistor needs to be about 47 ohms to limit the current to 100mA.

The BD137 has a minimum gain at 150mA of 40. Thus to guarantee saturation call that 30, 100mA / 30 ~= 3mA so the base resistor should be about 1k2 - in practice anything from 150 to 1k2 will work.

When using a transistor as a switch it's vital to turn it fully on (saturation) - which means supplying base current that will be more than is needed to just turn on the required output current. Always use the minimum current gain figure to calculate with otherwise you will have a circuit that works with some transistors and not with others! For high current transistors the gain depends on the load current - the BD137 datasheet shows this by listing it at several values of current.