• dragontamer@lemmy.worldM
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    2
    ·
    10 months ago

    with a resistor to keep the gate low

    The resistor is 'not connected". That means its resistance is infinity, as there’s no real connection there.

    • Hugin@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      10 months ago

      It’s not connected but this is a very common circuit for driving some load efficiently that the gpio can’t handle for it self. The two pins probably go to some load like a LED, motor, or relay that the gpio can’t power on it’s on. When the transistor is off current will be almost zero so no power loss. When the transistor is on it’s resistance is close to zero using all the power in the unknown load and the resistor. The resistor is probably there for current limiting in case the pins are shorted.

      • dragontamer@lemmy.worldM
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        10 months ago

        Small MOSFETs have like single-digit nano-coulombs of charge. I don’t know what MOSFET this is, but lets take a jellybean 2N7000 for instance.

        https://www.onsemi.com/pdf/datasheet/nds7002a-d.pdf

        You can see that after 1 nano-coulomb the gate is charged and fully active. That means that even a 1uA GPIO pin can charge the 2N7000’s gate in just 1-milisecond (assuming it can reach the 5V needed to charge this old, crappy MOSFET). But yeah, the ridiculously low currents needed to drive MOSFETs are the reason why they’re so popular in electronic circuits.

        You almost never need a resistor in practice. In fact, I’ve probably put more resistors in series with a MOSFET (slowing it down, to minimize noise / switching speeds).


        Larger, so called “Power MOSFETs” have significant gate-charges, so you usually use a 2N7000 (or maybe even a dedicated MOSFET-driver chip) to drive those. But logic-level? Even the cheapest jellybeans? Tiny gate-charge, easy to use, very simple circuits. Don’t need a resistor at all.


        Are you confusing a MOSFET (which is a voltage-controlled device) with a BJT? BJTs are current-controlled, and therefore need higher-amounts of current to drive well… higher currents. A Beta of 100 is reasonably common in the BJT world, and that’s just not enough for a typical GPIO to push a 5Amp motor or something. (ex: need 50mA and Beta 100 for BJT to drive 5Amp through a BJT).

        • Hugin@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          10 months ago

          I should have been clear about which resistor. I was talking about R18 as current limiter to the presumed load on the header. That way if the header gets shorted or the load has too high a draw at 3V3 you don’t blow the transistor.

          R20 is probably a weak pull down resistor to keep the transistor off until the microcontroller comes online.

          As far as the transistor I was thinking it was probably a 2N7000. That’s my goto in this kind of circuit.

          Depending on the spefic microcontroller the pins can default to a very week high even when off. Enough to activate a 2N7000. I’ve had motors briefly engage using a PIC and a 2N7000 when the system is turned on without a pull down resistor.