Skip to content

Commit

Permalink
feat(motor): tunning voltage params (#11)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Adjusted voltage settings for improved motor control system
performance, including an increase in power supply voltage from 12V to
24V and a motor voltage limit increase from 6V to 12V.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
hcd-bdltd authored Feb 12, 2024
2 parents 000008e + 92ce230 commit eb7dc76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void setup() {

// driver config
// power supply voltage [V]
driver.voltage_power_supply = 12;
driver.voltage_power_supply = 24;
driver.init();
// link the motor and the driver
motor.linkDriver(&driver);
Expand All @@ -69,7 +69,7 @@ void setup() {
motor.PID_velocity.I = 2;
motor.PID_velocity.D = 0;
// default voltage_power_supply
motor.voltage_limit = 6;
motor.voltage_limit = 12;
// jerk control using voltage voltage ramp
// default value is 300 volts per sec ~ 0.3V per millisecond
motor.PID_velocity.output_ramp = 1000;
Expand Down

0 comments on commit eb7dc76

Please sign in to comment.