@casainho , @stancecoke & all other contributors to this custom firmware:
As I wrote in my previous posts, I just finished beefing up some square wave 18 fet kt controllers. As adding a current sensor did not magically turn them into sine wave controllers, I decided to take a leap of faith and installed your firmware.
And WOW!!! I am highly impressed, you have made a true piece of art! As a newbie, it was very user friendly to install. And more importantly: it works like a charm and looks very professional! Thank you very much, it really is the pie on the hardware optimizations that you can do to these controllers. It is very admirable that you are still taking the time to answer questions of other enthousiasts on this forum. It is really appreciated!!
As a newbie, of course I had to solve quite a few challenges. And I have some suggestions and questions about the Java tool and app, if those are still under active development. I feel I could help other users with the knowledge that I gained, maybe I should write some tutorials myself. Anyway, I will list the topics so anyone could ask me if they are interested.
My experiences with the Java tool:
1. very user friendly. You don’t need any programming skills to use the tools. Eclipse is not needed for a newbie; just the Java tool and the software tools that you need to install.
My experiences with the blueosec app:
1. It looks amazing and was clearly built by ebike enthousiasts!
2. You can use the graph of the correction value to determine the optimal motor specific angle (I think

): run the motor at a constant speed, and change the specific angle until no correction is needed anymore. 238 is perfect
for my direct drive motor.
3. The wave table selection option is one of the greatest additions: the pure sine wave option is amazing: pure silence with ridiculous amounts of torque (once you set the phase amps you want). Pure sine wave is much more silent than the other wave forms!
4. The morse code to unleash the ‘Berserk mode’ a.k.a. Off-road mode is enough of a reason to install the custom firmware for any high powered bike user. The yellow font provides perfect feedback for having entered the correct code. If you switch off the ignition, you are immediately back to road legal. Very useful.
Suggestions for potential improvement of the bluosec app (these probably have been suggested by others before?):
1. Automatically apply the entered scaling factors for amps and volts so you can dial in the wanted limits in amps and volts directly without manual conversion into 0-255 values.
2. After applying suggestion 1: Display units in titles and descriptions
3. Automatic scaling of the graphs based on the entered limits (currently, my graphs are mostly out of sight due to high values). Alternatively, manually being able to set the maximum values for the axes would also help.
4. Show watts (or is it already there?). This is very useful variable for manual calibration of the cal a factor. For example, driving 50 km/h should take some 1000 watt without excessive wind speeds. And for comparison with other controllers or other power references as well.
Suggestions for improving the Java tool:
1. Add the WAve table option in The Java configurator as well, so that you can choose the pure sine wave for use with a display instead of the app (how can I change the code to do this manually?).
I think it is very important to mention that new users should take the time to calibrate the cal a and voltage calibration factors before accelerating their bike. The preset calibration value for voltage (67) was fine for me (selected the 48v dd preset), but the value for cal a was way off. It needed to be 21 instead of the preset 50 value. This could easily lead to blown mosfets because of way to high amps. I would advise to use an amp meter to calibrate this factor, by pressing the rear brakes while powering the motor (brake cable temporarily disconnected) and comparing the measured battery amps to the amps that the app reports. Alternatively, you can first check the voltage calibration in steady state with a multi meter, then drive 50 km/h and change cal a until amps*voltage=1000 watt (crude estimation).
I now drive my bike at a still moderate 80+ True battery amps in pure sine wave mode at a Kp value of 0.7 (set values: 95 battery amps and 310 phase amps). My 24 fet sabvoton controller does 150 battery amps and 450 phase amps out of the box with amp-wise similarly rated fets (actually higher rds), so I figure an 18 fet with great traces should be able to do 18/24*150=112,5 battery amps and 337,5 phase amps.
The only quirk that I found with the custom firmware is that if you brake quickly, the controller keeps powering the bike when you try to come to a standstill. It does not do this when you brake slowly or just let the bike roll to a stop. It seems to be connected to the pi-control? It “remembers” its previous power level and tries to stick to that.
I found that the solution is to enable a little bit of regen and to set the Max voltage high enough to enable this regen. With regen active, you can brake immediately and the scary auto-throttle does not occur anymore. So problem solved.
List of experiences I could tell about (all 18 fet controllers):
1. How to convert a 48v into 72v version
2. How to connect a buck converter to replace the lm317 + resistor
3. How to adapt common 12v buck converters to provide 15v for the mosfets and 5v converter
4. How to seriously upgrade traces
5. How to calibrate cal a
I will add some screenshots of the hard and software settings of the second square wave controller that I optimized with mods and custom firmware: