My schematic


The components

  • BSN20 is a N-channel enhancement mode field-effect transistor (datasheet)
  • IRF7416 is a HEXFET power MOSFET (datasheet)

This is a part of a project in which the line into R2 comes from the PWM of an ATtiny88 (datasheet).

The R2 is set as an output from the ATtiny88, at first the heater line was High all the time when R2 was toggled (PWM).

When attempting to debug the hardware I found that if I placed flux or isopropyl alcohol across the line to R2 (from the ATtiny88) to ground, the heater line would toggle as expected (it took longer than it sounds to come to this conclusion).

In further research I found this webpage which indicated I may need a resistor to help pull down the gate pin of BSN20. At the time I only had a diode so I placed it with the "flat" side to the gate and the "triangle" side to ground and it made it work.


My three questions are:

  1. In an ideal circuit should my design work?
  2. In a real circuit was my mistake that I needed a Mega Ohm plus resistor between the gate and ground to make sure the gate went to ground?
  3. Is the diode working as a hack, such that it provides a few Mega Ohm resistance with the way I placed it in my circuit?

In the long run I'd like to turn my DIY prototype into a produced circuit board. I have a computer science background not EE and would like to know what's going on and where I made my mistakes so that I can produce a valid design.

One more question

With more time to debug, i found one more variable. the voltage on the ground line in relation to the LDO regulator and at the leg of the source pin of BSN20 is reading 7.3mV. The voltage at several points across the ground trace showed different values. So one finial question. This seems to be either bad board design and/or more-likely a flux and other dirt under some of the chips acting like resistors pulling up the ground line. So...

  1. Why is the diode is working for me?
    • Mohm resistance
    • when the MCU sets the pin to ground its pulling the local ground line down to match the MCU in other words causing ~0 volts between the gate and the source.
  • \$\begingroup\$ Did you make measurements on the Gate of the IRF? Did this line toggle. \$\endgroup\$ – Tom L. Oct 11 '14 at 9:45
  • \$\begingroup\$ What's the MCU's supply voltage? \$\endgroup\$ – EM Fields Oct 11 '14 at 14:46

1) Yes.

2) No. Your mistake was in not realizing that the PWM output from the MCU couldn't get close enough to ground to turn Q1 OFF all the way, and therefore turn Q2 OFF all the way.

3). Yes, and you shouldn't use a diode, you should use a resistor and it should be something way less than a megohm in order to keep Q1's output transitions crispy. Depending on the MCU's supply voltage, 10k to 100k might be OK.

  • \$\begingroup\$ Just one extra note: putting a resistor between the Gate & the Source of Q1 is also warmly recommended because the controlling microcontroller may sometimes stay in a state when its output pins are in high-impedance state (not driven to either logical level), for example during reset or during programming. In that case the Gate of Q1 would be left floating, which is a highly undesirable state. \$\endgroup\$ – Laszlo Valko Oct 11 '14 at 20:43

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.