0
\$\begingroup\$

I want to use use an Arduino that is powered by 12 V to switch this relay:

enter image description here

The Arduino pins only give 5 V, so I want to try to design something that will give 12 volts to the relay coil when the Arduino output is at +5 out and then drop to zero volts when Arduino gives out 0. What I had in mind is here (where I am only modeling the relay portion with the coil (not sure what the actual inductance is either)

schematic

simulate this circuit – Schematic created using CircuitLab

Will this work?

\$\endgroup\$
  • \$\begingroup\$ Where does 6V come in here? \$\endgroup\$ – Samuel Feb 23 '16 at 21:00
  • \$\begingroup\$ I need 6V across the coil \$\endgroup\$ – yankeefan11 Feb 23 '16 at 21:04
  • \$\begingroup\$ Have you tried powering the coil from the Arduino's 5V rail (not the GPIO, so keep Q1/etc) to see if the coil still works? \$\endgroup\$ – Techydude Feb 23 '16 at 21:04
  • 1
    \$\begingroup\$ "Coil voltage: 12VDC", as usual with Automotive relays. Where did you even see 6V? \$\endgroup\$ – Asmyldof Feb 23 '16 at 21:18
  • 3
    \$\begingroup\$ The relay is specified to perform as advertised in every way when you put 12 volts across the coil, and that's how you should run it. With only 5.6 volts across the coil it'll be limping along and shock, vibration, ambient temperature rise and the phase of the moon can cause it to malfunction. \$\endgroup\$ – EM Fields Feb 23 '16 at 21:34
1
\$\begingroup\$

Note: The question was changed out from under this answer from wanting to drive a 6 V relay with a 12 V power supply, to discovering it was a 12 V relay all along. I'll leave this here since it's a good answer to the original question, which might be useful to others.


The simplest way requires no additional parts than what you would have to use anyway, just arranged differently:

This actually controlls the current thru the relay instead of the voltage across it. However, the DC resistance of relays is well controlled, so they can just as well be driven with a specific current. The relay current will be close to 4.3V / R1, which is 43 mA in this example. Look at the relay spec, find the full on current, or get it by dividing the normal coil voltage by its DC resistance. Take 4.3 V and divide it by that current to get the R1 resistance.

Note that while this method is simple, it's not very efficient. Twice the relay power will be used.

A even electrically simpler but more complicated firmware method is:

This has the advantage of being quite efficient. It will draw half the current from the 12 V supply when the relay is on as the previous circuit. The PWM should be fast enough so that the current thru the relay changes little during a half-pulse time. I'd try to run the PWM at a bit above the audio range, like 25 kHz. You don't need much PWM resolution since you want a fixed 50% duty cycle.

Of course another option is to get a 12 V relay. That is one of the common relay coil voltages. Whatever relay you have probably comes in a 12 V coil variant.

\$\endgroup\$
1
\$\begingroup\$

Simplest way is to use a resistor in series with the relay coil and equal to the coil's resistance.

Its power rating should be greater (twice isn't a bad number) than 6 volts times the relay coil current, and the catch diode should go from Q1 collector to +12 volts.

UPDATE:

Considering the edits to your question, it seems like that'll work, so let's find out. :)

The relay coil takes about 53 mA with 12 volts across it, so forcing a beta of around 10 (accepted engineering practice to ensure saturation) from Q1 would require its base current to be around 5 milliamperes.

If you figure a \$V_{BE} (sat)\$ of around 1 volt, then to get 5mA into the base R1 would have to drop 4 volts at 5 milliamperes.

Then, since \$ R = \frac{E}{I}\$,

$$ R1 = \frac{4V}{0.005A} = 800\text { ohms}$$

Your 1000 ohms would force 4 milliamperes into the base, so with a load of 50 milliamperes on the collector, R1 would have a current gain (\$\beta\$) of:

$$ \beta = \frac{Ic}{Ib} = \frac{50mA}{4mA} = 12.5 $$

Since most jellybean NPNs sport a natural beta far greater than that, at that collector current, almost any transistor you choose for Q1 will work.

And, since the Arduino should have no problem sourcing 5mA at 5 volts out, the circuit should work, no problem.

\$\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.