-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create task to send motor torque to motor controller (#110)
* convert accel and queue torque msg * adding in emrax motor parameters for torque calculation based on AC current --------- Co-authored-by: Scott A <[email protected]>
- Loading branch information
Showing
10 changed files
with
212 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* @file emrax.h | ||
* @author Nick DePatie | ||
* @brief Config file to hold some important values for Emrax 228-MV motor | ||
* @version 0.1 | ||
* @date 2023-12-28 | ||
* | ||
* @copyright Copyright (c) 2023 | ||
* | ||
*/ | ||
|
||
/* | ||
* Values retrieved from datasheet | ||
* Note: Emrax is Liquid Cooled | ||
* Note: We are using an encoder for position data | ||
*/ | ||
#define EMRAX_MAX_MOTOR_TEMP 120 /* degC */ | ||
#define EMRAX_NOMINAL_VOLTAGE 520 /* V */ | ||
#define EMRAX_PEAK_EFFICIENCY 90 /* % */ | ||
#define EMRAX_PEAK_POWER 124 /* kW, at 5500 RPM */ | ||
#define EMRAX_PEAK_TORQUE 230 /* Nm */ | ||
#define EMRAX_CONT_TORQUE 112 /* Nm */ | ||
#define EMRAX_LIMITING_SPEED 6500 /* RPM */ | ||
#define EMRAX_KV 15.53 | ||
#define EMRAX_KT 0.61 | ||
#define EMRAX_PEAK_CURRENT 380 /* A_RMS */ | ||
#define EMRAX_CONT_CURRENT 180 /* A_RMS */ | ||
#define EMRAX_INTERN_PHASE_RES 7.06 /* mOhm, at 25 degC */ | ||
#define EMRAX_INDUCTION_2PHASE 96.5 /* mHenry */ | ||
#define EMRAX_INDUCED_VOLTAGE 0.04793 /* V_RMS / RPM */ | ||
#define EMRAX_NUM_POLE_PAIRS 10 | ||
#define EMRAX_MOTOR_INTERTIA 0.02521 /* kg * m^2 */ | ||
#define EMRAX_WEIGHT 13.5 /* kg */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* @file torque.h | ||
* @author Scott Abramson | ||
* @brief Convert pedal acceleration to torque and queue message with calcualted torque | ||
* @version 1.69 | ||
* @date 2023-11-09 | ||
* | ||
* @copyright Copyright (c) 2023 | ||
* | ||
*/ | ||
|
||
#ifndef TORQUE_H | ||
#define TORQUE_H | ||
|
||
#include "cmsis_os.h" | ||
|
||
void vCalcTorque(void* pv_params); | ||
extern osThreadId_t torque_calc_handle; | ||
extern const osThreadAttr_t torque_calc_attributes; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.