# RPi B+ 如何控制无刷电机 ESC

> 原文链接：https://robotics.hellobike.com/pitfalls/2015-03-24-robotics-se-6837
> 频道：pitfalls | 更新日期：2015-03-24 | 标签：auto, stackexchange, quadcopter, raspberry-pi, brushless-motor, esc
> 核心摘要：ESC 可按舵机方式控制，使用 RasPi 舵机库或外接舵机控制器，BEC 供电电子设备也可行。

# RPi B+ 如何控制无刷电机 ESC

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[Controlling an ESC for Brushless Motors with an RPi](https://robotics.stackexchange.com/questions/6837/controlling-an-esc-for-brushless-motors-with-an-rpi)（Robotics Stack Exchange #6837）

**状态**：已解决

## 问题

提问者想用 RPi B+ 替代常规飞控控制四轴无刷电机，但担心 I2C、硬件 PWM 数量不足、软件 PWM 是否可用，以及 ESC 上电早于 RPi 时输入异常和 BEC 供电安全性。

## 环境

Linux / ROS 机器人软件与控制通用开发环境

## 解决办法

1. 将 ESC 按舵机方式控制：脉宽不表示位置，而表示输出速度，约 `1000µs` 为最低，约 `2000µs` 为全速。
2. 在 Raspberry Pi 上查找并使用任意舵机控制库，这类库即可控制 ESC。
3. 也可以外接舵机控制器作为替代方案。
4. 使用 ESC 的 BEC 给电子设备供电被认为是合理的。

原问题作者：Shreyas；采纳答案作者：Octopus。原内容依 CC BY-SA 4.0 授权，本页摘要同样依 CC BY-SA 4.0 授权。
:::

## 原始参考来源 (Sources)

- [Robotics Stack Exchange #6837：Controlling an ESC for Brushless Motors with an RPi](https://robotics.stackexchange.com/questions/6837/controlling-an-esc-for-brushless-motors-with-an-rpi)