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

Electric Motors and Controllers
Romantas   1 mW

1 mW
Posts: 18
Joined: Aug 31 2018 10:12am

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

Post by Romantas » Sep 03 2018 2:28am

]I found such a board from the module for arduino,
IMG_2018-09-03_100914_HDR.jpg
IMG_2018-09-03_100914_HDR.jpg (85.63 KiB) Viewed 560 times
I'll attach it to the board, without changing the original controller, I'll see what will change in the work, only then I will change the microcontroller and put the open firmware.
The motor is a gear wheel, the name is on the photo.
Image
Concerned about the resistor at the output of the current chip, for 712 there is probably no 2.2 kOm resistor
IMG_2018-09-03_110750_HDR.jpg
Attachments
IMG_2018-09-03_101522.jpg
IMG_2018-09-03_105037.jpg

User avatar
stancecoke   10 kW

10 kW
Posts: 896
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » Sep 03 2018 3:32am

Stop! As you can see easily from the layout of the solder pads, you need a ACS711 in EX-package!

https://www.digikey.de/product-detail/d ... e=octopart

regards
stancecoke

Romantas   1 mW

1 mW
Posts: 18
Joined: Aug 31 2018 10:12am

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

Post by Romantas » Sep 03 2018 3:52am

get in my conditions this building is a long story of delivery: (
Since I know how to be good friends with a soldering iron, problems are usually solved so :)
IMG_2018-09-03_114725_HDR.jpg
on my subjective sensations, the engine began to work a little quieter after I installed the current sensor. I will look at the oscilloscope of the current sensor.

As a result of measurements on the original firmware, interesting oscillograms of the power phase were obtained. The highest speed, it's a trapezoid, all that looks like a torn sinusoid is the different speeds of the controller.
Attachments
IMG_2018-09-03_124406_HDR.jpg
IMG_2018-09-03_124415_HDR.jpg
IMG_2018-09-03_124424_HDR.jpg
IMG_2018-09-03_124439_HDR.jpg

reset   10 mW

10 mW
Posts: 29
Joined: Aug 23 2018 4:01am

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

Post by reset » Sep 03 2018 5:03am

stancecoke wrote:
Aug 31 2018 5:57am
Third time: please use ride mode --> throttle and nothing else for testing!

As last option: swap through all possible Hall- and Phasewire combinations (36! :-))

regards
stancecoke
thanks again got throttle working turns out there is a 15 sec delay after flashing before throttle responds. LCD works without any info between controller and display. No joy with PAS so any further info would be much appreciated. Many thanks again

casainho   100 MW

100 MW
Posts: 2659
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 » Sep 03 2018 5:22am

Romantas wrote:
Sep 03 2018 3:52am
As a result of measurements on the original firmware, interesting oscillograms of the power phase were obtained. The highest speed, it's a trapezoid, all that looks like a torn sinusoid is the different speeds of the controller.
Thanks for checking and sharing that info. It is expected to not be a sinusoidal on the power as the speed increases because the system "draws" the phase voltage SVM patterns with less points as speed increases.
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, you can 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
stancecoke   10 kW

10 kW
Posts: 896
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » Sep 03 2018 5:30am

casainho wrote:
Sep 03 2018 5:22am
Thanks for checking and sharing that info. It is expected to not be a sinusoidal on the power as the speed increases because the system "draws" the phase voltage SVM patterns with less points as speed increases.
This oszillographs are from the stock 6-step firmware (SxxP) as far as I understand:
Romantas wrote:
Sep 03 2018 2:28am
I'll attach it to the board, without changing the original controller, I'll see what will change in the work, only then I will change the microcontroller and put the open firmware.
So there can't be any sinusodial waveform...
I'm not sure, but I think the graphs can't show the phase current, as in phase current you won't see PWM spikes as they are flatened due to the inductivity of the motor coils...
See your own documentation :wink:

I posted a LT-spice simulation of the phase current some time ago.

regards
stancecoke
Last edited by stancecoke on Sep 03 2018 6:01am, edited 2 times in total.

reset   10 mW

10 mW
Posts: 29
Joined: Aug 23 2018 4:01am

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

Post by reset » Sep 03 2018 7:11am

reset wrote:
Sep 01 2018 9:10am
stancecoke wrote:
Aug 31 2018 5:57am
Third time: please use ride mode --> throttle and nothing else for testing!

As last option: swap through all possible Hall- and Phasewire combinations (36! :-))

regards
stancecoke
Should have some time to test this on monday will let you know how I get on. Thanks again
Hi I'm trying to understand the delay in motor starting, just wondered if anyone has encountered it? thanks

reset   10 mW

10 mW
Posts: 29
Joined: Aug 23 2018 4:01am

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

Post by reset » Sep 03 2018 7:15am

reset wrote:
Sep 03 2018 7:11am
reset wrote:
Sep 01 2018 9:10am
stancecoke wrote:
Aug 31 2018 5:57am
Third time: please use ride mode --> throttle and nothing else for testing!

As last option: swap through all possible Hall- and Phasewire combinations (36! :-))

regards
stancecoke
Should have some time to test this on monday will let you know how I get on. Thanks again
Hi I'm trying to understand the delay in motor starting, just wondered if anyone has encountered it? thanks
I think this issue might be phase current, just tried raising it again an it seems more consistant.

User avatar
stancecoke   10 kW

10 kW
Posts: 896
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » Sep 03 2018 7:27am

reset wrote:
Sep 03 2018 7:11am
Hi I'm trying to understand the delay in motor starting, just wondered if anyone has encountered it? thanks
Please tell us, which commit you have tried and what the content of your config.h is!

regards
stancecoke

geofft   1 kW

1 kW
Posts: 318
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 » Sep 03 2018 7:44am

Hi I'm trying to understand the delay in motor starting, just wondered if anyone has encountered it? thanks
...I have noticed this on a couple of occasions, in both cases I 'fiddled' with the throttle connector which seemed to fix it. Looking back though I guess it could have been fw related. In both cases it happened when the battery was at a low state of charge.

Sorry, that's probably not much help... :(
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR 20amp, LCD3, 48v 12s lipo.

reset   10 mW

10 mW
Posts: 29
Joined: Aug 23 2018 4:01am

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

Post by reset » Sep 03 2018 7:57am

Screenshot (4).png
this is the config, seems to work consistently now with the raised phased voltage. Also now have PAS working but it works in both pedal directions.

Using this setup without LCD 3 and it works fine, do you know if the controller is constantly powered.

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>PATH = C:\Program Files (x86)\STMicroelectronics\st_toolset\asm;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Users\controller\AppData\Local\Microsoft\WindowsApps;C:\Program Files\SDCC\bin;C:\Program Files\STMicroelectronics\st_toolset\stvp;C:\Program Files (x86)\STMicroelectronics\st_toolset\stvp;C:\SDCC\usr\local\bin;C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\tools\cygwin\bin

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>del main.hex

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>sdcc --version
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.7.2 #10526 (MINGW64)
published under GNU General Public License (GPL)

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>make -f Makefile_windows clean
Cleaning files...

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>cd stdperiphlib\src

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.asm

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.rel

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.lk
Could Not Find C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src\*.lk

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.lst

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.rst

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.sym

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.cdb
Could Not Find C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src\*.cdb

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.map
Could Not Find C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src\*.map

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.elf
Could Not Find C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src\*.elf

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>del *.bin
Could Not Find C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src\*.bin

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib\src>cd..

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\StdPeriphLib>cd..
Could Not Find C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master\*.elf
Done.

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>make -f Makefile_windows
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_itc.c StdPeriphLib/src/stm8s_itc.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_clk.c StdPeriphLib/src/stm8s_clk.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_iwdg.c StdPeriphLib/src/stm8s_iwdg.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_gpio.c StdPeriphLib/src/stm8s_gpio.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_exti.c StdPeriphLib/src/stm8s_exti.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_uart2.c StdPeriphLib/src/stm8s_uart2.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_tim1.c StdPeriphLib/src/stm8s_tim1.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_tim2.c StdPeriphLib/src/stm8s_tim2.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_adc1.c StdPeriphLib/src/stm8s_adc1.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oStdPeriphLib/src/stm8s_flash.c StdPeriphLib/src/stm8s_flash.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -ogpio.c gpio.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -outils.c utils.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -ocruise_control.c cruise_control.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -ouart.c uart.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oadc.c adc.c
adc.c:76: warning 85: in function adc_init unreferenced local variable : 'ui16_counter'
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -obrake.c brake.c
brake.c:23: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -otimers.c timers.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -opwm.c pwm.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -omotor.c motor.c
motor.c:217: warning 158: overflow in implicit constant conversion
motor.c:231: warning 158: overflow in implicit constant conversion
motor.c:244: warning 158: overflow in implicit constant conversion
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oPAS.c PAS.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oSPEED.c SPEED.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -oupdate_setpoint.c update_setpoint.c
update_setpoint.c:253: warning 85: in function update_setpoint unreferenced function argument : 'PAS'
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -odisplay.c display.c
sdcc -c -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug -odisplay_kingmeter.c display_kingmeter.c
sdcc -IStdPeriphLib/inc -I. -mstm8 --std-c99 --nolospre --out-fmt-ihx --debug main.c StdPeriphLib/src/stm8s_itc.rel StdPeriphLib/src/stm8s_clk.rel StdPeriphLib/src/stm8s_iwdg.rel StdPeriphLib/src/stm8s_gpio.rel StdPeriphLib/src/stm8s_exti.rel StdPeriphLib/src/stm8s_uart2.rel StdPeriphLib/src/stm8s_tim1.rel StdPeriphLib/src/stm8s_tim2.rel StdPeriphLib/src/stm8s_adc1.rel StdPeriphLib/src/stm8s_flash.rel gpio.rel utils.rel cruise_control.rel uart.rel adc.rel brake.rel timers.rel pwm.rel motor.rel PAS.rel SPEED.rel update_setpoint.rel display.rel display_kingmeter.rel

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>ren main.ihx main.hex

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>STVP_CmdLine -BoardName=ST-LINK -ProgMode=SWIM -Port=USB -Device=STM8S105x6 -FileProg=main.hex -verbose -no_loop
STVP_CmdLine version 1.6

Verbose ON
Log activity ON
Display Progress OFF
Message box warning if protect option byte ON
Loop mode OFF
Erase device OFF
Blank check device OFF
Verify device ON

Configuration:
BoardName=ST-LINK ST-LINK_ID=0 Device=STM8S105x6 Port=USB ProgMode=SWIM

>>> Filling PROGRAM MEMORY image in computer with Blank Value
<<< Filling PROGRAM MEMORY image in computer succeeds

>>> Loading file main.hex in PROGRAM MEMORY image in computer
<<< Loading file succeeds

Hit 'Esc' key to abort during communication.

>>> Programming PROGRAM MEMORY
<<< Programming PROGRAM MEMORY succeeds

>>> Verifying PROGRAM MEMORY
<<< Verifying PROGRAM MEMORY succeeds

C:\Users\controller\Downloads\BMSBattery_S_controllers_firmware-Master\BMSBattery_S_controllers_firmware-Master>pause
Press any key to continue . . .
stancecoke wrote:
Sep 03 2018 7:27am
reset wrote:
Sep 03 2018 7:11am
Hi I'm trying to understand the delay in motor starting, just wondered if anyone has encountered it? thanks
Please tell us, which commit you have tried and what the content of your config.h is!

regards
stancecoke

reset   10 mW

10 mW
Posts: 29
Joined: Aug 23 2018 4:01am

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

Post by reset » Sep 03 2018 9:07am

has anyone had success with the PAS working in only one direction, any guidance gratefully received. thanks

geofft   1 kW

1 kW
Posts: 318
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 » Sep 03 2018 9:40am

reset wrote:
Sep 03 2018 9:07am
has anyone had success with the PAS working in only one direction, any guidance gratefully received. thanks
Yes! Have you experimented with 'PAS Threshold' in the configurator? On my setup any value outside the range 1.7 - 2.1 gave this sort of issue, I settled on 1.9 but yours may be different. Find a value that gives best reliable operation in one direction only then swap 'Pas direction left/right' if it's going the wrong way... :wink:
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR 20amp, LCD3, 48v 12s lipo.

Romantas   1 mW

1 mW
Posts: 18
Joined: Aug 31 2018 10:12am

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

Post by Romantas » Sep 03 2018 10:41am

After today's tests, it was possible to start the engine from the handle on the steering wheel.
While getting a speed of more than 25 km.ch did not work.
and I try to make a smooth throttle adjustment

Аnd who will explain to me how to use cheat code? and does it work or not?
and another question: why when I release the throttle stick, my engine continues to spin, gradually stopping, and the controller does not respond to the brake knob.
Attachments
1.png

pegpe   1 µW

1 µW
Posts: 1
Joined: Sep 03 2018 3:51pm

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

Post by pegpe » Sep 03 2018 4:09pm

Reading about this got me interested.
I am trying to hook up my motor controller, a LSW722 to my ST-Link/v2 controller via the white 4pin connector on the controller.
But so far no luck, can anyone help me with the exact pinout, just to make sure that I have not fried everything already.

Is the LSW722 a very rare controller? I have not found any information about it online.

reset   10 mW

10 mW
Posts: 29
Joined: Aug 23 2018 4:01am

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

Post by reset » Sep 03 2018 4:56pm

geofft wrote:
Sep 03 2018 9:40am
reset wrote:
Sep 03 2018 9:07am
has anyone had success with the PAS working in only one direction, any guidance gratefully received. thanks
Yes! Have you experimented with 'PAS Threshold' in the configurator? On my setup any value outside the range 1.7 - 2.1 gave this sort of issue, I settled on 1.9 but yours may be different. Find a value that gives best reliable operation in one direction only then swap 'Pas direction left/right' if it's going the wrong way... :wink:
Hi Geoff thanks for the info will check it out again tomorrow. I had tried adjusting this setting but not above 1.8. I'll give the higher values a try out in the morning.

User avatar
stancecoke   10 kW

10 kW
Posts: 896
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » Sep 04 2018 2:54am

pegpe wrote:
Sep 03 2018 4:09pm
I am trying to hook up my motor controller, a LSW722 to my ST-Link/v2 controller via the white 4pin connector on the controller.
Is the LSW722 a very rare controller? I have not found any information about it online.
Image

But be aware, Lishui controllers are using STM32 processors, so our firmware will not work with them.

The Numbers in the Name "LSWxxx" are just a code for the distributor, so they say nothing about the kind of the controller.

regards
stancecoke

geofft   1 kW

1 kW
Posts: 318
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 » Sep 04 2018 5:30am

Romantas wrote:
Sep 03 2018 10:41am
After today's tests, it was possible to start the engine from the handle on the steering wheel.
While getting a speed of more than 25 km.ch did not work.
and I try to make a smooth throttle adjustment

Аnd who will explain to me how to use cheat code? and does it work or not?
Romantas, you'll find an explanation of the 'cheat' procedure in stancecoke's notes:-

https://opensourceebikefirmware.bitbuck ... ndex4.html

...although this may not translate too well for you, so I'll try to make it simpler:-

1) Operate brake lever
(wait 1 second)
2) Release brake lever
(wait 1 second)
3) Operate brake lever
(wait 1 second)
4) Release brake lever.

You will see the speed display momentarily change when successful. If you find this difficult, try changing 'CHEAT TOLERANCE' (in main.h file) from 40 to 80, you can reduce this again later)
and another question: why when I release the throttle stick, my engine continues to spin, gradually stopping,
...that sounds like normal behaviour, you probably won't notice this with the wheel on the ground.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR 20amp, LCD3, 48v 12s lipo.

Romantas   1 mW

1 mW
Posts: 18
Joined: Aug 31 2018 10:12am

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

Post by Romantas » Sep 04 2018 5:38am

Big request to stancecoke:
Fix to the configurator tool "OSEC Parameter Configurator.jar" to read the last recorded values from config.h
every time you run the configurator, it reads its default values.
...that sounds like normal behaviour, you probably won't notice this with the wheel on the ground.
This is definitely not normal behavior, because the engine inside the wheel does not turn off, and continues to slowly slow down, if you start to brake it with a brake, it resists and starts to consume additional power from the power source.

and the information on the KT-LCD5 display is not displayed.
battery condition is not, condition about speed is not.
And about the difficulties of translation and the language barrier do not have to worry, I can perfectly understand everything :)
Attachments
config.h
(1.1 KiB) Downloaded 14 times
Last edited by Romantas on Sep 04 2018 6:33am, edited 1 time in total.

geofft   1 kW

1 kW
Posts: 318
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 » Sep 04 2018 6:08am

Romantas wrote:
Sep 04 2018 5:38am
Big request to stancecoke:
Fix to the configurator tool "OSEC Parameter Configurator.jar" to read the last recorded values from config.h
every time you run the configurator, it reads its default values.
+1 for this change, the current system is driving me mad.. :wink:
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR 20amp, LCD3, 48v 12s lipo.

User avatar
stancecoke   10 kW

10 kW
Posts: 896
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » Sep 04 2018 6:33am

Sorry for the inconvenience.

The settings of the last flash process are written to a new file now. You can easily restore your latest setting after a new start of the tool by clicking on the latest ini-file, srcoll to the right in the window to see which file is the latest.
OSEC_screenshot.JPG
Perhaps we can improve the code to have the newest file in the top of the list or automatically load the newest...
The last changes in the tool were done by the user Xnyle (in the german forum), he helps since several weeks with the development!

regards
stancecoke

geofft   1 kW

1 kW
Posts: 318
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 » Sep 04 2018 6:47am

or automatically load the newest...
...that would be my preference. There is also a small issue, my display type is 'KT-LCD3', but it always reloads from the .ini as 'none'.

Also thanks to Xnyle, it's good to see you're getting some help.. :D

Edit: I see the display options are now different, I probably need to retry this.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR 20amp, LCD3, 48v 12s lipo.

Romantas   1 mW

1 mW
Posts: 18
Joined: Aug 31 2018 10:12am

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

Post by Romantas » Sep 04 2018 6:51am

Thank you for the help, with the latest version of the configurator, which downloaded from GITIHAB, the engine starts its rotation immediately after the controller is turned on, the brake knob does not respond either. The throttle grip only adds speed :) The only good news is that the speed has increased to 33 km / h
The comparison function in the motor.h file showed differences in the code
And removed the cheat procedure in main.c
Attachments
config.h
(1.22 KiB) Downloaded 14 times
111u.png

User avatar
Xnyle   10 mW

10 mW
Posts: 31
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 » Sep 04 2018 7:19am

Are you sure that's not because you flashed default values? See above.

I'll change the tool so that it loads the newest file on startup.

Regarding config.h, yes a few things have changed. Maybe there are some new bugs due to that.
It's mainly code refactoring though. Nothing has changed about how the controller should work.

You'll find the "offroad" procedure somewhere else now.

Romantas   1 mW

1 mW
Posts: 18
Joined: Aug 31 2018 10:12am

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

Post by Romantas » Sep 04 2018 7:26am

I fully understand that this is in the development period, there may be breakages in the code.
I downloaded the old version of the code from

Code: Select all

https://github.com/OpenSource-EBike-firmware/BMSBattery_S_controllers_firmware
now, the display shows the speed and the battery charge, for a new part of the code this does not work.

Post Reply