Skip to content
Permalink
Browse files

increased velocity limit and added reduced current limit to mitigate …

…vbus overvoltage
  • Loading branch information...
LuSeKa committed May 28, 2019
1 parent ef4892b commit 9f7f5537d4a49704fcb2fa0f44cca5fbf10d713a
Showing with 5 additions and 1 deletion.
  1. +5 −1 tools/ODrive_hoverboard_motor_setup_part_01.py
@@ -8,7 +8,8 @@
current_control_bandwidth = 100
cpr = pole_pairs * 6
encoder_bandwidth = 100
vel_limit = 1000
vel_limit = 5000
current_limit = 5

print("Searching for ODrive...")
odrv0 = odrive.find_any()
@@ -40,6 +41,9 @@
print("Setting velocity limit to {}".format(vel_limit))
odrv0.axis0.controller.config.vel_limit = vel_limit
odrv0.axis1.controller.config.vel_limit = vel_limit
print("Setting current limit to {}".format(current_limit))
odrv0.axis0.motor.config.current_lim = current_limit
odrv0.axis1.motor.config.current_lim = current_limit
print("Configuring for current control")
odrv0.axis0.controller.config.control_mode = 1 #CTRL_MODE_CURRENT_CONTROL
odrv0.axis1.controller.config.control_mode = 1 #CTRL_MODE_CURRENT_CONTROL

0 comments on commit 9f7f553

Please sign in to comment.
You can’t perform that action at this time.