We have now verified PWM as working, and have an API to set duty cycle. Likewise, I have defined a function in stateMachine that should be used to implement this (feel free to add whatever abstraction needed, but this function should be used as the highest level “calc PWM” call
Desired Additional Features
We need to actually handle the logic for setting PWM. This algorithm may not be an exact science - but it needs to account for the following:
Cell temp: obviously, the temperature of the battery cells determines our fan speed
Cell proximity: we have 6(?) fans spread out across the battery packs. this algorithm should probably factor in cell proximity, and weigh the closer cells higher than the fourth (ie, if the cells located near fan2 are cold, but the ones much farther a way are hot, we should make sure our fan speed favors the nearby cells)
On top of this, this ticket should handle the abstraction of the timer object (htim1, etc). In the bare function right now, this object is hardcoded into each call, but this should be improved somehow
Note: while i dont have an exact vision for this algo right now, the simpler the better, as long as it accounts for the above. Realistically, it wouldnt be a huge deal if we always ran the fans on max power, so note that any improvement over that adds efficiency
Current Features
We have now verified PWM as working, and have an API to set duty cycle. Likewise, I have defined a function in stateMachine that should be used to implement this (feel free to add whatever abstraction needed, but this function should be used as the highest level “calc PWM” call
Desired Additional Features
We need to actually handle the logic for setting PWM. This algorithm may not be an exact science - but it needs to account for the following:
On top of this, this ticket should handle the abstraction of the timer object (htim1, etc). In the bare function right now, this object is hardcoded into each call, but this should be improved somehow
Note: while i dont have an exact vision for this algo right now, the simpler the better, as long as it accounts for the above. Realistically, it wouldnt be a huge deal if we always ran the fans on max power, so note that any improvement over that adds efficiency
Screenshots (as needed)
No response