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

Regarding the Java Configurator and the App:

Any volunteers around proficient in writing handbooks? The App can do so many things now on the fly but I doubt anyone will understand it without first investing a ton of time understanding the basics (about what the controller/motor is actually doing).

A few well made schematic bundled with screenshots could really make a huge difference for beginners.

I'm to lazy to do that though :wink:
 
haiyi911 said:
I know very little about eclipse or sdcc,i guess many Options is setted wrong.thanks
compiling is OK now, the flashing tool is found, too. Now it seems that you have a problem with the STLink. Check if the STLink drivers are installed properly by windows in the device manager. Please make sure that you use very short wires from the STLink to the controller. There were many reports, that it doesn't work with longer wires.
If you need a longer cable from your computer to your bike, please use an USB extension cable.
https://www.ebay.com/itm/5M-5-Meter-USB-2-0-Extension-Cable-Copper-Male-to-Female-USB-Adapter-Dual-Shield/162625091389?hash=item25dd35f73d:g:AuMAAOSwbIFaXvme:rk:12:pf:0

regards
stancecoke
 
Xnyle said:
The App can do so many things now on the fly

First a big thank you to you, Xnyle, the project has benefited a lot from your efforts :!:

I've copied the tutorial-pages to the wiki at github and translated the (very few...) BluOsec information from the german wiki to page 05 The BluOsec Android App.
Anyone with a github account can edit the wiki pages, so everybody is welcome to improve the documentation.
I will quit the tutorial at bitbucket now.

@casainho: can you please update the link in your signature to the github wiki!

regards
stancecoke
 
Xnyle said:
Ignore the file not found messages, as the script only tries to delete old stuff that isn't there.

sdcc must be in your path though (as the readme states, read it!) The whole build process is rather bodged together as nobody really cares from the moment on that it's running.

If you're unsure, use the Java Configurator first and only if you understand what's going on try to build via Eclipse.

Thanks! i will try although it's hard for me.
 
i have downloaded the main.hex file.first,i just try and the motor run not smothly.then i try again that motor donnot run any more(mosfets and lm317 are hot) :roll:
 
Please tell us, what kind of motor you are using and post the content of your config.h

regards
stancecoke
 
stancecoke said:
Please tell us, what kind of motor you are using and post the content of your config.h

regards
stancecoke

the motor:36v250w,Waterproof Hall Sensor,i donnot konwn the reduction ratio.i didnot change the config.h
 
OK, this seems to be the default setup. Do you use a 48V battery? If you use a 36V battery you have to set
- undervoltage limit to 111
- serial cells to 10

If you use a 6FET controller set
- Battery current cal a to 10 (for this old commit)

If the motor is noisy at start up, play around with motor specific angle, start with 212 and vary the value in +/- 5 steps.

regards
stancecoke

p.s. if you change to the recent commit, please read the wiki carefully

regards
stancecoke
 
mutetus said:
I also now have LCD7 with usb port for bluetooth-module,

Could you post a photo of the internals if you have itchy screwdriver finger?

Any other info about LCD7 or the BT interface?
 
Hi,

I installed the firmware on a KT36 controller. Board is a KTE-SVP5-A. I dit not change any config settings at first but had no response on the LCD3 display.
When I run it in DIAGNOSTICS and connect it with USB serial to the PC I can see the parameters run by.
When I select the LCD3 and connect the LCD the display shows all zero's and I can up/down the assist levels. But I see no battery status (is empty).
When I use the BLUOSEC setting and hook up the blutooth adapter I see nothing happen in the bluosec app.

Also the motor does not run when i press the throttle. MOSFETS do not get warm or show any activity.

I imported the project in eclipse and am able to compile it.

What would be the best test scenario and wat should I check to get this running?
 
Did you pair your BT device and select it in the App (swipe right for config pane)?

After that you should see something no matter how incorrect you configured the controller.

Next you should read the whole paramter documentation in the wiki and change your config.
 
stancecoke said:
OK, this seems to be the default setup. Do you use a 48V battery? If you use a 36V battery you have to set
- undervoltage limit to 111
- serial cells to 10

If you use a 6FET controller set
- Battery current cal a to 10 (for this old commit)

If the motor is noisy at start up, play around with motor specific angle, start with 212 and vary the value in +/- 5 steps.

regards
stancecoke

p.s. if you change to the recent commit, please read the wiki carefully

regards
stancecoke


i have tried again and again,something maybe be still wrong.so could you send me your .hex?
i use a 36V battery and just connect the throttle,the battery,the hall and motor.
where can i choose the ride mode on the tool- "OSEC Parameter Configurator. jar"
 

Attachments

  • 91.png
    91.png
    67.8 KB · Views: 2,126
Hello Stancecoke,

Is the KT-LCD5 supported ? I think KT-LCD5 was mentioned as supported however I don't see it listed, should I just select KT-LCD3 in the PC interface ?
The KT-LCD3 is just too big and too nice to be left on the bike parked outside the night (or at train station) - there are already some report of Forums (cyclurba) of vandalism !
So can KT-LCD5 be added as supported screen ?

In fact just to select assistance level, walk mode and switch the light on and off, the support of KT-LED would be great too ( some have speed display via led).
 
haiyi911 said:
i have tried again and again,something maybe be still wrong.
the motor specific angle is not 212 as recommented in your screenshot?!

Please download the latest commit of the firmware from github. The (latest commit of) BluOsec App will only work with this release.

If this doesn't help please switch to Diganostics mode and look at the first number that is sent, with this we can see what the controller is doing:
https://opensourceebikefirmware.bitbucket.io/windows_instructions/index6.html

haiyi911 said:
where can i choose the ride mode on the tool- "OSEC Parameter Configurator. jar"

The former ride modes are defined in a different way now.
Throttle and PAS are supported by default as long as you don't choose "torquesensor".
To have throttle response with no limitation, you have to set "Speed limit" and "Without PAS" to 100 kph e.g.

regards
stancecoke
 
Gaston said:
Is the KT-LCD5 supported ? I think KT-LCD5 was mentioned as supported however I don't see it listed, should I just select KT-LCD3 in the PC interface ?

Yes, the LCD5 uses the same protocol as the LCD3, so it works also.

Gaston said:
In fact just to select assistance level, walk mode and switch the light on and off, the support of KT-LED would be great too ( some have speed display via led).
Xnyle offered to implement functions via the LCD display in the german forum already, please just contact him per PM. Iguess the LED Displays are using the same protocol.

regards
stancecoke
 
stancecoke said:
haiyi911 said:
i have tried again and again,something maybe be still wrong.
the motor specific angle is not 212 as recommented in your screenshot?!

Please download the latest commit of the firmware from github. The (latest commit of) BluOsec App will only work with this release.

If this doesn't help please switch to Diganostics mode and look at the first number that is sent, with this we can see what the controller is doing:
https://opensourceebikefirmware.bitbucket.io/windows_instructions/index6.html

haiyi911 said:
where can i choose the ride mode on the tool- "OSEC Parameter Configurator. jar"

The former ride modes are defined in a different way now.
Throttle and PAS are supported by default as long as you don't choose "torquesensor".
To have throttle response with no limitation, you have to set "Speed limit" and "Without PAS" to 100 kph e.g.

regards
stancecoke

Diganostics mode;ui8_control_state=1,IS IT RIGHT?
 

Attachments

  • 234.png
    234.png
    19.9 KB · Views: 3,012
Please tell us which commit you are using and post the content of your config.h. Otherwise we can't help you.

The loop state is "1" in the screenshot. That means "linear regen". Please delete the line #define REGEN in the config.h

regards
stancecoke
 
i use the newest firmware and didnot change anything.there arenot #define REGEN in the config.h
i change the parameters and compilling / downloading the firmware by 'OSEC Parameter Configurator.jar'.
 

Attachments

  • config.h
    1.5 KB · Views: 100
OK, with the recent commit "1" means power in PAS ramp mode, so normal at startup. Does the number change if you open the throttle?

You have to set the max phase current to a much higher value than the max battery current. Try e.g. 300.

regards
stancecoke
 
the number changed when i opened the throttle.please look at the pictures.when i selected the election"torquesensor" model'', receiving messy code.in the last picture
 

Attachments

  • Screenshot_20181021-071247.jpg
    Screenshot_20181021-071247.jpg
    81.3 KB · Views: 2,987
  • Screenshot_20181021-071333.jpg
    Screenshot_20181021-071333.jpg
    86.5 KB · Views: 2,987
  • Screenshot_20181021-071343.jpg
    Screenshot_20181021-071343.jpg
    95 KB · Views: 2,987
  • Screenshot_20181021-071350.jpg
    Screenshot_20181021-071350.jpg
    103 KB · Views: 2,987
  • Screenshot_20181021-071449.jpg
    Screenshot_20181021-071449.jpg
    88.9 KB · Views: 2,987
  • Screenshot_20181021_081153.jpg
    Screenshot_20181021_081153.jpg
    221 KB · Views: 2,987
Hi Stancecoke,

I got the firmware installed and the Bluosec app and KTLCD3 are responding.
The only thing is that I can't get the motor to run. I first thought maybe the MOSFET's are fried but when hooking up to the scope I have no PWM signal on the Gate. Also when I measure the MCU pwm pin I have a high signal only.
I hooked up a thumb throttle but still nothing on the motor.

How can I force the motor to run without Pass only using the throttle.

I have eclipse running and can compile and flash the firmware.
My board is a KTE-SVP5-A. My motor is a MXUS XF07 250W

I tried just setting the pwm duty cycle by just setting it from the mainloop.

Code:
pwm_set_duty_cycle(100);
 
What does the App Display at "State"? If you don't see state, swipe vertically where the trip infos are, it changes between trip infos, phase/hall diagramm and details.

State is documented here:
https://www.pedelecforum.de/forum/index.php?threads/custom-rom-f%C3%BCr-kunteng-s06s-kt36-controller.50061/page-21#post-1069941

Feel free to add that info to the Wiki!
 
haiyi911 said:
the number changed when i opened the throttle.please look at the pictures.

So you get control state 145 this means PAS, Throttle override and Phase current limitation. What is your recent setting for phase current limit?

fetch.php


regards
stancecoke
 
Back
Top