ทรานซิสเตอร์ (Transistor)
Transistor
BJT • NPN / PNP • สวิตช์ & ขยายสัญญาณ • β (hFE)
BJT • NPN / PNP • Switch & Amplifier • β (hFE)
- บอกชนิดและโครงสร้างของทรานซิสเตอร์ได้
- อธิบายหลักการทำงานเป็นสวิตช์และวงจรขยายได้
- คำนวณกระแสและอัตราขยาย (β) ของ BJT ได้
- ตรวจสอบทรานซิสเตอร์ดี/เสียด้วยมัลติมิเตอร์ได้
- Identify the types and structure of transistors
- Explain how a transistor works as a switch and amplifier
- Calculate BJT currents and current gain (β)
- Test a transistor with a multimeter
ทรานซิสเตอร์เป็นอุปกรณ์สารกึ่งตัวนำ 3 ขา ที่ใช้กระแส (หรือแรงดัน) เล็กๆ ที่ขาควบคุม ไปควบคุมกระแสขนาดใหญ่ระหว่างอีกสองขา จึงทำหน้าที่ได้ทั้ง สวิตช์ และ วงจรขยายสัญญาณ ถือเป็นหัวใจของอุปกรณ์อิเล็กทรอนิกส์ทุกชนิด
A transistor is a 3-terminal semiconductor device in which a small control current (or voltage) controls a much larger current between the other two terminals. It acts as both a switch and a signal amplifier — the heart of all modern electronics.
• BJT (Bipolar Junction Transistor) — ควบคุมด้วยกระแส มี NPN และ PNP
• FET / MOSFET — ควบคุมด้วยแรงดันที่ขา Gate กินกระแสน้อยมาก ใช้ในวงจรกำลังและดิจิตัล
• BJT (Bipolar Junction Transistor) — current-controlled, comes as NPN and PNP
• FET / MOSFET — voltage-controlled at the Gate, draws almost no current; used in power and digital circuits
BJT มี 3 ขา: B (Base, ขาควบคุม) • C (Collector) • E (Emitter) — สังเกตหัวลูกศรที่ขา Emitter: NPN ลูกศรชี้ออก, PNP ลูกศรชี้เข้า
A BJT has 3 terminals: B (Base, control) • C (Collector) • E (Emitter). The emitter arrow tells the type: NPN points out, PNP points in.
NPN
PNP
N-MOSFET
สรุปสั้นๆ ก่อน: เมื่อป้อนแรงดันที่ขา Base ให้รอยต่อ B-E นำกระแส (VBE ≈ 0.7V) จะมี กระแสเบส IB เล็กๆ ไหล แล้ว เหนี่ยวนำให้กระแสคอลเลกเตอร์ IC ขนาดใหญ่ ไหลจาก C ไป E โดย IC = β × IB — กระแสเล็กควบคุมกระแสใหญ่ จึงเกิดการ "ขยาย" หัวข้อถัดไปจะอธิบายว่าทำไมถึงเป็นเช่นนั้น
The short version: when the Base is driven so the B-E junction conducts (VBE ≈ 0.7V), a small base current IB flows, which lets a much larger collector current IC flow from C to E, where IC = β × IB. A small current controls a large one — that is "amplification". The rest of this section explains why it happens.
BJT คือสารกึ่งตัวนำ 3 ชั้นเรียงติดกัน (NPN = N–P–N) เกิดเป็นรอยต่อ PN 2 รอยต่อ คือ B-E และ B-C แต่ความลับของการขยายอยู่ที่ สัดส่วนของแต่ละชั้น ซึ่งไม่เท่ากันเลย:
A BJT is three semiconductor layers stacked together (NPN = N–P–N), forming two PN junctions: B-E and B-C. The secret to amplification is that the three layers are deliberately not alike:
- Emitter (N⁺) — โด๊ปสารเจือหนักที่สุด: เพื่อ "ยิง" อิเล็กตรอนอิสระออกมาให้ได้มากที่สุด (คำว่า emitter = ผู้ปล่อย)
- Base (P) — บางมากและโด๊ปน้อย: บางระดับไมครอน มีโฮลให้จับคู่กับอิเล็กตรอนน้อย อิเล็กตรอนที่วิ่งเข้ามาจึงแทบไม่มีอะไรมาขวาง
- Collector (N) — พื้นที่กว้างที่สุด: คอยกวาดอิเล็กตรอนที่ทะลุเบสมาเก็บให้หมด และมีเนื้อที่ระบายความร้อน (P = VCE × IC ตกที่นี่)
- Emitter (N⁺) — the most heavily doped: its job is to "emit" as many free electrons as possible
- Base (P) — very thin and lightly doped: only microns thick with few holes to recombine with, so injected electrons meet almost no obstacles
- Collector (N) — the largest region: it sweeps up every electron that crosses the base, and has the area to dissipate heat (P = VCE × IC is burnt here)
ย่านการทำงานของ BJT ถูกกำหนดโดยไบอัสของรอยต่อทั้งสอง ไม่ใช่แค่ค่ากระแสเบสเพียงอย่างเดียว:
The operating region is set by how the two junctions are biased — not just by the base current alone:
| ย่านRegion | รอยต่อ B-EB-E junction | รอยต่อ B-CB-C junction | ผลที่ได้Result |
|---|---|---|---|
| Cut-off | ย้อนกลับ / ไม่ถึง 0.7Vreverse / below 0.7V | ย้อนกลับreverse | ไม่มีอิเล็กตรอนถูกฉีดเข้าเบส → IC ≈ 0no electrons injected into the base → IC ≈ 0 |
| Active | ตรง (0.7V)forward (0.7V) | ย้อนกลับreverse | คอลเลกเตอร์กวาดอิเล็กตรอนได้เต็มที่ → IC = β·IBthe collector sweeps up every carrier → IC = β·IB |
| Saturation | ตรงforward | ตรง (ด้วย)forward too | สนามที่ดูดอิเล็กตรอนหมดแรง IC ถูกจำกัดด้วย RC ไม่ใช่ β อีกต่อไป, VCE ≈ 0.2Vthe sweeping field is gone; IC is limited by RC, not β. VCE ≈ 0.2V |
👆 คลิกปุ่มขั้นที่ 1–5 เพื่อดูภาพตัดขวางเปลี่ยนไปทีละขั้น (หรือกด "เล่นอัตโนมัติ" ให้ไล่เองทั้ง 5 ขั้น)
👆 Click steps 1–5 to watch the cross-section change at each stage (or hit "Auto-play" to run through all five).
ขั้นที่ 1 — ปลดล็อกรอยต่อ B-E: ป้อนแรงดันบวกที่ขา B เทียบกับ E จนถึง VBE ≈ 0.7V
แรงดันนี้ไป "ทลาย" แนวปลอดพาหะ (depletion region — แถบเทาที่รอยต่อ) ทำให้รอยต่อ B-E เริ่มนำกระแส
สังเกต: แถบเทาที่ B-E ยุบลง แต่ยังไม่มีอิเล็กตรอนวิ่ง — ต่ำกว่า 0.7V เมื่อไหร่ ทรานซิสเตอร์อยู่ในย่าน Cut-off
Step 1 — unlock the B-E junction: drive B positive with respect to E until VBE ≈ 0.7V.
That collapses the depletion region (the grey band at the junction) so B-E starts to conduct.
Notice: the grey band shrinks but nothing flows yet — below 0.7V the transistor sits in cut-off.
ขั้นที่ 2 — อีมิตเตอร์ฉีดอิเล็กตรอน: อีมิตเตอร์ที่โด๊ปหนัก (N⁺) ฉีดอิเล็กตรอนจำนวนมหาศาลเข้าไปในเบส
— นี่คือกระแสหลักทั้งหมดของทรานซิสเตอร์ (= IE) สมมติว่ามี 100 ตัว
สังเกต: ตอนนี้อิเล็กตรอนไปกองอยู่ที่เบส เพราะรอยต่อ B-C ยังกั้นอยู่ (แถบเทาฝั่งขวา)
Step 2 — the emitter injects: the heavily doped emitter (N⁺) floods the base with electrons
— this is the transistor's whole current (= IE). Say 100 of them.
Notice: they pile up in the base, because the B-C junction still blocks them (grey band on the right).
ขั้นที่ 3 — เบสกินไปแค่ ~1%: เบสบางมากและมีโฮลน้อย (วงแดงในภาพ) อิเล็กตรอนที่จับคู่ (recombine) กับโฮล
แล้วต้องไหลออกทางขา B จึงมีแค่ ~1 ตัวจาก 100 — ส่วนนี้แหละคือ IB (จุดสีส้ม)
นี่คือหัวใจ: IB เป็นแค่ "เศษที่รั่วออกมา" ไม่ใช่ต้นทางของกระแสใหญ่
Step 3 — the base only takes ~1%: the base is thin and hole-poor (the red circles), so only about
1 electron in 100 recombines and leaves through the base lead — that is IB (the orange dots).
This is the key idea: IB is the "leakage", not the source of the big current.
ขั้นที่ 4 — คอลเลกเตอร์กวาดที่เหลือทั้งหมด: อีก ~99 ตัว วิ่งข้ามเบสไปถึงรอยต่อ B-C ซึ่งไบอัสย้อนกลับ
(C เป็นบวกกว่า B มาก) สนามไฟฟ้าแรงตรงนั้น (ลูกศรน้ำเงิน) ดูดอิเล็กตรอนเข้าคอลเลกเตอร์จนหมด → กลายเป็น IC
พลังงานที่ผลักกระแสก้อนนี้มาจาก VCC ที่ต่ออยู่กับขา C ไม่ได้มาจากขา B
Step 4 — the collector sweeps up the rest: the other ~99 cross the base to the reverse-biased B-C junction
(C is far more positive than B). Its strong field (blue arrows) pulls every one of them into the collector → that is IC.
The energy behind this current comes from VCC at the collector, not from the base.
ขั้นที่ 5 — จึงเกิดการขยาย: กระแสก้อนเดียวถูกแบ่งเป็น 99 : 1 โดยอัตโนมัติ (IC : IB)
และสัดส่วนนี้ถูกล็อกไว้ด้วยโครงสร้าง → ถ้าเราดัน IB เพิ่มเป็น 2 เท่า อิเล็กตรอนที่ถูกฉีดต้องเพิ่มเป็น 2 เท่าตาม IC ก็เพิ่ม 2 เท่าเช่นกัน
ขยับ IB แค่ 1 หน่วย แต่ IC ขยับตาม 99 หน่วย → IC = β × IB
Step 5 — and that is the amplification: one current splits itself 99 : 1 (IC : IB),
and the structure locks that ratio in. Double IB and the injection must double, so IC doubles too.
Move IB by 1 unit and IC moves by 99 → IC = β × IB
จุดที่คนสับสนกันมากที่สุดคือคำว่า "กระแสเล็กควบคุมกระแสใหญ่" แล้วเผลอคิดว่าทรานซิสเตอร์ เสกกระแสเพิ่มขึ้นมาจาก IB — ซึ่งไม่ใช่เลย ลองมองใหม่ 3 ข้อนี้:
The most common confusion is hearing "a small current controls a large one" and assuming the transistor creates extra current out of IB. It does not. Three points fix this:
- กระแสใหญ่ไม่ได้มาจากขา B — มันมาจาก VCC: ทรานซิสเตอร์ไม่สร้างพลังงาน มันเป็นแค่ วาล์ว พลังงานของ IC มาจากแหล่งจ่ายที่ต่อกับคอลเลกเตอร์อยู่แล้ว ขา B แค่สั่งว่าจะเปิดวาล์วกว้างแค่ไหน (เหมือนก๊อกน้ำ — แรงน้ำมาจากท่อประปา ไม่ได้มาจากมือเรา)
- IB คือ "เศษที่รั่วออกมา" ไม่ใช่ต้นทาง: จากขั้นที่ 2–4 ข้างบน อิเล็กตรอน 100 ตัวถูกฉีดจาก E เข้าเบส แล้วถูกแบ่งเป็น 1 ตัวออกทางขา B (= IB) กับ 99 ตัวไปคอลเลกเตอร์ (= IC) — ทั้งสองคือกระแสก้อนเดียวกันที่ถูกแบ่งสัดส่วน 99 : 1 ไม่ใช่ IB ไหลไปแล้วกลายเป็น IC
- "ขยาย" คือกลับด้านการมอง: สัดส่วน 99:1 ถูกล็อกไว้ด้วยโครงสร้าง ดังนั้นถ้าเราดัน IB จาก 1 → 2 หน่วย ธรรมชาติของอุปกรณ์บังคับให้อิเล็กตรอนที่ถูกฉีดเพิ่มเป็น 200 ตัว → IC ต้องขึ้นจาก 99 → 198 ตามไปเอง
ขยับ IB แค่ 1 หน่วย แต่ IC ขยับตาม 99 หน่วย — นี่แหละคือการขยาย
- The big current comes from VCC, not from the base: a transistor creates no energy — it is a valve. The energy in IC comes from the supply already wired to the collector; the base only decides how far the valve opens (like a tap: the pressure is in the pipe, not in your hand)
- IB is the "leakage", not the source: from steps 2–4 above, 100 electrons are injected from E into the base and split into 1 leaving via the base lead (= IB) and 99 reaching the collector (= IC). They are one and the same current, split 99 : 1 — IB does not "turn into" IC
- Amplification is that view, reversed: the 99:1 split is locked in by the structure. So if we push IB from 1 → 2 units, physics forces the injection up to 200 electrons → IC must follow from 99 → 198.
Move IB by 1 unit and IC moves by 99 — that is the amplification.
สัดส่วนอิเล็กตรอนที่วิ่งถึงคอลเลกเตอร์สำเร็จเรียกว่า α (alpha) และอัตราขยายกระแส β ก็คำนวณมาจาก α โดยตรง:
The fraction of electrons that make it to the collector is called α (alpha), and the current gain β follows directly from it:
ลองแทนค่า: α = 0.99 → β = 0.99 / 0.01 = 99 • ถ้าทำเบสให้บางลงอีกจน α = 0.995 → β = 199
เห็นได้ว่า α เปลี่ยนนิดเดียว แต่ β เปลี่ยนเป็นเท่าตัว — นี่คือเหตุผลที่ β ของทรานซิสเตอร์เบอร์เดียวกันจากคนละล็อตต่างกันได้ 2–3 เท่า และเป็นเหตุผลที่วงจรที่ดีต้องไม่พึ่งค่า β ที่แน่นอน
Plug in numbers: α = 0.99 → β = 0.99 / 0.01 = 99 • make the base thinner so α = 0.995 → β = 199.
A tiny change in α swings β enormously — which is why two transistors with the same part number can differ 2–3× in β, and why good circuits must never depend on an exact β.
คำถามนี้สำคัญมาก และคำตอบคือ "คนละหน้าที่กัน":
This is a crucial question, and the answer is that they each decide a different thing:
อัตราส่วน 99:1 (= β) ถูกล็อกมาตั้งแต่โรงงาน จากความบางของเบสและการโด๊ปสาร — เราเปลี่ยนมันด้วยการต่อวงจรไม่ได้ ซื้อ 2N2222 มาก็ติดค่า β ≈ 100–300 มาแบบนั้น
ทรานซิสเตอร์ไม่ได้บอกว่า IB ต้องกี่ mA — ตัวบังคับคือ RB กับแรงดันที่เราป้อน
IB = (Vin − 0.7) / RB
พอวงจรกำหนด IB มาแล้ว ทรานซิสเตอร์ถึงค่อยคูณ β ออกมาเป็น IC
The 99:1 ratio (= β) is locked in at the factory by the base width and doping — no wiring can change it. Buy a 2N2222 and it arrives with β ≈ 100–300 built in.
Nothing in the transistor says how many mA IB should be — RB and your drive voltage do:
IB = (Vin − 0.7) / RB
Once the circuit fixes IB, the transistor multiplies it by β to give IC.
แต่มีข้อสำคัญ: กฎ β จะเป็นจริงก็ต่อเมื่อวงจร ยอมให้ IC ไหลได้ถึงขนาดนั้น เพราะกระแสสูงสุดที่คอลเลกเตอร์ไหลได้ถูกจำกัดด้วย VCC และ RC อยู่แล้ว (≈ VCC/RC) — ลองเทียบ 2 กรณีนี้ (β = 100, VCC/RC = 20mA):
But there is a catch: the β rule only holds if the circuit lets IC get that big. The collector current is already capped by VCC and RC (≈ VCC/RC). Compare two cases (β = 100, VCC/RC = 20mA):
| IB ที่วงจรป้อนfrom the circuit | IC ที่ β "อยากให้เป็น"IC that β "wants" | IC ที่วงจร "ยอมให้ไหล"IC the circuit allows | ผลจริงWhat actually happens |
|---|---|---|---|
| 0.1 mA | 10 mA | ได้ถึง 20 mAup to 20 mA | ได้ 10 mA จริง → Active (กฎ β ใช้ได้)10 mA flows → Active (β rule holds) |
| 1 mA | 100 mA | ได้แค่ 20 mAonly 20 mA | ตันที่ 20 mA → Saturation (กฎ β พัง, อัตราส่วนจริงเหลือ 20:1)clamps at 20 mA → Saturation (β rule breaks; real ratio is 20:1) |
| NPN | PNP | |
|---|---|---|
| พาหะหลักMain carrier | อิเล็กตรอน (เร็วกว่า)electrons (faster) | โฮล (ช้ากว่า)holes (slower) |
| เปิดเมื่อTurns on when | VB สูงกว่าabove VE ≈ +0.7V | VB ต่ำกว่าbelow VE ≈ −0.7V |
| ทิศกระแสสมมติConventional current | ไหลเข้า C และ B → ออกที่ Einto C and B → out of E | ไหลเข้า E → ออกที่ C และ Binto E → out of C and B |
| ตำแหน่งในวงจรTypical position | ต่อโหลดด้านบน ทรานซิสเตอร์อยู่ฝั่งกราวด์ (low-side switch)load on top, transistor to ground (low-side switch) | ทรานซิสเตอร์อยู่ฝั่ง +V โหลดอยู่ด้านล่าง (high-side switch)transistor on +V, load below (high-side switch) |
หลักการภายในเหมือนกันทุกอย่าง เพียงแค่สลับชนิดสารและกลับขั้วแรงดันทั้งหมด — งานทั่วไปนิยม NPN เพราะอิเล็กตรอนเคลื่อนที่ได้เร็วกว่าโฮล ทำให้ได้ β และความเร็วสูงกว่า
The physics is identical — just swap the doping types and flip every voltage. NPN is preferred in general use because electrons move faster than holes, giving higher β and speed.
ต้อง — แต่ "พอดี" ไม่ได้แปลว่าออกแบบให้ตรงกับค่า β เป๊ะๆ ตรงกันข้ามเลย: วงจรที่ดีต้องออกแบบให้ผลลัพธ์ไม่ขึ้นกับ β เพราะ β เชื่อถือไม่ได้ — เบอร์เดียวกันคนละล็อตอาจได้ 100 กับ 300 แถมยังเปลี่ยนตามอุณหภูมิและระดับกระแสอีก ถ้าคำนวณโดยยึด β = 100 เป๊ะ แล้วบังเอิญได้ตัวที่ β = 250 มา วงจรจะเพี้ยนทันที
Yes — but "matched" does not mean designed around an exact β. Quite the opposite: a good circuit is designed so the result does not depend on β, because β is unreliable. Two parts with the same number can be 100 and 300, and the value drifts with temperature and current. Design for exactly β = 100, get a β = 250 part, and the circuit misbehaves.
คำนวณ IB จาก β ต่ำสุดในดาต้าชีต แล้วคูณเผื่ออีก 5–10 เท่า — ถ้าได้ตัวที่ β สูงกว่ามา มันก็แค่อิ่มตัวเหมือนเดิม ไม่เสียหาย → วงจรทำงานเหมือนกันหมดทุกตัว ไม่ต้องคัดของ
Compute IB from the minimum β in the datasheet, then multiply by 5–10×. A higher-β part simply saturates just the same — no harm → every part works identically; no hand-picking needed.
เทคนิค emitter degeneration: ใส่ตัวต้านทานที่ขาอีมิตเตอร์ แล้วอัตราขยายจะกลายเป็น ≈ RC / RE ซึ่งไม่มี β อยู่ในสูตรเลย — เท่ากับใช้ตัวต้านทาน 2 ตัวที่คุมค่าได้แม่น มาแทน β ที่เอาแน่นอนไม่ได้ (แลกกับอัตราขยายที่ลดลงบ้าง แต่คุ้มมาก)
Emitter degeneration: add a resistor at the emitter and the gain becomes ≈ RC / RE, with no β in the formula at all — two precise resistors replace an unpredictable β. You trade away some gain for a circuit that actually behaves.
สิ่งที่ต้อง "ต่อให้พอดี" จริงๆ คือขีดจำกัดในดาต้าชีต — เกินเมื่อไหร่คือพัง:
What you truly must match are the datasheet limits — exceed them and the part dies:
| ต้องเช็คCheck | ความหมายMeaning | ตัวอย่าง 2N22222N2222 example |
|---|---|---|
| IC(max) | กระแสคอลเลกเตอร์สูงสุดที่ทนได้maximum collector current | ~600–800 mA → ขับมอเตอร์ 2A ไม่ได้ ต้องเปลี่ยนเบอร์~600–800 mA → can't drive a 2A motor; pick another part |
| VCEO(max) | แรงดันคร่อม C-E สูงสุดmaximum C-E voltage | ~40V → ห้ามเอาไปใช้กับไฟ 220V เด็ดขาด~40V → never put it on 220V mains |
| PD(max) | กำลังสูญเสียสูงสุด (VCE × IC)max power dissipation (VCE × IC) | ~500 mW (ไม่มีฮีตซิงก์)~500 mW without a heatsink |
| IB(max) | กระแสเบสสูงสุดmaximum base current | ต้องมี RB เสมอ — ห้ามป้อนแรงดันเข้าขา B ตรงๆalways use RB — never drive the base with a bare voltage |
① หา RC (ตัวจำกัดกระแส LED) — ตอน ON ทรานซิสเตอร์อิ่มตัว VCE ≈ 0.2V
RC = (5 − 2 − 0.2) / 0.02 = 140 Ω → ใช้ค่ามาตรฐาน 150 Ω
② หา IB ขั้นต่ำ — IB(min) = IC / β = 20mA / 100 = 0.2 mA
③ เผื่อให้อิ่มตัวแน่ๆ (overdrive ×10) — เพราะ β ไม่แน่นอน ถ้าป้อนแค่พอดีจะไปค้างอยู่ย่าน Active ทำให้ VCE สูงและร้อน
IB = 0.2mA × 10 = 2 mA
④ หา RB — RB = (VMCU − VBE) / IB = (5 − 0.7) / 0.002 = 2,150 Ω → ใช้ 2.2 kΩ
① Find RC — when ON the transistor is saturated, VCE ≈ 0.2V
RC = (5 − 2 − 0.2) / 0.02 = 140 Ω → use the standard 150 Ω
② Minimum base current — IB(min) = IC / β = 20mA / 100 = 0.2 mA
③ Overdrive ×10 to guarantee saturation — β varies, so driving the bare minimum leaves it stuck in the active region: high VCE, hot transistor
IB = 0.2mA × 10 = 2 mA
④ Find RB — RB = (VMCU − VBE) / IB = (5 − 0.7) / 0.002 = 2,150 Ω → use 2.2 kΩ
- ห้ามต่อขา B เข้าแรงดันตรงๆ โดยไม่มี RB — รอยต่อ B-E คือไดโอด แรงดันเกิน 0.7V เพียงนิดเดียวกระแสจะพุ่งจนพัง
- β ไม่ใช่ค่าคงที่ — เปลี่ยนตาม IC, VCE และอุณหภูมิ; datasheet ให้ช่วงกว้าง (เช่น 100–300) ให้ออกแบบด้วยค่าต่ำสุดเสมอ
- VBE ลดลง ~2 mV ต่อ 1°C ที่ร้อนขึ้น — เป็นเหตุของ thermal runaway ในวงจรขยายกำลัง จึงต้องมี R ที่ขา E ช่วยเสถียร
- ใช้เป็นสวิตช์ ต้องขับให้อิ่มตัว (overdrive 5–10 เท่า) ไม่งั้น VCE ค้างสูง → กำลังสูญ P = VCE×IC ทำให้ร้อน
- ขับโหลดที่เป็นขดลวด (รีเลย์/มอเตอร์) ต้องใส่ไดโอด flyback คร่อมโหลดเสมอ ไม่งั้นแรงดันย้อนตอนตัดไฟจะเจาะทรานซิสเตอร์
- Never tie the base straight to a voltage without RB — B-E is a diode; a little over 0.7V and the current runs away and destroys it
- β is not a constant — it varies with IC, VCE and temperature. Datasheets quote a wide range (e.g. 100–300); always design with the minimum
- VBE drops ~2 mV per °C of heating — the root of thermal runaway in power stages, which is why an emitter resistor is used to stabilise the bias
- As a switch, drive it hard into saturation (5–10× overdrive), otherwise VCE stays high and P = VCE×IC cooks the device
- Driving an inductive load (relay/motor) always needs a flyback diode across the load, or the turn-off kickback will punch through the transistor
คราวนี้มาดูวงจรจริงกันบ้าง — ไมโครคอนโทรลเลอร์ 5V สั่งให้ทรานซิสเตอร์ NPN จุด LED คลิกขั้นที่ 1–6 เพื่อไล่ดูตั้งแต่ไฟเข้า, ทำไมต้องมี RB ก่อนขา B, กระแสไหลทางไหน, ไปจนถึงแรงดันที่แต่ละขา และกด ปุ่ม HIGH/LOW เพื่อเปิด-ปิดอินพุตเทียบดูระหว่างย่าน Cut-off กับ Saturation ได้ตลอดเวลา
Now the real circuit — a 5V microcontroller telling an NPN transistor to light an LED. Click steps 1–6 to follow the power in, why RB sits before the base, where the current actually flows, and the voltage on every pin. Hit the HIGH/LOW button any time to switch the input and compare cut-off with saturation.
ขั้นที่ 1 — ไฟเข้าและกราวด์ (จุดที่คนเข้าใจผิดบ่อยที่สุด):
แบตเตอรี่ 5V มี 2 ขั้ว — ขั้วบวกไปเป็น รางไฟ +5V (เส้นบน) และขั้วลบไปเป็น กราวด์ 0V (เส้นล่าง)
ใน NPN เราต่อขา E ลงกราวด์ ดังนั้น E คือขาที่ลบที่สุด ไม่ใช่บวก ส่วนขา C ต่อขึ้นไปหา +5V จึงบวกที่สุด
กฎที่ต้องจำ: VC > VB > VE เสมอสำหรับ NPN
ลูกศรที่ขา E ชี้ออก = ทิศกระแสสมมติไหลออกทาง E (กระแสไหลจาก + ไป −) ส่วนอิเล็กตรอนวิ่งสวนทาง คือเข้าทาง E — อย่าสับสนสองอันนี้
Step 1 — power and ground (the most misunderstood part):
the 5V battery has two terminals — positive becomes the +5V rail (top) and negative becomes ground, 0V (bottom).
In an NPN we tie E to ground, so E is the most negative pin, not the positive one. C goes up to +5V, so it is the most positive.
The rule: VC > VB > VE for every NPN.
The emitter arrow points out = conventional current leaves via E (current runs + → −), while electrons travel the opposite way, entering at E. Don't mix the two up.
ขั้นที่ 2 — ทำไมต้องมี RB ก่อนขา B: เพราะรอยต่อ B-E คือไดโอดตัวหนึ่ง
เมื่อแรงดันถึง ~0.7V มันจะนำกระแส และไดโอดไม่จำกัดกระแสให้ตัวเอง — ถ้าเอาขา B ต่อตรงเข้า 5V กระแสจะพุ่งสูงมาก ทรานซิสเตอร์ (และขาไมโครฯ) พังทันที
RB จึงเป็นตัวกำหนดว่าจะให้ IB ไหลเท่าไหร่:
IB = (VIN − VBE) / RB = (5 − 0.7) / 2,200 ≈ 1.95 mA
สังเกตว่าแรงดันส่วนเกิน 4.3V ไปตกคร่อม RB ทั้งหมด เหลือคร่อม B-E แค่ 0.7V เท่านั้น (ไดโอดคุมแรงดันตัวเองไว้)
Step 2 — why RB must sit before the base: the B-E junction is a diode.
Past ~0.7V it conducts, and a diode does not limit its own current — wire the base straight to 5V and the current explodes, destroying the transistor (and the MCU pin).
RB is what sets IB:
IB = (VIN − VBE) / RB = (5 − 0.7) / 2,200 ≈ 1.95 mA
Note the surplus 4.3V is dropped entirely across RB; only 0.7V ever appears across B-E — the diode clamps itself there.
ขั้นที่ 3 — วงจรควบคุม (จุดส้ม): กระแสเบสไหลครบวง
ขาไมโครฯ 5V → RB → เข้าขา B → ออกขา E → ลงกราวด์ → กลับไปที่ไมโครฯ
กระแสนี้เล็กมาก (≈ 2 mA) ขาไมโครฯ จ่ายไหวสบายๆ — นี่คือ "มือที่หมุนก๊อกน้ำ"
สังเกตว่าไมโครฯ กับแบตเตอรี่ ต้องใช้กราวด์ร่วมกัน (common ground) ไม่งั้นกระแสเบสไม่มีทางไหลกลับ วงจรจะไม่ทำงาน — เป็นข้อผิดพลาดคลาสสิกตอนต่อวงจรจริง
Step 3 — the control loop (orange dots): the base current completes its circuit:
MCU 5V → RB → into B → out of E → ground → back to the MCU.
It is tiny (≈ 2 mA), easily supplied by an MCU pin — this is "the hand turning the tap".
Notice the MCU and the battery must share a common ground, otherwise the base current has no return path and nothing works — a classic beginner's wiring mistake.
ขั้นที่ 4 — วงจรกำลัง (จุดเขียว): LED ติด! พอ B-E นำกระแส ทรานซิสเตอร์ก็เปิด "วาล์ว" ระหว่าง C กับ E
กระแสหลักจึงไหล +5V → RC → LED → เข้าขา C → ออกขา E → ลงกราวด์
สังเกตว่า กระแสก้อนนี้ไม่ได้ผ่านขา B และไม่ได้มาจากไมโครฯ เลย — พลังงานมาจากแบตเตอรี่ 5V ล้วนๆ ไมโครฯ แค่สั่งเปิด
β อยากให้ IC = 100 × 1.95mA = 195 mA แต่วงจร (RC + LED) ยอมให้ไหลได้แค่ ≈ 18.7 mA
→ กระแสตัน ทรานซิสเตอร์จึงอิ่มตัว (Saturation) VCE เหลือ 0.2V = ทำตัวเป็นสวิตช์ที่ปิดสนิท
Step 4 — the power loop (green dots): the LED lights up! Once B-E conducts, the transistor opens the "valve" between C and E,
so the main current flows +5V → RC → LED → into C → out of E → ground.
Notice this current never passes through the base and never comes from the MCU — the energy is all from the 5V battery. The MCU merely gives the order.
β wants IC = 100 × 1.95mA = 195 mA, but the circuit (RC + LED) only allows ≈ 18.7 mA
→ the current clamps and the transistor saturates: VCE drops to 0.2V, behaving as a fully closed switch.
ขั้นที่ 5 — ทำไมต้องมี RC: LED ก็คือไดโอดอีกตัว — มันไม่จำกัดกระแสให้ตัวเองเหมือนกัน
ถ้าต่อ LED ตรงเข้า 5V โดยไม่มี RC กระแสจะพุ่งเป็นหลายร้อย mA แล้ว LED จะไหม้ทันที
คำนวณค่า RC จากแรงดันที่เหลือหลังหัก LED และ VCE(sat):
RC = (5 − 2 − 0.2) / 0.019 ≈ 150 Ω
หลักการเดียวกับ RB เป๊ะ — เจอไดโอด (หรือ LED) เมื่อไหร่ ต้องมีตัวต้านทานจำกัดกระแสเสมอ
Step 5 — why RC is needed: an LED is just another diode — it does not limit its own current either.
Connect it straight across 5V with no RC and hundreds of mA will rush through: the LED burns out instantly.
Size RC from what is left after the LED and VCE(sat):
RC = (5 − 2 − 0.2) / 0.019 ≈ 150 Ω
Exactly the same principle as RB — wherever there is a diode or LED, there must be a current-limiting resistor.
ขั้นที่ 6 — แรงดันแต่ละขา (กดปุ่ม HIGH/LOW เทียบดู):
Step 6 — pin voltages (toggle HIGH / LOW to compare):
| VE | VB | VC | LED | LED | ย่าน | Region | |
|---|---|---|---|---|---|---|---|
| อินพุต LOW (0V)Input LOW (0V) | 0 V | 0 V | 5 V | ดับoff | Cut-off | ||
| อินพุต HIGH (5V)Input HIGH (5V) | 0 V | 0.7 V | 0.2 V | ติดon | Saturation |
💡 สังเกตจุดสำคัญ: ตอนอิ่มตัว VC (0.2V) ต่ำกว่า VB (0.7V)
— แปลว่ารอยต่อ B-C กลายเป็นไบอัสตรงไปแล้ว ตรงกับตารางเงื่อนไขไบอัสในหัวข้อก่อนหน้าพอดี
และ VE = 0V เสมอ เพราะต่อกราวด์อยู่ — E คือขาลบสุดของ NPN ตลอดเวลา
💡 Key observation: in saturation VC (0.2V) is below VB (0.7V)
— meaning the B-C junction has become forward biased, exactly as the bias table above predicts.
And VE stays 0V because it is tied to ground — E is always the most negative pin of an NPN.
| ย่านRegion | เงื่อนไขCondition | IC | การใช้งานUse |
|---|---|---|---|
| Cut-off หยุดนำOff |
VBE < 0.7V (IB ≈ 0) | ≈ 0 | สวิตช์ ปิด (OFF)Switch OFF |
| Active ขยายActive |
IB น้อย, VCE ยังสูงsmall IB, VCE > VCE(sat) | β × IB | วงจรขยายสัญญาณAmplifier |
| Saturation อิ่มตัวSaturation |
IB มากพอ, VCE ≈ 0.2Venough IB, VCE ≈ 0.2V | สูงสุดmax | สวิตช์ เปิด (ON)Switch ON |
β ทั่วไป 50–300 (ทรานซิสเตอร์สัญญาณเล็ก)
Typical β is 50–300 for small-signal transistors
ตอนอิ่มตัว VCE ≈ 0.2V
At saturation VCE ≈ 0.2V
- สวิตช์อิเล็กทรอนิกส์: ใช้สัญญาณเล็กจากไมโครคอนโทรลเลอร์ขับ LED, รีเลย์, มอเตอร์, บัซเซอร์
- วงจรขยายสัญญาณ: ขยายเสียง (audio amplifier), ขยายสัญญาณเซ็นเซอร์
- วงจรดิจิตัล / ลอจิกเกต: เป็นองค์ประกอบพื้นฐานภายในไอซีและ CPU
- วงจรกำเนิดสัญญาณ (Oscillator) และวงจรควบคุมแรงดัน
- Electronic switch: a small microcontroller signal drives LEDs, relays, motors, buzzers
- Amplifier: audio amplifiers, boosting weak sensor signals
- Digital / logic gates: the basic building block inside ICs and CPUs
- Oscillators and voltage-regulation circuits
มอง BJT เป็นไดโอด 2 ตัว (B-E และ B-C) ตั้งมิเตอร์ที่โหมดทดสอบไดโอด
Think of a BJT as two diodes (B-E and B-C). Set the meter to diode-test mode.
- NPN: สายแดง (+) ที่ขา B → แตะ C และ E ควรอ่านได้ ~0.6–0.7V ทั้งคู่ (นำกระแส)
- สลับสาย (แดงที่ C/E, ดำที่ B) → ต้องขึ้น OL (ไม่นำ) ทั้งคู่
- ระหว่าง C กับ E ต้องไม่นำกระแสทั้งสองทิศ (OL) — ถ้านำแสดงว่าช็อต เสีย
- PNP: ตรงข้าม — สายดำ (−) ที่ขา B จึงจะนำกระแสไป C และ E
- NPN: red lead (+) on B, touch C then E → both should read ~0.6–0.7V (conducting)
- Swap leads (red on C/E, black on B) → both must show OL (no conduction)
- Between C and E, no conduction either way (OL) — if it conducts, the transistor is shorted/faulty
- PNP: reversed — the black lead (−) on B is what conducts to C and E
| เบอร์Part | ชนิดType | การใช้งานทั่วไปTypical Use |
|---|---|---|
| 2N2222 / PN2222 | NPN | สวิตช์/ขยายทั่วไป ~600mAGeneral switching/amp, ~600mA |
| BC547 | NPN | สัญญาณเล็ก, วงจรเสียงSmall signal, audio |
| BC557 | PNP | สัญญาณเล็ก (คู่ของ BC547)Small signal (complement of BC547) |
| TIP120 | NPN DarlingtonNPN Darlington | อัตราขยายสูง ขับมอเตอร์/โหลดหนักHigh gain, drives motors/heavy loads |
| 2N3055 | NPN กำลังNPN Power | กระแสสูง ~15A วงจรเพาเวอร์High current ~15A, power circuits |
| IRFZ44N | N-MOSFET | สวิตช์กระแสสูง, PWM, มอเตอร์High-current switching, PWM, motors |