Skip to content

Actuator Core: implement PWM and SPI #14

@wocsor

Description

@wocsor

Currently, Actuator controls the motor drivers with binary states. This works for actuator types with high hysteresis and position control, but for steering control this won't work. Implementing PWM to handle the motor drivers will be a better solution long-term.

Additionally, the motor drivers have SPI connected to gather the driver state, such as current draw and error states. This info is useful for sending diagnostic information about the board to the user.

  • implement PWM on GPIO connected to motor driver PWM pins
  • read in PWM set value from CAN, positive and negative set the DIR pin on the driver and absolute value is sent on to the driver
  • setup SPI peripheral connected to driver
  • send SPI messages to driver
  • read SPI messages from driver
  • output driver states to CAN

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions