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

Electric Motors and Controllers
casainho
100 kW
100 kW
Posts: 1120
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Dec 20, 2017 9:56 am

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: Select all

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'
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

User avatar
stancecoke
1 kW
1 kW
Posts: 402
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Dec 20, 2017 10:05 am

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

casainho
100 kW
100 kW
Posts: 1120
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Dec 20, 2017 10:25 am

stancecoke wrote:
Dec 20, 2017 10:05 am
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.
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

User avatar
stancecoke
1 kW
1 kW
Posts: 402
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Dec 20, 2017 11:31 am

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

casainho
100 kW
100 kW
Posts: 1120
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Dec 20, 2017 11:54 am

stancecoke wrote:
Dec 20, 2017 11:31 am
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...
Ok then. Cherrytree is fast for taking notes and happens that also export to HTML.
Gives trust to me something done and written by tecnhical guys/developers, and not something fancy that seems the output of (just) marketing and commercial guys. I think our target are users that are tecnhical and they should identify themselves with our no fancy documentation.
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

User avatar
stancecoke
1 kW
1 kW
Posts: 402
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Dec 20, 2017 12:07 pm

OK, I think you have to give me some advise how to add content to the bitbucket site.

You are right, the site has not to be fancy, but is has to be well structured and not just a ragbag of thoughts. There should be a common theme visible all the time...

regards
stancecoke
Last edited by stancecoke on Dec 20, 2017 1:35 pm, edited 1 time in total.

casainho
100 kW
100 kW
Posts: 1120
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Dec 20, 2017 1:16 pm

stancecoke wrote:
Dec 20, 2017 12:07 pm
OK, I think you have to give me some advise how to add content to the bitbucket site.

You are right, the site has not to be fancy, but is has to be well structured and not just a ragbag of thoughts. There should be a common theme visible all the time...

edit: something went wrong, everything was deleted on bitbucket?!
So, I just had renamed the older repo and created a new one, were I put the files again, so this new repo has no history and so should has less than 2GBytes, which is the limit of bitbucket.

I created this folder "windows_instructions" (can be renamed later) and put a testing index.html file there:
https://opensourceebikefirmware.bitbuck ... tructions/

Image

So, prepare your notes and export as HTML. Upload the files to the "windows_instructions" folder and we will have there the documentation.
That is a git repository, just like on github: https://bitbucket.org/opensourceebikefi ... tbucket.io
And I just gave you write access.
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/


User avatar
stancecoke
1 kW
1 kW
Posts: 402
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Dec 21, 2017 9:28 am

I've just added the first blueprint of the english tutorial for windows:
https://opensourceebikefirmware.bitbuck ... tructions/

I took a free layout from the web and used KompoZer for editing.

For translation I used deepl, the translation is not revised yet.

I hope that helps our future "customers" :wink:

regards
stancecoke

casainho
100 kW
100 kW
Posts: 1120
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Dec 21, 2017 10:14 am

stancecoke wrote:
Dec 21, 2017 9:28 am
I've just added the first blueprint of the english tutorial for windows:
https://opensourceebikefirmware.bitbuck ... tructions/

I used a free layout from the web and edited it with KompoZer.

For translation I used deepl, the translation is not revised yet.

I hope that helps our future customers :wink:
It works and I like the content (pictures, text and the structure).
What I don't like much:
- I think the steps should be in a vertical list (maybe numbered)/vertical menu and not at top and horizontal menu. I think is not clear that it is a list of steps and that user should start from left to right and follow that sequence
- The top banner image seems unrealistic, I would prefer a real image
- Manage expectations: I think all that colors, top banner and layout seems to give impression of a product/service from a company which is not the reality. I think we should lower expectations, keep clear that the firmware is not a product from an existing company and users should not expect a polish product and professional customer support.
Also seems we are competing with Kunteng and BMSBattery, because like that we seem to have an equal or even better website. I was thinking of a website more like an user manual that could be like a complement to Kunteng and BMSBattery documentation and not kind of direct competition. We depend on their success, we need to keep a good relation with them, they should not feel that we are try to compete with them (and we are not!).
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

User avatar
stancecoke
1 kW
1 kW
Posts: 402
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Dec 21, 2017 10:33 am

Dear casainho,

a simple "thank you" would have been enough....

I've added a disclaimer that this is a hobby project and a numbering of the steps.

regards
stancecoke

geofft
10 W
10 W
Posts: 97
Joined: Nov 09, 2012 9:41 am
Location: Berkshire UK

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

Post by geofft » Dec 21, 2017 10:50 am

Sorry to be a pain guys but I'm having a problem with the latest 'master branch'. It goes like this:-

If I download it and run it from directly from 'Start_Compliling.bat it runs ok and will continue to do so with further attempts.

If I run it via 'OSEC Parameter Configurator.jar' it fails to transfer data to the controller. After doing this any attempt to run it from 'Start Compiling.bat' also fails.

I've attached a cmd log (from a failed run) - maybe you could take a look....?

Geoff.
Attachments
Master branch cmd log.txt
(11.26 KiB) Downloaded 18 times
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48 20amp, LCD3, 48v 12s lipo.

casainho
100 kW
100 kW
Posts: 1120
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Dec 21, 2017 10:51 am

stancecoke wrote:
Dec 21, 2017 10:33 am
Dear casainho,

a simple "thank you" would have been enough....

I've added a disclaimer that this is a hobby project and a numbering of the steps.
I recognize that you have been tireless and the fact that the firmware is practically finished is the result of much of your effort.

And I will link on the main page to this instructions, trying to give main focus to the actual main page + install instructions for Windows and install instructions on Linux (will need to write them, but will be copy-paste from actual notes). The current notes/documentation for developers will be at the end, with lower focus.
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

User avatar
stancecoke
1 kW
1 kW
Posts: 402
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Dec 21, 2017 10:55 am

@geofft:
can you please upload your latest config.h?
perhaps you can try to delete the old config.h before clicking "write configuration"

@casainho: you're welcome!

regards
stancecoke
Last edited by stancecoke on Dec 21, 2017 10:57 am, edited 1 time in total.

casainho
100 kW
100 kW
Posts: 1120
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Dec 21, 2017 10:57 am

geofft wrote:
Dec 21, 2017 10:50 am
Sorry to be a pain guys but I'm having a problem with the latest 'master branch'. It goes like this:-

If I download it and run it from directly from 'Start_Compliling.bat it runs ok and will continue to do so with further attempts.

If I run it via 'OSEC Parameter Configurator.jar' it fails to transfer data to the controller. After doing this any attempt to run it from 'Start Compiling.bat' also fails.

I've attached a cmd log (from a failed run) - maybe you could take a look....?
I also get that errors while building and seems the config.h file generated by the Java tool duplicates some define like: "MOTOR_ROTOR_OFFSET_ANGLE" - I hope Stancecoke can resolve this issue.

Code: Select all

#define MOTOR_ROTOR_OFFSET_ANGLE 202
#define ADC_MOTOR_CURRENT_MAX 30
#define ADC_MOTOR_REGEN_CURRENT_MAX 30
#define MOTOR_ROTOR_OFFSET_ANGLE 137
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

User avatar
stancecoke
1 kW
1 kW
Posts: 402
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Dec 21, 2017 10:59 am

ahh, okay, that's a copy-paste error, I can fix it easily :-)

regards
stancecoke

casainho
100 kW
100 kW
Posts: 1120
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Dec 21, 2017 11:05 am

stancecoke wrote:
Dec 21, 2017 10:59 am
ahh, okay, that's a copy-paste error, I can fix it easily :-)
Also my mistake on main.h, need to delete #define MOTOR_TYPE MOTOR_TYPE_Q85. Can you do that also? When you confirm, I can also try build on my side to test.
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

geofft
10 W
10 W
Posts: 97
Joined: Nov 09, 2012 9:41 am
Location: Berkshire UK

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

Post by geofft » Dec 21, 2017 11:10 am

Stancecoke, not sure if you need config.h now but I've attached it below.
Attachments
config.h
(1.1 KiB) Downloaded 15 times
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48 20amp, LCD3, 48v 12s lipo.

User avatar
stancecoke
1 kW
1 kW
Posts: 402
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Dec 21, 2017 11:28 am

Thank you, geofft. I've just updated the Java tool in the master branch. I fixed the double entry of MOTOR_ROTOR_OFFSET_ANGLE. The log assumed that there could be another problem with the MOTOR_TYPE, but I can't find a further error.

regards
stancecoke

geofft
10 W
10 W
Posts: 97
Joined: Nov 09, 2012 9:41 am
Location: Berkshire UK

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

Post by geofft » Dec 21, 2017 11:45 am

Yup, looks good now, many thanks.

I look forward to trying it 'on the road' tomorrow...... :wink:
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48 20amp, LCD3, 48v 12s lipo.

casainho
100 kW
100 kW
Posts: 1120
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Dec 21, 2017 11:50 am

There was an error of redefinition MOTOR_TYPE, I corrected. I also renamed config.h to config-example.h so it is not overwritten by the Java tool. Geofft, please download again and use it.
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

geofft
10 W
10 W
Posts: 97
Joined: Nov 09, 2012 9:41 am
Location: Berkshire UK

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

Post by geofft » Dec 21, 2017 12:03 pm

Still seems ok.

I can see config-example.h amongst the files now so I'm on the right download.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48 20amp, LCD3, 48v 12s lipo.

User avatar
stancecoke
1 kW
1 kW
Posts: 402
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Dec 21, 2017 12:58 pm

casainho wrote:
Dec 21, 2017 11:05 am
Can you do that also? When you confirm, I can also try build on my side to test.
sorry, I have not recognized your post in time...

regards
stancecoke

casainho
100 kW
100 kW
Posts: 1120
Joined: Feb 14, 2011 2:43 pm

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

Post by casainho » Dec 22, 2017 4:56 am

Stancecke, I updated the main documentation with a link to your Windows instructions but unfortunately I am short of time now and my internet connection is bad and failing to upload the changes - hope to have it ready by the end of day.
And the Java tool fails on Linux, because some commands it uses are only for Windows -- anyway, that config-example.h should be enough for a Linux user, so no need to work on Java tool for Linux.

Image
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

User avatar
stancecoke
1 kW
1 kW
Posts: 402
Joined: Aug 02, 2017 2:56 pm

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

Post by stancecoke » Dec 22, 2017 5:40 am

casainho wrote:
Dec 22, 2017 4:56 am
And the Java tool fails on Linux, because some commands it uses are only for Windows
That should be easy to solve in Java, I think we can keep one common Java-Tool. But i don't know the syntax of the linux command lines...
see here

Code: Select all

       public class OSValidator {

    private static String OS = System.getProperty("os.name").toLowerCase();

    public static void main(String[] args) {

        System.out.println(OS);

        if (isWindows()) {
            System.out.println("This is Windows");
        } else if (isMac()) {
            System.out.println("This is Mac");
        } else if (isUnix()) {
            System.out.println("This is Unix or Linux");
        } else if (isSolaris()) {
            System.out.println("This is Solaris");
        } else {
            System.out.println("Your OS is not support!!");
        }
    }

    public static boolean isWindows() {
        return (OS.indexOf("win") >= 0);
    }

    public static boolean isMac() {
        return (OS.indexOf("mac") >= 0);
    }

    public static boolean isUnix() {
        return (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 );
    }

    public static boolean isSolaris() {
        return (OS.indexOf("sunos") >= 0);
    }
    public static String getOS(){
        if (isWindows()) {
            return "win";
        } else if (isMac()) {
            return "osx";
        } else if (isUnix()) {
            return "uni";
        } else if (isSolaris()) {
            return "sol";
        } else {
            return "err";
        }
    }

}
I just added the basic functionality of operating system detection to the source code of the Java tool, we have to add the linux commands...

regards
stancecoke
Last edited by stancecoke on Dec 22, 2017 10:51 am, edited 2 times in total.

Post Reply