I have built this very simple circuit (image) but the relay will not engage after the switch is closed. I can feel the relay begin to engage but it does not latch closed. The relay is 36 ohms, 71mA @ 5V. An npn 3904 should supply up to 800 mA. Am I missing some thing? I have tried several transistors. And tested the relay.
You need a resistor feeding the base, otherwise as soon as you press the switch the transistor will blow - if you've tried several transistors, you now have several dead transistors.
Also, it's important that you fit a diode across the relay coil, cathode to the top - otherwise the transistor will be destroyed when you release the switch.
pretty much what was said. If the relay is used for switching a higher current load, you may want to consider using simply a power bjt or mosfet and dump the relay.
Spestis, the values you give for the relay are not correct. If the coil is 36 ohms the current at 5V would be 5/36 = 139Ma. My data sheet says the maximum collector current for the 2N3904 is 200Ma. If the relay in fact only
needs 71Ma then I would use the beta of the 2N3904 @ 100Ma is min of 30.
Base current would be 71Ma/30 =2.3Ma. The resistor would be (5-0.7)/2.3Ma
=1.869K. I would use a 1.5K ohm resistor to insure collector saturation.
Spestis, the values you give for the relay are not correct. If the coil is 36 ohms the current at 5V would be 5/36 = 139Ma. My data sheet says the maximum collector current for the 2N3904 is 200Ma. If the relay in fact only
needs 71Ma then I would use the beta of the 2N3904 @ 100Ma is min of 30.
Base current would be 71Ma/30 =2.3Ma. The resistor would be (5-0.7)/2.3Ma
=1.869K. I would use a 1.5K ohm resistor to insure collector saturation.
The tutorial talks about hFE being used in a calculation for the value of the base resistor for a switching transistor.
One of our members talks about using beta in the calculation for the value of the base resistor for the switching transistor.
They are wrong.
The base current must simply be 1/10th the collector current for the 2N3904 transistor and for most other transistors.
Grab a meter and start measuring voltages. The transistor in your curcuit can be thought of as a switch. When the "switch" is off, you will measure close to 0V across your relay's coil. When the switch on on, you'll measure close to the power supply voltage across your relay's coil. If these conditions are validated, and you are getting the same result, then your relays are defective.