DRV-12 BJT base driven from a logic pin without a base resistor¶
| Severity | Status | Implementation |
|---|---|---|
| error | runs in better_erc | easy, depends on netlist |
Data it needs: graph, part classes, rails.
Looks at. Bipolar transistors (part class), the driving pin.
What it catches. The base of a bipolar transistor connected straight to a logic output with no resistor (and the transistor not a digital transistor with built-in resistors).
Why it matters. The base-emitter junction is a diode: it clamps the pin at about 0.7 V, and the only current limit is the pin's own output resistance. The pin sources tens of milliamps into the base, beyond its rating; the pin and the transistor both degrade, and the MCU's IO budget is spent on one pin.
Example. A BC817 switching a buzzer with its base on an STM32 GPIO directly: the pin sits at 0.8 V instead of 3.3 V, delivers its short-circuit current, and other pins on the same port droop.
How to check. BJTs (designator Q, symbol or MPN) whose base net reaches an IC output with no resistor in series; skip pre-biased (digital) transistors by MPN.
Fix. A base resistor sized for the collector current over the transistor's minimum gain with margin (1-10 kΩ for small loads), or a pre-biased transistor (DTC, PDTC series).
References. AN10909 §2.1 "Important parameter for BJTs in a load switch application" (base resistor and IC/IB); AoE3 chapter 2.
Test schematics¶
Each schematic below is in test_schematics/sources. The block under it is what berc check --only DRV-12 reports on it.
drv-12_base_resistor¶
error DRV-12 #mks the base of Q1 is on /BUZZ with U1.3 (PA0) and no resistor: the base-emitter junction clamps the pin and draws its short-circuit current
net /BUZZ, part Q1
fix: a base resistor sized for the collector current over the minimum gain (1-10 kΩ for small loads), or a pre-biased transistor (DTC, PDTC)