Author Topic: Choosing a suitable N-channel mosfet to relays for a A/B amplifier switch  (Read 2053 times)

0 Members and 1 Guest are viewing this topic.

Offline perdrixTopic starter

  • Frequent Contributor
  • **
  • Posts: 665
  • Country: gb
I'm designing an A/B amplifier switch to switch two amplifiers to a pair of speakers.

I'm planning on an ATTiny13A (running off 5V) to decode IR commands and to turn on/off a pair of DPDT relays.

My initial thought was to have the uP drive an N-channel MOSFET which in turn drives an SPST relay, whose output drives a pair of  Winner 40.52 12V DPDT relays.

But on further thought I think I can drive both 12V DPDT relays directly using the FET, if I choose the "right" FET.

Would an MMBF170 be suitable with a gate resistor of 680R and G-S resistor of 68K (driven from the 5V uP)?

Here's a proposed schematic:



Thanks, David
« Last Edit: December 07, 2023, 02:41:42 pm by perdrix »
 

Offline CountChocula

  • Supporter
  • ****
  • Posts: 208
  • Country: ca
  • I break things—sometimes on purpose.
Re: Choosing a suitable N-channel mosfet to relays for a A/B amplifier switch
« Reply #1 on: December 07, 2023, 02:47:37 pm »
Sounds to me like it would — the relays need 55mA each, so at 110mA you're well below the rated current of the FET and it should work fine as a low-side switch. Don't forget to add flywheel diodes to the relays to prevent back EMF problems. The 680Ω seems a bit high to me, perhaps consider 100Ω to make sure that the voltage across the relay's coil doesn't raise too slowly.
Lab is where your DMM is.
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 3888
  • Country: us
Re: Choosing a suitable N-channel mosfet to relays for a A/B amplifier switch
« Reply #2 on: December 07, 2023, 03:12:38 pm »
I would definitely stick with a mechanical relay.  It's no problem to drive two relays from the same mosfet but the one you are using is a 10 volt gate drive.  Use a logicec fet or a BJT. 
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 3888
  • Country: us
Re: Choosing a suitable N-channel mosfet to relays for a A/B amplifier switch
« Reply #3 on: December 07, 2023, 03:14:41 pm »
Nevermind that does have a rating for 4.5 V drive, should be fine.
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2504
  • Country: gb
  • Recovering Electrical Engineer
Re: Choosing a suitable N-channel mosfet to relays for a A/B amplifier switch
« Reply #4 on: December 07, 2023, 03:58:46 pm »
R3 isn't necessary unless the trace or wiring from the micro is very long. It will delay switch on by a few nS or so and thats about it.  Vg~30pF. The ATTiny13A has pushpull outputs, that kinda makes R4 superfluous too.

You dont need 1A diodes for flyback protection. Small signal diodes eg 4148 types are fine for small relays operating at low duty cycles.
As noted The MMBF170 can easily switch the full relay current.
Substantial decouling caps on the 12V line adjacent to the coils are a good idea. Without it you might radiate some clicks and pops especially is your 12V is poorly routed/ wired.

If that ever becomes a problem, sort out the wiring and use an RC snubber across the coils. Typically 100R+100n
I'd avoid ground paths made via the mounting holes, its not good practice. 
 

Offline perdrixTopic starter

  • Frequent Contributor
  • **
  • Posts: 665
  • Country: gb
Re: Choosing a suitable N-channel mosfet to relays for a A/B amplifier switch
« Reply #5 on: December 08, 2023, 10:00:22 am »
R3 isn't necessary unless the trace or wiring from the micro is very long. It will delay switch on by a few nS or so and thats about it.  Vg~30pF. The ATTiny13A has pushpull outputs, that kinda makes R4 superfluous too.

... decouling caps on the 12V line adjacent to the coils

So just delete both R3, R4 and connect PB1 direct to the gate?   If so that's good - reduces the BOM :).

Decoupling caps across the coils?  What sort of value did you have in mind 100n, 1uF, 10uF, 100uF?

I'll float the mounting holes ...

Snubbers - did you really mean across the coils?

Thanks, David
 

Online HwAoRrDk

  • Super Contributor
  • ***
  • Posts: 1561
  • Country: gb
Re: Choosing a suitable N-channel mosfet to relays for a A/B amplifier switch
« Reply #6 on: December 08, 2023, 11:34:03 am »
No, I would not remove R4. Don't forget that at startup the ATtiny's pins will default to inputs until your code configures them otherwise, so without a pull-down the gate of the 'FET will be floating momentarily, which may cause spurious activation of the relays.

Also, may I suggest a polarity protection diode on the 12V input? I note you are using a centre-negative barrel jack, which is less common than centre-positive. The diode will protect against someone accidentally connecting the wrong polarity supply.

Oh, and if you want to reduce components, why the LM317? Why not a fixed-ouput 5V regulator? For example 7805, et al.
« Last Edit: December 08, 2023, 11:40:39 am by HwAoRrDk »
 

Offline dietert1

  • Super Contributor
  • ***
  • Posts: 2376
  • Country: br
    • CADT Homepage
Re: Choosing a suitable N-channel mosfet to relays for a A/B amplifier switch
« Reply #7 on: December 08, 2023, 01:48:17 pm »
By the way: for better sound quality one can nowadays use mosfet switches instead of relays. Relays have been a known source of trouble in high end active speakers. The reason is that some relays strong enough to handle high power of amplifier may not be working well for "dry" switching after some years. In active speakers this meant that the tweeter output would become unreliable and/or distorted.
A back-to-back pair of low RDSON mosfets with a PVI1060 isolated gate drive works much better.

Regards, Dieter
« Last Edit: December 08, 2023, 01:51:09 pm by dietert1 »
 

Offline perdrixTopic starter

  • Frequent Contributor
  • **
  • Posts: 665
  • Country: gb
Re: Choosing a suitable N-channel mosfet to relays for a A/B amplifier switch
« Reply #8 on: December 08, 2023, 02:58:05 pm »
By the way: for better sound quality one can nowadays use mosfet switches instead of relays. Relays have been a known source of trouble in high end active speakers. The reason is that some relays strong enough to handle high power of amplifier may not be working well for "dry" switching after some years. In active speakers this meant that the tweeter output would become unreliable and/or distorted.
A back-to-back pair of low RDSON mosfets with a PVI1060 isolated gate drive works much better.

Regards, Dieter

Here's the schematic as it currently stands:



It has 4 DPCO relays, if you can come up with a neat solution using low RDSOn MOSFETs to replace all of those, I'm interested as I too am a bit concerned about the issue of dry switching.

I'm not certain if I need the dummy load resistors - I know that's an issue for valve (tube) amplifiers, but I don't know if they are necessary for solid-state class AB and class D amplifiers??

Thanks, David
« Last Edit: December 08, 2023, 03:03:03 pm by perdrix »
 

Offline perdrixTopic starter

  • Frequent Contributor
  • **
  • Posts: 665
  • Country: gb
Re: Choosing a suitable N-channel mosfet to relays for a A/B amplifier switch
« Reply #9 on: December 08, 2023, 03:31:04 pm »
No, I would not remove R4. Don't forget that at startup the ATtiny's pins will default to inputs until your code configures them otherwise, so without a pull-down the gate of the 'FET will be floating momentarily, which may cause spurious activation of the relays.

Also, may I suggest a polarity protection diode on the 12V input? I note you are using a centre-negative barrel jack, which is less common than centre-positive. The diode will protect against someone accidentally connecting the wrong polarity supply.

Oh, and if you want to reduce components, why the LM317? Why not a fixed-ouput 5V regulator? For example 7805, et al.

OOOPS!  The negative centre barrel jack wasn't intended!!!  I've replaced the barrel jack with a regular screw terminal connection for 12V.   I'll add a Bob Pease mosfet circuit to protect against reverse power:



What's a nice readily available cheap low RDSOn N channel power MOSFET in surface mount?  I'm thinking of using an IRFS7537TRLPBF is D2-Pak.  Bob used the good old IRF511 which is TO-220.

Yes I will consider using a 7805 ...

Thanks, David
« Last Edit: December 08, 2023, 04:04:48 pm by perdrix »
 

Offline perdrixTopic starter

  • Frequent Contributor
  • **
  • Posts: 665
  • Country: gb
Re: Choosing a suitable N-channel mosfet to relays for a A/B amplifier switch
« Reply #10 on: December 14, 2023, 01:50:49 am »
I priced it all up and in the end decided that going with MOSFETs and Optical gate drivers was going to be just too costly.

So I went back to relays but using two pairs of contacts for each signal line:



David
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf