Skip to content

Stepper API: Set Ramp Profile #88563

Open
@jilaypandya

Description

@jilaypandya

Introduction

Currently stepper api lacks support for configuring ramp.

Problem description

Ramp support is essential for stepper motor control to ensure smooth operation:

  1. Smooth Acceleration and Deceleration
  2. Prevention of Missed Steps
  3. Reduced Wear and Tear
  4. Support for High-Speed Motion

Proposed change

Introduce a function to configure ramp in stepper api.
Introduce a trapezoidal ramp implementation allowing trapezoidal ramp motion.

Detailed RFC

Create a ramp interface with at least following functions:

  1. reset_ramp - required to recalculate ramp distance profiles each time a new move action is called
  2. get_next_step_interval - after each step the next step interval has to be calculated

Introduce ramp lib in stepper driver.

  • This lib shall consist of various ramp profiles beginning with trapezoidal_ramp
  • End goal is to have a selection of ramp for each instance of a stepper driver via DeviceTree.

Sample Implementation: #88564

Proposed change (Detailed)

Dependencies

There are currently 5 Upstream Stepper Drivers, 4 of which do not support ramp control inherently, these would highly benefit from the ramp control.

Finally tmc50xx driver could be supported out of the box from stepper api as well.
This would increase portability of stepper api by supporting from basic gpio-drivers, for instance, the step/dir drivers to advanced motion control drivers, for instance, the trinamic drivers.

Concerns and Unresolved Questions

Alternatives

Metadata

Metadata

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions