9
\$\begingroup\$

I have a solid state relay which needs at least 3V to activate, and I need to toggle with a 2.3V output from a microcontroller. I've also got a 6V 1A power supply which I can use to power the relay.

I understand I need to use transistors somehow and I've got the basics down, but I don't understand why I need resistors in the circuit for the transistor to work.

So my questions are: why do I need resistors, how do I know which resistor to use, and which transistor is suitable for my needs?

(The solid state relay is a Crouzet 84 134 900)

\$\endgroup\$

2 Answers 2

11
\$\begingroup\$

Resistors in this situation are about current limiting. If you applied your 2.3V micro output directly across a transistor base-emitter junction, the transistor would try to draw far more current than is really needed, which would harm either the transistor, the micro, or both. So you put a 500 ohm or 1K resistor in series and this limits the current into the BE junction. The particular value depends on the transistor.

You'll choose your transistor primarily based on the needs of the relay. You need something that can withstand the 6V supply when not conducting, and that can pass enough current to close the relay when it is conducting. Now, you said this was a solid state relay, so this current is probably a lot less than you'd need for a mechanical relay, so you'd probably get away with any garden variety switching transistor, e.g., 2n2222, 2n3904, etc.

Fwiw, there are solid state relays that can be directly driven by logic circuits.

\$\endgroup\$
1
  • \$\begingroup\$ Hello, i wanted to ask (why would it draw more current than is needed?) \$\endgroup\$ Commented May 9, 2016 at 16:32
8
\$\begingroup\$

Resistors in this context are used to provide a predictable current. The current thru a resistor is known if the voltage accross the resistor and the resistance are known. The relationship between these three is called Ohm's law.

The input of your solid state relay is most likely a LED. You didn't provide a link to the datasheet, so I didn't look it up. The datasheet will also tell you the current it needs, but let's assume 10mA now for sake of example. A good drive circuit for this case is:

When the digital output is low, the transistor will be off, no current will flow thru it, and the relay will be off. When the base of Q1 is driven to 2.3V when the digital output is high, the emitter will be one B-E drop less. Let's say the B-E drop is 700mV, so the emitter voltage will be 1.6V. That is also the voltage accross the resistor. By Ohm's law we know the current thru the resistor will be 1.6V / 160Ω = 10mA. Due to the transistor's gain, most of this will come thru the collector, which means thru the relay input. This circuit is essentially a switchable fixed 10mA current sink.

The collector voltage of the transistor will be whatever it needs to be to maintain that 10mA current, as long as that is within the range it can manage. The collector can go a little lower than the base voltage and up to the supply voltage. For simplicity, let's say it's lower limit is the base voltage of 2.3V when on, which leaves up to 3.7V that the circuit can apply to the relay. You say the relay drops 3V when on, so that all sounds fine.

\$\endgroup\$
3
  • \$\begingroup\$ I've usually seen the resistor placed between the input and the base. Is there a compelling reason to put it in the load path? \$\endgroup\$
    – JustJeff
    Commented Dec 31, 2011 at 17:11
  • \$\begingroup\$ I think I see - you're assuming the SSR's input is essentially a bare LED, so you're getting double duty from the resistor by using in the emitter circuit. \$\endgroup\$
    – JustJeff
    Commented Dec 31, 2011 at 17:21
  • \$\begingroup\$ @JustJeff: Yes. This scheme only requires the single transistor and also allows the supply voltage to vary. The downside is that it eats up more voltage, but in this case there is enough voltage to spare given the 6V supply. \$\endgroup\$ Commented Dec 31, 2011 at 17:34

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.