TryKeep Supply Voltage Vcc (V) at 5 and Load Current Ic (mA) at 70; compare results while adjusting Overdrive Factor (typ. 2x).
ObserveWith Transistor Beta (hFE) at 100 and overdrive at 2, design base current is 1.400 mA and the nearest standard resistor is 3.3 k ohm.
ExplainLoad Current Ic (mA) divided by Transistor Beta (hFE) gives minimum base current; the overdrive factor scales it before resistor selection.
Technical boundaries. The calculation assumes a fixed 0.7 V base-emitter drop and chooses the closest resistor from a fixed list spanning 100 to 47000 ohms. It flags base current above 20 mA but does not establish transistor saturation or the actual GPIO drive voltage.
BJT Base Resistor Calculator
This calculator estimates base current from an assumed gain and overdrive factor. Operating gain alone does not guarantee saturation. Check the exact part’s saturation test conditions, base voltage, and the driver’s loaded output before selecting the resistor.
viewof bjt_vcc = Inputs.range([3.3,24], {value:5,step:0.1,label:"Supply Voltage Vcc (V)"})viewof bjt_ic_load = Inputs.range([1,5000], {value:70,step:1,label:"Load Current Ic (mA)"})viewof bjt_beta_val = Inputs.range([20,500], {value:100,step:10,label:"Transistor Beta (hFE)"})viewof bjt_overdrive = Inputs.range([1.0,5.0], {value:2.0,step:0.1,label:"Overdrive Factor (typ. 2x)"})
bjt_vbe =0.7bjt_ib_min = (bjt_ic_load /1000) / bjt_beta_valbjt_ib_design = bjt_ib_min * bjt_overdrivebjt_rb_calc = (bjt_vcc - bjt_vbe) / bjt_ib_designbjt_standard_values = [100,120,150,180,220,270,330,390,470,560,680,820,1000,1200,1500,1800,2200,2700,3300,3900,4700,5600,6800,8200,10000,12000,15000,18000,22000,27000,33000,39000,47000]bjt_rb_standard = bjt_standard_values.reduce((prev, curr) =>Math.abs(curr - bjt_rb_calc) <Math.abs(prev - bjt_rb_calc) ? curr : prev)bjt_ib_actual = (bjt_vcc - bjt_vbe) / bjt_rb_standardbjt_pb_actual = (bjt_vcc - bjt_vbe) * bjt_ib_actualhtml`<div style="background:#f8f9fa; border:1px solid #dee2e6; border-radius:8px; padding:16px; margin:8px 0; font-family:Arial,sans-serif;"><h4 class="depth-l1" style="margin-top:0; color:#2C3E50;">BJT Base Resistor Calculator</h4><table style="width:100%; border-collapse:collapse;"><tr style="background:#E67E22; color:white;"><th style="padding:8px; text-align:left;">Parameter</th><th style="padding:8px; text-align:right;">Value</th></tr><tr><td style="padding:6px; border-bottom:1px solid #ddd;">Minimum Base Current (Ib = Ic / beta)</td><td style="padding:6px; text-align:right; border-bottom:1px solid #ddd;">${(bjt_ib_min *1000).toFixed(3)} mA</td></tr><tr><td style="padding:6px; border-bottom:1px solid #ddd;">Design Base Current (with ${bjt_overdrive}x overdrive)</td><td style="padding:6px; text-align:right; border-bottom:1px solid #ddd;">${(bjt_ib_design *1000).toFixed(3)} mA</td></tr><tr><td style="padding:6px; border-bottom:1px solid #ddd;">Calculated Rb = (Vcc - 0.7V) / Ib</td><td style="padding:6px; text-align:right; border-bottom:1px solid #ddd;">${bjt_rb_calc.toFixed(0)} ohm</td></tr><tr style="background:#E8F5E9; font-weight:bold;"><td style="padding:6px; border-bottom:1px solid #ddd;">Nearest Standard Value</td><td style="padding:6px; text-align:right; border-bottom:1px solid #ddd;">${bjt_rb_standard >=1000? (bjt_rb_standard/1000).toFixed(1) +' k': bjt_rb_standard} ohm</td></tr><tr><td style="padding:6px; border-bottom:1px solid #ddd;">Actual Base Current (with standard Rb)</td><td style="padding:6px; text-align:right; border-bottom:1px solid #ddd;">${(bjt_ib_actual *1000).toFixed(3)} mA</td></tr><tr><td style="padding:6px; border-bottom:1px solid #ddd;">Base Resistor Power Dissipation</td><td style="padding:6px; text-align:right; border-bottom:1px solid #ddd;">${(bjt_pb_actual *1000).toFixed(2)} mW</td></tr>${bjt_ib_actual *1000>20?`<tr style="background:#FFEBEE;"><td style="padding:6px; font-weight:bold; color:#E74C3C;" colspan="2">Warning: Base current (${(bjt_ib_actual *1000).toFixed(1)} mA) exceeds typical GPIO limit (20mA). Use a driver stage or switch to MOSFET.</td></tr>`:''}</table><p style="margin-top:8px; font-size:0.9em; color:#666;">This calculator estimates base current from hFE and an overdrive factor; it does not establish saturation. Check the selected transistor's VCE(sat) test conditions, GPIO source-current rating, guaranteed VOH, and VBE(sat).</p></div>`