I have received a lot of great help on this site now I need help choosing a transistor for my project.
I am using a controller with a 5v output and some transistor to switch a relay. The manufacturer of the controller said to use a 220-440ohm resistor on the base of the transistor. The coil of the relay is powered by 9v and is 500ohm so Ic=9/500= 18mA. I am got sure if i am calculating hfe correctly. I came up with a value of around 8 using a 440ohm resistor on the base. Will a bc107 NPN transistor work? https://www.st.com/stonline/books/pdf/docs/9293.pdf
Also, will a 10kohm resistor on the emitter prevent leakage when the transistor is off? Just making sure I am on the right track.
I know I need a protection diode on the coil. What do i need if the relay contact is seeing 24vdc, max 8A?
You would connect the 10kΩ resistor between the base and emitter if you were worried about high temperature leakage. But that's not needed if the controller source driving the transistor input resistor is pulled to ground for logic zero.
The relay contact may need protection if the contact load is inductive. What are the contacts controlling?
Use a general purpose transistor, BC338, BC548, PN2222A or even the BC109 you linked to - it doesn't matter.
Add a diode (1N4001 will do) in reverse parallel with the relay coil to protect the transistor from the high voltage pulse produced when it's turned off.
Hero999 and crutshow, thanks so much for your help.
If I chose to use the BC548 transistor will i need to use its min hfe (110) to calculate the resistor for the base or can I stick with the 2k4Ω as originally planned?
To clarify, the beta given in the data sheet is for AC operation at the give collector current and voltage. If you want to use the transistor as a switch you want to make sure it is completely turned on, with minimum saturation voltage. Thus you use a low value of beta to insure this (which is commonly selected to be a value of 10).
Hero999: could you tell me if I'm understanding this correctly?
When you say to use a forced value of 10 for gain (which is hfe and beta, right?), the transistor you put in will be able to pass way more collector current based on its actual hfe. So your 'factor of safety' to make sure the transistor-as-switch is on is the actual hfe/forced value.
I'm doing a similar circuit, using a 555 output to a 2N3904 Base to operate a relay coil requiring about 90mA @ 5V.
But the ~470Ω base resistor
(5-.6)/.009 = 477Ω
didn't seem to allow enough collector current to flow so I switched to a 100Ω and it worked. I assume a higher gain transistor also would have worked, so how does the actual gain figure into the calculation?