NPN Transistor

An NPN transistor is a 3-terminal BJT (Bipolar Junction Transistor) that uses a small base current to control a much larger collector-to-emitter current — used for switching and amplification.

NPN Transistor

At a glance

Pins and properties exactly as the circuit editor and simulator define this part. The text below explains how to use them.

Pinout

Pinout of the NPN Transistor, drawn as in the circuit editor. Select a label to see that pin in the table below.

Pins

Pins of this part
PinLabelType
EMITTERESignal out
BASEBSignal in
COLLECTORCSignal in

Properties

What you can change in the Property Inspector.

Properties of this part
PropertyRange or choicesDefault
hFE (Gain)10 to 2000100
Max Ic0.05 to 10 A0.1 A
Max Vce10 to 200 V40 V

An NPN transistor is a 3-terminal BJT (Bipolar Junction Transistor) that uses a small base current to control a much larger collector-to-emitter current — used for switching and amplification. In Open Maker Studio, it does not have Blockly code blocks — it interacts directly with the real-time SPICE analog simulator.


1. Schematic Symbol

Standard NPN symbol — base into the device, emitter arrow pointing outward (current flows out of the emitter):

B C E

2. Real Model & Characteristics

OMS's NPN Transistor's SPICE model is calibrated against the real 2N3904 (Fairchild/onsemi) datasheet — a genuinely different, meaningfully-calibrated model rather than generic textbook defaults: real Early voltage (VAF=74.03V), real base-emitter/base-collector junction capacitance (CJE=4.49pF, CJC=3.64pF, what gives this transistor a real, nonzero switching speed in the transient solver), IS=1e-14, BR=1. One honest limitation: the model includes a real base resistance value (RB=10Ω) in its .model line, but the solver doesn't stamp RB yet — it's set correctly for when that lands, but currently has no effect on the simulation.


3. Core Calculations & Math

  • Current Gain (hFE / β): the ratio between collector current and base current:

    IC=β×IBI_C = \beta \times I_B

    A small base current "amplifies" into a much larger collector current — the basis of both switching and amplifier circuits.


4. Component Properties (Property Inspector)

When you select an NPN Transistor on the canvas, you can modify the following parameters in the Property Inspector panel:

  • hFE / Gain (beta): Sets the current gain.
    • Default: 100
    • Range: 10 to 2000 (step size 10)
  • Max Ic (Ic_max): Sets the maximum safe collector current.
    • Default: 0.1 A
    • Range: 0.05 A to 10 A (step size 0.05 A)
  • Max Vce (Vce_max): Sets the maximum safe collector-emitter voltage rating.
    • Default: 40 V
    • Range: 10 V to 200 V (step size 5 V)

[!NOTE] Vce_max is currently a label-only property — checked the real faults: [...] array and confirmed only Ic_max (collector current) has an enforced fault. Exceeding Vce_max in your circuit does not currently trigger any warning or fault in the simulator.


5. Programming Notes

Transistors are purely passive-in-the-Blockly-sense analog components and have no associated Blockly blocks. A transistor only influences the electrical behavior of connected components — for example, a transistor switching a motor on/off determines the voltage a board_analog_read block reads on a downstream sense pin.


6. Simulator Behavior

  • Real-time Collector Current Readout: While a simulation is running, OMS renders a live text overlay directly on the transistor body — not a hover-only tooltip — showing collector current (Ic=…mA) whenever it exceeds ~1mA. The active region also glows blue once conducting, or orange when approaching (80%+) its Ic_max rating.
  • One Real Fault: exceeding Ic_max triggers an OVERCURRENT fault (as noted in Section 4, Vce_max is not currently enforced).
NPN Transistor — OMS Parts