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

Electric Motors and Controllers
geofft   1 kW

1 kW
Posts: 345
Joined: Nov 09 2012 9:41am
Location: Berkshire UK

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

Post by geofft » May 04 2019 6:39am

flangefrog wrote:
Apr 30 2019 6:46am


If you don't want so much power dissipation/heat you could replace the linear regulator (resistor/LM317 combination) with a 15V buck converter such as the CUI V7815W-500. I did this on mine (ignore the TL783 stuff, I went for the buck instead).

https://endless-sphere.com/forums/viewt ... 3#p1210397
Wasn't aware of those V7815W buck converters, I think I'll give one a try. A while back I tried a couple of the cheapo chinese ebay bucks but found I was getting occasional random mosfet failures. Reverted back to the LM317 setup and this hasn't happened again since...
BBS02 V2 48v 750w, 12s lipo.
Q128H (36v 201rpm), KT36/48SVPR, LCD3, 48v 12s lipo.

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

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

Post by Xnyle » May 05 2019 1:57pm

Just to bump this Thread a bit :)
Screenshot_BluOsec_20190428-131758.png

User avatar
stancecoke   10 kW

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

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

Post by stancecoke » May 06 2019 2:32am

Really cool design ! :thumb:
Is there any progress in the vibration issue?

regards
stancecoke

MercyFlush   100 µW

100 µW
Posts: 7
Joined: Dec 30 2018 1:27am

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

Post by MercyFlush » May 06 2019 7:23am

So I have my 18FET KT60SVP and it weirdly the high side and low side drivers are identical to the 48v 12FET I have. Perhaps this is something we should add to the WIKI for those with >48v controllers to check if the polarity config matches their hardware as it doesn't seem to be consistent based on the seller of the hardware.

I have loaded the latest revision of the code to my setup and I have only battery voltage shown on my stock firmware KT-LCD3. I have changed the checksum from 1 through to 20 and have had no luck. I too am getting about a 1 second pulse on startup regardless of throttle connected or not. I have the following setup:
-BHT alternative motor ~70rpm/v with confirmed working Halls etc. (Confirmed using three controllers including a VESC)
-Hall type throttle
-NO PAS
-2x6S 4500mAh 40C LIPOs for testing. About 0.01V sag in testing

I have probed around with my scope and found some interference on the throttle input at exactly the switching frequency of the controller, sometimes spiking to over 10V! I wonder if this has anything to do with the issues at high current / rpm.

Additionally, I have tried to increase the decrement of

Code: Select all

ui16_current_cal_b 
from 1 to as high as 35 (in steps of 2) and have resolved the issue, but now have lazy/unpredictable throttle response. I also changed the amount of samples taken by the ADC from 16 to 128 (as below) and this helped my a slight amount (I could change the decrement to about 25 and avoid startup rotation).

Before I gave up for the day I added some delay between the initial current sampling (just before the below code) and also changed the order of the main.c main void to put adc_init(); before pwm_init(); and even with a 5second delay between these I still get wheel rotation. I have also tried to tie PAS and Throttle inputs to ground to no effect! I think it is perhaps something in the PAS_init or electrical noise / bad voltage regulation of the ADC :?: :?: :?:

As I get time I will dig deeper on the circuit and try to find the culprit of the noise. P.S> I can audibly hear the 15.625kHz switching noise from my motor when I reduce the ui16_current_cal_b decrement to 1. It really makes me think something is funny with the code and perhaps configs with no PAS. Hopefully this is helpful, please let me know if I'm just rambling on too much :wink:

Code: Select all

    // read and average a few values of ADC. Check that your sample will not overflow!!!
    for (ui8_i = 0; ui8_i < 128; ui8_i++) {
        delay_halfms(30);
        adc_trigger();
        delay_halfms(30);
        ui16_current_cal_b += ui16_adc_read_motor_total_current();
        ui16_x4_cal_b += ui16_adc_read_x4_value();
        ui16_throttle_cal_b += ui8_adc_read_throttle();
    }
    
    ui16_current_cal_b >>= 7;
    ui16_current_cal_b -= 28;
    ui16_x4_cal_b >>= 7;
    ui16_x4_cal_b -= 1;
    ui16_throttle_cal_b >>= 7;
    ui16_throttle_cal_b -= 1;
    }

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

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

Post by Xnyle » May 06 2019 10:37am

I would just first debug the ADC values for a long time after startup (via diagnostics/printf) and see if they behave funny.
BTW are you sure that your controller does 10bit ADC and not 12, 16, whatever? that would explain a lot. So debug them as 16bit.
Is there any progress in the vibration issue?
No, I'm pretty sure now the motor is just crap mechanically, motor shaft, ball-bearing,...
Efficiency is also not very good, my 5kg heavier no name DD is about 10% more efficient overall.
Nothing I changed has any statistically significant effect.
I don't drive that bicycle very much though.

MercyFlush   100 µW

100 µW
Posts: 7
Joined: Dec 30 2018 1:27am

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

Post by MercyFlush » May 09 2019 9:14am

Xnyle wrote:
May 06 2019 10:37am
I would just first debug the ADC values for a long time after startup (via diagnostics/printf) and see if they behave funny.
BTW are you sure that your controller does 10bit ADC and not 12, 16, whatever? that would explain a lot. So debug them as 16bit.
So after about 9 hours debugging and tracing my way through the unfamiliar code, I have landed on the following as the part of the cause of the unwanted acceleration on startup.

Code: Select all

	ui32_time_ticks_between_pas_interrupt_accumulated -= ui32_time_ticks_between_pas_interrupt_accumulated >> 3;
	// do not allow values > ramp_start into smoothing cause it makes startup sluggish
	// also do not allow values < ramp_start when pedalling backwards
	if ((!PAS_is_active||(ui16_time_ticks_between_pas_interrupt > ui16_s_ramp_start)) && ((ui16_aca_flags & TQ_SENSOR_MODE) != TQ_SENSOR_MODE)) {
		ui32_time_ticks_between_pas_interrupt_accumulated += ui16_s_ramp_start;
	} else {
		ui32_time_ticks_between_pas_interrupt_accumulated += ui16_time_ticks_between_pas_interrupt;
	}
	printf("PAS_is_active %d\r\n",PAS_is_active);
	printf("PAS_timetickacc %lu\r\n",ui32_time_ticks_between_pas_interrupt_accumulated);
	ui16_time_ticks_between_pas_interrupt_smoothed = ui32_time_ticks_between_pas_interrupt_accumulated >> 3;
	printf("PAS_timetick %u\r\n",ui16_time_ticks_between_pas_interrupt_smoothed);
As well as

Code: Select all

// >=8 means levels are switched of, use wanted percentage directly instead
	ui16_assist_percent_smoothed -= ui16_assist_percent_smoothed >> 4;
	if ((ui8_assistlevel_global & 15) < 8) {
		ui16_assist_percent_smoothed += ui8_a_s_assistlevels[ui8_assistlevel_global & 15];
	} else {
		ui16_assist_percent_smoothed += ui8_assist_percent_wanted;
	}
	printf("ALG %u\r\n",ui8_assistlevel_global);
	ui8_assist_percent_actual = ui16_assist_percent_smoothed >> 4;
Basically the maximum allowed current is determined by the assist level which is slowly ramped from 0 to whatever your default setting is (In my case my screen doesn't communicate with the controller, so 66% is my number). So basically the issue was that I have no PAS or torque sensor only throttle. Logically I unchecked the Torque Sensor Ride Option in the tool, however this enabled the PAS code (Code only checks if Torque mode == 1). Essentially the as PAS code accumulates the time_ticks_between_pas_interrupt from the starting number of 0 up to the RAMP START value (64000), then that goes to

Code: Select all

float_temp = 1.0 - (((float) (ui16_time_ticks_between_pas_interrupt_smoothed - ui16_s_ramp_end)) / ((float) (ui16_s_ramp_start - ui16_s_ramp_end)));
which then sets the current target to be something other than zero

Code: Select all

uint32_current_target = ((uint16_t) (uint32_current_target)*(uint16_t) (float_temp * 100.0)) / 100 + ui16_current_cal_b;
I think this could be solved by initializing all these smoothing functions to the preset value. Alternatively, I think turning on the TORQUE_MODE circumvents the issue too.

I'll be looking at it with fresh eyes over the weekend. Perhaps someone else could provide some insight into the best course of action to resolve this issue :bigthumb:

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

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

Post by Xnyle » May 09 2019 11:16am

You noticed the comment that's above your last code snippet?
//if you are pedaling slower than defined ramp end
//or not pedalling at all
//current is proportional to cadence
No cadence -> no current. If you have no PAS sensor time_ticks always goes to max, same as if you have one and are not pedalling. Otherwise everyone else would have your problems at standstill.

MercyFlush   100 µW

100 µW
Posts: 7
Joined: Dec 30 2018 1:27am

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

Post by MercyFlush » May 09 2019 4:36pm

Xnyle wrote:
May 09 2019 11:16am
No cadence -> no current. If you have no PAS sensor time_ticks always goes to max, same as if you have one and are not pedalling. Otherwise everyone else would have your problems at standstill.
Do you understand that it takes about 300 cycles for time_ticks to reach max as it starts at 0?
That it what I am saying is the issue.

Maybe someone else can debug time_ticks every loop and compare. I have many logs showing over 200 cycles for time_ticks to reach max, with the current set point being written quite high in this period. Not an issue for weak motors or for very damped PI I suppose

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

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

Post by Xnyle » May 09 2019 5:14pm

ui16_time_ticks_between_pas_interrupt only gets updated when ui8_PAS_Flag == 1 otherwise it keeps it's initial value of 64000L.
ui8_PAS_Flag only gets to 1 if there was an interrupt on the PAS__PORT which is GPIOD which is address GPIOD_BaseAddress which is 0x500F

For what you describe to happen you PAS__PORT might be floating. Otherwise ui16_time_ticks_between_pas_interrupt_smoothed should be always 64000L>>3 which is also >timeout.

But what do I know, maybe someone else can debug :wink:

MercyFlush   100 µW

100 µW
Posts: 7
Joined: Dec 30 2018 1:27am

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

Post by MercyFlush » May 09 2019 6:47pm

Xnyle wrote:
May 09 2019 5:14pm
ui16_time_ticks_between_pas_interrupt only gets updated when ui8_PAS_Flag == 1 otherwise it keeps it's initial value of 64000L.
ui8_PAS_Flag only gets to 1 if there was an interrupt on the PAS__PORT which is GPIOD which is address GPIOD_BaseAddress which is 0x500F

For what you describe to happen you PAS__PORT might be floating. Otherwise ui16_time_ticks_between_pas_interrupt_smoothed should be always 64000L>>3 which is also >timeout.

But what do I know, maybe someone else can debug :wink:
Ahh yes! That makes sense, remember I was getting switching noise on my ADC inputs. On a high speed Input with an interrupt this could be the issue! PAS flag must be getting set when the PWM first gets enabled
I will confirm later today. Thank you for the help btw :thumb:

Also, should I just be running in Torque mode if I only have a throttle? Does this solve my issues altogether?

EDIT:
I still stand by my statement that time_ticks_smoothed starts at 0 and works it's way up. Just run the following and see what I mean. Or ignore it and we'll all just move on.

Code: Select all

#include <stdio.h>

int PAS_is_active = 0;
int ui16_time_ticks_between_pas_interrupt = 64000;
int ui16_s_ramp_start = 1500;
int ui16_aca_flags = 0;
int TQ_SENSOR_MODE = 0;
static int ui32_time_ticks_between_pas_interrupt_accumulated = 0;
static int ui16_time_ticks_between_pas_interrupt_smoothed = 0;
int ui8_i;

int main(void) {
  for (ui8_i = 0; ui8_i < 8; ui8_i++) {
  if ((!PAS_is_active||(ui16_time_ticks_between_pas_interrupt > ui16_s_ramp_start)) && ((ui16_aca_flags & TQ_SENSOR_MODE) != TQ_SENSOR_MODE)) {
    ui32_time_ticks_between_pas_interrupt_accumulated += ui16_s_ramp_start;
  } else {
    ui32_time_ticks_between_pas_interrupt_accumulated += ui16_time_ticks_between_pas_interrupt;
  }
  ui16_time_ticks_between_pas_interrupt_smoothed = ui32_time_ticks_between_pas_interrupt_accumulated >> 3;//smoothed is defined in ACAcontrollerState as = 0
  printf("time_ticks = %u\r\n", ui16_time_ticks_between_pas_interrupt);
  printf("Smoothed = %u\r\n", ui16_time_ticks_between_pas_interrupt_smoothed);
  }
  return 0;
}

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

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

Post by Xnyle » May 10 2019 4:20am

It doesn't, it starts at ui32_time_ticks_between_pas_interrupt_accumulated>>3 which starts at timeout, not at 0 as in your code.

You can let it start at timeout <<3 which would be more correct but I doubt that solves your problem.

MercyFlush   100 µW

100 µW
Posts: 7
Joined: Dec 30 2018 1:27am

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

Post by MercyFlush » May 10 2019 5:44am

Xnyle wrote:
May 10 2019 4:20am
It doesn't, it starts at ui32_time_ticks_between_pas_interrupt_accumulated>>3 which starts at timeout, not at 0 as in your code.

You can let it start at timeout <<3 which would be more correct but I doubt that solves your problem.
Ah, yes you are correct accumulated starts at Timeout, thanks for that :wink: . Changing that in the example I provided above actually helps my case and shows that it matches up with my debugging.

Code: Select all

#include <stdio.h>

int PAS_is_active = 0;
int ui16_time_ticks_between_pas_interrupt = 64000;
int ui16_s_ramp_start = 64000;
int ui16_aca_flags = 0;
int TQ_SENSOR_MODE = 0;
static int ui32_time_ticks_between_pas_interrupt_accumulated = 3125;
static int ui16_time_ticks_between_pas_interrupt_smoothed = 0;
int ui8_i;

int main(void) {
  for (ui8_i = 0; ui8_i < 8; ui8_i++) {
      ui32_time_ticks_between_pas_interrupt_accumulated -= ui32_time_ticks_between_pas_interrupt_accumulated >> 3;
  if ((!PAS_is_active||(ui16_time_ticks_between_pas_interrupt > ui16_s_ramp_start)) && ((ui16_aca_flags & TQ_SENSOR_MODE) != TQ_SENSOR_MODE)) {
    ui32_time_ticks_between_pas_interrupt_accumulated += ui16_s_ramp_start;
  } else {
    ui32_time_ticks_between_pas_interrupt_accumulated += ui16_time_ticks_between_pas_interrupt;
  }
  ui16_time_ticks_between_pas_interrupt_smoothed = ui32_time_ticks_between_pas_interrupt_accumulated >> 3;//smoothed is defined in ACAcontrollerState as = 0
  printf("time_ticks = %u\r\n", ui16_time_ticks_between_pas_interrupt);
  printf("Smoothed = %u\r\n", ui16_time_ticks_between_pas_interrupt_smoothed);
  }
  return 0;
}

Code: Select all

ui16_current_cal_b = 324
System initialized
PAS_is_active = 0
PAS_timetickacc = 66735
PAS_timetick = 64000
PAS_timetick smooth = 8341
ui8_temp = 2
battcurrmax = 800
current target = 16
float_temp = 25
ui16_time_ticks_between = 8341
ui16_s_ramp_end = 1500
ui16_s_ramp_start =  64000
Current Target = 338
cutoffSP in = 5
cutoffSP out = 5
update setpoint 5
PAS_is_active = 0
PAS_timetickacc = 122394
PAS_timetick = 64000
PAS_timetick smooth = 15299
ui8_temp = 5
battcurrmax = 800
current target = 40
float_temp = 22
ui16_time_ticks_between = 15299
ui16_s_ramp_end = 1500
ui16_s_ramp_start =  64000
Current Target = 354
cutoffSP in = 6
cutoffSP out = 6
update setpoint 6
PAS_is_active = 0
PAS_timetickacc = 171095
PAS_timetick = 64000
PAS_timetick smooth = 21386
ui8_temp = 8
battcurrmax = 800
current target = 64
float_temp = 19
ui16_time_ticks_between = 21386
ui16_s_ramp_end = 1500
ui16_s_ramp_start =  64000
Current Target = 367
cutoffSP in = 6
cutoffSP out = 6
update setpoint 6
PAS_is_active = 0
PAS_timetickacc = 213709
PAS_timetick = 64000
PAS_timetick smooth = 26713

You need to understand that what causes the wheel rotation at startup is the setpoint being written to. It gets written to via float_temp, which is determined by ui16_time_ticks_between_pas_interrupt_smoothed not ui16_time_ticks_between_pas_interrupt

ui16_time_ticks_between_pas_interrupt_smoothed starts at 0 and after 8 samples reaches 64000 after a total of 64 iterations of the first code snip I posted above.

I have patched my code to work by setting

Code: Select all

static int ui32_time_ticks_between_pas_interrupt_accumulated = 8*64000;
My motor works perfectly now that the smoothing is initialized to the correct value, no more jogging on startup.

User avatar
usertogo   10 W

10 W
Posts: 96
Joined: Nov 19 2014 9:31am

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

Post by usertogo » May 13 2019 9:54am

Thanks for creating and maintaining this OpenSource effort so active!

I also want to get in to it in my latest build and am wondering if these controllers are the type that take the developed firmware:
https://www.aliexpress.com/item/Okfeet- ... 3c00J9rrgZ
https://www.aliexpress.com/item/ebike-4 ... 3c00J9rrgZ
Notice one is 'Square' and the other 'Sine' - and implies I have no clue - the sine wave requires a better MCU?

I am interested to save a lot of brakes on the front wheels by using the regenerative braking, how well does it work, is there a limit to the battery voltage to which they can charge back to regenerating? Is there control of the regen intensity?
I read there exists a wiki on the subject? I would be happy to participate there collecting data and maintaining links!

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

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

Post by Xnyle » May 13 2019 12:41pm

Wiki: https://github.com/stancecoke/BMSBatter ... mware/wiki
Controller should both work, read wiki for info on pimping square wave (ACS712) :)
Regen braking working fine on direct drive including overvoltage protection, 5 step adjustable via app or additional regen throttle.
again, read wiki :)

If you want to improve the wiki, make it easier to understand for newcomers that would be greatly appreciated.

For the time being, make sure, you read the complete wiki twice, that should answer a lot of "stupid" questions.

uploader18   1 µW

1 µW
Posts: 2
Joined: May 14 2019 11:02am

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

Post by uploader18 » May 14 2019 11:06am

I just flashed latest firmwire and set in config offroad speed, limit and without PAS to 50 kph but no change in speed. i do nat have pas it is electric scooter.

system is 36v with 250w motor.

Is there anybody who can help me?

Thanks

Žiga

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

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

Post by Xnyle » May 14 2019 2:14pm

Can't write for anyone else, but I won't until you don't prove you read

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

by posting some kind of useful information.

uploader18   1 µW

1 µW
Posts: 2
Joined: May 14 2019 11:02am

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

Post by uploader18 » May 14 2019 4:24pm

Hi!

I was thinking that there is some kind of limit that does not allow me to go over 25 but i think i am limited with KV value of motor.

Am I right?

https://drive.google.com/open?id=1YMAPp ... -dm3O_hVzp (motor)
https://drive.google.com/open?id=1QMSh8 ... nSn1ioV4ou (controller)

haiyi911   1 W

1 W
Posts: 57
Joined: Oct 13 2017 5:35am

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

Post by haiyi911 » May 15 2019 3:30am

stancecoke wrote:
Jan 07 2019 11:13am
I'm using the BionX IGH3 with our firmware. It's completely quiet except small resonance vibrations in the range of 12-14 km/h.
stancecoke
hi,stancecoke
with my direct motor the small resonance vibrations in the range of 11-12km/h,could it be fixed?

TomiLi   1 µW

1 µW
Posts: 2
Joined: Feb 11 2019 4:23am

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

Post by TomiLi » May 15 2019 6:00am

Hello,
I have KT36/48SVPRK-SLS02G version of KT controller (45A, 18 mosfets) with reverse function.
I am considering changing software to increase the maximum current but I have to use reverse function witch unfortunately wasn't probably implemented in the OpenSource firmware.
I have not analyzed the source code yet, but can you tell me if it would be difficult to add such functionality?

User avatar
Xnyle   10 W

10 W
Posts: 73
Joined: Sep 03 2018 1:05pm

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

Post by Xnyle » May 15 2019 6:07am

You'd have to change interpolation in motor.c and also disable or rework angle correction there. Also you'd have to implement something in display.c or BOdisplay.c to set or reset the new reverse flag you will have to introduce.

If you write nice code and don't just hack it in some way, we might be able to merge a pull request.

User avatar
stancecoke   10 kW

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

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

Post by stancecoke » May 15 2019 6:21am

uploader18 wrote:
May 14 2019 4:24pm
i think i am limited with KV value of moto
Yes, you have to use a battery with higher voltage or you have to use field weakening (not recommented)
haiyi911 wrote:
May 15 2019 3:30am
with my direct motor the small resonance vibrations in the range of 11-12km/h,could it be fixed?
It's a mecanical problem, you can try to increase/decrease the tension of the spokes, but that might just shift the resonance range...
Xnyle wrote:
May 15 2019 6:07am
You'd have to change interpolation in motor.c
not only the interpolation, but the angle assorted to the hall events, too. In reverse direction, 60° is followed by 0°, not 120°.

regards
stancecoke

TomiLi   1 µW

1 µW
Posts: 2
Joined: Feb 11 2019 4:23am

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

Post by TomiLi » May 15 2019 6:52am

Xnyle wrote:
May 15 2019 6:07am
You'd have to change interpolation in motor.c and also disable or rework angle correction there. Also you'd have to implement something in display.c or BOdisplay.c to set or reset the new reverse flag you will have to introduce.

If you write nice code and don't just hack it in some way, we might be able to merge a pull request.
Thank you for the information, I will take a closer look at it and maybe try to do some tests to find out how it all works.

haiyi911   1 W

1 W
Posts: 57
Joined: Oct 13 2017 5:35am

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

Post by haiyi911 » May 15 2019 8:17am

stancecoke wrote:
May 15 2019 6:21am

It's a mecanical problem, you can try to increase/decrease the tension of the spokes, but that might just shift the resonance range...
regards
stancecoke
Thanks for your infomation, :D i tried other controller and the motor run well,so i think that the problem can be fixed by some way.

User avatar
stancecoke   10 kW

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

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

Post by stancecoke » May 15 2019 8:24am

haiyi911 wrote:
May 15 2019 8:17am
i tried other controller and the motor run well
Was the other controller a square wave or a sinosodial one?

regards
stancecoke

haiyi911   1 W

1 W
Posts: 57
Joined: Oct 13 2017 5:35am

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

Post by haiyi911 » May 15 2019 8:28am

stancecoke wrote:
May 15 2019 8:24am

Was the other controller a square wave or a sinosodial one?

regards
stancecoke
it was sinosodial controller.And there was a strange phenomenon the throttle was full but the motor kept standstill,just like the motor stopped at special position,the motor couldnot be started.

Post Reply