The above recommendations are reasonable, but since this is the Technical Reference Section it should be pointed out that
A) This only applies to the circuit above. Many Infineon controllers have a different 12V regulator design and these values WILL NOT WORK.
**( Case in point - the 18 fet controllers)
B) The values in the table above are really on the ragged edge - it is possible that you could over-volt the LM317 using those values.
Based on the circuit above - one purpose of varying R1 is to limit the voltage drop across the LM317 regulator.
The maximum acceptable voltage drop across the LM317 is 40V, and the above recommendations may result in an over-voltage situation on the LM317
(note: Vdrop being Calculated by subtracting Vout from Vin)
Specifically for the circuit above:
Vout = 1.25V(1 + R3/R2) + Ia(R3)
R2 = 1.2k
R3 = 10k
Ia = 50uA to 100uA
Vout = 1.25V(1 + 10k/1.2k) + Ia(10k)
Vout = 12.16V to 12.66V
So now we know what Vout is about 12V
(always good to check numbers - right? _Never trust a Chinese schematic
Now lets work an example.
Assuming the following:
Vin = 95.57V (from the table above)
Vout = 12V (from the schematic and my calculations)
I = 50mA (from the linked reference to ebikes.ca and a reasonable rule of thumb)
Vdrop = Vin - VR1 - Vout
VR1 = I * R1 = 50mA * 780ohms = 39V
Vdrop = 95.57 - 39 - 12 = 44.57V
So what this means is that if you implement this resistor choice and your controller current is about 50mA (which is about what it will be) then you will be putting 44.57V across the LM317 which technically puts it into the failure zone.
It is wise to leave a little margin - so generally you would not want to put more than say... 37V across the LM317 worst case. For this example, I think that 900ohms would be more appropriate than 780 ohms. That said - this is all assuming 50mA, so if you assume 60mA then 780ohms would be fine and if you assume 40mA you would be looking at a high likely hood of the expulsion of magic smoke.
In the end, it is the responsibility of the individual who is modding the controller to take responsibility for calculating the correct values to use. The wise individual would measure the actual current draw on the controller in situ and work the formulas from there - since as you can see the controller current draw plays a huge role in the equation.
methods tip of the day:
Trust but verify - this goes for everything in life, but especially for magic numbers on the internet. Nothing is as straight forward as it appears in Electronics.
P.S. Oh yea - Dont forget to run the LVC numbers too to make sure you have sufficient voltage for the LM317 to regulate at 12V - and of course - run the power numbers and add at least 40% margin to your power resistor selection. (I.e. if you come up with 2.4W then run a pair of 2W resistors in parallel)
In this case at 68V 50mA we would still have a sold 17V across the LM317.
P.S.S. Not all controllers draw 50mA !!! Each of the many infineon designs have different components on the board, different accessories, etc. The 12 fet controller that runs a Throttle, ebrakes, Cruise Control, halls, and an LED is going to pull more current (less drop across the LM317) than a 6 fet controller with only a throttle. THAT is why you measure your own current in situ for best results.
P.S.S.S. The honest truth is that just about any of those values will actually work in real life since the LM317 often times has good Margin. On my controllers at home I do stupid things like run 18S on 12S max controllers all the time..... Technically it should not work - but it does
P.S.S.S.S. I just wanted to write 4 S's