I bought TIP147 and wanted to control 100 Watt halogen with it and arduino. I tried that but it didn't work. My halogen was on all the time. I looked TIP147 datasheet but I'm not sure why it don't work with arduino. So why it don't work?
OK stop right there.
No base resistor from the arduino to transistor. = fried arduino pin.
What voltage are you running it off?
I am going to assume you have a 5V external supply.
However, if it is 100W then the current rating is too small.
center pin to halogen
OK
right pin to arduino gnd and power supply gnd
Wrong right pin to halogen supply +ve
Other end of halogen to ground / arduino ground / halogen supply ground
This is a PNP transistor not an NPN one so it must be used as a top switch.
If there is a supply greater than 5V then you need another NPN transistor to pull up the base signal for this one.
I think you needed to get a TIP 142 not the transistor you have. You still need the base resistor as well though.
With 12V you need another NPN transistor to drive the base up to 12V in order to turn it off.
However with a 100W 12V load you have a current of 8 Amps which is far too high for this transistor, not from the current rating point of view but the dissipation of the transistor. It has a Vsat of 3V, so with a current of 8.3 A you have power dissipation inside the transistor of 25 Watts. Now given that you can have a soldering iron rated at 25W you are going to need some very good cooling on the transistor.
As far as connections, you have to read the datasheet and decide if you have the Base-Emitter-Collector connections correct.
Your drawing looks like a decent start - you are missing the Arduino-NPN base transistor.
Maybe this drawing will help more.
Find the NPN you are using and make it match.
I picked this particular NPN because it only needs 10mA of current into the base to control 500mA thru the collector.
When it does the emitter will be ~ 0.03V
The TIP147 needs 40mA out of its base to control 10A thru the collector. If R1 is 10K, then when the NPN is turned on nearly all current will flow from PNP emitter to base and then thru the NPN. R2 limits that current. If we want the base of the PNP to be about 0.7V when the NPN turns on, then there will (0.7V - 0.03V) volts across R2.
Solving for 40mA thru R2: (0.7V - 0.03V)/0.04A = 16.75 ohm, so use a 15 ohm resistor there.
and imagine the NPN in place of the switch/R2.
When the NPN is off, the base voltage is high and the PNP turns off.
When the NPN is on, the voltage gets pulled low at the left side of Rb, and current Ib is allowed to flow, turning on the PNP.