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

silentguy said:
I have the StlinkV2 programmer and I’m willing to overwrite the stock firmware on this LSW1031 as it is not very good. Only 2 settings can be changed. Backlight brightness and tc which I’m not sure what it does.
It’s also speed limited to 25kmh and I would like to remove this for USA

What exactly do you want to improve in this controller? I have exactly the same controller and I am looking for softer startup, torque offset and faster PAS cutoff.
The display is Kingmeter Digital II http://www.king-meter.com/#/product/product-info/50. I bougth it from Phoebe Liu from Aliexpress.

For configuring the speed limit this is what i got:
1 Step.jpg
2 Step.jpg
3 Step.jpg
4 Step.jpg

Hope it will help.

There are also perimeters like tC and dEF-2 but dont know the meaning of those
 
stancecoke said:
szkuba said:
1. Dynamic assist level?
You have to ask Xnyle for that feature :)

szkuba said:
2. Speed influences Tq Sensor?
If you activate this, the assist factor increases with the speed (for lazy commuting :))

szkuba said:
3. I was wandering how the cadence is being calculated?
The number of timertics (@16kHz) between two PAS interrupts are counted.

szkuba said:
4. Would the KT-LCD4 work with open firmware?
I've not tested it, but I think yes. It should use the same communication protocol as the LCD 3/5 diplays.

regards
stancecoke
Thanks i will ping Xnyle for more insigth on #2. Though how to achieve gentle power increase at startup aka soft start?
 
stancecoke said:
silentguy said:
I’ll wait to flash

Thank you for the photos! The open source firmware should work with this controller.
Thanks I’ll try to flash

You have to check to which processorpin the torque-signal is connected.
How do I check this ?
With the open source firmware it has to be connected to the throttle input. But this can be changed quite easily in the source code.

Where have you buyed the controller? From Phoebe Liu at Aliexpress?

Yes I ordered from that shop. The KT controller came with A display I’m not sure the name. .

What kind of display was delivered with the controller? I've implemented several displays already, but the one in the link seems to be new/different.

We should start a new thread for the Lishui firmware.

I’ll join the thread if you start it. Sorry I’m not good at making the forum posts.
 
szkuba said:
silentguy said:
I have the StlinkV2 programmer and I’m willing to overwrite the stock firmware on this LSW1031 as it is not very good. Only 2 settings can be changed. Backlight brightness and tc which I’m not sure what it does.
It’s also speed limited to 25kmh and I would like to remove this for USA

Yes I have the same display but didn’t find the name anywhere.

What exactly do you want to improve in this controller? I have exactly the same controller and I am looking for softer startup, torque offset and faster PAS cutoff.
The display is Kingmeter Digital II http://www.king-meter.com/#/product/product-info/50. I bougth it from Phoebe Liu from Aliexpress.

For configuring the speed limit this is what i got:
1 Step.jpg
2 Step.jpg
3 Step.jpg
4 Step.jpg

Hope it will help.

There are also perimeters like tC and dEF-2 but dont know the meaning of those


Great !!! Thanks. I asked them for the info on how to change the settings and they would not give it to me. For now all I wanted was to remove the 25kmh limit when the assist cuts out and switch to mph for USA
I’d like to increase it to about 35-40kmh , or at least to the legal limit in USA.

I’ll try the passcode and change the settings
 
Bad news I think.
LSW1031 and Sempu T4 torquemeter
I changed the parameters on the King meter to
To 16inches for ST1 wheel size
and 40 for ST2 speed ?

When I turned on display I got error 30
I also got some magic smoke from the controller and possibly the display too as it overheated.

This was just with turning on the unit
I put a little throttle load on it as well

Not sure why it’s drawing so much current.

When looking at the controller the 51ohm resistor
which I replaced ( original burnt ) was getting hot enough to melt the heat shrink I put on it.
See pic. Green wire wound 51 ohm resistor in the black heat shrink.

Any ideas on what’s wrong ?
It did the same thing with the KT controller and overheated a mosfet.
I think the heatsink is not enough

Update :

Display is ok. It turns on but gives error 30.
I’ll see if I can find the error codes.

The mosfets are ok . So heatsink is fine.

The 50 ohm resistor is heating up and causing smoke on the shrink wrap. I think it will burn out if I leave the power on.
53656673-4B16-461B-85A9-E035D7223FD4.jpeg
 
Update.

I tried 2 different batteries and everything works fine

No more error code 30

I’ll go back to the first battery , which had been working fine.
The cells are rated at 8A but if I’m not drawing that current it should be fine.

Error code 30 is

30 Communication abnormality – This error is often a result of a connection error between the display and the controller. Check to see if all plugs are connected properly or have been damaged.
 
Thanks again ,szkuba, I was able to set limit to 40kmh.
I Couldn’t change to mph

I verified new speed limit no load test on the wheel.

I think I’ll need to experiment with KT 36svp open source FW a bit more when I have time.
 
Hello, what happened to the temperature sensor configuration in the java tool ? I remember reading something about setting it up over x4, but can't find documentation about it.
 
My first test drive with the Sempu T4 torque meter

https://youtu.be/PPevxzOZn8M


More videos are here.


https://m.youtube.com/channel/UC6iR085onIm3MXvJt4bnQ_g/videos?utm_source=share&utm_medium=ios_app&utm_name=iossmf
 
silentguy said:
My first test drive with the Sempu T4 torque meter

https://youtu.be/PPevxzOZn8M


More videos are here.


https://m.youtube.com/channel/UC6iR085onIm3MXvJt4bnQ_g/videos?utm_source=share&utm_medium=ios_app&utm_name=iossmf
Nice to see it works for you :) btw i do have 5 assist levels.
 
szkuba said:
silentguy said:
My first test drive with the Sempu T4 torque meter

https://youtu.be/PPevxzOZn8M


More videos are here.


https://m.youtube.com/channel/UC6iR085onIm3MXvJt4bnQ_g/videos?utm_source=share&utm_medium=ios_app&utm_name=iossmf
Nice to see it works for you :) btw i do have 5 assist levels.

I only have 3 assist levels.
I wish they would give me the code to change to mph but they told me not available. I don’t think the person knows.
I have only ST1 and ST2. Wheel size and speed limit.
 
qwerkus said:
Hello, what happened to the temperature sensor configuration in the java tool ? I remember reading something about setting it up over x4, but can't find documentation about it.

bump. Could some one help me figuring this out ? How to solder a temp sensor to x4 (or anything else), add support for it when compiling the bin and than calibrate it correctly. I if works, I hope to contribute to wiki documentation as this is in my opinion a useful feature of the opensource firmware.
 
qwerkus said:
Hello, what happened to the temperature sensor configuration in the java tool ?

Xnyle has deleted this feature in the recent master branch. You can use the old power control branch (without BluOSEC).
You can look at the code in the old branch and try to port it to the master, also :)

regards
stancecoke
 
Hello,

I'm trying to get my Sempu T4 Torque sensor working along with a regular throttle, but i'm struggling with the last part of the setup.

I have:
- KT24/36SVPR-HRD01 controller flashed with the "torque_from_X4" branch of the code
- Sempu T4 torque sensor 8-60v version
- 36v battery
- Bafang G310 rear motor
- BluOsec app

I have made the following connections:
- Sempu torque signal to X4
- Sempu PAS signal to PAS input
- Sempu power to 36v battery (positive to blue display cable)
- Slimline half twist throttle to normal throttle input
- External speed sensor connected to the motor speed wire
- HC-05 powered via DCDC and wired to the board

I have confirmed that the the motor spins smoothly and works correctly. I've independently confirmed that the PAS aspect of the Sempu works and the separate twist throttle works. I have the BluOsec app working well. But when i try to set up the settings for Torque Sensor and Throttle, it does not work as expected. The throttle works, but the torque sensor does not. If I have the 'Torquesensor' option off, the Sempu engages the motor when the Sempu spins with no weight and in both directions. I have confirmed that the torque sensor is working as the value in BluOsec rests at 310 and increases to around 350-380 when operated on the test bench with some downward pressure. Incidentally, i also noticed the slight fluctuation in resting value, depending on battery voltage, so i will add a DCDC supply to normalise this.

1. What settings are necessary to make this setup work correctly?
2. Is there a way to alter the range of the x4Value torque input, or must it only be controlled via TQ Calib?
3. What does TQ Calib refer to, for instance, what is the range? It's currently set to 1500, but is this just a multiplier?
4. How do i adjust the speed sensor for my 6 pole Bafang motor as it currently reads 6x too fast. It's connected to input x5
5. Is it the BluOsec reliable for setup configuration, or should i use the USB until things are stable?
6. I noticed PAS threshold was reading around 2.5 in BluOsec in both directions. Is it necessary to adjust this from the 1.9 that's currently there?

Here are my current settings:

Screenshot 2020-03-08 at 15.02.03.jpg
 
szkuba said:
silentguy said:
I have the StlinkV2 programmer and I’m willing to overwrite the stock firmware on this LSW1031 as it is not very good. Only 2 settings can be changed. Backlight brightness and tc which I’m not sure what it does.
It’s also speed limited to 25kmh and I would like to remove this for USA

I received this doc in CHINESE and translated it.
It doesnt give the codes to use , nor the secret menu
Also I don’t have ST3 , ST4
 

Attachments

  • Digital II-LCD中文 最新款仪表说明书.docx
    601.3 KB · Views: 49
silentguy said:
szkuba said:
silentguy said:
I have the StlinkV2 programmer and I’m willing to overwrite the stock firmware on this LSW1031 as it is not very good. Only 2 settings can be changed. Backlight brightness and tc which I’m not sure what it does.
It’s also speed limited to 25kmh and I would like to remove this for USA

I received this doc in CHINESE and translated it.
It doesnt give the codes to use , nor the secret menu
Also I don’t have ST3 , ST4

Here’s the translation from google
 

Attachments

  • kingmeteriiEnglish.txt
    11.5 KB · Views: 44
stancecoke said:
qwerkus said:
Hello, what happened to the temperature sensor configuration in the java tool ?

Xnyle has deleted this feature in the recent master branch. You can use the old power control branch (without BluOSEC).
You can look at the code in the old branch and try to port it to the master, also :)

regards
stancecoke

Thanks for the reply. Will do. Is there any reason (bug?) the feature was dropped ?
 
qwerkus said:
Is there any reason (bug?) the feature was dropped ?
No, I think Xnyle just thougt nobody would use this feature.
It's quite confusing, we have four different functions (in different branches) for the ADC-Input on X4: linear regen, temperature reading, throttle reading, torque reading. All of this is not well documented :(

regards
stancecoke
 
stancecoke said:
qwerkus said:
Is there any reason (bug?) the feature was dropped ?
No, I think Xnyle just thougt nobody would use this feature.
It's quite confusing, we have four different functions (in different branches) for the ADC-Input on X4: linear regen, temperature reading, throttle reading, torque reading. All of this is not well documented :(

regards
stancecoke

Yes, that's also my impression. I think a smart way to go about it would be to abstract configurable analog inputs. You'd select which functions you need in the java tool, and than the script matches each function to an available gpio an tells you where to solder what. For an instance I'm trying to get temp reading over x4 and linear regen of the throttle input. No success so far.
 
hichemhlm said:
Hi, is there anybody who know's where i can find the original firmware of kt-36svpr ? Thanks

Don't think its available. The firmware is r/w locked by default meaning that a backup is not possible leaving only the manufacturer as a potential source for the firmware. I asked them repeatedly for a firmware release, without success. Never seen a downloadable version online either. So should you succeed, please be upload it here :D
 
qwerkus said:
hichemhlm said:
Hi, is there anybody who know's where i can find the original firmware of kt-36svpr ? Thanks

Don't think its available. The firmware is r/w locked by default meaning that a backup is not possible leaving only the manufacturer as a potential source for the firmware. I asked them repeatedly for a firmware release, without success. Never seen a downloadable version online either. So should you succeed, please be upload it here :D

:cry: i ll try, but apparently there is no hope
 
davideserin said:
Hello,

I'm trying to get my Sempu T4 Torque sensor working along with a regular throttle, but i'm struggling with the last part of the setup.

I have:
- KT24/36SVPR-HRD01 controller flashed with the "torque_from_X4" branch of the code
- Sempu T4 torque sensor 8-60v version
- 36v battery
- Bafang G310 rear motor
- BluOsec app

I have made the following connections:
- Sempu torque signal to X4
- Sempu PAS signal to PAS input
- Sempu power to 36v battery (positive to blue display cable)
- Slimline half twist throttle to normal throttle input
- External speed sensor connected to the motor speed wire
- HC-05 powered via DCDC and wired to the board

I have confirmed that the the motor spins smoothly and works correctly. I've independently confirmed that the PAS aspect of the Sempu works and the separate twist throttle works. I have the BluOsec app working well. But when i try to set up the settings for Torque Sensor and Throttle, it does not work as expected. The throttle works, but the torque sensor does not. If I have the 'Torquesensor' option off, the Sempu engages the motor when the Sempu spins with no weight and in both directions. I have confirmed that the torque sensor is working as the value in BluOsec rests at 310 and increases to around 350-380 when operated on the test bench with some downward pressure. Incidentally, i also noticed the slight fluctuation in resting value, depending on battery voltage, so i will add a DCDC supply to normalise this.

1. What settings are necessary to make this setup work correctly?
2. Is there a way to alter the range of the x4Value torque input, or must it only be controlled via TQ Calib?
3. What does TQ Calib refer to, for instance, what is the range? It's currently set to 1500, but is this just a multiplier?
4. How do i adjust the speed sensor for my 6 pole Bafang motor as it currently reads 6x too fast. It's connected to input x5
5. Is it the BluOsec reliable for setup configuration, or should i use the USB until things are stable?
6. I noticed PAS threshold was reading around 2.5 in BluOsec in both directions. Is it necessary to adjust this from the 1.9 that's currently there?

Here are my current settings:

Screenshot 2020-03-08 at 15.02.03.jpg


I briefly got it to work by adjusting gear ratio
However I think some other issue may have caused the mosfets to overheat.

For Now I ordered a new KT controller and I’m using the original non-open source fw controller LSW 1031 and Kingmeter II which works.

Try gear ratio ,and also motor angle.
Also throttle min , max.
I advise you to wire a 10A or less fuse to the battery positive into controller. This may avoid the mosfets smoking and magic smoke I had.
You may ask someone else for help as I was not successful
Looking Forward to your success and hoping that you can report it here
 
On the github page the following is listed under what works:

"C/P parameters mapped differently"

Is it documented anywhere how these are mapped? If not, can someone point me to where they are set in the code?

Thanks
 
Back
Top