0
\$\begingroup\$

I'm trying to turn on a 5V SPDT Electromechanical Relay. It is planned to be used with microcontroller application. Below is the circuit that I wired on a protoboard:

Schematic

When connected like that and measured with meter, the BJT will drive the relay with current about 35mA, and the measured voltage across the relay is about 2.7V, but it won't turn on the relay. The BJT already saturated so even if I reduce the value of 1k res, the collector current won't rise anymore.

At first I suspect that my LDO regulator either cannot provide enough current to kick start the relay or the regulator is not fast enough, so I also tried changing the input and output capacitor to a higher value like 47uF, 100uF but the result still the same.

If I just remove the regulator from the circuit and power the relay from the 6V battery directly (4x1.5V battery), the relay can be turned on without any problem.

  • Can someone enlighten me with detailed explanation?
  • What could be causing this phenomenon?
  • What could be the solution?
\$\endgroup\$
6
  • 2
    \$\begingroup\$ What is the voltage out of the LDO while trying to turn the relay on? \$\endgroup\$
    – HandyHowie
    Jun 28, 2018 at 7:21
  • 1
    \$\begingroup\$ What kind of LDO are you using? What is its droput voltage? \$\endgroup\$
    – JG97
    Jun 28, 2018 at 7:23
  • \$\begingroup\$ Where are you located? The BC337 family recommended in my answer is available in most countries. If not available to you, there are other transistors with more current gain at 100 mA or so. Please add a link to your relay data sheet and/or specifiy relay current. \$\endgroup\$
    – Russell McMahon
    Jun 28, 2018 at 8:28
  • 1
    \$\begingroup\$ Not sure an L7805CV qualifies as an LDO. If the dropout is 2-2.5V your output probably isn't 5.0V. Try adding another battery making the supply 7.5V. that might do the trick. \$\endgroup\$ Jun 28, 2018 at 12:26
  • 2
    \$\begingroup\$ The 7805 is the opposite of an LDO (HDO?). You should give it around 3V at end of battery life to work with (in other words, 8V in). Or get a better regulator. But you'll still want more volts I think to account for the battery voltage dropping as it approaches the end of life (somewhere between 0.8V and 1V per cell usually is considered the end for an alkaline cell). That means you need maybe 8 cells or more, not 4. \$\endgroup\$ Jun 28, 2018 at 14:39

2 Answers 2

1
\$\begingroup\$
  1. Recommended operating limits 7805 datasheet:

enter image description here

You can see that V_min is 7V, while your Battery voltage is 6V!

  1. Why do you need an LDO ?

In your circuit configuration it makes absolutely no sense! Further, if you want to switch the relais, use a Pmos or Nmos transistor instead of a BJT, depending if you prefer a low-side or high-side switch.
Since a relay consists of a coil, don't forget to include a suppression diode in parallel to your relais. You should also read the datasheet of your relais about max/min ratings.

schematic

simulate this circuit – Schematic created using CircuitLab

  1. Be aware of stablity issues!

An inductor makes a regulator more unstable!

\$\endgroup\$
3
  • \$\begingroup\$ That circuit is just for testing purpose, in the very early design step, even the micro still not there. Anyway, why it must be pmos or nmos? Aren't BJT simpler to use/more suitable? \$\endgroup\$
    – Qrenz
    Jun 29, 2018 at 2:31
  • \$\begingroup\$ I nmos is safer in terms of stability. The coil and resistors at the base together with parasitic caps (C_D1, C_eb) can form an oscillator. Therefore a right resistor value has to be added in series to the base. Further if you drive a BJT from a µP port you have to deliver a static current, while with a nmos you don't. Secondly you have a saturation voltage of about 100-200mV between collector and emitter, while in nmos you have only I_ds*R_on. Hence, much safer to use a nmos! \$\endgroup\$
    – abu_bua
    Jun 29, 2018 at 9:33
  • \$\begingroup\$ BTW: Why don't you connect to relay direct to V_Battery --> Look at the datasheet what's the maximum voltage rating: you are unburdening the load of the voltage regulator. \$\endgroup\$
    – abu_bua
    Jun 29, 2018 at 9:37
0
\$\begingroup\$

The 2N2222 is an incredibly gutless transistor (to use a technical term)(:-) ).

You need to provide a link to your relay's data sheet, and a link to a 2N2222 data sheet would help people help you. You may have a 2N2222 or a 2N222A or ... . The specs vary enough to matter in this case. Assuming a 2N2222 ...

The data sheet shows that the transistor Beta/ Hfe/current gain is
35 at Ic = 10 mA with Vce = 10V! and
20 at 150 mA with Vce = 1V.

and

Vce_sat is 0.3V to 1V with forced Beta (= Ic/Ib) of 10.

In your case Ib = (Vsupply-Vbase)/Rbase ~= (5-0.6)/1000 = 4.4 mA.
If Beta = 20 then Icmax = 20 x 4.4 = 88 mA.
If Beta = 35 Icmax =~ 150 mA.
Deep ending on your relay the above may or may not be enough.
Worse, as Vcesat is in the 0.3V - 1V range the availablke relay current is further reduced.

I recommend a transistor with more hair on its chest.
As my standard "jelly bean" transistors I use the BC337-40 (NPN) or BC327-40 (PNP)of the equivalent SMD parts. The -40 indicates a MEAN beta of 400 (range = 250-600) at whatever-the-datasheet-says mA.
They are hardly dearer than other small transistors and about as capable as any for most purposes.

BC337 - Digikeyt selection page and ON semi BC337-40 datasheet Ic = 500 mA, Vce = 50V, Beta 100 - 600 at Ic=100 mA, ...

\$\endgroup\$
2
  • \$\begingroup\$ Anyway, if not using a regulator, that is the supply came directly from ~6V battery, the relay can be turned on (with a nice click sound), the current is ~53mA when I measured. Then I also tried adding RC network (68Ohm || 220uF) between the relay and the collector of 2N2222, and the relay can also be turned on with reduced current ~35mA. But if the regulator is there, the relay can't be turned on. I need to decide, anyway which one is a good practice for relay circuit? Put a regulator or direct connect to battery? \$\endgroup\$
    – Qrenz
    Jun 28, 2018 at 11:38
  • \$\begingroup\$ @Qrenz So surely the answer is to get rid of the regulator. Relays aren't that fussy about the voltage applied to the coil. Check the data sheet and see if it will work fine at about 5.4V (6V - 0.6V for the transistor). \$\endgroup\$
    – Simon B
    Jun 28, 2018 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.