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):
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:
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:
10to2000(step size10)
- Default:
- Max Ic (
Ic_max): Sets the maximum safe collector current.- Default:
0.1A - Range:
0.05A to10A (step size0.05A)
- Default:
- Max Vce (
Vce_max): Sets the maximum safe collector-emitter voltage rating.- Default:
40V - Range:
10V to200V (step size5V)
- Default:
[!NOTE]
Vce_maxis currently a label-only property — checked the realfaults: [...]array and confirmed onlyIc_max(collector current) has an enforced fault. ExceedingVce_maxin 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%+) itsIc_maxrating. - One Real Fault: exceeding
Ic_maxtriggers anOVERCURRENTfault (as noted in Section 4,Vce_maxis not currently enforced).

