简体   繁体   English

使用 jetson nano 通过 esc 控制无刷电机

[英]Control motor brushless with esc using jetson nano

I have done a lot of research on how to control a brushless motor with an ESC (Electronic Speed Controller) using a nano jetson.我已经对如何使用 nano jetson 控制带有 ESC(电子速度控制器)的无刷电机进行了大量研究。 I did not find how to connect the esc to the gpio of the jetson.我没有找到如何将esc连接到jetson的gpio。 I also did not find how to make a simple code to control my motor.我也没有找到如何编写一个简单的代码来控制我的电机。

If you could help me to clear these points.如果你能帮助我清除这些点。

Thanks in advance.提前致谢。

Sacha Lepresle萨沙·莱普雷勒

Check out the Nvidia Jetson GPIO repository , and the PWM sample .查看 Nvidia Jetson GPIO 存储库PWM 示例 You could for example initiate the PWM-signal to 100Hz like this:例如,您可以像这样将 PWM 信号初始化为 100Hz:

p = GPIO.PWM(output_pin, 100) p = GPIO.PWM(输出引脚,100)

And adjust the PWM duty cycle between 0.1-0.2% in order to generate the necessary 1-2ms high pulse PPM signal to set, like this:并在 0.1-0.2% 之间调整 PWM 占空比,以产生必要的 1-2ms 高脉冲 PPM 信号进行设置,如下所示:

p.ChangeDutyCycle(0.1) # 0%
p.ChangeDutyCycle(0.2) # 100%

I am uncertain if the resolution of the Jetson Nano PWM-timers are good enough for this kind of small adjustments, but it is a quick thing to try.我不确定 Jetson Nano PWM 定时器的分辨率是否足以进行这种小的调整,但这是一件快速的尝试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM