【问题标题】:How to calculate distance travelled by Robot in avr如何计算机器人在avr中行进的距离
【发布时间】:2018-03-04 06:27:02
【问题描述】:

在这里,我想计算机器人在 atmega 2560 中行进的距离?我知道公式距离 = 车轮周长 * 电机转速(以 rpm 为单位)。但我不知道如何将此公式应用于以下问题。

What is the approximate distance covered by the robot in 2 seconds, if OCR5AL=OCR5BL=0xB2. Given that, maximum speed at which the motors rotate is 300 rpm and wheels have a radius of 2.8cm.
Where
OCR5AL is Output compare register low value for Left Motor
OCR5BL is Output compare register low value for Right Motor

Maximum speed is attained, when OCR5AL =OCR5BL =0xFF.

【问题讨论】:

    标签: avr atmega avrdude


    【解决方案1】:

    电机每分钟转数 (rpm) 和车轮转数是不同的。我不认为你的机器人的轮子以 300 rpm 的速度旋转。 因此,为了能够计算距离,您需要知道车轮旋转 360 度需要多少电机转数。 例如,如果您有步进电机,这将正常工作。知道车轮转一圈所需的步数,可以为您提供一个计算距离的数学公式。 如果您想使用时间测量来解决这个问题,您需要计算出使用不同的电机速度转动车轮需要多少秒和毫秒。

    【讨论】:

      猜你喜欢
      • 2019-03-31
      • 1970-01-01
      • 2021-12-31
      • 2021-05-10
      • 1970-01-01
      • 1970-01-01
      • 2023-03-04
      • 2021-05-25
      • 1970-01-01
      相关资源
      最近更新 更多