-1
\$\begingroup\$

I have this circuit.

My problem is: Why I don't get 5v on relay pins if I have a 5v 3A power supply powering everything? I only get about 4.7v.

schematic

simulate this circuit – Schematic created using CircuitLab

BAT1 = 5v 3A power adapter

Using a multimeter I get 5.1v

Thank you very much.

\$\endgroup\$
  • 3
    \$\begingroup\$ How do you want the current to flow through the transistor? I can't see a situation where Vce will ever be positive... \$\endgroup\$ – Eugene Sh. Nov 22 '16 at 17:43
  • \$\begingroup\$ As @EugeneSh. said, that transistor will never pass current. What do you think it's doing there? You have the collector connected to the negative side of the battery \$\endgroup\$ – DerStrom8 Nov 22 '16 at 17:44
  • 1
    \$\begingroup\$ I'm going to guess that the OP meant to mirror the transistor about the x-axis, though if that indeed is how it is connected in real life, it won't work. \$\endgroup\$ – Brendan Simpson Nov 22 '16 at 17:48
11
\$\begingroup\$

Your transistor is backwards. The reason you are getting 4.7 volts is because of the PN junction between the base and emitter in the transistor. When D8 is high, this junction is forward biased and drops about 0.7 volts.

Try something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

Remember, the transistor is like a water valve in this instance. The collector is where the current flows into it, and the emitter is where the current flows out. Current flow is controlled by the base. In this case you want the current to flow through the LED and the relay into the collector, and then "emit" that current into ground, which completes the circuit.

\$\endgroup\$
  • 2
    \$\begingroup\$ Nice and clean. +1 \$\endgroup\$ – EM Fields Nov 22 '16 at 18:09
  • \$\begingroup\$ Although water valves are often bidirectional and transistors are not. \$\endgroup\$ – user253751 Nov 22 '16 at 21:49
  • 1
    \$\begingroup\$ @immibis Well that's why I said "like a water valve". \$\endgroup\$ – Brendan Simpson Nov 22 '16 at 21:50
  • \$\begingroup\$ @immibis: Not true. Connect the transistor upside down and it'll still work, mas o menos... \$\endgroup\$ – EM Fields Nov 23 '16 at 2:27
1
\$\begingroup\$

I am assuming that you are measuring 4.7V across the relay coil terminals, and your supply measures 5.1V.

The transistor will always drop a bit of voltage. A 0.4V drop indicates your transistor is on fairly well, perhaps it could do a bit better.

You have not told us the relay coil resistance, but if I assume 72mA for a JS1A type relay and another 3mA for the LED, that's 75mA. Typically we would like to see base current of about at least 1/20 of that, and you are giving it more than that, so that is fine.

However, your transistor has E and C swapped. What happens in that case, is that the transistor will actually work except its characteristics will mostly be worse. Breakdown voltage will be rated at 5V, not 75V, and current gain will be probably 1/10 or less of what it is when properly connected. Because of the low gain, the Vce ends up being 0.4V when it should be more like 0.1 or 0.2V.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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