2
\$\begingroup\$

I am trying to use two G5V-2-DC5‎ relays to switch four wires at the same time between two different outputs. All signals are 5 V. I've gotten this to work fine with a simple physical switch but want to trigger the relays from another circuit. Wiring the + side of the relay trigger to the input directly doesn't work. I've also tried putting a 2N2222 transistor in, triggered by the input with the collector wired to the positive rail but the emitter ends up with a voltage too low to trigger the relays.

I vaguely realize that there are usually resistors in a circuit (such as with an LED to restrict current) but any time I've put a resistor in this circuit the relays don't trigger. I could use some guidance on how to make this work.

The relay pins (4-13) connections are not shown in the below schematic. While they are wired they are part of a separate circuit. There are 2 relays wired in parallel which work properly and draw about 220 mA when pin 1 is wired directly to the +5 V rail via a physical switch.

circuit diagram

\$\endgroup\$
7
  • 3
    \$\begingroup\$ Draw and show a schematic of what you've done so far. \$\endgroup\$
    – Klas-Kenny
    Commented Jan 25, 2022 at 20:27
  • 1
    \$\begingroup\$ This seems like a common collector buffer which won't do what you want - please look at electronics.stackexchange.com/a/105866/9612 and let us know if it happens to answer your question. \$\endgroup\$
    – nanofarad
    Commented Jan 25, 2022 at 20:30
  • 1
    \$\begingroup\$ You also need to show what the "input" is. I would guess it isn't strong enough to drive the relay (which requires on the order of 100 mA), which is why you tried the transistor, but we need to know. \$\endgroup\$
    – Null
    Commented Jan 25, 2022 at 20:30
  • 1
    \$\begingroup\$ Sounds like you have the NPN transistor wired backwards. And the resistors for the transistor base is as much for protection of the transistor as it is to male it work. Add a schematic of what you have wired and we can tell you how to fix it. \$\endgroup\$
    – Passerby
    Commented Jan 25, 2022 at 20:39
  • 2
    \$\begingroup\$ Does this answer your question? Why load in NPN transistor switch are located in collector circuit? \$\endgroup\$
    – brhans
    Commented Jan 25, 2022 at 21:13

1 Answer 1

3
\$\begingroup\$

Thanks to the comments on my post I found my answer. The transistor needed to be wired to the GND end of the relays rather than the 5v side. circuit diagram

\$\endgroup\$
4
  • 2
    \$\begingroup\$ Don't forget the diode. Special effects are very visual without it. \$\endgroup\$
    – TQQQ
    Commented Jan 25, 2022 at 23:53
  • \$\begingroup\$ And thanks to other answers I realized that the level shifter was also not needed in this configuration. \$\endgroup\$
    – papercrane
    Commented Jan 26, 2022 at 0:12
  • 1
    \$\begingroup\$ Added a diode in reverse across the relays as suggested as well as a resistor on the base of the transistor. \$\endgroup\$
    – papercrane
    Commented Jan 26, 2022 at 0:19
  • 2
    \$\begingroup\$ TQQQ is right, there needs to be a diode across the coils [allaboutcircuits.com/textbook/semiconductors/chpt-3/… , to suppress the large voltage spikes that occur when the relay switches off. Also you must protect the base of the transistor with a resistor (try 1kΩ), to prevent excessive current flowing into the base when the control signal is above 0.7V. \$\endgroup\$ Commented Jan 26, 2022 at 0:19

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.