ทำไมจึงต้องใช้ตัวขับ
ขาไม่สามารถจ่ายไฟให้มอเตอร์ได้ ให้ใช้ทรานซิสเตอร์หรือตัวขับ
ทำไมจึงต้องใช้ตัวขับ เป็นบทเรียน Arduino & IoT Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 1 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Arduino & IoT Academy และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Arduino & IoT Academy มีบทเรียนทั้งหมด 4 บทเรียน
บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ
Pins Are Tiny
An Arduino pin can only push a few milliamps. That is plenty for an LED, but a motor wants far more current than a pin can ever supply. ⚡
What a Motor Demands
Even a small DC motor can pull hundreds of milliamps when starting. Connect it straight to a pin and you risk frying your board instantly.
Enter the Driver
A driver is a middleman. Your pin sends a tiny control signal, and the driver switches a much bigger current from a separate power supply.
The Transistor as a Switch
The simplest driver is a single transistor. A small voltage on its base lets a large current flow through, like a faucet your pin gently opens.
Separate Power for the Motor
The motor draws from its own supply, not the Arduino's 5V. The pin only flips the transistor, so the heavy current never touches your board.
Share a Common Ground
The motor supply and the Arduino must share one ground. Without a common reference, the transistor never sees a clean on or off signal.
Driving It in Code
To your sketch, a transistor driver looks just like an LED. You set a pin HIGH to run the motor and LOW to stop it.
pinMode(9, OUTPUT);
digitalWrite(9, HIGH); // motor on
digitalWrite(9, LOW); // motor offMOSFETs for Bigger Loads
For heavier current a logic-level MOSFET is the go-to switch. It wastes little energy as heat and handles motors a small transistor cannot.
Ready-Made Driver Modules
You rarely wire transistors by hand. A driver module packs the switching parts onto one tidy board you simply plug into.
One Direction Only
A single transistor can turn a motor on and off, but it spins only one way. To reverse a motor you need more, which the next lesson covers. 🔄
Why It Keeps Boards Alive
The whole point of a driver is isolation: it lets a fragile 5V pin command a powerful load without ever risking the Arduino itself.
Quick Check
Why can't you connect a DC motor directly to an Arduino output pin?
Recap
Pins are weak, motors are hungry, so a driver like a transistor or MOSFET switches a separate supply. Share ground and you protect your board. 🚀
คำถามที่พบบ่อย
บทเรียน “ทำไมจึงต้องใช้ตัวขับ” ฟรีหรือไม่
ใช่ — ข้อความเต็มของ “ทำไมจึงต้องใช้ตัวขับ” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Arduino & IoT Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Arduino & IoT Academy มีบทเรียนทั้งหมด 4 บทเรียน
คุณจะเรียนรู้อะไรในบทเรียน “ทำไมจึงต้องใช้ตัวขับ”
ขาไม่สามารถจ่ายไฟให้มอเตอร์ได้ ให้ใช้ทรานซิสเตอร์หรือตัวขับ คุณปฏิบัติ Arduino & IoT Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน
คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Arduino & IoT Academy หรือไม่
ไม่จำเป็นต้องมีประสบการณ์มาก่อน Arduino & IoT Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 1 จากทั้งหมด 4 บทเรียน
บทเรียน “ทำไมจึงต้องใช้ตัวขับ” ใช้เวลานานแค่ไหน
บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย
ฉันเขียนและรันโค้ดในบทเรียน Arduino & IoT Academy นี้ได้ไหม
ได้ บทเรียน Arduino & IoT Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ
บทเรียนทั้งหมดในหลักสูตรนี้
- ทำไมจึงต้องใช้ตัวขับ
- ความเร็วและทิศทางด้วยสะพานรูปตัว H
- สวิตช์อุปกรณ์ไฟบ้านด้วยรีเลย์
- ป้องกันแรงดันกระชากจากการเหนี่ยวนำกลับ