Skip to main content

Check Your Understanding 5.1.4 Check Your Understanding

1.

You want to drive a small DC motor that requires 200 mA. The STM32C031C6’s GPIO pin is rated for 6 mA, and 15 mA at most. Why can’t you connect the motor directly to the GPIO pin?
  • The motor requires far more current than the GPIO pin can safely supply; drawing 200 mA from a pin rated for 6 mA would damage the microcontroller.
  • Correct. The solution is to use a transistor: the GPIO pin drives the control terminal with a small current or voltage, and the transistor switches the motor’s 200 mA from a separate supply path.
  • GPIO pins can only source current, not sink it, so they cannot drive any motor.
  • The STM32C031C6’s GPIO pins can both source and sink current: the limitation is the magnitude (a few milliamps), not the direction.
  • Motors require AC power, and GPIO pins only produce DC signals.
  • Small DC motors run on DC, the same kind of signal a GPIO pin produces. The issue is current capacity, not signal type.
  • The motor’s resistance is too low for the GPIO pin’s output impedance to match.
  • Impedance matching is a concern in RF and audio circuits, not in low-frequency switching applications like this. The real issue is that 200 mA exceeds the pin’s current rating.

2.

What is the fundamental difference between how a BJT and a MOSFET are controlled?
  • A BJT is controlled by a current into the base; a MOSFET is controlled by a voltage on the gate and draws essentially no steady-state current.
  • Correct. This distinction matters for GPIO drive budget: a BJT requires you to supply base current (limited by the resistor you choose), while a MOSFET gate draws nearly zero steady-state current from the GPIO pin.
  • A BJT is controlled by voltage; a MOSFET is controlled by current.
  • It is the other way around: BJT = current-controlled (base current), MOSFET = voltage-controlled (gate voltage).
  • BJTs work with AC signals only; MOSFETs work with DC signals only.
  • Both BJTs and MOSFETs work with DC switching applications. The distinction between them is about how the control terminal operates, not AC vs DC.
  • BJTs are faster than MOSFETs and therefore preferred for high-speed switching in embedded systems.
  • For the switching speeds used in this course, both are fast enough. MOSFETs are often preferred because they require no steady-state gate current.

3.

An NPN BJT has \(\beta = 150\text{.}\) A GPIO pin drives the base through a 10 kΩ resistor from 3.3 V (\(V_{BE} \approx 0.7\,\text{V}\)). What collector current can this transistor support?
  • About 39 mA
  • Correct. \(I_B = (3.3 - 0.7)/10\,\text{k}\Omega = 260\,\mu\text{A}\text{;}\) \(I_C = 150 \times 260\,\mu\text{A} \approx 39\,\text{mA}\text{.}\)
  • About 3.9 mA
  • \((3.3-0.7)/10000 = 0.26\,\text{mA}\text{,}\) not 0.026 mA. Recheck the decimal place.
  • About 330 mA
  • You need to subtract \(V_{BE} \approx 0.7\,\text{V}\) from the supply before dividing by the base resistor.
  • The BJT stays off; 3.3 V is below the threshold.
  • The turn-on threshold is \(V_{BE} \approx 0.7\,\text{V}\text{.}\) A 3.3 V supply through a 10 kΩ resistor easily exceeds that.

4.

You select a MOSFET with \(V_{th} = 4\text{ V}\) minimum to switch a load from a 3.3 V GPIO pin. What problem will occur?
  • The GPIO pin can only drive the gate to 3.3 V, which is below the 4 V threshold; the MOSFET will not turn on fully (or at all), so the load won’t be switched.
  • Correct. This is why logic-level MOSFETs, specified to turn on fully at 3.3 V or lower, are required when driving directly from a 3.3 V microcontroller pin.
  • The MOSFET will turn on too quickly, causing a large inrush current that damages the load.
  • A gate voltage below threshold causes the MOSFET to turn on less, not more aggressively. The problem here is under-drive, not over-drive.
  • The MOSFET will work correctly because \(V_{th}\) is the maximum gate voltage needed.
  • \(V_{th}\) is the minimum voltage at which the device begins to conduct, not a maximum. The GPIO must be able to exceed it to turn the MOSFET on.
  • Nothing: MOSFETs are always compatible with 3.3 V signals regardless of their threshold specification.
  • Not all MOSFETs are logic-level compatible. Standard (high-threshold) MOSFETs require 5–10 V on the gate; using one with a 3.3 V GPIO will result in the device not turning on properly.