Arduino步进和驾驶员频率和限制

发布于 2025-02-11 18:11:47 字数 717 浏览 2 评论 0原文

我一直在使用arduino uno在事物的脉搏侧运行步进。

我发现了我假定是步进驱动程序的限制,或UNO硬件限制等。

我一直在使用此基本的代码来找出适用于我的应用程序的正确设置(0.9)在下面的代码中,似乎符合我的设置中某些东西的局限性,我相信我的便宜的Foyo Fym404a驾驶员将成为罪魁祸首。

它说频率限制为100kpp,(100,000Hz?)。

在用数字万用表(GND到引脚9)测量0.9设置时,频率读取为75.48kHz。 这种设置是当我听到噪音的噪音而没有电动机的运动

时,在设置延迟时没有电动机的运动,它读取495.80Hz和电动机的稳定运行良好。

我试图弄清楚的是,频率的跳跃似乎对您来说是否正确?从延迟(1到0.9)

是否完全有可能与步进驱动器一起使用,并且无法以较高的频率运行,或者代码不使用UNO的全部功能正确编程后,我读到可以脉动到8MHz。

期待您的建设性答案。

 void loop() {
  digitalWrite(8, HIGH); // sets the digital pin 8 on
  delay(1);            //  waits for .1 second's
  digitalWrite(8, LOW);  // sets the digital pin 8 off
  delay(1);            // waits for .1 second's
}

I have been using an Arduino Uno for running a stepper on the pulse side of things.

I have found a limitation of what I presume to be the stepper driver, or Uno Hardware limitation etc.

I have been using this basic bit of code to figure the correct settings for my application, ie higher RPM motor actuation, setting the timing to delay(0.9) in the code below seems to meet the limitations of something on my setup, I believe that my cheap Foyo FYM404A driver to be the culprit.

it says that the frequency limitation is 100kpps, (100,000Hz?).

when measuring at the 0.9 setting with a digital multimeter (gnd to pin 9) the frequency reads 75.48KHz.
this setting is when im hearing a whining noise and no motion of the motor

when repeating the measurement when set to delay(1) it reads 495.80Hz and a good stable running of the motor.

What I am trying to figure out is whether the jump in frequency seems right to you? going from delay(1 to 0.9)

and

whether it could be entirely possible that the limitation is with the stepper driver and it just isn't able run at higher frequencies or the code isn't using the full capability of the Uno which from what I read can pulse to 8MHz, when programmed properly.

looking forward to your constructive answer.

 void loop() {
  digitalWrite(8, HIGH); // sets the digital pin 8 on
  delay(1);            //  waits for .1 second's
  digitalWrite(8, LOW);  // sets the digital pin 8 off
  delay(1);            // waits for .1 second's
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜宝宝 2025-02-18 18:11:47

延迟函数接受整数值,而不是浮点值,这意味着将“ 0.9”传递给该函数,编译器实际上将“ 0”翻译为“ 0”,因为编译器确实剪切/截断了数字的小数部分,并且仅保留整数部分在这种情况下为“ 0”。

延迟函数将其输入参数作为毫秒为毫秒,这意味着如果您想具有5Hz的频率(即0.1秒低,高和0.1秒高 - > f = 1/0.2),则应调用延迟(100) - > 100ms = 0.1秒

The delay function accepts integer value, not floating-point values, this means passing '0.9' to the function will be actually translated as '0' by the compiler as the compiler do cut/truncate the decimal part of the number and keep only the integer part which is '0' in this case.

delay function takes its input argument as milliseconds, which means if you want to have a frequency of 5HZ (i.e. 0.1 sec LOW and 0.1 sec HIGH -> f= 1/0.2) you should be calling delay(100) -> 100ms = 0.1sec

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文