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

Electric Motors and Controllers
Basia   10 W

10 W
Posts: 69
Joined: Nov 10 2017 4:17am
Location: Wilmington

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

Post by Basia » Jun 19 2018 1:56pm

installed the firmware on the new controller. without load - speed 47km/h with a load of 5km/h. the wheel continues to spin after releasing the throttle. Is it possible to adjust the lower value of throttle?

User avatar
stancecoke   10 kW

10 kW
Posts: 926
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 » Jun 20 2018 2:31pm

I thought the problem with the released throttle was solved?! Please upload your config.h again!

regards
stancecoke

Basia   10 W

10 W
Posts: 69
Joined: Nov 10 2017 4:17am
Location: Wilmington

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

Post by Basia » Jun 20 2018 4:01pm

stancecoke wrote:
Jun 20 2018 2:31pm
I thought the problem with the released throttle was solved?! Please upload your config.h again!

regards
stancecoke
Thanks for the help!
Sometimes the wheel starts to rotate itself without pressing the throttle.
what to choose? pwm directly or current / speed?
Attachments
config.h
(1.38 KiB) Downloaded 66 times
settings.PNG
settings.PNG (41.35 KiB) Viewed 654 times

drunkencat129   100 W

100 W
Posts: 111
Joined: Aug 05 2008 11:44pm

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

Post by drunkencat129 » Jun 20 2018 7:10pm

hey guys wondering if some one can help me out i got a kt 18 fet i got with 4110 fets and 100v caps moded to it also built up the traces does any one know how to make the power on circut support 100v i can replace the voltage reg with a dc to dc converter but is that only thing i need to change thanks

crank2giri   100 µW

100 µW
Posts: 9
Joined: Oct 04 2015 10:11pm

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

Post by crank2giri » Jun 21 2018 12:58am

Hey Guys,
We are working on a 14S Battery pack and no PAS, wanted to understand how get the controller working in this mode for a 14FET Controller 1000W. Also is there as a way to derate the motor? As in, limit the power output to something like 350W.

DarkDD   100 µW

100 µW
Posts: 7
Joined: May 04 2018 11:26pm

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

Post by DarkDD » Jun 21 2018 7:43am

Hi! I am completely unable to get the thing to generate an ihx file using any of the tools. Any help would be appreciated. I'll give the details if you could help. Thanks!

casainho   100 MW

100 MW
Posts: 2799
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 » Jun 21 2018 8:47am

crank2giri wrote:
Jun 21 2018 12:58am
Hey Guys,
We are working on a 14S Battery pack and no PAS, wanted to understand how get the controller working in this mode for a 14FET Controller 1000W. Also is there as a way to derate the motor? As in, limit the power output to something like 350W.
Go to the source files and read config-example.h file.
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.

DarkDD   100 µW

100 µW
Posts: 7
Joined: May 04 2018 11:26pm

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

Post by DarkDD » Jun 21 2018 9:04am

DarkDD wrote:
Jun 21 2018 7:43am
Hi! I am completely unable to get the thing to generate an ihx file using any of the tools. Any help would be appreciated. I'll give the details if you could help. Thanks!
P.S. I am trying to compile on Windows.

Commenting a line in ebike_app.c works with OSEC parameter configurator. But I want the slightly higher configurability of the firmware configurator tool.

Can I use OSEC configurator and edit config.h then use the .bat file?

I notice that the firmware configurator tool generates a smaller config file...

User avatar
stancecoke   10 kW

10 kW
Posts: 926
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 » Jun 21 2018 10:35am

Basia wrote:
Jun 20 2018 4:01pm

Sometimes the wheel starts to rotate itself without pressing the throttle.
Two possibilities:
1. turn the throttle slightly while switching on the system, then release it after a few seconds
2. Put a small offset to the variable ui8_adc_throttle_offset in the adc.c, as you did it for the battery current before.

Code: Select all

for (ui8_i = 0; ui8_i < 16; ui8_i++)
  {
    ui16_counter = TIM2_GetCounter () + 10; // delay ~10ms
    adc_trigger ();
    while (!ADC1_GetFlagStatus (ADC1_FLAG_EOC)) ; // wait for end of conversion
    ui16_adc_throttle_offset += UI8_ADC_THROTTLE;
  }
  ui16_adc_throttle_offset -= 8;
  ui16_adc_throttle_offset >>= 4;

  ui8_adc_throttle_offset = ui16_adc_throttle_offset;
}
Basia wrote:
Jun 20 2018 4:01pm

what to choose? pwm directly or current / speed?
You should use current/speed setting.

regards
stancecoke
Last edited by stancecoke on Jun 21 2018 11:05am, edited 1 time in total.

User avatar
stancecoke   10 kW

10 kW
Posts: 926
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 » Jun 21 2018 10:42am

DarkDD wrote:
Jun 21 2018 9:04am

Commenting a line in ebike_app.c works with OSEC parameter configurator. But I want the slightly higher configurability of the firmware configurator tool.

Can I use OSEC configurator and edit config.h then use the .bat file?
please post the output of the cmd window, so we can see what's going wrong.
As written several times before, you can use any texteditor to modify the config.h and just double click on start_compiling.bat to start the compiling and flashing process.
The java tool is not editig the existing config.h but overwrites it with the recent settings in the tool.
@casainho: are there new parameters in the config.h since the last update of the java-tool?

regards
stancecoke
Last edited by stancecoke on Jun 21 2018 11:06am, edited 1 time in total.

casainho   100 MW

100 MW
Posts: 2799
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 » Jun 21 2018 11:05am

stancecoke wrote:
Jun 21 2018 10:42am
The java tool is not editig the existing config.h but overwrites it with the recent settings in the tool.
@casainho: are there new parameters in the config.h since the last update of the java-tool?
No and in fact, I now think it is not a good idea that software as it takes much time to update. I prefer as a developer, the config-example.h and I think it is not a problem for this users.

Also, I think that having your software version and branch of firmware is a confusion, because I see others like Basia asking things that I don't know which versions are using.

I think would be better to:
- remove the firmware configuration tool and keeping an updated config-example.h, if possible with even more examples/information.
- remove the links to your firmware branch, from the user documentation but keep on developer notes

Also I am more and more away of this project because right now I almost have no ebikes using KT controllers. I just replaced my girlfriend bicycle with a new one and with TSDZ2. My son bicycle will be the next. The only bicycle with a KT controller is another one for me but has a direct drive motor Q11, that his heavy and slow (with 48V battery just runs at about 25km/h when near discharged while TSDZ2 can keep the 35km/h or more) -- seems I bought a bad quality/old technology direct drive motor.
My experience with TSDZ2 is much better than with hub geared motors like Q85 or Q100. I only miss a motor with direct drive for having regen but I don't have one that I know is relative cheap and good.

So, Stancecoke, I hope you can keep developing and improving current code. I am on TSDZ2 code and luckily, is almost the same technology so I hope to share what I learned. But I plan to keep reading here but I will also have no hardware to test new things or understand possible issues of new users.

KT motor controllers are clear better hardware than TSDZ2, and are much easier to develop for!! And even the LCDs, as I am using KT LCD3 with TSDZ2 instead original LCD.

Image
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
stancecoke   10 kW

10 kW
Posts: 926
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 » Jun 21 2018 11:15am

Sad to read, that you want to quit this project.... :(

I think there's no problem with the Java Tool, it makes the firmware usable for people who don't have computer skills like you or me :-)

If there's a bug in the Java Tool, I can fix it easily. But for this we need the feedback of the users.
I think Basia is using your master. I don't know anyone who uses my fork...

regards
stancecoke

geofft   1 kW

1 kW
Posts: 324
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 » Jun 21 2018 11:49am

stancecoke wrote:
Jun 16 2018 2:03pm
I've pushed the 5-step-version to a new branch now.
https://github.com/OpenSource-EBike-fir ... ode_5_step

I left the initial values for the step-durations at one second. The tolerance is now settable in the main.h. It is set to 0.8s now.

You can start the code at any time. To make sure, to begin from the start, pull the lever for a few seconds first.

I'll try it in hardware tomorrow.

regards
stancecoke
@stancecoke: I still haven't been able to get offroad mode to trigger. I've been using the exact same timing as your video, also tried various different settings for the timers in main.h but haven't once seen it trigger. I think something's not right, not sure if anyone else has got this to work, I haven't seen any other feedback for this.

No rush for this, I can see you have other help requests to deal with first. If there's anything you want me to try with this though, please ask.... :wink:
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR, LCD3, 48v 12s lipo.

User avatar
stancecoke   10 kW

10 kW
Posts: 926
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 » Jun 21 2018 12:40pm

I've commented out the print commands now, please try again. If this doesn't work, I can't do any more, as I have no LCD3...
But even if this works, the power cut at the speed limit is not implemented in casainhos code yet. So the offroad mode will only work with P3=0.

regards
stancecoke

Basia   10 W

10 W
Posts: 69
Joined: Nov 10 2017 4:17am
Location: Wilmington

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

Post by Basia » Jun 21 2018 2:03pm

stancecoke wrote:
Jun 21 2018 10:35am
Basia wrote:
Jun 20 2018 4:01pm

Sometimes the wheel starts to rotate itself without pressing the throttle.
Two possibilities:
1. turn the throttle slightly while switching on the system, then release it after a few seconds
2. Put a small offset to the variable ui8_adc_throttle_offset in the adc.c, as you did it for the battery current before.

Code: Select all

for (ui8_i = 0; ui8_i < 16; ui8_i++)
  {
    ui16_counter = TIM2_GetCounter () + 10; // delay ~10ms
    adc_trigger ();
    while (!ADC1_GetFlagStatus (ADC1_FLAG_EOC)) ; // wait for end of conversion
    ui16_adc_throttle_offset += UI8_ADC_THROTTLE;
  }
  ui16_adc_throttle_offset -= 8;
  ui16_adc_throttle_offset >>= 4;

  ui8_adc_throttle_offset = ui16_adc_throttle_offset;
}
Basia wrote:
Jun 20 2018 4:01pm

what to choose? pwm directly or current / speed?
You should use current/speed setting.

regards
stancecoke
nothing has changed, after one minute the wheel starts to twitch. short pulses are applied to the wheel. I do not understand anything (((

apple2   100 µW

100 µW
Posts: 8
Joined: Mar 28 2016 8:08am

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

Post by apple2 » Jun 21 2018 6:25pm

Guys, can you point me to the biggest controller that can run this? I want in!

DarkDD   100 µW

100 µW
Posts: 7
Joined: May 04 2018 11:26pm

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

Post by DarkDD » Jun 22 2018 12:34am

stancecoke wrote:
Jun 21 2018 10:42am
DarkDD wrote:
Jun 21 2018 9:04am

Commenting a line in ebike_app.c works with OSEC parameter configurator. But I want the slightly higher configurability of the firmware configurator tool.

Can I use OSEC configurator and edit config.h then use the .bat file?
please post the output of the cmd window, so we can see what's going wrong.
As written several times before, you can use any texteditor to modify the config.h and just double click on start_compiling.bat to start the compiling and flashing process.
The java tool is not editig the existing config.h but overwrites it with the recent settings in the tool.
@casainho: are there new parameters in the config.h since the last update of the java-tool?

regards
stancecoke
Hey! Thanks for the quick reply! I edited the config file and got somewhere. Still having an issue..

Code: Select all

Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp143. Please contact sdcc authors with source code to reproduce.
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oebike_app.c ebike_app.c
ebike_app.c:179: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp16. Please contact sdcc authors with source code to reproduce.
ebike_app.asm:390: Error: <a> machine specific addressing or addressing mode error
ebike_app.asm:427: Error: <a> machine specific addressing or addressing mode error
removing ebike_app.rel
make: *** [ebike_app.rel] Error 1

Doing the following in ebike_app.c lets me build though...

Code: Select all

 //ebike_app_set_error (EBIKE_APP_ERROR_06_SHORT_CIRCUIT); 

i.e. commenting that line...


P.S. I can keep giving you feedback and also help in dev once I get the toolchain down properly! Shall dual boot my system soon!

casainho   100 MW

100 MW
Posts: 2799
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 » Jun 22 2018 12:43am

stancecoke wrote:
Jun 21 2018 11:15am
Sad to read, that you want to quit this project.... :(

I think there's no problem with the Java Tool, it makes the firmware usable for people who don't have computer skills like you or me :-)

If there's a bug in the Java Tool, I can fix it easily. But for this we need the feedback of the users.
I think Basia is using your master. I don't know anyone who uses my fork...
Seems that more people want to use the firmware. I think would be good to have a good documentation and force users to read it before asking for help. Other way I think will be to much work and repetitive questions.

I can also write on main page that this project is no longer being maintained and that new users may or may not get help when asking question on the forum.

What do you prefer?
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.

casainho   100 MW

100 MW
Posts: 2799
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 » Jun 22 2018 12:45am

DarkDD wrote:
Jun 22 2018 12:34am
stancecoke wrote:
Jun 21 2018 10:42am
DarkDD wrote:
Jun 21 2018 9:04am

Commenting a line in ebike_app.c works with OSEC parameter configurator. But I want the slightly higher configurability of the firmware configurator tool.

Can I use OSEC configurator and edit config.h then use the .bat file?
please post the output of the cmd window, so we can see what's going wrong.
As written several times before, you can use any texteditor to modify the config.h and just double click on start_compiling.bat to start the compiling and flashing process.
The java tool is not editig the existing config.h but overwrites it with the recent settings in the tool.
@casainho: are there new parameters in the config.h since the last update of the java-tool?

regards
stancecoke
Hey! Thanks for the quick reply! I edited the config file and got somewhere. Still having an issue..

Code: Select all

Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp143. Please contact sdcc authors with source code to reproduce.
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oebike_app.c ebike_app.c
ebike_app.c:179: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp16. Please contact sdcc authors with source code to reproduce.
ebike_app.asm:390: Error: <a> machine specific addressing or addressing mode error
ebike_app.asm:427: Error: <a> machine specific addressing or addressing mode error
removing ebike_app.rel
make: *** [ebike_app.rel] Error 1

Doing the following in ebike_app.c lets me build though...

Code: Select all

 //ebike_app_set_error (EBIKE_APP_ERROR_06_SHORT_CIRCUIT); 

i.e. commenting that line...


P.S. I can keep giving you feedback and also help in dev once I get the toolchain down properly! Shall dual boot my system soon!
Which version of SDCC are you using? must be 3.7.0. If is different, why did you decide to use another version?
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.

1N4001   10 W

10 W
Posts: 72
Joined: Nov 28 2017 7:55am

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

Post by 1N4001 » Jun 22 2018 1:21am

casainho wrote:
Jun 22 2018 12:43am
stancecoke wrote:
Jun 21 2018 11:15am
Sad to read, that you want to quit this project.... :(

I think there's no problem with the Java Tool, it makes the firmware usable for people who don't have computer skills like you or me :-)

If there's a bug in the Java Tool, I can fix it easily. But for this we need the feedback of the users.
I think Basia is using your master. I don't know anyone who uses my fork...
Seems that more people want to use the firmware. I think would be good to have a good documentation and force users to read it before asking for help. Other way I think will be to much work and repetitive questions.
I think it would be more important to unify things. Not knowing the structure of the project and the different parts seems to be the main source of confusion. I know it's not my place to demand things, but it would definitely improve understanding among newbies.


Multiple forks, separate documentations, different branches, several ways to create configs (including outdated ones!)... I'm not surprised that people are confused.

Multiple forks: Yours and Stancecoke's. Ideally (really, ideally) you would merge them and have a #define to switch between different behaviors at compile time.

Separate documentations: Why is there this with almost no content, and this? Then the Windows instructions here which look completely different. Plus there's Stancecoke's German docs page. This should all be in one place, with different languages kept in sync as best as possible. A Wiki would be ideal, as it encourages others to contribute aswell and allows for corrections and improvements.

Different branches: They are necessary, I know that. Maybe add to the documentation how they differ from the main branch.

Config files: I understand the need to have a Windows tool for those not comfortable editing header files. But as we could see multiple times now, it needs to be kept in sync with features and changes at all times to be useful. Either that, or just force people to edit the header file. Which would be less comfortable, but better in the long run (with appropiate documentation)
Last edited by 1N4001 on Jun 22 2018 2:04am, edited 2 times in total.

User avatar
stancecoke   10 kW

10 kW
Posts: 926
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 » Jun 22 2018 1:59am

Hmm, it would be interesting, which tutorial the recent users were following and where problems occured. If you follow this chapter for chapter, there should be no problem!

As written before: If there's a bug in the OSEC_Parameter_Configurator.jar , please report it, then I'll fix it.

But you are right, we should delete things, that are old and/or not working.

regards
stancecoke

casainho   100 MW

100 MW
Posts: 2799
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 » Jun 22 2018 2:25am

1N4001 wrote:
Jun 22 2018 1:21am
casainho wrote:
Jun 22 2018 12:43am
stancecoke wrote:
Jun 21 2018 11:15am
Sad to read, that you want to quit this project.... :(

I think there's no problem with the Java Tool, it makes the firmware usable for people who don't have computer skills like you or me :-)

If there's a bug in the Java Tool, I can fix it easily. But for this we need the feedback of the users.
I think Basia is using your master. I don't know anyone who uses my fork...
Seems that more people want to use the firmware. I think would be good to have a good documentation and force users to read it before asking for help. Other way I think will be to much work and repetitive questions.
I think it would be more important to unify things. Not knowing the structure of the project and the different parts seems to be the main source of confusion. I know it's not my place to demand things, but it would definitely improve understanding among newbies.


Multiple forks, separate documentations, different branches, several ways to create configs (including outdated ones!)... I'm not surprised that people are confused.

Multiple forks: Yours and Stancecoke's. Ideally (really, ideally) you would merge them and have a #define to switch between different behaviors at compile time.

Separate documentations: Why is there this with almost no content, and this? Then the Windows instructions here which look completely different. Plus there's Stancecoke's German docs page. This should all be in one place, with different languages kept in sync as best as possible. A Wiki would be ideal, as it encourages others to contribute aswell and allows for corrections and improvements.

Different branches: They are necessary, I know that. Maybe add to the documentation how they differ from the main branch.

Config files: I understand the need to have a Windows tool for those not comfortable editing header files. But as we could see multiple times now, it needs to be kept in sync with features and changes at all times to be useful. Either that, or just force people to edit the header file. Which would be less comfortable, but better in the long run (with appropiate documentation)
I agree in all the points!! Even on the wiki and maybe the best way is to use the github wikis.

But let's see if Stancecoke or others are able to help and improve on this.
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.

honya96   1 kW

1 kW
Posts: 328
Joined: Mar 05 2015 9:38am
Location: Czech Republic

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

Post by honya96 » Jun 22 2018 2:40am

apple2 wrote:
Jun 21 2018 6:25pm
Guys, can you point me to the biggest controller that can run this? I want in!
72v 70A 24FET.

If you cant find it anywhere, this Is KT company dealer chn_1@163.com.

I dont know if they are still making them.

DarkDD   100 µW

100 µW
Posts: 7
Joined: May 04 2018 11:26pm

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

Post by DarkDD » Jun 22 2018 3:00am

casainho wrote:
Jun 22 2018 12:45am
DarkDD wrote:
Jun 22 2018 12:34am
stancecoke wrote:
Jun 21 2018 10:42am
DarkDD wrote:
Jun 21 2018 9:04am

Commenting a line in ebike_app.c works with OSEC parameter configurator. But I want the slightly higher configurability of the firmware configurator tool.

Can I use OSEC configurator and edit config.h then use the .bat file?
please post the output of the cmd window, so we can see what's going wrong.
As written several times before, you can use any texteditor to modify the config.h and just double click on start_compiling.bat to start the compiling and flashing process.
The java tool is not editig the existing config.h but overwrites it with the recent settings in the tool.
@casainho: are there new parameters in the config.h since the last update of the java-tool?

regards
stancecoke
Hey! Thanks for the quick reply! I edited the config file and got somewhere. Still having an issue..

Code: Select all

Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp143. Please contact sdcc authors with source code to reproduce.
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oebike_app.c ebike_app.c
ebike_app.c:179: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp16. Please contact sdcc authors with source code to reproduce.
ebike_app.asm:390: Error: <a> machine specific addressing or addressing mode error
ebike_app.asm:427: Error: <a> machine specific addressing or addressing mode error
removing ebike_app.rel
make: *** [ebike_app.rel] Error 1

Doing the following in ebike_app.c lets me build though...

Code: Select all

 //ebike_app_set_error (EBIKE_APP_ERROR_06_SHORT_CIRCUIT); 

i.e. commenting that line...


P.S. I can keep giving you feedback and also help in dev once I get the toolchain down properly! Shall dual boot my system soon!
Which version of SDCC are you using? must be 3.7.0. If is different, why did you decide to use another version?
Yes! you're right. I'm using SDCC 3.6.0. I can't seem to find a windows SDCC 3.7.0... And I don't know how to build it from sources :? :oops:

Also yeah FAQ would be good since all the confusion of the bitbucket pages, this incredibly large forum thread and all the branches!

You think you'd have the time to generate a few hex files if I gave you the config?

User avatar
stancecoke   10 kW

10 kW
Posts: 926
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 » Jun 22 2018 8:33am

DarkDD wrote:
Jun 22 2018 3:00am
Yes! you're right. I'm using SDCC 3.6.0. I can't seem to find a windows SDCC 3.7.0...
Please read the tutorial, there you will find the link to the precompiled windows files and the instruction how to install them. SDCC 3.7.0 is only available for 64bit systems with windows.

regards
stancecoke

Post Reply