1

schematic

simulate this circuit – Schematic created using CircuitLab

I use D1 to visually indicate the active transistor. However, gate pin acts as if it were floating. What is wrong with my gate-grouding mechanism?

Obviously, small current originates somewhere, even with MCU's gate-facing pin = LOW. Replacing the MCU with the battery doesn't resolve the problem - weak noise comes out of the speaker. If, i.e. LED is introduced instead - if flashes slightly. If 5V RAIL is replaced with i.e. 12V, in OFF mode I can still see 10V on the output.

Removing D1 solves everything.

How can D1 cause M1 gate to float?

FlegmatoidZoid
  • 511
  • 4
  • 17
  • 1
    D! is effectively very high impedance at voltages well below its on voltage. If the uC provides high/low the FET should turn off . BUT if the uC provides high/float there is no pull down to ground. | Butzke's R3 can be 100k or even 1 M probably. | As shown if you use a capable FET the speaker will experience hard DC across it if FET remains on. It may survive this but may not depending on speaker and FET. This is OK if designed that way withon device specs. – Russell McMahon Feb 17 '14 at 20:35

4 Answers4

2

The only "gate-grounding mechanism" in your circuit is the MCU IO pin and, if you are hearing a weak noise thru the speaker (when the MCU output is low), then your MCU is not adequately connected to ground or your MOSFET is incorrectly wired or broken. I would also recommend that you put (maybe) 100 ohms in series with your speaker to limit the current drawn from the power rail when the MOSFET does turn on.

If, on the other hand you are floating your MCU output or have the MCU in reset, then leakage currents from the IO pin could begin to turn on the MOSFET and the sound you hear is power supply noise. The LED, D1 could allow a voltage of maybe 1.5 volts to appear on your gate under these circumstances and that is starting to be enough to turn a "standard" MOSFET on.

Andy aka
  • 434,556
  • 28
  • 351
  • 777
1

You can force the ground in the gate using a pull down resistor.

For the noise you can use a RC Snubber to filter the noise generated by the inductive load of the speaker.

schematic

simulate this circuit – Schematic created using CircuitLab

Butzke
  • 1,012
  • 12
  • 27
1

Your pulldown arrangement of D1 and R1 does not work well due to the forward voltage of D1. For any significant current to flow, the gate must be above this forward voltage. If D1's forward voltage is higher than the threshold voltage of M1, then it won't be very good at holding the transistor off.

A solution is to add a resistor in parallel, as Butzke suggests.

Also as suggested, you should do something to handle the inductive load, either an RC snubber, or an antiparallel diode, etc. As the circuit is now, when the speaker is switched off, it's probably driving M1 into breakdown. That's hard on the transistor, and may be operating it outside of specifications.

Phil Frost
  • 56,804
  • 17
  • 141
  • 262
0

Decoupling, decoupling and don't forget decoupling

  • Make sure the power supply you use is regulated and sufficiently decoupled with buffer caps.
  • Decouple the microcontroller with a 100nF cap to ground, one per Vcc pin.
  • Add a capacitor from the speaker 5V side to the transistor's source, large enough to suppress switching noise from the transistor.

Check this answer for more details.

jippie
  • 33,033
  • 16
  • 93
  • 160