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: 1119
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 6:44 am

stancecoke wrote: That should be easy to solve in Java,
We would need to use an IDE that also works on Linux, there should be for sure some that also is easy to put the UI widjets visually. Also I think you are not sharing the project file for the IDE you are using.
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

User avatar
stancecoke
1 kW
1 kW
Posts: 400
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 6:56 am

casainho wrote:
Dec 22, 2017 6:44 am
We would need to use an IDE that also works on Linux, there should be for sure some that also is easy to put the UI widjets visually. Also I think you are not sharing the project file for the IDE you are using.
Eclipse for Java developers will run on Linux of course?! The java code should work with it without problems...
see this post:
https://endless-sphere.com/forums/viewt ... 9#p1341649

You should open the OCEC.java with the WindowBuilder Editor. Then you can edit the graphic interface by drag and drop.

regards
stancecoke
Java_Windowbuilder.png
Java_Windowbuilder.png (56.63 KiB) Viewed 425 times
Design tab.png
Design tab.png (26.45 KiB) Viewed 419 times
Design Window.png
Design Window.png (119.3 KiB) Viewed 421 times

casainho
100 kW
100 kW
Posts: 1119
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 11:57 am

stancecoke wrote:
Dec 22, 2017 6:56 am
You should open the OCEC.java with the WindowBuilder Editor. Then you can edit the graphic interface by drag and drop.
Go it thanks.

Do you plan an improvement to the tool? Because I think would be better to have the options grouped in sections, as I did on config-example:
1. THROOTLE options
2. PAS options
3. LCD options
4. BATTERY options
5. MOTOR options
6. MOTOR CONTROLLER options

Also, things like on MOTOR CONTROLLER: ADC_MOTOR_CURRENT_MAX that each unit is 0.5A, the user could put the motor current value in amps and the tool in background would validate the input and multiply *2 to get the ADC motor current value. Well, but I must say this would be a lot of work!! That is an idea but I guess our users don't really need this level of detail.
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

User avatar
stancecoke
1 kW
1 kW
Posts: 400
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 12:41 pm

casainho wrote:
Dec 22, 2017 11:57 am
Do you plan an improvement to the tool?
To be honest, I'm already working on my next project. But once you have managed to edit the tool for the Linux implementation, you can bundle the parameters easily in the way you like, just by dragging the items with the mouse.
You have to choose file-->export-->as runnable jar for building the executable jar-file.

I can add the few command lines for Linux, if you tell me the syntax. This will take just a few minutes.

regards
stancecoke

casainho
100 kW
100 kW
Posts: 1119
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 23, 2017 9:06 am

stancecoke wrote:
Dec 22, 2017 12:41 pm
casainho wrote:
Dec 22, 2017 11:57 am
Do you plan an improvement to the tool?
To be honest, I'm already working on my next project. But once you have managed to edit the tool for the Linux implementation, you can bundle the parameters easily in the way you like, just by dragging the items with the mouse.
You have to choose file-->export-->as runnable jar for building the executable jar-file.

I can add the few command lines for Linux, if you tell me the syntax. This will take just a few minutes.
I am also starting on another project, but something not about EBikes nor with potential for a community. But I will keep investing on this project, as I should start 2018 working for a that German company that is developing technology and products for electric micromobility, where EBikes are relevant as also the motor control technology - I mean that the knowledge I get by working on this project, will bring value to me as a professional:

So, I am thinking in reverse the order/priority of documentation, with focus for user and main page to be:
1. about the controllers and our flexible OpenSource firmware
2. install firmware
3. EBike example (Q85 + S06S + 24V battery + torque sensor)
4. development

4. development will be in a separated folder, just like Windows instructions are now, so the main documentation focus is just for users
2. install firmware will be on the main documentation: would need to move your Windows instructions to CherryTree, I can do that
3. is where I would like to document, with pictures and text, each part (just for that example and for our firmware) we can buy from BMSBattery and the wirings including the install on the bike, as I think BMSBattery site lacks this valuable information.

Maybe I will focus later on the Java tool...
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

geofft
10 W
10 W
Posts: 96
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 23, 2017 10:39 am

Apologies for my lack of feedback on the 'Master branch' but it looks like I've got a dead test controller, appears to program ok but no response from motor with either throttle or pas input. Had some issues when testing the Torque Simulation branch, I guess the damage happened here.

I've ordered a replacement but it will obviously be a couple of weeks or so before I get to try this again, will feedback then.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48 20amp, LCD3, 48v 12s lipo.

casainho
100 kW
100 kW
Posts: 1119
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 23, 2017 10:51 am

geofft wrote:
Dec 23, 2017 10:39 am
Apologies for my lack of feedback on the 'Master branch' but it looks like I've got a dead test controller, appears to program ok but no response from motor with either throttle or pas input. Had some issues when testing the Torque Simulation branch, I guess the damage happened here.

I've ordered a replacement but it will obviously be a couple of weeks or so before I get to try this again, will feedback then.
When I burned my controllers, I generally got 2 things:
1. power mosfets in shortcircuit and the battery pack BMS will quick disable the controller when turn it on, due to the high current asked from the short circuit
2. power mosfets (or the power mosfet drivers) open and will never close as commanded by the firmware, this will mean motor will never rotate nor ask current from the battery

Seems you have 2. At least you can program and test that process :-)

Can you please confirm that LCD works?? You can look at it and see if throttle symbol works when you use throttle. The same for the brakes.
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

geofft
10 W
10 W
Posts: 96
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 23, 2017 11:21 am

I've now removed the test controller but here is what I can tell you:-

I've done a (very) quick dc check on the mosfets, they *look* ok

lcd works but the brake symbol (and others inputs) were not indicating any response, so it seems something fundamental is wrong.

With the controller powered the LM317 v. reg was getting hot rather quickly (v. output ok), this may be normal? I'm not sure.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48 20amp, LCD3, 48v 12s lipo.

User avatar
stancecoke
1 kW
1 kW
Posts: 400
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 23, 2017 11:30 am

geofft wrote:
Dec 23, 2017 10:39 am
it looks like I've got a dead test controller
Have you retested it with a formerly working setup, e.g. torque-simulation fork with simple throttle?

regards
stancecoke

geofft
10 W
10 W
Posts: 96
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 23, 2017 11:34 am

Yes, that also was not working.

It's a bit of a puzzle, it points towards the mosfet drivers as these could be loading the LM317 output voltage but you would expect phases that were still working to pulse the motor.

I'll know for sure where the trouble is when I get the replacement controller, fortunately these things are cheap enough that you don't lose sleep if you pop one.
Last edited by geofft on Dec 23, 2017 11:43 am, edited 1 time in total.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48 20amp, LCD3, 48v 12s lipo.

casainho
100 kW
100 kW
Posts: 1119
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 23, 2017 11:40 am

geofft wrote:
Dec 23, 2017 11:21 am
lcd works but the brake symbol (and others inputs) were not indicating any response, so it seems something fundamental is wrong.

With the controller powered the LM317 v. reg was getting hot rather quickly (v. output ok), this may be normal? I'm not sure.
When I got that symptoms, it was because I wired incorrectly some wires like brakes, like doing a short circuit or something because I wired the 5V pin wrongly.

I suggest for you to connect only the LCD for testing and make sure it wire it correctly.

Maybe your controller is ok :-)
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

geofft
10 W
10 W
Posts: 96
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 23, 2017 11:49 am

I did double check all the connectors, pretty sure this was ok, now working fine with 'stock' controller re-connected. I'll maybe give it another try later next week, I guess we've all got other things to worry about for the next few days.

Enjoy your Christmas.

Geoff.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48 20amp, LCD3, 48v 12s lipo.

User avatar
stancecoke
1 kW
1 kW
Posts: 400
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 23, 2017 12:05 pm

casainho wrote:
Dec 23, 2017 9:06 am
I should start 2018 working for a that German company
Congratulations! Where is the company seated in Germany?

Regards
stancecoke

casainho
100 kW
100 kW
Posts: 1119
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 23, 2017 1:12 pm

geofft wrote:
Dec 23, 2017 11:49 am
I did double check all the connectors, pretty sure this was ok, now working fine with 'stock' controller re-connected. I'll maybe give it another try later next week, I guess we've all got other things to worry about for the next few days.

Enjoy your Christmas.
Maybe the burn part is something on the 5V line...
If LCD don't show throttle signal or brake, probably the microcontroller is not sending data do the LCD. LCD works just by having his supply voltage, but features like wheel speed should be zero.

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

casainho
100 kW
100 kW
Posts: 1119
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 23, 2017 1:17 pm

stancecoke wrote:
Dec 23, 2017 12:05 pm
Congratulations! Where is the company seated in Germany?
I can't give more details now -- I will be very happy to give all the details when it is official and that should happen up to the end of next week. A company that develops high technology for EBikes and electric micromobility!! A kind of a dream for me.
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

casainho
100 kW
100 kW
Posts: 1119
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 23, 2017 2:38 pm

Just updated the documentation, now just focus on user.
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

User avatar
stancecoke
1 kW
1 kW
Posts: 400
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 24, 2017 4:24 am

casainho wrote:
Dec 23, 2017 2:38 pm
Just updated the documentation, now just focus on user.
That's really an improvement, thank you! I hope we can win some more beta-users of our firmware with this. Perhaps you can use the "FLEXIBLE OPENSOURCE FIRMWARE" page as the main link in your signature and in the post #1 of this thread, instaead of just the index with a blank page.
geofft wrote:
Dec 23, 2017 11:21 am
With the controller powered the LM317 v. reg was getting hot rather quickly (v. output ok), this may be normal? I'm not sure.
The voltage regulator gets quite hot, thats normal. Have you checked if there are 5V on the red wires of the Brake-/Throttle-/PAS connectors?
It would be very strange, if you killed something in the peripheral 5V-components on the PCB by the firmware-settings.

Perhaps you can send the defective controller to casainho or me for diagnostics.

Merry Christmas!

regards
stancecoke

geofft
10 W
10 W
Posts: 96
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 24, 2017 5:37 am

The voltage regulator gets quite hot, thats normal. Have you checked if there are 5V on the red wires of the Brake-/Throttle-/PAS connectors?
It would be very strange, if you killed something in the peripheral 5V-components on the PCB by the firmware-settings.
The v. reg is too hot to touch after around 2 minutes - is that ok?

Yes, the 5v is present at all these points.

I think I may have made a stupid mistake with my st-link connector. I used a jst-sh connector (single row) to fit into the st link, completely forgetting that the pins were open to one side of the connector. These were probably touching the other row of pins putting RST-SWCLK and SWIM-SWDIO. I guess this must have been affecting programming and may have damaged the st-link.. :oops: Have now ordered another st-link just in case.

Thanks for your offer to diagnose but I won't trouble you guys with this, you've been enough help already. Like we said these things are cheap enough to not worry too much.

Happy Christmas.
Geoff.

Edit to add: When I initially programmed the Torque Sim. branch (which worked ok) I was using the jumper set supplied with the st-link, not my wonder cable. This is the only difference to my hardware so looks very possible for the cause of my problem.
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48 20amp, LCD3, 48v 12s lipo.

casainho
100 kW
100 kW
Posts: 1119
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 24, 2017 6:34 am

stancecoke wrote:
Dec 24, 2017 4:24 am
casainho wrote:
Dec 23, 2017 2:38 pm
Just updated the documentation, now just focus on user.
That's really an improvement, thank you! I hope we can win some more beta-users of our firmware with this. Perhaps you can use the "FLEXIBLE OPENSOURCE FIRMWARE" page as the main link in your signature and in the post #1 of this thread, instaead of just the index with a blank page.
Just overwrite index.html with FLEXIBLE_OPENSOURCE_FIRMWARE.html and works well.

Also added "CHOOSE MOTOR CONTROLLER" to say what motor controllers works and give links to the shops.
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

casainho
100 kW
100 kW
Posts: 1119
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 24, 2017 9:31 am

I took some pictures of Bluetooth module: https://opensourceebikefirmware.bitbuck ... etooh.html

Stancecoke, do you think is similar to the ones you know? Do you think this one also turns on/off the controller like the LCD?

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

User avatar
stancecoke
1 kW
1 kW
Posts: 400
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 25, 2017 5:45 am

There is a clone of the standard HM-10 BLE modules on the left side. Can you identify any printing on the further components on the right side? I think the bigger thing will be the voltage regulator for the HM-10, but it could be the high-side switch also (is it a SOT-223 package with 6.5mm width?)
Can you find the pad where the blue wire pad is connected to? Can you disassemble the PCB from the housing, to see what's on the back side?

regards
stancecoke

casainho
100 kW
100 kW
Posts: 1119
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 25, 2017 6:07 am

stancecoke wrote:
Dec 25, 2017 5:45 am
There is a clone of the standard HM-10 BLE modules on the left side. Can you identify any printing on the further components on the right side? I think the bigger thing will be the voltage regulator for the HM-10, but it could be the high-side switch also (is it a SOT-223 package with 6.5mm width?)
Can you find the pad where the blue wire pad is connected to? Can you disassemble the PCB from the housing, to see what's on the back side?
If the idea is to found if this can turn on/off, then I prefer to wait 2 more weeks when I should receive 2x S06S-BT and then I can try with original firmware and mobile app.

Right now, I am installing NetBeans Java IDE. I tried some hours with Eclipse and WindowsBuilder but for some reason there are some glitches, maybe is just for me on Ubuntu. Well, I will try with NetBeans... the options I put on the firmware are really very few, should not take much time to do from the start the Java tool e reuse the code you did.
Developer of the Flexible OpenSource firmware for EBike motor controllers: https://opensourceebikefirmware.bitbucket.io/

User avatar
stancecoke
1 kW
1 kW
Posts: 400
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 25, 2017 12:40 pm

casainho wrote:
Dec 25, 2017 6:07 am
I tried some hours with Eclipse and WindowsBuilder but for some reason there are some glitches,
Strange, I just tried it on ubuntu and it worked with the first try (there was an error message, but it worked nevertheless).The config.h was built correctly, of course nothing else happend as the linux commands for compiling and flashing aren't implemented yet. I've uploaded the whole project folder as a zip-archive to the github tools folder. Perhaps you can try to import the project to eclipse.

regards
stancecoke
Bildschirmfoto von »2017-12-25 18-36-42«.png

casainho
100 kW
100 kW
Posts: 1119
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 25, 2017 12:52 pm

stancecoke wrote:
Dec 25, 2017 12:40 pm
Strange, I just tried it on ubuntu and it worked with the first try (there was an error message, but it worked nevertheless). I've uploaded the whole project folder as a zip-archive to the github tools folder. Perhaps you can try to import the project to eclipse.
Thanks but I am going well with NetBeans and is an opportunity to redesign. I want to organize the fields on that logic blocks. And maybe I will put the notes as a text label and not as a tooltip (maybe).

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


Post Reply