Modified Motor Driver Firmware to include Flash + Thermal
Dependencies: FastPWM3 mbed-dev-STM-lean
Config/motor_config_U12.h@76:4fd876d4cf2b, 22 months ago (annotated)
- Committer:
- adimmit
- Date:
- Tue Oct 18 16:22:24 2022 +0000
- Revision:
- 76:4fd876d4cf2b
- Parent:
- 66:3947255b18c5
added some position data logging;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
saloutos | 62:bbdf5afada79 | 1 | #ifndef MOTOR_CONFIG_U12_H |
saloutos | 62:bbdf5afada79 | 2 | #define MOTOR_CONFIG_U12_H |
benkatz | 20:bf9ea5125d52 | 3 | |
elijahsj | 66:3947255b18c5 | 4 | |
saloutos | 61:33f2dc2b589f | 5 | // CONFIGURATION PARAMETERS FOR U12 MOTORS |
saloutos | 60:0c8caaa91182 | 6 | |
elijahsj | 66:3947255b18c5 | 7 | #define R_PHASE 0.158f //Ohms |
saloutos | 61:33f2dc2b589f | 8 | #define L_D 0.000084f //Henries |
elijahsj | 66:3947255b18c5 | 9 | #define L_Q 0.000084f //Henries |
saloutos | 61:33f2dc2b589f | 10 | #define NPP 21 //Number of pole pairs |
saloutos | 61:33f2dc2b589f | 11 | |
elijahsj | 66:3947255b18c5 | 12 | #define KT 0.1916f //N-m per peak phase amp, = WB*NPP*3/2 |
saloutos | 61:33f2dc2b589f | 13 | #define GR 6.0f //Gear ratio |
elijahsj | 66:3947255b18c5 | 14 | #define KT_OUT 1.15f //KT*GR |
elijahsj | 66:3947255b18c5 | 15 | #define WB 0.00608f // from KT //Flux linkage, Webers. |
saloutos | 61:33f2dc2b589f | 16 | |
saloutos | 58:32e8927fe39f | 17 | #define R_TH 1.25f //needs update //Kelvin per watt |
saloutos | 58:32e8927fe39f | 18 | #define INV_M_TH 0.02825f //needs update //Kelvin per joule |
saloutos | 61:33f2dc2b589f | 19 | #define T_AMBIENT 25.0f // ambient temperature during temp calibration |
benkatz | 22:60276ba87ac6 | 20 | |
saloutos | 61:33f2dc2b589f | 21 | // U12 motor is KV40...use to calculate Kt |
saloutos | 61:33f2dc2b589f | 22 | // actuator has 36 stator slots, 42 pole magnets |
saloutos | 58:32e8927fe39f | 23 | // so, 21 elec revs per mech rev |
saloutos | 58:32e8927fe39f | 24 | // 36*21 steps per elec rev if using traditional commutation |
benkatz | 20:bf9ea5125d52 | 25 | |
benkatz | 20:bf9ea5125d52 | 26 | #endif |