Calcultions to choose between a transistor (switch)

arduinocontroltransistors

thanks in advance :).

I am a little bit confused, i need to turn on a led lamp (5watts), using a light sensor from my Arduino. I was reading a lot of theory the past two days. Here is the deal:

What i understand is the next:

To choose the transistor i need the current, voltages and pose consumption of the load. And also i need to limit the current to the load from the source and put a resistance from the arduino too.

1st: I need a lamp of 5 watts(led lamp).
2nd: I have a 12 volt battery at 7A/H.
3rd: My arduino gives me 5V and 40mA.

Since i need 5watss i can find the current to turn on my lamp using P=IV. 5W/12V=.416amperes.
Then i need to limit the current from the source, if i have 7A, i need to waste (eat 6.5 Amperes). I Find a resistance capable if this using I=V/R, R=V/I, R=12V/6.5A, R= 1.84 ohms (or 2 ohms).

Then i got the resistance from my load at my input. Now i need to find a transistor supporting that values and the resistance from the base to my arduino. How i do that?.

I Know the currents must be additive then IB+IC=IE, since i know how many current i have from IC and IB i can use kirchoff laws to find the resistance from my arduino.

IB+IC=IE, then IB=IE-IC, then VB/RB=IE-IC but then IB and the associated values VB and RB depend on the transistor?, finding a model of transistor i find how many current i need to swicht some current from C and the i need to couple that current from the data sheet with a resistance to switch the arduino?.

I am missing something? or i am wrong at everything? :S

Best Answer

You're best bet is to use the following: Connect your bulb to your 12 volt source in series with your resistor, which is in series with your transistor (Collector side on an NPN BJT). Then connect an arduino pin, in series with a resistor, to the base junction. Finally, connect your Emitter to ground. The problem with your calculation is that it assumes all of your voltage is being dropped across your bulb. You can't do this, because you'd need current to flow through the circuit, which means you'll need to add a resistor, which will take a voltage drop of its own (V=IR). Your best bet is to find the right balance between the voltage drop that you need across your bulb, and across your resistor. As an example, if you drop 10 Volts across the bulb, this means to generate 5W, you'll need to limit your current to 500mA (P = IV). This leaves 2 Volts that can be dropped across the resistor, giving you a 4 Ohm resistor. Also keep in mind: the resistor you choose will need to be power rated appropriately (in the example I used, it needs to be rated for 1 W), and you'll want to make sure that the transistor can handle the appropriate power dissipation. For most BJTs with a high enough Beta value, your Emitter and Collector currents should be equal, so I wouldn't worry too much about any voltage drop across the transistor. I hope this helps.