RobertK66 / obc_1769_core

Implements hardware abstractions and Layer2(3) modules for usage of the OBC hardware in cubesat projects
GNU General Public License v3.0
1 stars 1 forks source link

PSU academic goal #60

Open kodsurf opened 2 years ago

kodsurf commented 2 years ago

I have to set the goal here to myself to conclude PSU work within the scope of my master thesis.

So the task in this issue is a bit aside on how I would approach problematics in real works. The status with actual EPS system SW is FROZZEN. Still I need to fulfil an academic goal.


It is assumed that real physical values are encoded with Q-formats ( https://chummersone.github.io/qformat.html ) and compiled into a datavector[88]. Which is then send to OBC.

My academic goal is to write datavector parser which would decode the data and store it as real physical values. (similarly to what was done with Thruster module) .

Currently there are no real example of PSU datavector output avaliable due to some HW issues or work in progress with HW dev.

Within academic goal I will manually generate encoded datavector, which would be transmitted to OBC from arduino upon I2C request that would be similar to PSU.

Encoding of datavector is provided in a table below. Encodings were obtained by reverse engineering PSU and Pegasys repos

<html xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

Software reference | Register index | Description | Binary format -- | -- | -- | -- EPS_HK_I_PV2_5V | 0 | Current through FET3-2 between PV2-bus and 5V converter,low byte | q2_13 EPS_HK_I_PV1_5V | 2 | Current through FET3-1 between PV1-bus and 5V converter, low byte | q2_13 EPS_HK_V_PV2 | 4 | Voltage at PV2-bus,low byte | uq3_13 EPS_HK_V_5V_IN | 6 | Voltage at the input of the 5V converter measured at FET3-1,low byte | uq3_13 EPS_HK_I_PV1_3V3 | 8 | Current through FET5-1 between PV1-bus and 3V3 converter,low byte | q2_13 EPS_HK_I_PV2_3V3 | 10 | Current through FET5-2 between PV2-bus and 3V3 converter,low byte | q2_13 EPS_HK_V_PV1 | 12 | Voltage at PV1-bus,low byte | uq3_13 EPS_HK_V_3V3_IN | 14 | Voltage at the input of the 3V3 converter measured at FET5-2,low byte | uq3_13 EPS_HK_TEMP_BAT1SW | 16 | Temp near BAT1 switches low byte | q7_8 EPS_HK_TEMP_5V | 18 | Temp near 5V converter low byte | q7_8 EPS_HK_I_PV1_HV | 20 | Current through FET4-1 between PV1-bus and HV supply,low byte | q2_13 EPS_HK_I_PV2_HV | 22 | Current through FET4-2 between PV2-bus and HV supply,low byte | q2_13 EPS_HK_V_3V3_OUT | 24 | Voltage at the output of the 3V3 converter,low byte | uq3_13 EPS_HK_V_HV | 26 | Voltage at the output of the HV supply to the PPTs measured at FET4-2,low byte | uq3_13 EPS_HK_I_PV2_BAT1 | 28 | Current through FET1-2 between PV2-bus and battery 1,low byte | q2_13 EPS_HK_I_PV1_BAT1 | 30 | Current through FET1-1 between PV1-bus and  battery 1,low byte | q2_13 EPS_HK_V_5V_OUT | 32 | Voltage at the output of the 5V converter,low byte | uq3_13 EPS_HK_V_BAT1 | 34 | Voltage of the battery 1,low byte | uq3_13 EPS_HK_I_PV2_BAT2 | 36 | Current through FET2-2 between PV2-bus and battery 2,low byte | q2_13

<html xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<html xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

EPS_HK_I_PV1_BAT2 | 38 | Current through FET2-1 between PV1-bus and  battery 2,low byte | q2_13 -- | -- | -- | -- EPS_HK_VCC_MC | 40 | Supply voltage of the MC | uq3_5 EPS_HK_TEMP_MC | 41 | Temperature of the internal sensor of the MC | int EPS_HK_V_BAT2 | 42 | Voltage of the battery 2,low byte | uq3_13 EPS_HK_TEMP_BAT1 | 44 | Temp of BAT1 on the battery holder,low byte | q7_8 EPS_HK_TEMP_BAT2 | 46 | Temp of BAT2 on the battery holder,low byte | q7_8 EPS_HK_STATUS_1 | 48 | B7 (MSB): 3V3-1 on  B6: 3V3-2 on | uint8_t EPS_HK_STATUS_2 | 49 | /* B7 (MSB): Power Low Warning (EPS will enter in Power Down Mode soon after this warning), B6: Bat1 connected to PV1 | uint8_t EPS_HK_STATUS_3 | 50 | /* B7 (MSB): 3V3 Burst Mode on, B6: 5V Burst Mode on | uint8_t EPS_HK_STATUS_BAT1 | 51 | Estimation of the remaining capacity of the Battery 1 | int EPS_HK_STATUS_BAT2 | 52 | Estimation of the remaining capacity of the Battery 2 | int EPS_HK_REBOOT_MC | 53 | Number of reboots since RBF of the main controller | int EPS_HK_REBOOT_CC1 | 54 | Number of reboots since RBF of the first communication controller | int EPS_HK_REBOOT_CC2 | 55 | Number of reboots since RBF of the second communication controller | int EPS_HK_VCC_CC1 | 56 | Supply voltage of CC1 | uq3_5 EPS_HK_TEMP_CC1 | 57 | Temperature of the internal sensor of CC1 | int EPS_HK_VCC_CC2 | 58 | Supply voltage of CC2 | uq3_5 EPS_HK_TEMP_CC2 | 59 | Temperature of the internal sensor of CC2 | int EPS_HK_STATUS_CC1 | 60 | B7 (MSB)-B6: CC Mode: 00 Boot Mode, 01 Flight Mode | uint8_t EPS_HK_STATUS_CC2 | 61 | B7 (MSB)-B6: CC Mode: 00 Boot Mode, 01 Flight Mode | uint8_t EPS_HK_CC_ID | 62 | 0xAB | uint8_t EPS_HK_TBD | 63 | Not Used |  

RobertK66 commented 2 years ago

Is it ok for you to have this in an own branch and not in develop for now !? Overall I am not sure why and with which reasoning we should use this special Qm.n data formats. Let's discuss this next Bi-weekly meeting!