Choosing a suitable N-channel mosfet to relays for a A/B amplifier switch - Page 1
Forum section: electronics / beginners

author: perdrix
author_rank: Frequent Contributor
timestamp: December 07, 2023, 02:19:46 pm
content: 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

author: CountChocula
author_rank: Unknown
timestamp: December 07, 2023, 02:47:37 pm
content: 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.

author: ejeffrey
author_rank: Super Contributor
timestamp: December 07, 2023, 03:12:38 pm
content: 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.

author: ejeffrey
author_rank: Super Contributor
timestamp: December 07, 2023, 03:14:41 pm
content: Nevermind that does have a rating for 4.5 V drive, should be fine.

author: Terry Bites
author_rank: Super Contributor
timestamp: December 07, 2023, 03:58:46 pm
content: 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+100nI'd avoid ground paths made via the mounting holes, its not good practice.

author: perdrix
author_rank: Frequent Contributor
timestamp: December 08, 2023, 10:00:22 am
content: Quote from: Terry Bites on December 07, 2023, 03:58:46 pmSo 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

author: HwAoRrDk
author_rank: Super Contributor
timestamp: December 08, 2023, 11:34:03 am
content: 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.

author: dietert1
author_rank: Super Contributor
timestamp: December 08, 2023, 01:48:17 pm
content: 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

author: perdrix
author_rank: Frequent Contributor
timestamp: December 08, 2023, 02:58:05 pm
content: Quote from: dietert1 on December 08, 2023, 01:48:17 pmHere's the schematic as it currently stands:It has 4 DPCO relays, if you can come up with a neat solution using low RDSOnMOSFETs 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

author: perdrix
author_rank: Frequent Contributor
timestamp: December 08, 2023, 03:31:04 pm
content: Quote from: HwAoRrDk on December 08, 2023, 11:34:03 amOOOPS! 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 RDSOnN 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

author: perdrix
author_rank: Frequent Contributor
timestamp: December 14, 2023, 01:50:49 am
content: 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