Skip to content

Common Anode Stepper Pulse Control #10

@Naitry

Description

@Naitry

This issue is directly mentioned in the main loop of main.cpp, our core embedded firmware

  // need to update pins manually because we are using an open collecter (common anode) configuration which isnt supported by the hardware pwm timer.
  // see https://www.omc-stepperonline.com/download/DM542T.pdf section 4 for more info on open drain configuration

  // TODO manually updating pins work fine for now but will be severely impacted by any blocking code. need to look into a better solution
  wristInclinationMotor->updatePin();
  wristRotationMotor->updatePin();
  baseMotor->updatePin();
  gripperMotor->updatePin();

The current code repeatedly checks the current period of a stepper motor (time since last flipped) and changes the state dependently. This manual flipping is necessary due to our use of an open collector configuration.

The issue is that this competes with serial input in the main loop and can be blocked by the serial input, preventing it from controlling the motors sometimes.

We need to change the way in which we control the steppers to prevent it being blocked by other processes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions