Transistor driven relay

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

warpie

Well-known member
Joined
Feb 7, 2009
Messages
1,581
I'm playing around with a 1073 circuit where I'd like to add a relay mute switch as well as a number of other relays for selecting input, bypassing the EQ, etc...

Do I need to drive the relays from a transistor? What is the general rule for using transistors in such applications?

The relays are 24V and and I'll have a dedicated power rail (+24V) for all the relays and LEDs.

The mute relay would be something as simple as this.

Thanks!
w.
 

Attachments

  • mute_relay.jpg
    mute_relay.jpg
    30.3 KB · Views: 37
Thank you but my actual question is when a transistor is needed and when it can be omitted*

*and simply have a mechanical switch controlling directly the relay.


EDIT:

The datasheet states that the Nominal operating Power for the 24V relay is 200mW(24V), so that'll be around 9mA?
If that's the case even by having 10 relays, the total current draw would be around 90mA.
Considering that I'll have a dedicated 24V rail for the relays and the LEDs, do I really need transistors to drive the relays?

 
warpie said:
Thank you but my actual question is when a transistor is needed and when it can be omitted*

*and simply have a mechanical switch controlling directly the relay.


EDIT:

The datasheet states that the Nominal operating Power for the 24V relay is 200mW(24V), so that'll be around 9mA?
If that's the case even by having 10 relays, the total current draw would be around 90mA.
Considering that I'll have a dedicated 24V rail for the relays and the LEDs, do I really need transistors to drive the relays?
You should also be able to find specs rating current/voltage of switches.

JR
 
Hi warpie
I would usually go for a transistor driving a relay as the base voltage transition is typ 0.6 volts and the magnetic field from this is low, where the 24v driving the relay coil the field is very high. The placement of the relay could have long path through switch controlling it and pickup into other circuity could be a noise spike. As an engineer you need to be aware that nothing is perfect, and everything is a comprise to the desired performance.
Duke
 
Thank you Duke!

So, are you suggesting that in alI (or in most) cases a relay driver is good practise?

Did I get this right? :)

Also, is it correct to assume that if there's some distance between the switch and the relay, it's better to have the transistor closer to the switch rather than to the relay?

thanks again!
 
warpie said:
Thank you Duke!

So, are you suggesting that in alI (or in most) cases a relay driver is good practise?

Did I get this right? :)

Also, is it correct to assume that if there's some distance between the switch and the relay, it's better to have the transistor closer to the switch rather than to the relay?

thanks again!
um no... for that scenario the transistor should be near the relay to keep the high current loop area small (follow the current).

A small current in the base, switches a larger current in the collector.

This is an advanced design concept...  Best overall design needs to weigh "all" the factors involved.

Factors that we (I), do not know.

JR
 
You can directly power a relay through a switch. Sure. But in practice it's not that common because sudden current pulses running through long traces can generate magnetic fields that can be picked up by nearby circuitry. High gain, high impedance circuitry or transfomers would be particularly susceptible. It is also not common because it is equally bad to dump sudden current pulses into a ground network shared by signal circuitry. And generally it's a good idea to minimize traces / wires that have significant power behind them so that if something shorts you don't make a mess.

However, you could probably do it and not get switching noise. The key is to run traces / wires sending current physically close to the equal and opposite return current. Then the magnetic fields cancel out. So imagine that you have a switch, a relay and a power supply. If you just haphazardly ran a wire from the +24V supply sending current to the relay and then from the relay to the switch and then from the switch to some random grounding point, that would probably cause unwanted noise. However, if you send current to the relay, then send to the switch and then carefully run the switch return wire physically close to the corresponding send wire back to the relay (where it's not even connected to anything) and then carefully run that wire physically close to said relay send wire where it connects to ground next to the power supply filter cap, then it would probably be fine. Meaning don't make a "loop" because it will radiate magnetic fields.

Or, you can just send current to the relay, through a transistor and then return current next to the relay send wire and your loop is small. Now you can just supply a small voltage to the transistor to control the relay. Also a mosfet like 2N7000 is good.
 
In case it was not mentioned, incorporating the transistor makes for an excuse to build-in some form of debouncing too.
 
Drive relay direct from switch. That has worked for roughly two centuries.

Until you find a case where that won't work. If your "switch" becomes a micro controller, these can't drive relays direct, they need a transistor. Yes, long relay-coil lines may tick-up your audio, where a <1V 10mA base-drive might not. (But relays tend to tick-off audio other ways also.)

 
Thank you all for your help! Much appreciated.

It seems that a relay driver is the way to go then since it'll probably improve things or at least it won't do any harm.

Is the attached pic a good way to implement the transistor and if so, what would best? A or B?

Also, if a switch is to be used to control two relays, is it better to have two different transistors or a single transistor would be enough to control both relays?


boji said:
In case it was not mentioned, incorporating the transistor makes for an excuse to build-in some form of debouncing too.
You've lost me there. Are you suggesting having some debouncing circuit? I thought that's the case with  uC, which I won't be using.
 

Attachments

  • relay_mute.jpg
    relay_mute.jpg
    41.7 KB · Views: 37
warpie said:
Thank you all for your help! Much appreciated.

It seems that a relay driver is the way to go then since it'll probably improve things or at least it won't do any harm.

Is the attached pic a good way to implement the transistor and if so, what would best? A or B?

Also, if a switch is to be used to control two relays, is it better to have two different transistors or a single transistor would be enough to control both relays?

You've lost me there. Are you suggesting having some debouncing circuit? I thought that's the case with  uC, which I won't be using.
Mechanical switches do not cleanly open close, but may bounce during transition. Switch bounce driving an inductive load could aggravate spikes.  When driving a transistor low side switch base it is trivial to add a C across the base-emitter junction to slow it down and effectively debounce it.

JR
 
Deboucning means to prevent the relay from switching on / off several times as the switch transitions. In practice it probably would not be a major problem but the fix is to add a simple RC filter to the control signal.

You could use B with a small cap (like 10n) from the base to ground.

But if you want to get pedantic about it I would do this: Switch -> diode -> 33k -> 100n cheap ceramic cap to ground -> 33k / 10K voltage divider -> 2N7000 transistor gate on voltage div. Connect the relay / protection diode to the drain (like orientation B in your drawing). But a regular transistor would work equally well.
 
PRR said:
Drive relay direct from switch. That has worked for roughly two centuries.

Until you find a case where that won't work. If your "switch" becomes a micro controller, these can't drive relays direct, they need a transistor. Yes, long relay-coil lines may tick-up your audio, where a <1V 10mA base-drive might not. (But relays tend to tick-off audio other ways also.)

At Neve back in the 70s we drove relays directly from a switch. However, most relay circuits included a local energy stored to prevent clicks appearing on the supply rails. This usually consisted of a series 47 ohm or 100 ohm resistor and a 100uF capacitor.

Cheers

Ian
 
So something like this would be OK?

I'd rather not overcomplicate things as long as it would fully operate without hiccups  :)

Also, what about R3 and R4? Is 10k a good value?

Thanks again for your help!

BTW, I think I've seen some examples in the past where C3 is as high as 220nF.
 

Attachments

  • relay_mute2.jpg
    relay_mute2.jpg
    31.4 KB · Views: 31
Yeah,  that's fine. But bear in mind that 24V across 10K means that you're going to have 2mA pouring into the base. You could use 33K series instead or even higher to get that below 1mA. Or use a 2N7000 for zero mA. They cost pretty much the same as a regular bipolar transistor so there's really no reason not to use the mosfet here.
 
Thanks squarewave,

I have a bunch of  bc550 so I thought I'd use these. I don't  mind if there's a bit of current draw I guess.
I mean, even if I use 10 relays, the total current consumption would be around 10mA or less, right?

So, changing R3 to 47k or even 100k (and leave R4= 10k) would be fine? 

Also, what about using the same switch for 2 (or maybe 3) relays? Can I use a single (common) transistor for all the relays as long as they're close to each other on a PCB?
 
warpie said:
So, changing R3 to 47k or even 100k (and leave R4= 10k) would be fine? 
Yeah, probably. The parameters governing that would be the voltage and current on the base. The voltage has to be above ~0.6V. So 100k/10k voltage divider is >2V so ok. And base current should be > Ic/Hfe or some such. So if the relay current is ~10mA and the transistor Hfe is maybe a little low at 100 that's 10mA/100 = 0.1mA. So 24V / 100K = 0.24mA so again ok. But 33k gives me a warmer fuzzier feeling.

warpie said:
Also, what about using the same switch for 2 (or maybe 3) relays? Can I use a single (common) transistor for all the relays as long as they're close to each other on a PCB?
Yes, that would be fine. But usually if you do that they would be run in series like 24V -> relay coil1 -> relay coil2 -> transistor -> ground. That uses less power because you're not dropping as much voltage across each coil like you would running them in parallel. However, in this case you would probably need to use 12V relays and not 24V relays. So if you bought the relays already, you might have to run them in parallel. There might be a reason for not doing that but I can't think of a reason why at the moment.
 

Latest posts

Back
Top