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

Electric Motors and Controllers
honya96   1 kW

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

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

Post by honya96 » Feb 28 2018 3:59am

casainho wrote:
Feb 28 2018 12:02am
For now, the only thing I miss from geared motor is the no vibrations -- this direct drive motor vibrates and I fell it, much better if they didn't exist like on geared motor.
With high end controllers those vibrations doesnt exist and there is no resistance of the motor (you cant tell if controller is on or off) you cant guess by sound if you have throttle aplied or not, complete silence.

I have not tested yet after the last changes made but I was able to get it running kind of.

With 6 fet ok, with 18fet there is a kick when switching from 60 to 360° and when switching back to 60 at low rpm it spins faster for a while after the switch. (Without any throttle)

Tested same settings on both and also tried to compensate for different snesor. 18fet's phase hall sensor has 2.5v at zero current, but 6 fet has the one you said is 2V (not tested)

User avatar
stancecoke   10 kW

10 kW
Posts: 896
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » Feb 28 2018 5:53am

honya96 wrote:
Feb 28 2018 3:59am
Tested same settings on both and also tried to compensate for different snesor. 18fet's phase hall sensor has 2.5v at zero current, but 6 fet has the one you said is 2V (not tested)
@casainho: Where do you get this information from? From my experience and from internet informations the ACS712 has an output of 2.5V @Vcc=5V also....

regards
stancecoke

casainho   100 MW

100 MW
Posts: 2679
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Feb 28 2018 6:30am

stancecoke wrote:
Feb 28 2018 5:53am
honya96 wrote:
Feb 28 2018 3:59am
Tested same settings on both and also tried to compensate for different snesor. 18fet's phase hall sensor has 2.5v at zero current, but 6 fet has the one you said is 2V (not tested)
@casainho: Where do you get this information from? From my experience and from internet informations the ACS712 has an output of 2.5V @Vcc=5V also....
I did measure with oscilloscope, I was looking at the phase current to measure the peak values and compare with valuea measured on shunt. I need to measure again and see!!!
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, you can 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: 2679
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Feb 28 2018 6:42am

honya96 wrote:
Feb 28 2018 3:59am
casainho wrote:
Feb 28 2018 12:02am
For now, the only thing I miss from geared motor is the no vibrations -- this direct drive motor vibrates and I fell it, much better if they didn't exist like on geared motor.
With high end controllers those vibrations doesnt exist and there is no resistance of the motor (you cant tell if controller is on or off) you cant guess by sound if you have throttle aplied or not, complete silence.
Thanks for the feedback. Maybe something is not correct... I hope we will understand what with time.

A friend that repairs electric bicycles and motor cycles, told me what Stancecoke also told recently - some motor cycle controllers, do regen a bit when user apply throttle and the motorcycle is moving, and I think we can do that with our hardware.
The thing is, if we release the motor phases then we don't have regen. Would you prefer to have no regen while riding an ebike?? Well, for motorcycles, my friend told me it can be like when user releases the throttle, it open motor phases and when user then apply regen, it starts regen -- maybe you are riding more like a motorcycle.
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, you can consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

Gaston   1 µW

1 µW
Posts: 4
Joined: Feb 26 2018 7:59am
Location: POLAND

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

Post by Gaston » Feb 28 2018 8:24am

If I can add my 2 cents about Regen, bicycle can have their direct drive motor on front, motorcycle only on the rear, and motorcycle use Twist Throttle that you modulate perpetually. So about stability & Regen point of view, we cannot compare the two.
On top scooter or motorcycle are heavy and stable: you can lock the front brake and not fall, bicycle less likely.

This to say Regen should have variable force and be on demand, with an intuitive variable command.
This kind of command is obvious on Car and Motorcycle (where you espect anyway a natural 'slowdown' effect with their gas engine), less on Bicycle.

I sometime use the rear brake to stabilize my bicycle (going really downhill for example, or now on the ice) and would not wand an aggressive Regen, or any Regen, at that moment,
but going too fast before a stop yes please.
Last, it would be a pain if it slow you down every second you stop pedalling !

This is why pedalling backward seems so great and safe, it gives the control of when and how hard to Regen, with an intuitive command. If you have a direct drive motor, this feature is giving a very unique reason to try your Firmware ;-)

casainho   100 MW

100 MW
Posts: 2679
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Feb 28 2018 8:50am

Gaston wrote:
Feb 28 2018 8:24am
Regen, or any Regen, at that moment,
but going too fast before a stop yes please.
Last, it would be a pain if it slow you down every second you stop pedalling !

This is why pedalling backward seems so great and safe, it gives the control of when and how hard to Regen, with an intuitive command. If you have a direct drive motor, this feature is giving a very unique reason to try your Firmware ;-)
My experience with ebrake by pedaling backwards is that is really useful and fun before a stop.

Current code has a small delay, like a buffer (on the PI controller I term, that slows down a bit the response of throttle. Also the regen current is configured to be 0 while running and is set to max while braking and will have a specific value by pedaling backwards. So, even with throttle 0, should not slow down -- at least I didn't feel slow downs yesterday.

Are you aware that you will have to use torque sensor and modding it with a PAS to get that feature you like?? https://opensourceebikefirmware.bitbuck ... rakes.html
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, you can 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: 896
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » Feb 28 2018 10:04am

casainho wrote:
Feb 28 2018 8:50am

Are you aware that you will have to use torque sensor and modding it with a PAS to get that feature you like??
You don't have to add an additional PAS, you just have to solder the yellow wire of the torque-sensor to one of the PAS-Halls directly...
Torque Sensor Hall mod.jpg
Torque Sensor Hall mod.jpg (151.3 KiB) Viewed 846 times

Why do you have to use the torque sensor? A "normal" PAS should work also?!

regards
stancecoke

honya96   1 kW

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

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

Post by honya96 » Feb 28 2018 10:54am

Gaston wrote:
Feb 28 2018 8:24am
This to say Regen should have variable force and be on demand, with an intuitive variable command.
This kind of command is obvious on Car and Motorcycle (where you espect anyway a natural 'slowdown' effect with their gas engine), less on Bicycle.
Backwards pedaling is not the only way of variable regen, you can mod the brake lever as Stancecoke posted few months back or use another throttle (thumb or half twist) on left side. But its working only with Stancecoke's fw now.

Anyway, I have to say that backwars padaling regen is easiest (no modifications) if it will work with PAS only. Also maybe a good idea to make it activated only by brake lever sensor+backwards pedal

Thumb or lever variable regen can be as responsive as clasic brakes.

Most users have motor on rear wheel

honya96   1 kW

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

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

Post by honya96 » Feb 28 2018 11:09am

casainho wrote:
Feb 28 2018 6:42am
A friend that repairs electric bicycles and motor cycles, told me what Stancecoke also told recently - some motor cycle controllers, do regen a bit when user apply throttle and the motorcycle is moving, and I think we can do that with our hardware.
The thing is, if we release the motor phases then we don't have regen. Would you prefer to have no regen while riding an ebike?? Well, for motorcycles, my friend told me it can be like when user releases the throttle, it open motor phases and when user then apply regen, it starts regen -- maybe you are riding more like a motorcycle.
I have that "bit" of regen while aplying throttle with stock fw and really dont like that, so if we are able to set the zero current that well so we will not feel resistance, then I would prefer this.

But I think its possible to release phases and when you add throttle or regen - it reactivates them with the zero current (it knows rpm from halls so it should be able to guess?) And as fast as posible when it gest enough feedback from phases it reacts to throttle/regen

All above as fast so you cant see a delay compared to as it is now.

I ride more like a motorcycle, thats true. It may not be that important for you guys.

But the controller/fw has a potencial to be used on road legal small motorcycles :)

casainho   100 MW

100 MW
Posts: 2679
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Feb 28 2018 1:28pm

ALERT!!

ADC_MOTOR_REGEN_CURRENT_MAX and ADC_BATTERY_REGEN_CURRENT_MAX, any of the them CAN'T be more than 66 units!! Other way motor will start and go to max speed!!!

This a limitation of the hardware. I was using like 120 units and that did overflow to about 200, because there is a subtraction:

Code: Select all

ui8_adc_target_motor_regen_current_max = ui8_adc_motor_current_offset - ui8_value;
ui8_adc_motor_current_offset is about 75 on my S12S. So 66 seems to be a safe value.
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, you can 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: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

Post by honya96 » Feb 28 2018 4:19pm

After the last changes the switch from 60 to 360° interpolation works, so I cant even tell when it switches. Works really good.

I tested a lot on table and all the limitings are doing their job with both 6fet and 18fet

Interesting find - I tried setting rotor angle to where it shows lowest noload battery amp draw. (With interpolation switch at 200 so it never switches) and I found that for the test motor 218-219 shows almost the same current, 217 takes more, but 220+ seems like hiting some limit at high rpm, starts cutting like 2 times a second. It can't be max erps!

Is this the right way to set it or I will find lower value better at real ride?

casainho   100 MW

100 MW
Posts: 2679
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Mar 01 2018 4:35am

stancecoke wrote:
Feb 28 2018 10:04am
You don't have to add an additional PAS, you just have to solder the yellow wire of the torque-sensor to one of the PAS-Halls directly...
Thanks for the info.
But, you mean adding an extra cable to carry the PAS-Halls signal directly?
stancecoke wrote:
Feb 28 2018 10:04am
Why do you have to use the torque sensor? A "normal" PAS should work also?!
Because I implemented for torque sensor. To be clear, I am implementing for my needs and I hope you guys don't expect that I will implement all ideas/features. And that is because I don't have much free time nor resources.
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, you can 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: 2679
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Mar 01 2018 7:46am

honya96 wrote:
Feb 28 2018 4:19pm
After the last changes the switch from 60 to 360° interpolation works, so I cant even tell when it switches. Works really good.

I tested a lot on table and all the limitings are doing their job with both 6fet and 18fet

Interesting find - I tried setting rotor angle to where it shows lowest noload battery amp draw. (With interpolation switch at 200 so it never switches) and I found that for the test motor 218-219 shows almost the same current, 217 takes more, but 220+ seems like hiting some limit at high rpm, starts cutting like 2 times a second. It can't be max erps!

Is this the right way to set it or I will find lower value better at real ride?
I just know that this ways:
- https://opensourceebikefirmware.bitbuck ... hunt).html
- // This value can be tested with motor running at medium speed, where it is already running with sinewave interpolation (not at startup)
// A way to test: put the motor with the same mechanical load (like on a bike training roller) and with a constant speed
// changing this value will make the motor to need more or less current to mantain the same speed -- adjust to use the least current possible
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, you can 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: 2679
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Mar 01 2018 11:02am

Got the ebrake working by pedaling backards, using the torque sensor I modded as shown here: https://opensourceebikefirmware.bitbuck ... rakes.html

It is disabled by default on the code but instructions to enable are on config-example.h. The code is on master branch.

So, while riding again, I found that the vibrations happens only at startup or at hills, so, when current is being limited.
I think the firmware on direct drive motors must be better tested and developed -- I hope to do it with time, as my main bicycle has that type of motor.
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, you can 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: 896
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » Mar 01 2018 12:08pm

casainho wrote:
Mar 01 2018 4:35am
But, you mean adding an extra cable to carry the PAS-Halls signal directly?
No, just using the existing yellow wire for the unprocessed PAS signal. I guess, the raw signal is not exactly symmetrical, so the direction detection should work with just one PAS hall.

Image

regards
stancecoke

honya96   1 kW

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

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

Post by honya96 » Mar 02 2018 7:01pm

Guys, I really tried to solve this without bothering you, but I cant get my bike to "soft start"

the smallest amount of power I can get with just slightly added throttle is about 500w. I tried setting like everything in reasonable range at config.h and main.h

I think it may be the problem with jump at interpolation switch point (its back with direct motor) it increases rpm when switching to 360° and also when getting back to 60°without throttle.

But I am not sure, because the start power is same with 60° only.

direct pwm duty cycle starts with extremly low power but then at some point (throttle position/rpm) it adds way too much (my throttle HW is ok)

Can it be still wrong rotor angle?

At main.h
PWM CYCLE MAX 254
PWM CYCLE MIN 20
why is min. 20 and not 1?

casainho   100 MW

100 MW
Posts: 2679
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Mar 02 2018 7:43pm

Please don't enable DO_SINEWAVE_INTERPOLATION_360_DEGREES. I don't use it, only 60 degrees interpolation - I don't know if any motor works well with 360 degrees interpolation... That is experimental.

If you find that thing happens on transition from no interpolation to interpolation 60 degrees, happens that FOC also starts at
// minimum speed to do FOC
if (ui16_motor_speed_erps > MOTOR_ROTOR_ERPS_START_INTERPOLATION_60_DEGREES)

Maybe the angle before FOC and after FOC are very diffetent... Maybe you van also adjust the ERPS at FOC starting....
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, you can 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: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

Post by honya96 » Mar 02 2018 7:56pm

Ok I mean from no interpolatiom to 60.. I tried values from 5 to 300 (300-never switch)

So "FOC" starting and 60° interpolation are 2 different things?

racingame   10 W

10 W
Posts: 95
Joined: Jan 26 2018 9:40am

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

Post by racingame » Mar 02 2018 8:47pm

When I receive the controller, what I have to do to remove the read-only protection using Windows as OS? Also, how can I make a dump of the original firmware written in the ST chip?

casainho   100 MW

100 MW
Posts: 2679
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Mar 03 2018 12:41am

honya96 wrote:
Mar 02 2018 7:56pm
Ok I mean from no interpolatiom to 60.. I tried values from 5 to 300 (300-never switch)

So "FOC" starting and 60° interpolation are 2 different things?
I am almost sure your issue happens because FOC starts and not the interpolation. So, start by disable FOC:
Origonal code:

Code: Select all

// minimum speed to do FOC
    if (ui16_motor_speed_erps > MOTOR_ROTOR_ERPS_START_INTERPOLATION_60_DEGREES)
Change to:

Code: Select all

// minimum speed to do FOC
    if (ui16_motor_speed_erps > 1000)
    {
So, let's see if that issue happens without FOC running.

If so, probably you have a very different start angle from the one FOC setup, hence that big change in speed and current.
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, you can 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: 896
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » Mar 03 2018 3:45am

racingame wrote:
Mar 02 2018 8:47pm
When I receive the controller, what I have to do to remove the read-only protection using Windows as OS? Also, how can I make a dump of the original firmware written in the ST chip?
You can't make a dump, as there is the read/write protection. That's usual to protect the intellectual property of the developer.
You can disable the protection with a click on the button "Write Option Byte" in the java tool. See here.
But with this click, the original firmware is erased and there's no way back to stock firmware.

regards
stancecoke

lizardmech   100 mW

100 mW
Posts: 45
Joined: May 19 2017 4:16am

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

Post by lizardmech » Mar 03 2018 6:17am

honya96 wrote:
Mar 02 2018 7:01pm
Guys, I really tried to solve this without bothering you, but I cant get my bike to "soft start"

the smallest amount of power I can get with just slightly added throttle is about 500w. I tried setting like everything in reasonable range at config.h and main.h

I think it may be the problem with jump at interpolation switch point (its back with direct motor) it increases rpm when switching to 360° and also when getting back to 60°without throttle.

But I am not sure, because the start power is same with 60° only.

direct pwm duty cycle starts with extremly low power but then at some point (throttle position/rpm) it adds way too much (my throttle HW is ok)

Can it be still wrong rotor angle?

At main.h
PWM CYCLE MAX 254
PWM CYCLE MIN 20
why is min. 20 and not 1?
I'm not certain if it will work with larger direct drive motors,to do FOC you have to be able to work out where the stator flux is in relation to the d and q axis of the rotor. To do this you either have an encoder or sensorless observer to determine the rotor angle and an electrical model of the motor to estimate where the stator flux is in comparison to the rotor.

The way this firmware works is closer to an open loop sinewave controller but has a small degree of feedback via hall sensors but only enough resolution on the rotor position to determine that it hasn't totally desynced but not enough to detect minor deviations from the q axis. If you feed a BLDC motor 3 current sinewaves spaced 120 electrical degrees apart it will naturally align itself provided there is enough current and the speed isn't too high, if the motor never experiences a load that is significant enough to overcome it's torque it will remain in sync with the stator.

On a low inductance geared motor this probably isn't much of an issue, gearing means it doesn't deal with large torque loads and low inductance means there's not much delay between the hall sensor and where the controller assumes the stator flux is. On a larger direct drive motor it's very different, it's expected to produce much more torque and will desync if it drifts from the rotor q axis. Secondly the larger direct drive hub motors have significant inductance, this means they resist changes in current and magnetization is delayed. If the delay causes the stator flux to align with the rotor d axis then it's possible the controller tries to keep the rotor aligned with the hall sensor output but is wasting most of the current generating flux far from the q axis.

The original firmware must have some work around for this situation without having to use cpu intensive FOC calculations, possibly they use the current sensor to measure how long it takes for the current to rise and they have a look up table of expected results based on the inductance range most ebike motor come in. One way it might be possible to test it would be to see if the original firmware can run motors with inductance values that are very different to common ebike motors.

racingame   10 W

10 W
Posts: 95
Joined: Jan 26 2018 9:40am

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

Post by racingame » Mar 04 2018 9:33am

Hello, can I ask you how can I learn how to write a firmware for a brushless motor from scratch, how did you figure it out how to do it? I've always written software, but when it comes to write a firmware I have no clue where to start from or where to look for getting some information. Also, looking at your code, I can't really figure out all the physics/mathematical formulas parts. I have so many ideas, so many things I'd like to include in my firmware and would really like to learn how to implement all of them.

For example, I'd like to customise your firmware to add support for gearsensor , but how to do it? It has a HIGO connector, so first of all I have no clue where I should plug it to my S12S controller in order for it to work, also I have no clue what kind of data it sends to the controller, how do I sniff/debug those packets sent from the gearsensor (or any other device like brakes, PAS, etc.) to the controller when I change gear, and how do I create a event handle that gets triggered when getting that precise input.

Sorry for the long message, I'd like to get some help where I can start from to learn something by myself. :P

honya96   1 kW

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

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

Post by honya96 » Mar 04 2018 9:50am

racingame wrote:
Mar 04 2018 9:33am
so first of all I have no clue where I should plug it to my S12S controller in order for it to work
If its 2 pin you can use original cruise connector (blue+black) but I cant help about fw.

User avatar
stancecoke   10 kW

10 kW
Posts: 896
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » Mar 04 2018 11:04am

I've used the fine weather today to do a testride with the linear regen function :-)
I found that we have to disable FOC while regen, as the advance angle runs to nirvana otherwise.
With this small change in the code, it works well now. I use a thumb throttle (thumb brake :wink: ) for controlling the regen. I used the torque sensor and rode in torquesensor-mode. Now I can confirm, that the modding of the torquesensor with the raw signal of one PAS-Hall works well, the direction detection is OK.

regards
stancecoke
Last edited by stancecoke on Mar 04 2018 2:23pm, edited 1 time in total.

Post Reply