Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-dev-f303 FastPWM3
Config/motor_config.h@54:3e056b097c52, 2020-03-03 (annotated)
- Committer:
- bdring
- Date:
- Tue Mar 03 00:53:49 2020 +0000
- Revision:
- 54:3e056b097c52
- Parent:
- 52:cf8b2abf811d
Working on step/dir
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
benkatz | 20:bf9ea5125d52 | 1 | #ifndef MOTOR_CONFIG_H |
benkatz | 20:bf9ea5125d52 | 2 | #define MOTOR_CONFIG_H |
benkatz | 20:bf9ea5125d52 | 3 | |
benkatz | 48:74a40481740c | 4 | #define R_PHASE 0.13f //Ohms |
benkatz | 47:e1196a851f76 | 5 | #define L_D 0.00002f //Henries |
benkatz | 47:e1196a851f76 | 6 | #define L_Q 0.00002f //Henries |
benkatz | 47:e1196a851f76 | 7 | #define KT .08f //N-m per peak phase amp, = WB*NPP*3/2 |
benkatz | 47:e1196a851f76 | 8 | #define NPP 21 //Number of pole pairs |
bdring | 52:cf8b2abf811d | 9 | #define GR 6.0f //Gear ratio |
benkatz | 37:c0f352d6e8e3 | 10 | #define KT_OUT 0.45f //KT*GR |
benkatz | 48:74a40481740c | 11 | #define WB 0.0025f //Flux linkage, Webers. |
benkatz | 48:74a40481740c | 12 | #define R_TH 1.25f //Kelvin per watt |
benkatz | 48:74a40481740c | 13 | #define INV_M_TH 0.03125f //Kelvin per joule |
benkatz | 22:60276ba87ac6 | 14 | |
bdring | 54:3e056b097c52 | 15 | //#define P_MIN -12.5f // posiiton min in radians |
bdring | 54:3e056b097c52 | 16 | //#define P_MAX 12.5f // posiiton max in radians |
bdring | 52:cf8b2abf811d | 17 | |
bdring | 54:3e056b097c52 | 18 | #define P_MIN (-2 * PI) // posiiton min in radians |
bdring | 54:3e056b097c52 | 19 | #define P_MAX (2 * PI) // posiiton max in radians |
bdring | 54:3e056b097c52 | 20 | |
bdring | 54:3e056b097c52 | 21 | #define STEPS_PER_REV 1000.0f // ster per revolution |
bdring | 54:3e056b097c52 | 22 | #define RADS_PER_STEP ( (2.0f * PI) / STEPS_PER_REV) // radian move per step |
benkatz | 20:bf9ea5125d52 | 23 | |
benkatz | 20:bf9ea5125d52 | 24 | |
benkatz | 20:bf9ea5125d52 | 25 | #endif |