Gu Jasper / Motor_DRV8323RH_for_20190

Dependencies:   mbed-dev-f303 FastPWM3

Files at this revision

API Documentation at this revision

Comitter:
benkatz
Date:
Thu May 24 15:03:25 2018 +0000
Parent:
40:cd7e837b2b93
Child:
42:738fa01b0346
Commit message:
back to normal

Changed in this revision

Config/motor_config.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Config/motor_config.h	Thu May 24 15:02:32 2018 +0000
+++ b/Config/motor_config.h	Thu May 24 15:03:25 2018 +0000
@@ -5,8 +5,8 @@
 #define L_D 0.00003f            //Henries
 #define L_Q 0.00003f            //Henries
 #define KT .075f                 //N-m per peak phase amp, = WB*NPP*3/2
-#define NPP 7                  //Number of pole pairs
-#define GR 1.0f                 //Gear ratio
+#define NPP 21                  //Number of pole pairs
+#define GR 6.0f                 //Gear ratio
 #define KT_OUT 0.45f            //KT*GR
 #define WB 0.0024f               //Webers.  
 
--- a/main.cpp	Thu May 24 15:02:32 2018 +0000
+++ b/main.cpp	Thu May 24 15:03:25 2018 +0000
@@ -61,8 +61,8 @@
 
  #define P_MIN -12.5f
  #define P_MAX 12.5f
- #define V_MIN -650.0f
- #define V_MAX 650.0f
+ #define V_MIN -45.0f
+ #define V_MAX 45.0f
  #define KP_MIN 0.0f
  #define KP_MAX 500.0f
  #define KD_MIN 0.0f