Modified Motor Driver Firmware to include Flash + Thermal

Dependencies:   FastPWM3 mbed-dev-STM-lean

Committer:
adimmit
Date:
Tue Oct 18 16:22:24 2022 +0000
Revision:
76:4fd876d4cf2b
Parent:
70:2ea6c555a2cb
added some position data logging;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
saloutos 62:bbdf5afada79 1 #ifndef MOTOR_CONFIG_U10_H
saloutos 62:bbdf5afada79 2 #define MOTOR_CONFIG_U10_H
saloutos 60:0c8caaa91182 3
saloutos 61:33f2dc2b589f 4 // CONFIGURATION PARAMETERS OF U10 MOTORS
saloutos 60:0c8caaa91182 5
elijahsj 66:3947255b18c5 6 #define R_PHASE 0.433f //Ohms
saloutos 61:33f2dc2b589f 7 #define L_D 0.0002f //Henries
elijahsj 66:3947255b18c5 8 #define L_Q 0.0002f //Henries, set both inductances equal for now
saloutos 61:33f2dc2b589f 9 #define NPP 21 //Number of pole pairs
saloutos 61:33f2dc2b589f 10
elijahsj 70:2ea6c555a2cb 11 #define KT 0.2028f //N-m per peak phase amp, = WB*NPP*3/2
saloutos 61:33f2dc2b589f 12 #define GR 6.0f //Gear ratio
elijahsj 70:2ea6c555a2cb 13 #define KT_OUT 1.2168f //KT*GR
saloutos 61:33f2dc2b589f 14 #define WB 0.00606f // from KT //Flux linkage, Webers.
saloutos 61:33f2dc2b589f 15
saloutos 60:0c8caaa91182 16 #define R_TH 1.25f //needs update //Kelvin per watt
saloutos 60:0c8caaa91182 17 #define INV_M_TH 0.02825f //needs update //Kelvin per joule
saloutos 61:33f2dc2b589f 18 #define T_AMBIENT 25.0f // ambient temperature during temp calibration
saloutos 60:0c8caaa91182 19
saloutos 61:33f2dc2b589f 20 // U10 motor is KV50...use to calculate Kt
saloutos 61:33f2dc2b589f 21 // actuator has 36 stator slots, 42 pole magnets
saloutos 60:0c8caaa91182 22 // so, 21 elec revs per mech rev
saloutos 60:0c8caaa91182 23 // 36*21 steps per elec rev if using traditional commutation
saloutos 60:0c8caaa91182 24
saloutos 60:0c8caaa91182 25 #endif