Page 146 of 161

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

Posted: Jul 30 2019 3:17am
by stancecoke
flangefrog wrote:
Jul 30 2019 2:56am
Currently to connect you just click the Bluetooth icon on the header (ux could be better). You should see a Bluetooth device chooser dialog.
Hm, that only works on my newest android tablet. With my older android mobile and on IPhone and Windows10 it doesn't work.

Perhaps you can write a small tutorial, how to make it work offline?!

Regards
stancecoke

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

Posted: Jul 30 2019 4:05am
by flangefrog
As per https://github.com/WebBluetoothCG/web-b ... -status.md
The Windows implementation is available in Chrome 70.0.3526.0 and requires Windows 10 version 1703 (Creators Update).
Android: Requires Android 6.0 Marshmallow or later.
WebBLE is an app for iOS that supports the GATT Communication API
See also https://caniuse.com/#search=web%20bluetooth

You can also use Chromium or Opera on Windows. Of course the PC will need to support Bluetooth LE. Most Bluetooth 4/5 adaptors are dual mode and support LE. Or you can buy one of these: https://www.ebay.com/itm/Mini-USB-Bluet ... 2848510670

On Android you need Opera Mobile, Samsung Internet, Android Browser or Chrome. Make sure you use the browser and the link isn't opening inside an app like Gmail for example, as that will use the WebView where Web Bluetooth isn't yet supported.

On iOS webBLE is a browser that implements the Web Bluetooth API as the iOS WKWebView component used by Chrome doesn't yet support it.

There are already thousands of tutorials on how to use Service Workers. You generally use them as a proxy and supply resources from a local cache rather than a remote server.
https://css-tricks.com/serviceworker-for-offline/
https://developers.google.com/web/funda ... s/offline/
https://developer.mozilla.org/en-US/doc ... ce_workers

I'll add offline support when I have some time.

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

Posted: Jul 30 2019 4:31am
by stancecoke
flangefrog wrote:
Jul 30 2019 4:05am
I'll add offline support when I have some time.
Hm, I think this will be necessary. I am already very IT-affine, but such headstands to get an app running offline is not a good prerequisite for a wide use of such applications...

regards
stancecoke

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

Posted: Aug 02 2019 7:03am
by qwerkus
Hi, anyone working on making the sw102 display compatible with the kt open source firmware ? Lot of useful infos here: https://github.com/OpenSource-EBike-fir ... -LCD-SW102
I'd join the effort but my knowledge is not deep enough to do everything by myself.

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

Posted: Aug 02 2019 11:36am
by stancecoke
Sorry, but both of the main developers don't like any display. (Xnyle prefers his BlueOsec App for the android cell phone, I prefer to have no device at my handlebar at all :wink: )

Of course everbody is invited to implement the stock Bafang-protocol to our firmware. I think it could be done by copy and paste from the "Forumscontroller" code. As long as there is no possibility to flash the sw102 without destroying the housing, a custom firmware for the display is no alternative...

regards
stancecoke

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

Posted: Aug 02 2019 1:40pm
by qwerkus
stancecoke wrote:
Aug 02 2019 11:36am
Sorry, but both of the main developers don't like any display. (Xnyle prefers his BlueOsec App for the android cell phone, I prefer to have no device at my handlebar at all :wink: )
Cool! I get that there is no need for all the hype stuff, bu how do you check batt level and how do you control power / temperature to make sure it doesn't overheat ?
stancecoke wrote:
Aug 02 2019 11:36am
Of course everbody is invited to implement the stock Bafang-protocol to our firmware. I think it could be done by copy and paste from the "Forumscontroller" code. As long as there is no possibility to flash the sw102 without destroying the housing, a custom firmware for the display is no alternative...
Ok, thanks for the heads up.

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

Posted: Aug 03 2019 2:53am
by stancecoke
qwerkus wrote:
Aug 02 2019 1:40pm
how do you check batt level and how do you control power / temperature to make sure it doesn't overheat ?
I know quite exactly, how far I can ride with a fully charged battery. I use the motor only for commuting, not for trips in the mountains. The power is controlled by my legs, I have a torque- and cadence-sensor installed. Overheat is no problem with 10 amps maximum current and no long/steep inclines.

regards
stancecoke

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

Posted: Aug 03 2019 10:27am
by fi7ippo
FedeleC wrote:
May 26 2019 11:07am

I want to investigate on my thought that in some situations (hilly journeys), the power saved by auto shift (letting the driver legs/motor work with the most adequate gear) is more than the power consumption of this sub-system.


So, I rerouted/created some input/output of my KT36/48SVPR-HRD01:
  • Rearranged some wires to power the Sempu T2 @ 36 V
  • Draw current directly from Vbat +36V pad to a DC/DC Step Down Converter to 6,8V, to power the servo. I reached to connect and enclose it inside the controller box
  • Attached Servo signal output to a pad connected (via a 2,2K resistor) to PIN 43 of STM8S: I want try to use it as a PWM output of Timer 3, not used yet by OSEC, @ about 50 Hz. I've to check if i'll need to short circuit the 2,2 K resistor, I hope not :wink:
  • Attached a passive buzzer output to a pad connected (via 2,2 K resistor, again) to PIN 45: it would be sooo nice to notice the driver of an imminent gear shift...This PIN has to be reconfigured with the STM8 S Option byte to work as a Beep source.
After finishing optimizing the OSEC to my motor (it worked at first start!), next days I'll work on FW to create the automatic gear shift function: altough I'm not a programmer I have a past experience in motor controllers...so let's try! :D
Hi FedeleC, I'm very interested to Your project! Do You make any progress?

I don't know if putting the servo on the derailleur is the best thing because of its weight on the gearbox. It would probably be easier to use with any derailleur if it operated the stock cable (much shorter, since the servo can be put on the dropout).
But the principle is the same.
I'm dreaming of connecting a bluetooth remote control for the gears to the SW102 display and controlling the derailleur with the KT or TSDZ2 controller (but I don't think there is a pwm free output on this), so we can no authorise gear change if cadence < 10, or pedal torque > 30Nm, automatic gear change, and a lot of more stuff ...

Thanks You!

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

Posted: Aug 06 2019 1:35am
by haiyi911
Hi,
When I start to ride under PAS mode, the motor works intermittently, with a creaking sound. Yet when I speed the pedaling up, the abnomal sound disappear and it goes smoothly.Do I have to worry about parameters?
PAS magnets:5
timeout:3125
ramp end :1500 or 18750(10rpm)
ramp start:64000
pas threshold:1.1
Thanks in advance.

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

Posted: Aug 06 2019 2:34am
by stancecoke
haiyi911 wrote:
Aug 06 2019 1:35am
When I start to ride under PAS mode, the motor works intermittently, with a creaking sound.
Ramp start bigger than timeout makes no sense.
Use a PAS with more magnets and /or increase timeout.

regards
stancecoke

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

Posted: Aug 06 2019 3:24am
by haiyi911
ok, i have to try it.

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

Posted: Aug 15 2019 3:50pm
by redmouse
Good day folks,
would anyone advise which pins on my controller are used for programming?
Mine is 18-fet and the board looks different than the example controller.
Or can I straight up use the display cables for programming?

here's pictures of my controller:
https://imgur.com/a/w2XMfQr

And in case anyone can help with my cutting out problem: viewtopic.php?f=30&t=101681

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

Posted: Aug 20 2019 3:23am
by tolkaNo
Do you guys know if the KT-LCD8 display's will work on non KT controllers? Obviously i won't have any programming features but i should still be able to get voltage and speed readout assuming one of the wires from the display is for hall's

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

Posted: Aug 25 2019 10:55am
by Xnyle
It isn't, its a very minimalistic (1980s style) digital protocol via UART. IIRC even the voltage reading is not being measured directly by the display.

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

Posted: Aug 26 2019 5:52am
by csbike
sorry for my newbie question. I just got my stlinkv2 and I would like to flash the firmware from MacOSX.
openOCD seems to work, but I cannot find scripts for stm8, only stm32. Is this normal?
Otherwise there seems to be stm8flash. I haven't tried it yet. Does it require openocd? Or is it standalone?

thanks

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

Posted: Aug 27 2019 2:37am
by stancecoke
csbike wrote:
Aug 26 2019 5:52am
Does it require openocd?
openocd is only needed for debugging.

regards
stancecoke

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

Posted: Aug 27 2019 4:55am
by csbike
stancecoke wrote:
Aug 27 2019 2:37am
csbike wrote:
Aug 26 2019 5:52am
Does it require openocd?
openocd is only needed for debugging.

regards
stancecoke
thanks, but from what I understood, you can also flash using openocd. Or am I wrong?
Also where do I get the stm8 files I need as they are not in the official openocd directory. I found this openOCD clone (https://github.com/ntfreak/openocd/tree ... tcl/target). Is this where you guys get them? Should I install the clone, or just copy over the missing scripts?

thanks

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

Posted: Sep 04 2019 9:34pm
by Aquakitty
Hi, using this firmware, can I reprogram my 12 mosfet controller to a lesser amperage? I think the version I purchased is too much for my battery, but not entirely clear yet on why. Like could I limit it using the amperage setting to 20 amps?

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

Posted: Sep 05 2019 9:39am
by geofft
Aquakitty wrote:
Sep 04 2019 9:34pm
Hi, using this firmware, can I reprogram my 12 mosfet controller to a lesser amperage? I think the version I purchased is too much for my battery, but not entirely clear yet on why. Like could I limit it using the amperage setting to 20 amps?
As long as your controller is a suitable type for the firmware you can configure limits in both battery and motor phase current. Have a read through the guide here:-

https://github.com/stancecoke/BMSBatter ... mware/wiki

...you'll find all the info you need there.

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

Posted: Sep 08 2019 12:47pm
by Powerhour
Thanks for all the time spent on this

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

Posted: Sep 09 2019 2:41am
by cnrd
Hi

So before I order, is this controller compatible? https://s.click.aliexpress.com/e/OD09IRG8

Also I have a KT-LCD3, which currently has the TSDZ2 FW on it, any way to use it with a KT controller on this FW?

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

Posted: Sep 14 2019 1:12pm
by Powerhour
This awesome new color lcd states that it has the communication protocol supporting the tongsheng controller.. could the firmware be loaded onto one of these?

C$ 109.95 | colored TFT LCD display 24v36v48v52v60v72v 3.5 inch IPS screen vertical/horizontal middle type+controller electric bike parts
https://s.click.aliexpress.com/e/BPA08yFI

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

Posted: Sep 15 2019 2:50am
by geofft
Powerhour wrote:
Sep 14 2019 1:12pm
This awesome new color lcd states that it has the communication protocol supporting the tongsheng controller.. could the firmware be loaded onto one of these?
The o/s firmware is actually loaded into the controller not the display. The display you mention isn't supported by the fw and even if the comms protocol was similar you would probably have some other issues. Best to stick with a supported display, the lcd3 is the obvious choice here.

I see from other threads you are keen to use a torquesensor, I'm using the Sempu T4 t/s with this firmware and can confirm it works well with Stancecoke's branch. Be aware though that setting up the hardware and fw to get everything working well takes some time and patience, this is not a plug and play solution. Also developement of the fw seems to have pretty much finished and it can sometimes be difficult nowadays to get help when you run into trouble, however the wiki contains lots of good info.

In your situation I would be taking a long hard look at the TSDZ2..... :wink:

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

Posted: Sep 15 2019 4:46am
by casainho
geofft wrote:
Sep 15 2019 2:50am
Powerhour wrote:
Sep 14 2019 1:12pm
This awesome new color lcd states that it has the communication protocol supporting the tongsheng controller.. could the firmware be loaded onto one of these?
The o/s firmware is actually loaded into the controller not the display. The display you mention isn't supported by the fw and even if the comms protocol was similar you would probably have some other issues. Best to stick with a supported display, the lcd3 is the obvious choice here.

I see from other threads you are keen to use a torquesensor, I'm using the Sempu T4 t/s with this firmware and can confirm it works well with Stancecoke's branch. Be aware though that setting up the hardware and fw to get everything working well takes some time and patience, this is not a plug and play solution. Also developement of the fw seems to have pretty much finished and it can sometimes be difficult nowadays to get help when you run into trouble, however the wiki contains lots of good info.

In your situation I would be taking a long hard look at the TSDZ2..... :wink:
I hope someday to use the 3kw Bafang BBSHD mid drive motor drive (for my future cargobikes when I will have baby) with KT motor controller and this firmware, then, I will want to add support for the 850C and SW102 as on the TSDZ2 firmware.

The Bafang BBSHD, we can't simple develop firmware for it, so, must be with an external controller.

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

Posted: Sep 15 2019 6:56am
by geofft
casainho wrote:
Sep 15 2019 4:46am

I hope someday to use the 3kw Bafang BBSHD mid drive motor drive (for my future cargobikes when I will have baby) with KT motor controller and this firmware, then, I will want to add support for the 850C and SW102 as on the TSDZ2 firmware.

The Bafang BBSHD, we can't simple develop firmware for it, so, must be with an external controller.
...as discussed elsewhere, the torquesensor is the key to turning the BBS02/HD into the brilliant drive that it could be. Hopefully a solution that fits the bill will come along, I'm keeping an eye out for possibilities. I might see if I can get a pair of those pedal pressure sensors to work with the existing KT fw, it would be interesting to see how they perform...