No base resistor
BJT- Symptom
The GPIO pin runs hot; the MCU resets or the pin dies.
- Cause
Base–emitter is a diode; only the pin’s internal resistance limits the current.
- Fix
Add a series base resistor; 1 kΩ is enough for a 50 mA load.
The numbers
- Base currentI_B = (3.3 − 0.7) / 1 kΩ2.6 mAfar below the pin limit
- Forced gainβ = 50 / 2.6≈ 19below hFE, so it saturates
“VGS(th) < 3.3 V, so it is logic level”
MOSFET- Symptom
The MOSFET runs hot and the load is weak; one batch works, the next fails.
- Cause
Only 250 µA flows at VGS(th); an IRF540N passes a few hundred mA at 3.3 V.
- Fix
Pick a part with RDS(on) guaranteed at your gate voltage, or add a driver.
No gate pull-down
MOSFETProtection- Symptom
The motor twitches at power-up or while flashing; the LED flickers.
- Cause
The pin floats during boot; noise and Cgd lift the gate above threshold.
- Fix
Put 10–100 kΩ from gate to source; avoid strapping pins.
No flyback diode
Protection- Symptom
The transistor fails short after hours; the MCU resets at random.
- Cause
Coil current cannot stop instantly; the drain hits avalanche and the MOSFET absorbs the energy.
- Fix
Put a diode across the load, cathode to +; add a zener for fast release.
Slow 1N4007 as a PWM flyback diode
Protection- Symptom
The MOSFET runs far hotter than calculated; the diode heats and EMI is high.
- Cause
A slow diode acts like a short for microseconds at every turn-on.
- Fix
In PWM use a Schottky (SS34, 1N5819) or an ultrafast diode (UF4007).
P-MOS on a 12 V rail driven straight from a 3.3 V GPIO
MOSFET- Symptom
The load never turns off, and the pin may be damaged.
- Cause
Even with the pin high, VGS is −8.7 V, so the P-MOS stays on.
- Fix
Add a gate–source pull-up and a small NPN that pulls the gate down.
The numbers
- Pin highV_GS = 3.3 − 12−8.7 Vwell past threshold, so on
- With NPN, pin highV_GS = 0 − 12−12 Von
- With NPN, pin lowV_GS = 12 − 120 Vthe pull-up turns it off
High-side N-MOS with its gate driven from a GPIO
MOSFET- Symptom
The load gets only a few volts; the MOSFET runs very hot.
- Cause
It becomes a source follower; the source stays about 2 V below the gate.
- Fix
Move it low-side, or use a P-MOS with a level shifter or a bootstrap driver.
The numbers
- Source voltageV_S ≈ 3.3 − 21.3 Vit needs VGS ≈ 2 V to conduct
- Across the MOSFETV_DS = 12 − 1.310.7 V
- LossP = 10.7 V · 0.5 A5.4 W
Using an emitter follower as a switch
BJT- Symptom
A 12 V load sees only ~2.6 V; the transistor heats.
- Cause
The emitter stays 0.7 V below the base, and the base cannot exceed 3.3 V.
- Fix
Put the load in the collector (common emitter, low-side) and saturate it.
The numbers
- Load voltageV_E = 3.3 − 0.72.6 V
- Left across the transistorV_CE = 12 − 2.69.4 Vthis voltage becomes heat
Ignoring the Darlington drop
BJT- Symptom
A TIP120 or ULN2003 runs very hot; the load is under-powered.
- Cause
A Darlington never saturates; it drops 1–2 V.
- Fix
Use a logic-level MOSFET; loss at 3 A falls from 6 W to 0.23 W.
The numbers
- TIP120 lossP = 2 V · 3 A6 W
- MOSFET lossP = 3² · 0.025 Ω0.23 W
- Ratio6 / 0.23≈ 26×
Sharing the load return with signal ground (ground bounce)
Layout- Symptom
The ADC jumps on PWM edges, I²C/UART fails, the MCU resets.
- Cause
The load trace has resistance and inductance; switching 5 A makes 1 V spikes.
- Fix
Use a star ground: power return to the supply, MCU ground at one point.
The numbers
- Resistive dropV = 20 mΩ · 5 A0.1 V
- Inductive spikeV = 10 nH · 5 A / 50 ns1 Vat every edge
Exceeding the total GPIO current
MCU- Symptom
Each pin is within limits, yet the MCU warms and output levels sag.
- Cause
Port-group and package limits also apply; pin currents add up.
- Fix
Drive loads via transistors, a ULN2003 or a TPIC6B595; leave pins a few mA.
The numbers
- Total6 · 30 mA180 mA
- Port-group limitdatasheet~100–150 mAexceeded
Exceeding VGS(max) on a 24 V rail
MOSFETProtection- Symptom
The P-MOS fails gate–source short at first switch-on or days later.
- Cause
When the NPN pulls the gate to 0 V, VGS is −24 V; the limit is ±20 V.
- Fix
Add R2 in series with the gate as a divider, or a 12–15 V zener.
The numbers
- No dividerV_GS = 0 − 24−24 Voutside the limit
- With dividerV_GS = −24 · R1 / (R1 + R2)−12 Vfully on, safe
Forgetting that RDS(on) rises with temperature
MOSFET- Symptom
A MOSFET calculated at 100 °C runs above 150 °C or dies in thermal runaway.
- Cause
RDS(on) is ~1.5× higher at 100 °C; heat raises loss, loss raises heat.
- Fix
Iterate with the hot RDS(on); where the curves cross is the real Tj.
The numbers
- With the 25 °C valueT = 40 + 1.6 · 40104 °Cfirst estimate
- Loss at 104 °CP = 1.6 · (1 + 0.006 · 79)2.36 W
- New temperatureT = 40 + 2.36 · 40134 °C
- EquilibriumT = 104 + 0.384 · (T − 25)≈ 153 °Csettles after a few rounds
No dead-time in a half-bridge (shoot-through)
ProtectionMOSFET- Symptom
The bridge heats, the supply dips at every edge, then both MOSFETs blow.
- Cause
Turn-off is slower than turn-on, so both switches briefly conduct together.
- Fix
Leave 100 ns–1 µs with both off (IR2104 or complementary PWM).
Paralleling BJTs without emitter resistors
BJT- Symptom
One transistor takes most of the load, overheats and dies; then the other.
- Cause
VBE drifts −2 mV/°C, so the hotter transistor draws more current.
- Fix
Put 0.1–0.47 Ω in each emitter, or use MOSFETs.
The numbers
- VBE driftΔV = 50 °C · 2 mV/°C0.1 V
- RE feedbackV = 0.22 Ω · 1.5 A0.33 V3× larger than the drift
Huge gate resistor + high PWM frequency
MOSFET- Symptom
The MOSFET heats even at low current; brightness tracks duty oddly.
- Cause
The gate RC constant is close to the PWM half-period; the gate never fully charges.
- Fix
Use RG = 10–100 Ω; 10 kΩ belongs in the pull-down.
The numbers
- Time constantτ = 10 kΩ · 2 nF20 µs
- Half periodt = 1 / (2 · 20 kHz)25 µsalmost equal to τ
- With 47 Ωτ = 47 Ω · 2 nF94 ns
Long gate wires → ringing/oscillation
Layout- Symptom
MHz ringing on the gate, EMI and heating; sometimes VGS(max) is exceeded.
- Cause
20 cm of wire and Ciss form a lightly damped RLC circuit.
- Fix
Place the driver right at the MOSFET and add 5–22 Ω of gate resistance.
The numbers
- Resonancef₀ = 1 / (2π · √(200 nH · 2 nF))8.0 MHz
- Dampingζ = 2/2 · √(2 nF / 200 nH)0.10ζ < 0.5 → large overshoot
- Short trace + 10 Ωζ = 10/2 · √(2 nF / 20 nH)1.6no overshoot
Capacitive inrush resets the MCU
Protection- Symptom
The MCU resets the moment you switch on a module with a big capacitor.
- Cause
An empty capacitor acts like a short; the rail collapses under the surge.
- Fix
Use soft start, a load-switch IC, an eFuse or an NTC.
The numbers
- Instant currentI = 12 V / 0.55 Ω≈ 22 A
- With a 10 ms rampI = 1000 µF · 12 V / 10 ms1.2 A