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

stancecoke said:
That's right for some safety issues and the direction detection, but it's miles in front in easy and intuitive usage and documentation/parameter explanation.

We should work on that, if you put all user relevant parameters in the config.h I can update the Javatool for the master branch, as I have offered before.
I will in some hours. So I think I will create a config.h file for Q85 motor, etc and put a lot of comments to help users. Try to structure the file in a way that is logic to understand and have only there the options needed but keep some defines on main.h that are for developers. And try keep always that config file updated and to be a reference, I will not change everytime I change to my personal configs.

I hope that will be ok for the Java tool. Let me finnish so than we can talk again.
 
OK, that sounds good!

I found an error with THROTTLE + PAS Mode. The JavaTool writes
Code:
#define THROTTLEANDPAS
to the config.h, but the code expects
Code:
#define THROTTLE_AND_PAS

I can fix this bug this evenig.
@geofft: you can edit the config.h by hand, save the changes and double click on start_compiling.bat for flashing, if you are impatient :wink:.

regards
stancecoke
 
stancecoke said:
I can fix this bug this evenig.
@geofft: you can edit the config.h by hand and double click on start_compiling.bat for flashing, if you are impatient :wink:.

Thanks for digging out this bug but there's absolutely no hurry. I'm sure you'll appreciate that there's other firmware out there that I'm trying but I'll certainly come back to this and retest it when time permits.
 
stancecoke said:
OK, that sounds good!
Just created and tested a config.h file for the following hardware combination:

// This file is the firmware configuration for the following hardware combination:
// - throotle and PAS; using motor current/torque and/or wheel speed controller
// - PAS with 8 magnets and with configured max cadence of 90 RPM
// - LCD3
// - battery pack Li-ion 24V
// - BMSBattery S06S 24/36V motor controller
// - BMSBattery Q85 motor 328RPM (direct drive motor)

I think may be easy to understand for Geofft (and also for Stancecoke to adapt Java tool):


Stancecoke, you will need to do some good changes to Java tool as I am using less options and some that are now different.
Also, can you please make the tool and needed files in one specific folder like "firmware_configuration_tool"?
And I think would be great if the Java tool had help explanation information for each field, just like I did in the config.h.
If you start, I can then go and also help to keep the tool updated.

The firmware is almost finished, now is time for documentation :)
Maybe we could put the main page with the current project information (advantages, status e history) + information on how to install the firmware. And keep the current notes as a separated file for developers - this file could be linked from the main file/site.
Would you help to write that notes files, for Windows and maybe in EN?
 
Speaking here as your average dumb end user, it would be good if you guys worked within a common framework of easy to understand installation proceedures. This would hopefully still allow you to develop your own individual firmware but would make it easier to attract non-coders like myself to give it a try and do some testing for you. I guess with so many motor/battery/controller options out there, the more testers the better...
 
geofft said:
it would be good if you guys worked within a common framework of easy to understand installation proceedures.
I already tried to keep the installation procedere as simple as possible for the windows solution :) . And as you managed it even with a tutorial that's written in german, I hope it's OK (even for a less experienced pc-users than you?!). Had you any trouble within the installation? Would a proper english translation of the tutorial bring an improvement?

There's no common platform like arduino available for the STM8, yet. There are only some experimental approaches, that won't help us at the moment, I guess.

regards
stancecoke
 
I've just done a quick and dirty update of the Java-Tool in the master branch. It's not perfect yet, but it should work.
There are no comments in the created config.h file, but I've added some "mouse over" pop-up online help to a few parameters, as most of them are self-explaining, further online help will be added later. As long as you don't use the Java Tool, casainhos commented original config.h won't be touched.
I left the Cheat time definitions in the tool, as casainho mentioned, that he plans to implement the cheat soon :wink: .
The tool has to be located in the main folder actually, as there is no path information in the Java-Code yet.

regards
stancecoke


C#ROME_B_Master.png
 

Attachments

  • config.h
    1.1 KB · Views: 80
I've updated the german wiki now and referenced everything to the master branch. The bugfix for the Throttle+PAS mode in the torque-simulation branch is done, also. I won't do further development on this branch.

@casainho: can you check the explanation of the parameters in the wiki and give suggestions for an improvement if necessary, please.
https://www.pedelecforum.de/wiki/doku.php?id=elektrotechnik:eek:pen_source_java_tool_master
I don't know, if you want to place an english translation on bitbucket...

Regards
stancecoke
 
Did anyone use an LCD2 display? The Wiki speaks only from the models LCD3 and LCD5. The LCD2 is smaller and owns all needed functions.
 
RC23 said:
Did anyone use an LCD2 display? The Wiki speaks only from the models LCD3 and LCD5. The LCD2 is smaller and owns all needed functions.
I buy my components from BMSBattery and the cheaper is LCD5.
 
stancecoke said:
@casainho: can you check the explanation of the parameters in the wiki and give suggestions for an improvement if necessary, please.
https://www.pedelecforum.de/wiki/doku.php?id=elektrotechnik:eek:pen_source_java_tool_master
I don't know, if you want to place an english translation on bitbucket...
My girlfriend bought a new computer that will take 4 weeks to arrive, so no mobile app soon.

I am buying components to finish my 3 ebikes, using on all of them, the torque sensor. I will also buy S06S-BT because I think we will go with Bluetooth in future, mainly to configure the specific features of our firmware.

So now I want to focus on documentation, but only in EN. I will not check the DE wiki (sorry) but use instead my time to make EN documentation. I think germans can translate from EN, as anyone else. And the Java tool seems very important and Windows install process. I would like to help improve Java tool and I would like to know which IDE are you using to design the user interface.

Also the cheat mode, maybe we could use the same terms others are using: street legal mode and offroad mode. The sequence on the brakes is just a way to select one of that 2 modes, since with LCD we can't do it.
 
RC23 said:
Did anyone use an LCD2 display?
I assume, that the LCD2 uses the same protocol as the LCD3/5, so just try if it works :wink:

casainho said:
I will not check the DE wiki
That is really a pity, I think google translate would give you 85% for an english documentation on bitbucket. But that's your decision of course.

casainho said:
I would like to help improve Java tool and I would like to know which IDE are you using to design the user interface.
That is very simple, I use Eclipse for Java-Developers with the WindowBuilder plugin. You can find the recent sourcecode of C#ROME-B in the tools folder of the master branch on github. 8)

regards
stancecoke
 
And here another online translate tool which works better than Google translate with a better language quality. Please try it.

https://www.deepl.com/translate
 
stancecoke said:
That is really a pity, I think google translate would give you 85% for an english documentation on bitbucket. But that's your decision of course.
I mean I will use all the resources available, including translation, but I will not comment for improvements on that wiki in DE.
 
:?: :?: :?:

casainho said:
Would you help to write that notes files, for Windows and maybe in EN?
Of course, but where do you want to place the note files? I'll need write access there.


RC23 said:
And here another online translate tool which works better than Google translate with a better language quality. Please try it.
https://www.deepl.com/translate
Thank you for that hint! After a few tests I would say, that the results are better than on google translate!

regards
stancecoke
 
Was asked earlier this week for some photos of the bike I'm using for trying out the firmware these guys are working hard on.

Bike is a Trek Fuel 90 (ebay purchase) which I have converted with different handlebars, seat, mudguards, rack and pannier, etc to be a multi purpose street and trail bike, also a more comfortable ride for my advancing years. Motor is a BMS Q128H which draws up to 800w with the lipo 12s battery mounted in the front of the pannier.

The diminutive size of the S06S meant I was able to mount it under the rack, this works well as it keeps it in the airflow and doesn't take up space in the pannier. The cables from the controller pass through a hole in the bottom of the pannier so the connections can be made inside - this is also convenient for placing the test S06S inside the pannier and connecting in the same way without having to remove the stock controller.
Geoff.

Hmm....for some reasons those photos haven't attached, I'll try again...
Ah...files too big it seems, will try to reduce somehow..
 

Attachments

  • IMG_20171220_102739151reduced.jpg
    IMG_20171220_102739151reduced.jpg
    177 KB · Views: 2,138
  • IMG_20171220_102825806reduced.jpg
    IMG_20171220_102825806reduced.jpg
    130.3 KB · Views: 2,138
  • IMG_20171220_102619408reduced.jpg
    IMG_20171220_102619408reduced.jpg
    140.6 KB · Views: 2,138
I use postimage.com, works very well.
 
casainho said:
I use postimage.com, works very well.

A right-click on the photo and 'Edit in 3D Paint' did the job... :wink:
 
We could prepare a free homepage for the documentation, something like this:
https://crome-b.jimdo.com/

edit: I've discarded that idea.

regards
stancecoke
 
stancecoke said:
We could prepare a free homepage for the documentation, something like this:
https://crome-b.jimdo.com/
Better to go with github or bitbucket pages. Please look at cherrytree 🍒 software, install and test, to write the documentation.
 
stancecoke said:
Of course, but where do you want to place the note files? I'll need write access there.
I think we should use github or bitbucket pages to host the documentation web page. I am being using bitbucket because some limitations.

On there github or bitbucket, we just can have one public URL per project and so I am using already the http://opensourceebikefirmware.bitbucket.io/

For notes/documentation, I am using CherryTree (OpenSource and good note taking software, for the 3 OSs). I take my notes fast there then I export to HTML from there and then I put the HTML page + source file on the bitbucket. I think should keep doing like this, even if this is not collaborative as a wiki.... but at least is very fast to copy-paste information from forum, web, etc.

So, I think I can create a directory like: http://opensourceebikefirmware.bitbucket.io/windows_documentation and you could put the HTML there. Then I would link on the main documentation page, to that one. Anyway, let's go and later we can reorganize better.

Please go to https://github.com/giuspen/cherrytree/ and download the software and start writing the documentation in EN. Then I can help you to export, etc.
Also create your account on bitbucket so I can add you there to have write access.
 
This is the limitation I talked, as I am keeping a git the source file as also the HTML file, and the current documentation is big, with a lot of big images and files...
And the solution is to loose git history, it works.

Code:
cas@cas-sp4:~/OpenSource-EBike-firmware/opensourceebikefirmware.bitbucket.io$ git push
Password for 'https://casainho@bitbucket.org': 
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 410 bytes | 410.00 KiB/s, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: repository is in read only mode (over 2 GB size limit).
remote: 
remote: Learn how to reduce your repository size: https://confluence.atlassian.com/x/xgMvEw.
To https://bitbucket.org/opensourceebikefirmware/opensourceebikefirmware.bitbucket.io.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://casainho@bitbucket.org/opensourceebikefirmware/opensourceebikefirmware.bitbucket.io.git'
 
I know that you are a fan of open source software, but to be honest, the layout of the pages that are built with your suggested tools is not very sexy. If we use the free offer of a professional WYSIWYG web hosting service, we can create a good looking homepage just with drag and drop / copy and paste. The design of the linked page took me just 15 minutes...
I'm not happy with the wiki solution in the german forum, too.

regards
stancecoke
 
stancecoke said:
I know that you are a fan of open source software, but to be honest, the layout of the pages that are built with your suggested tools is not very sexy. If we use the free offer of a professional WYSIWYG web hosting service, we can create a good looking homepage just with drag and drop / copy and paste. The design of the linked page took me just 15 minutes...
In past, I lost all my documentation of a project (done with DokuWiki) about EBikes, because I did host in one of that sites and it disappeared in one night, the site just closed and I lost all my work (yes, I didn't had a backup :-( ) -- so now I prefer to trust on platforms like github and where the sources are also on the personal computers of developers.
Also, I trust when I see something hosted on the github sites and not much on that sites, with that not well known address names.

Another alternative, would be to go with Google drive text documents because they are collaborative and can be made with public read access.
Even other, using github wikis, but then again they are kind of slow to edit when compared to that taking notes software.

But if you prefer to go with that website, just go and give me write access and I will improve if possible. And I will link on the main site to there. But please make sure you can make a backup in something that is easily exported and after imported on other different platform.
 
OK, then I'll discard the thing at jimdo and will register at bitbucket. But I think, cherrytree will not be my favorite tool to create websites...

You can find me now at bitbucket, username stancecoke

regards
stancecoke
 
Back
Top