Trying to use a transistor as a switch to turn on a 12v 20w mr16 light

hookset

New Member
Okay as some of you know I am new to a lot of this, but learning quickly and having fun. I have a completed my first master piece, and now its time to improve it, and in the process learn more about transistors.
Currently I turn on a 12v 20w MR16 using a Reed Relay but instead I want to use a transistor. Is that possible? So far all of the NPN i've looked (and tried) appear far to weak to handle 20w. So once again I turn to you for help. The research so far of the internet has turned up way too many conflicting stories.

BTW - A little more on my project:
Unit 1 - RF remote sensor
Use a PIR and RF transmitter. On detection it sends a signal to the base station.

Unit 2 - IR remote sensor
Use a PIR and IR transmitter. On detection it sends a signal to the base station.

Unit 3 - Base Station
can receive either RF or IR from remote sensors to active a hacked HD video camera that will film base on the dip switch setting. It also has a LDR to determine if the flood light needs to be turned on.
 

hookset

New Member
I am trying a TIP41C now. looking at the Datasheet it appears that this should work. 12v/20w I should need about 1.7amps. Will report back tomorrow.
 

bluejets

Senior Member
Better to use logic level mosfet.
Driving 1.7A if gain is around 30 to 60 will be too much base current for the micro.
 

westaust55

Moderator
As a general guide for NPN transistors (typically as low side switches):
1. Select a transistor that will handle the current and the power dissipation when saturated
2. In saturation Vce(sat) applies * Ic (load current) = power dissipation as heat - too much and you need a heat sink
3. Find the transistor gain in saturation Hfe(sat) and if not quoted as a good rule take the linear region gain and divide by 10
4. Ic / Hfe(sat) is the Transistor base current you need to pass into the base.
5. The transistor base will be at ~0.7 volts and the PICAXE output will almost be at Vcc (5 volts?)
6. The PICAXE to base resistor needs to be no more than (Vcc - 0.7)/base amps.

If Ib (base current is greater then 20mA or better if greater than say 15mA then add an inter posing transistor such as BC548 or 2N2222.

PNP transistors as high side side switches often need further consideration such as interfacing transistor in particular where the voltage for load circuit is greater than PICAXE supply voltage to ensure PNP will turn off.
 
Last edited:

MartinM57

Moderator
^^^^^^^
5 and 6 are normally for NPN transistors of course ;)

Hookset - as you can see, the forum likes nothing better than making assumptions about what you are really trying to do...
...are you trying to switch the positive supply to the light i.e sourcing the current, in which case jojo's circuits are the sort of thing you need
...are you, as is more common, switching the ground side of the light i.e. sinking the current, in which case a suitable NPN transistor as per Manual 3 relay contact switching examples, or a suitable logic level MOSFET is all you need
 

hookset

New Member
This is all very good information... MartinM57 My thought is to switch the ground side. Per manual 3 Transistor Interfacing Circuit. I believe I have a darlington transistor that will work. I am now trying to do the math to make sure.. Data sheet is here https://www.alliedelec.com/images/products/datasheets/bm/STMICROELECTRONICS/70014125.pdf
I know I can always count on the members here. I hope to one day be able to give some of it back ..
I'll post my calculation later today and y'all can check my math.
 

MartinM57

Moderator
TIP41C is a (very old, I'm sure I had one in my parts box more than 25 years ago, IIRC) NPN power transistor, not a darlington, with a Hfe of lets say 30 at best at an Ic of 1.7A

So base current would need to be 1700/30 mA = 56.6mA, which is considerably more than a PICAXE output pin can/should source.

In your situation, which is just on/off switching, I would be looking at the "standard" logic level MOSFET that people tend to use - IRL520 (http://www.vishay.com/docs/91298/91298.pdf). However, with a RDSon of 0.27 ohms, I'll leave you to work out the power dissipated in the MOSFET at an Ids of 1.7A - for anything above 200mW or so, you should be considering a heatsink of some sort.

PS googling "logic level FET site: picaxeforum.co.uk" gives loads of other ideas/views on all this
 

hookset

New Member
Thank you MartinM57 - I will look into the FET during lunch today. here is the idea very straight forward ( if it attaches)
npn circuit.jpg
 

MartinM57

Moderator
Yep, that's the general idea:
- you should use a MOSFET schematic symbol if you are considering using one
- people often put a high-ish value resistor (say 47K) from MOSGET gate to ground to make sure that the MOSFET remains off when the PICAXE output is "floating" - e.g. when it's powered off
- the diode probably isn't needed (normally only used when the load being switched is inductive e.g. a relay coil). No harm in leaving it though
 

lbenson

Senior Member
Some other mosfets which might be overkill for your application but would generate less heat would be IRF1405 (common in wheelchair controllers), IRF3205, RFP12N10L. Sparkfun is selling the FQP30N06L.

Adafruit sells IRLB8721PBF-ND. This is what they say about it:
The TO-220 package can dissipate up to 2 Watts without a heat sink (at room temperature). Because it has an Rds of as low as 9 milliohms, that means that you can switch at least 15 Amperes without a heat sink
Some of these would benefit (for cooling purposes) from being driven at 12V by an intermediate transistor or signal fet (like 2n7000).

More appropriate suggestions from others more knowledgeable would be welcome.
 
Last edited:

bluejets

Senior Member
will be too much base current for the micro.
Not with the driver(2N2222).
Before you jump in boots and all, remember that sometimes answers are posted at the same time and in this instance, your post just happened to be accepted a few nano seconds before mine, so it would be appreciated if you do not yell your answers by inserting bold type, thankyou.
 

hookset

New Member
Thanks for the help - Its working

I would like to thank everyone for their help! :cool:
I now have the light working off a mosfet that I picked up from Radio Shack (IRF510). As with most projects, it was a great learning experience for me. I now have a better understanding of NPN, PNP, and MOSFETs.
 

jojojo

Senior Member
@bluejets :
Sorry, bold are not use in that way, for me.
Just because i dont like "quote" manners. Post's become too large, and it need many pages, just for some replys.
 

MartinM57

Moderator
I now have the light working off a mosfet that I picked up from Radio Shack (IRF510).
interesting. As the neersayers would say that's not the ideal device (the IRL5X0 would be better) so can you measure the voltage across the MOSFET (drain to source) and the bulb current when the light is on please?
 
Top