KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

Electric Motors and Controllers
casainho   1.21 GW

1.21 GW
Posts: 3520
Joined: Feb 14 2011 2:43pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by casainho » Apr 13 2019 2:48pm

stancecoke wrote:
Apr 11 2019 10:20am
Yes, the Sempu T4 is the better choice. My experience with the Bafang sensor (eunorau) is very bad, see the german forum:

https://www.pedelecforum.de/forum/index ... sor.56636/

regards
stancecoke
Why don't you guys write resume working torque sensors on wiki?

I remember to use the BMSBattery ones and being problematic because they broke. Would be so nice if I could try that Sempu Y4 on that time.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by Xnyle » Apr 13 2019 5:04pm

@geofft because Overvoltage is not set so you get a compile error. I didn't check you settings, that's why I asked for ones matching the CURRENT Java tool :)

I checked in corrected versions

geofft   1 kW

1 kW
Posts: 346
Joined: Nov 09 2012 9:41am
Location: Berkshire UK

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by geofft » Apr 13 2019 5:50pm

Xnyle wrote:
Apr 13 2019 5:04pm
@geofft because Overvoltage is not set so you get a compile error. I didn't check you settings, that's why I asked for ones matching the CURRENT Java tool :)

I checked in corrected versions
Ahh....ok, my mistake. Thanks for correcting the files.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR, LCD3, 48v 12s lipo.

nox   1 µW

1 µW
Posts: 1
Joined: Mar 29 2019 5:27am

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by nox » Apr 22 2019 2:33pm

Hello,

Is it worth to try OSEC with KT36-ZWSRT (KTE-6S5-A) + LCD5 + MXUS XF08 rear geared wheel? Will it work?
label.jpg
top.jpg
bottom.jpg
left.jpg
right.jpg
rear.jpg
daughter_front.jpg
daughter_back.jpg
My goal is to use OSEC BT app along with controller without LCD5.

Upd:
Can't find spoiler tag, sorry

User avatar
dodjob   1 kW

1 kW
Posts: 303
Joined: Jun 30 2010 3:46pm
Contact:

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by dodjob » Apr 23 2019 2:28am

Hey there,
I've the KT9 in the hailong dock.
I have two issues:
-it NEVER worked correctly with original firmware and my modded GT-Direct drive (similar to bionx motor) with 120° halls since I changed them to ss41
-the power resistor gets hot as hell 😅🔥🙈. Did anybody had this? All seems quite cold on the board, but as soon as I start the controller, even with nothing plugged except display, it becomes VERY hot (I have measured 80mA which makes about 4,5W... Don't know if it's "normal" though.
I got some very partial success while tweaking the phase motor correction (and hall angle..etc), but it seems to get havoc as soon as the motor gets a few rpm too much.
This apply only to my direct drive motor, a small geared works well, and the motor itself works well with for instance a bbshd controller or small sine Bafang. I'm at lost, no idea what I should check at this point 😅☝️
Gruß,
H.
**Edit**
I have replaced the LM317 as it was the only thing getting warm. Well.. no luck unfortunately. The controller is just pulling too much current. Don't know if it's hardware or software related, and the reason I ask here 😅☝️
Felt beer-cruiser MAC 8T lifepo4 36V12AH 12FETS4110 http://www.bavarian-ebikes.com

geofft   1 kW

1 kW
Posts: 346
Joined: Nov 09 2012 9:41am
Location: Berkshire UK

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by geofft » Apr 24 2019 10:42am

dodjob wrote:
Apr 23 2019 2:28am
Hey there,


**Edit**
I have replaced the LM317 as it was the only thing getting warm. Well.. no luck unfortunately. The controller is just pulling too much current. Don't know if it's hardware or software related, and the reason I ask here 😅☝️
I've only had experience with the KT36/48 type controllers, with these the series resistor and LM317 also get very hot, I'm guessing your controller has similar circuitry here. I fretted about this myself but it's the way it's meant to work and seems to be surprisingly reliable. If you check page 126 of this thread you'll see a mod I did that gets this heat out to the casing and away a lot quicker, has worked totally reliably for me.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR, LCD3, 48v 12s lipo.

User avatar
dodjob   1 kW

1 kW
Posts: 303
Joined: Jun 30 2010 3:46pm
Contact:

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by dodjob » Apr 24 2019 12:15pm

Thanks Geoff.. well mine went real bad, melted the coat and started to weld to the capacitor 😅 (remember it's a hailong controller) I will probably change this by adding a small dc-dc or route it outside
I suspect the openspurce firmware sucks a bit more, and this bit more is over the very very short limit of the LM 🙈🔥🔥
Felt beer-cruiser MAC 8T lifepo4 36V12AH 12FETS4110 http://www.bavarian-ebikes.com

kkm   1 mW

1 mW
Posts: 10
Joined: Sep 27 2018 3:22pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by kkm » Apr 24 2019 12:57pm

nox wrote:
Apr 22 2019 2:33pm


Is it worth to try OSEC with KT36-ZWSRT (KTE-6S5-A) + LCD5 + MXUS XF08 rear geared wheel? Will it work?
What about frame vibrations / resonances when using a rear geared motor with an original firmware? I tried the rear engines Mxus XF15R (Gear 50, 1:5 reduction rate), XF08 (1:4.4), as well as Bafang SWX02 500w (1:5). And they all have the same breakdown on the original firmware (6-step ZWS and sinewave SVPR) and on the open source. Unpleasant resonances and vibrations of the frame, pedals, even the KT-LCD3 display on the steering wheel rattles, and strong vibration peaks in the range of ~11-12 km / h and ~ 20-23 km / h. The feeling that you are riding on an old crumbling clunker, and not on a new motor.
I do not know, therefore, the firmware is so poorly compatible with gear motors. Yes - the user of the front engines may not notice the problems - the front fork softens the vibrations and does not allow them to be rigidly up to the aluminum “ringing” bikeframe.
Yes, without a load, the motors behave perfectly on 6 steps and a sine - but if you sit down and go - everything becomes bad.
I had to buy and install a cheap standalone Chinese controller https://ru.aliexpress.com/store/product ... 18beQneQ7v with a “real” meander. Yes, without a load, the engine's itching is louder, but when driving it behaves perfectly - quietly, smoothly, there are not the slightest vibrations. I do not know the reason. Perhaps the KT firmware are optimized for working with DD? Does open source not take into account any features of gear motors? Or are these motors wound so as to perfectly work only with a pure meander, not 6-step and not sine?

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by Xnyle » Apr 24 2019 3:52pm

Mhh that's interesting. I just spent the last two weeks trying to identify the origin of those vibrations with an XF15. Found a few minor bugs, tweaked a few things. There is a difference but ultimatey those vibrations around 15km/h remained.

Would be interesting to know what your controller that doesn't cause any vibrations does differently, maybe full FOC which maybe unintentionally automatically eliminates resonances.

But in general many people use geared motors and the problems with my XF15 do not seem to be electrical: If I turn the wheel backwards without any power connected I still get those vibrations.

So if your controller is able to somehow counter those mechanical vibrations, kudos. Doesn't change the fact, that the motor is the real problem?

Maybe @geofft could write something about the Q128 regarding vibrations.

geofft   1 kW

1 kW
Posts: 346
Joined: Nov 09 2012 9:41am
Location: Berkshire UK

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by geofft » Apr 25 2019 2:53am

Maybe @geofft could write something about the Q128 regarding vibrations.
There seems to be no inherent problem with vibrations with this motor (Q128H) and with my current settings it pulls smoothly and quietly throughout the rpm range. When I've had issues with cogging, etc, during the development of the firmware it has always been cured by changes in the code configuration, it doesn't seem to have any mechanically resonant point in the rpm range.

I've been generally very happy with this motor, it seems the earlier Q128 was a bit lacking in power but the Q128H and Q128C seem to have been a noticeable improvement on this. I can't make comparisons with other hub motors as this is the only one I've ever tried (my other ebikes are BBS02 powered), but I keep it restricted to 800w and at this power level I've had no issues so far.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR, LCD3, 48v 12s lipo.

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by Xnyle » Apr 25 2019 8:02am

Thanks for reporting back,

@casainho: I'm trying out different waveforms, what is the formula the SVM table was generated with?

I'm coming close with

2.0/3.0*(sqrt(3.0)*sin(x)+1.0/3.0*sin(3*x)); (0<x<2pi)

But it's not exactly the same.

casainho   1.21 GW

1.21 GW
Posts: 3520
Joined: Feb 14 2011 2:43pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by casainho » Apr 25 2019 9:10am

Sorry I don't remember now.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

User avatar
Marv1337n   1 W

1 W
Posts: 55
Joined: Jul 07 2018 5:16am
Location: Germany

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by Marv1337n » Apr 27 2019 2:05am

Does this firmware show higher wattage numbers than the stock one with my LCD3? It tops out at 1999W although I'm using a lot more.

User avatar
dodjob   1 kW

1 kW
Posts: 303
Joined: Jun 30 2010 3:46pm
Contact:

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by dodjob » Apr 27 2019 2:44am

kkm wrote:
Apr 06 2019 12:40pm
gutyex wrote:
Mar 30 2019 10:51am
I have an S06S flashed with this firmware, and when I turn on the kit, the motor starts going at a moderate speed and doesn't stop until it's turned off again.
I finished my experiments with the firmware because of the behavior of the thumb throttle that does not suit me, as I wrote above, and returned to the stock firmware (on another controller).
But today my friend got the built-in (for hailong battery case) controller board KTE-9S5-J5 from ebikekit.kom, and asked me to solder the connector for programming.

IMG_0053.JPG

Waterproof compound is very soft, and the contacts are easily released from it with an ordinary wooden toothpick.
The good news is that the firmware has been launched and is working on this controller. The power supply of the throttle hall sensor on this controller is higher than usual (4.9 volts) and the desired "Throttle min" value is 47-49, otherwise the motor slowly rotates when power on. This is normal and logical.
The bad news is that even with the “Throttle min” 100-180, the motor starts to rotate when turned on and makes 0.5 turns without load, or more than 30 on load, ( if you hold the motor with your hand when turned on). I am at a loss - why turn on PWM, if the value of "trottle min" guaranteed below the minimum?! Checked twice... No PAS or TQS connected - only thumb throttle (without throttle - same behavior). MXUS XF15 gear motor.
This happened on the latest firmware (masher branch).
Fortunately, I had in the archive firmware from October last year with the last commit "Added Tool for State translation stancecoke committed Oct 23, 2018" - and with this firmware, the motor makes only 1/16 turn at a very low power, then stop (or slightly hold it with your hand and the motor will not start to rotate) and does not rotate on an ebike installed in the wheel.
As I know - on the forum there are users of such controllers on the factory firmware, pay attention to this problem.
By the way, the correct value of the "Battery current Cal a" is 100 for this controller, as well as for 6Fet controllers.
Hey mate!
Saw your post on the KT opensource thread. I have the same controller and installed the firmware too.
I have also installed osec and used the app to check hall phase and current sense phase on phase b (the little diagram + phase color feedback)
Anyway, I don't get anything regarding the back fem from motor. The green line from diagram remains more or less straight.
Did you check this? Do you see something like a sine wave when you turne the motor?
I tried to Google the phase current sensor, "SM19" but it didn't give anything. You may have some input there.
The controller is somehow ok with geared g310/g370 motors, but fail miserably with Direct drive 🙈
I suspect the foc isn't working because phase current sensor is not correctly read/or give other kind of Infos. And the FOC try to compensate this at some point. Disabling angle correction reduce this behaviour, but because of probably not perfectly good phase angle settings, my motor will not work well 😅.
Gruß,
H.

** edit**

I found it ^^It's this sensor:
https://www.allegromicro.com/~/media/Fi ... E4FEF09289
And as it looks, it seems to be delivering another mV/A as the ACS712 maybe a reason why this thing isn't displaying phase current in in the diagram of OSEC.
Screenshot from 2019-04-27 14-06-10.jpg
Screenshot from 2019-04-27 14-06-10.jpg (73.01 KiB) Viewed 881 times
Felt beer-cruiser MAC 8T lifepo4 36V12AH 12FETS4110 http://www.bavarian-ebikes.com

walmis   1 µW

1 µW
Posts: 4
Joined: Oct 14 2018 3:01am

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by walmis » Apr 28 2019 2:32am

Anyone else getting crashes for the latest bluOSEC app? I've tried on android 9 and 7.1.2 and on both the app crashes.
Attachments
Screenshot_20190428-104240.png

User avatar
dodjob   1 kW

1 kW
Posts: 303
Joined: Jun 30 2010 3:46pm
Contact:

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by dodjob » Apr 28 2019 4:20am

walmis wrote:
Apr 28 2019 2:32am
Anyone else getting crashes for the latest bluOSEC app? I've tried on android 9 and 7.1.2 and on both the app crashes.
Same here with pie. I disabled the update 😅☝️
Felt beer-cruiser MAC 8T lifepo4 36V12AH 12FETS4110 http://www.bavarian-ebikes.com

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by Xnyle » Apr 28 2019 7:47am

No idea, that line (601) is already gone due to extensive refactoring. Also I reworked all SpannableStrings, so no idea which one is causing problems.

I'm checking in a new version later, have to test a few things first though.

If it still crashes, i'll need a new stack trace with current line numbers :)

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by Xnyle » Apr 28 2019 7:55am

Actually... I would have needed the line above where 601 appears, the one that ends with .... :)

Don't post images, post the actual text :wink:

Not to mention that comments like "Same here" are even more useless for debugging.

walmis   1 µW

1 µW
Posts: 4
Joined: Oct 14 2018 3:01am

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by walmis » Apr 28 2019 10:19am

Sorry, shitty app, installed a new one, now i can copy the stack trace lol.

Code: Select all


FATAL EXCEPTION: main
Process: org.erratic.android.bluosec, PID: 8687
java.lang.IndexOutOfBoundsException: setSpan (0 ... -1) has end before start
	at android.text.SpannableStringInternal.checkRange(SpannableStringInternal.java:464)
	at android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:189)
	at android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:178)
	at android.text.SpannableString.setSpan(SpannableString.java:60)
	at org.erratic.android.bluosec.DashboardFragment.updateCurrent(DashboardFragment.java:397)
	at org.erratic.android.bluosec.DashboardFragment.renderState(DashboardFragment.java:601)
	at org.erratic.android.bluosec.MainTabActivity$3$1.run(MainTabActivity.java:562)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6718)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
	

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by Xnyle » Apr 28 2019 10:42am

Guess your locale has '.' as decimal separator then?

So much stuff that can go wrong with locale settings when not addressed properly :(

New version pushed.

timmy66   100 mW

100 mW
Posts: 40
Joined: Jul 12 2016 1:07am

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by timmy66 » Apr 28 2019 1:44pm

I'm sorry to ask a dumb question, have read through many of the pages:

but is the highest power opensource compatible controller either this (psw : SKU:KT36/48SVPR-20A )

http://www.pswpower.com/ven.php?cargo.2016-3f-33c0

or (bms battery : s12s 500w)

https://bmsbattery.com/ebike-kit/552-s1 ... e-kit.html

I see reference to the 12 and 18mosfet varieties, but can't find these in the sine wave controllers anywhere.

Also, It's not clear why these are rated at 500w if they're able to do 20/25A at 48V (~1000 watts).

Thanks for helping to not buying the wrong thing. I'll be powering a ~750w direct drive motor with this.

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by Xnyle » Apr 28 2019 3:06pm

Got a bit more expensive since i bought it, but this one is working fine.

https://www.aliexpress.com/item/Black-4 ... 63766.html

MercyFlush   100 µW

100 µW
Posts: 7
Joined: Dec 30 2018 1:27am

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by MercyFlush » Apr 29 2019 4:57am

Has anyone had luck in sorting the High/Low side polarity of the 60V/72V SVP's?
I have just picked one up (KT60SVP) and am not wanting to pop any transistors or mosfets :)

j bjork   100 W

100 W
Posts: 254
Joined: Aug 31 2018 3:01pm
Location: Linköping, Sweden

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by j bjork » Apr 29 2019 7:48am

timmy66 wrote:
Apr 28 2019 1:44pm

I see reference to the 12 and 18mosfet varieties, but can't find these in the sine wave controllers anywhere.
Here is one example, there are probably a bunch more out there:

https://www.ebay.com/itm/48V-1500W-Brus ... SwzJ5XcfEw

User avatar
flangefrog   1 kW

1 kW
Posts: 368
Joined: Jun 26 2013 10:21pm
Location: Auckland, New Zealand

Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW

Post by flangefrog » Apr 30 2019 6:46am

geofft wrote:
Apr 24 2019 10:42am
dodjob wrote:
Apr 23 2019 2:28am
Hey there,


**Edit**
I have replaced the LM317 as it was the only thing getting warm. Well.. no luck unfortunately. The controller is just pulling too much current. Don't know if it's hardware or software related, and the reason I ask here 😅☝️
I've only had experience with the KT36/48 type controllers, with these the series resistor and LM317 also get very hot, I'm guessing your controller has similar circuitry here. I fretted about this myself but it's the way it's meant to work and seems to be surprisingly reliable. If you check page 126 of this thread you'll see a mod I did that gets this heat out to the casing and away a lot quicker, has worked totally reliably for me.
The heat output of the resistor/LM317 combination in watts is calculated based on the voltage drop multiplied by the current draw (including quiescent/no load current). E.g. try 48V-15V = 33V and 80mA in the below calculator
http://www.ohmslawcalculator.com/ohms-law-calculator

If you don't want so much power dissipation/heat you could replace the linear regulator (resistor/LM317 combination) with a 15V buck converter such as the CUI V7815W-500. I did this on mine (ignore the TL783 stuff, I went for the buck instead).

https://endless-sphere.com/forums/viewt ... 3#p1210397

Post Reply