为什么需要驱动器
引脚无法为电机供电,请使用晶体管或驱动器
为什么需要驱动器 是 CoddyKit 上的免费 Arduino & IoT Academy 课时。 这是第 1 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 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 导师)并解锁 Arduino & IoT Academy 课程的其余内容,请升级到 CoddyKit PRO。 Arduino & IoT Academy 课程共包含 4 节课。
「为什么需要驱动器」这节课中我会学到什么?
引脚无法为电机供电,请使用晶体管或驱动器 你通过在浏览器中直接运行的动手代码来练习 Arduino & IoT Academy,全天候 AI 导师会在你学习这节课的过程中回答你的问题。
学习 Arduino & IoT Academy 需要有经验吗?
无需任何先前经验。CoddyKit 上的 Arduino & IoT Academy 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 1 节课,共 4 节。
「为什么需要驱动器」课时需要多长时间?
大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。
我能在这节 Arduino & IoT Academy 课中编写并运行代码吗?
能。每节 Arduino & IoT Academy 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。
此课程中的所有课时
- 为什么需要驱动器
- 使用 H 桥控制速度与方向
- 使用继电器切换市电设备
- 防止反电动势尖峰