bingo5 wrote: ↑
Aug 14 2019 9:40am
buba wrote: ↑
Aug 14 2019 8:03am
I think you are right and agree fully, Bingo5! Especially if you want serious performance!
What you describe is exactly how the firmware does it but I can see why you feel it is as a black box function.
If anyone gets to the hard max
limit very often it is usually because the min
limit is too high. Try lowering the min
limit and it will help with a better thermal control.
So if you have:
Min: 75 °C
Max: 85 °C
Min: 45 °C
Max: 85 °C
This will start to limit very, very slightly at 45 degrees and you will not even notice. But it will help to keep the temperature down and will give a smoother thermal throttling. This is not necessary to do, instead it is just a tip for anyone that wants a smoother experience.
Thank you buba, not only for your fast answer but also for your entgagement for the firmware and the people they want to use this.
I will try your hint. Before i has too much fear that eg 45°C the performance is too much pruned. Thats what i mean with "black box". So can you explain (if you have time for this) in more detail, how the power is limited between 45 and 85 °C?
By the way, actually i use the vlcd5 port from marcoq
Appreciate the kind words, Bingo5!
I will try to explain without going into much detail but let me know if something needs more explaining.
1. It all starts with the target current, targetCurrent. This is exactly what it sounds like: a target value of the current through the motor. If you are pushing hard on the pedals you will get a lot of power. This is because the targetCurrent is set high and the system is trying to give you that current.
2. The min
limit defines the temperature where the thermal protection will start to limit the current through the motor. In other words, it is a threshold that when passed allows the thermal protection to engage and start limiting the targetCurrent.
3. The max
limit defines the limit where the targetCurrent will be completely limited. This means that no matter what the targetCurrent is it will be 100 % limited.
To further explain we will start with an example with easy numbers:
1. The target current is set to targetCurrent and it is 10 A
limit is set to minTemperature and it is set to 50 °C
limit is set to maxTemperature and it is set to 100 °C
The delta current, i.e. the difference between the lowest current and the targetCurrent, is 10 - 0 = 10. The delta temperature, i.e. the difference between the lowest and highest temperature, is 100 - 50 = 50.
This means that for every step above 50 °C, which is our defined min
limit, the targetCurrent will be limited by 10 / 50 = 0.2 A.
If the temperature is 51 °C it will limit the targetCurrent by 0.2 A.
If the temperature is 52 °C it will limit the targetCurrent by 0.4 A.
If the temperature is 53 °C it will limit the targetCurrent by 0.6 A.
If the temperature is 99 °C it will limit the targetCurrent by 9,8 A.
If the temperature is 100 °C it will limit the targetCurrent by 10 A.
Notice that every limiting step is only 0.2 A. If you had set the min
limits closer with less of a margin the steps would be much bigger and aggressive.
Here is a generic example:
1. The target current is set to targetCurrent
limit is set to minTemperature
limit is set to maxTemperature
The delta current, i.e. the difference between the lowest current and the targetCurrent, is targetCurrent - 0 = targetCurrent. The delta temperature, i.e. the difference between the lowest and highest temperature, is maxTemperature - minTemperature.
This means that for every step above minTemperature, the targetCurrent will be limited by targetCurrent / (maxTemperature - minTemperature).
As with many things you do not need to calculate anything. Just set the limits you feel are safe and should work, try it out and change if something is not working to your satisfaction.