Class RepeatUltraMk2¶
Defined in File repeat_ultra_mk2.hpp
Nested Relationships¶
Nested Types¶
Inheritance Relationships¶
Base Type¶
public ISpeedMotor
Class Documentation¶
-
class RepeatUltraMk2 : public ISpeedMotor¶
Drivers for the Repeat Ultra Mk2 controlled by a Vortex80AEsc AM32 controller.
Fun fact of the day: If the pinion gear breaks, no fear, get some green loctite 603 which is designed for shear forces. Generally is ready to use within an hour if you are in a pinch. (Wait 24 hours if you can.)
https://repeat-robotics.com/buy/ultra-2/
Public Functions
-
mockable ~RepeatUltraMk2() = default¶
- mockable void setTargetSpeed (const RPM &speed)
Since this motor does not use feedback to control its speed, this is the value that it uses to estimate the required voltage and thus the duty cycle.
Currently, this code assumes that the speed controller interpolates the speed linearly from minimum to maximum speed. The maximum speed is assumed to be the kv constant multiplied by the nominal voltage.
This will likely be changed after testing.
This is motivated by the fact that a motor controller with only 10 volts can at most provide a bdlc motor 10 volts. Given the kv value, the maximum theoretical speed would be that.
-
void initialize() override¶
Required to send a zero arming signal The initialization needs to have an arming signal sent for 1-2 seconds. It will be left up to the caller on how to ensure the delay.
-
void update()¶
Public Static Attributes
-
static constexpr RPMPerVolt kKv = {1450.0}¶
-
struct Config¶
- Param controllerInputVoltage:
- the nominal voltage supplied to the motor controller. It doesn’t have to be too precise.
- Param pwmData:
- the frequency and port information
- Param inverted:
- whether or not to make clockwise counter-clockwise etc. In fang-mcb and the electronics department, counterclockwise is positive.
- Param gearRatio:
- how many motor turns per shaft turn. This means that a ratio greater than 1 will make the output speed slower but stronger.
- Param rampSpeed:
- how RPM per second (this is dimensionally stripped for simplicity reasons)
-
mockable ~RepeatUltraMk2() = default¶