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

Electric Motors and Controllers
User avatar
Valopallo   100 mW

100 mW
Posts: 48
Joined: May 29 2018 1:37pm

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

Post by Valopallo » Jan 20 2019 8:53am

stancecoke wrote:
Jan 20 2019 8:24am
Cal b seems to be correct. For a S06S Cotroller cal a has to be something about 100.
Ok. Changed the battery cal a value to 100 and now the battery current and target current match very closely.
stancecoke wrote:
Jan 20 2019 8:24am
I think your video is in Torque-Simulation mode with highest assist level?!
Yes. I understood that torgue-simulation mode is automatic because I don't own a Torque sensor. I also understood that S06S is a torque simulation controller. Torque simulation is a mode? What other modes are there? Why did you mention that? It seems I may be missing something very basic here... :shock:
BluOSEC@36V|15A|S06S|rear DD|MTB|Hardtail|Tunturi

User avatar
stancecoke   100 kW

100 kW
Posts: 1050
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 » Jan 20 2019 8:58am

Valopallo wrote:
Jan 20 2019 8:53am
Ok. Changed the battery cal a value to 100 and now the battery current and target current match very closely.
:thumb:
Is the motor still braking that hard, if you stop pedaling? Please try this on the road, as with wheel in the air, it is not representative.
Valopallo wrote:
Jan 20 2019 8:53am
Yes. I understood that torgue-simulation mode is automatic because I don't own a Torque sensor.
Don't worry :-). If the Controller detects PAS-Pulses and the Torque-Sensor-Mode is not enabled, it works in torquesimulation mode automatically. If you don't mount a PAS, you can go just in throttle-mode.

regards
stancecoke

User avatar
Valopallo   100 mW

100 mW
Posts: 48
Joined: May 29 2018 1:37pm

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

Post by Valopallo » Jan 20 2019 9:57am

stancecoke wrote:
Jan 20 2019 8:58am
:thumb:
Is the motor still braking that hard, if you stop pedaling? Please try this on the road, as with wheel in the air, it is not representative.
Ok. I took a spin outside with the bike and it feels a bit more responsive. The original problem didn't seem to change much or at all, though. I'm also guessing this phenomena might purely be because I'm quite a lightweight rider (62kg) and the normal and quite strong magnetic power of the direct drive motor is just what feels almost like the regen braking feeling when not pedaling or using throttle. I also notice the same thing when I'm riding downhill and I shut down the controller and don't pedal. -> The wheel spins freely without the magnetic force of the dd motor, so it's almost like the non-friction-feeling of a geared motor. But sure, If you can help me to try some other settings like ramp end and ramp start with it, please do so. The push and pull feeling is a bit annoying afterall.

stancecoke wrote:
Jan 20 2019 8:58am
Don't worry :-). If the Controller detects PAS-Pulses and the Torque-Sensor-Mode is not enabled, it works in torquesimulation mode automatically. If you don't mount a PAS, you can go just in throttle-mode.
Ok. Just to make this clear; PAS is not equal to the torque sensor? Right. I have 12magnet PAS and I also have a throttle, but I accidentally broke my throttle's sensor from the handlebar and I'm waiting for a new one arrive from china and I'm using PAS only at the moment because of that. I do notice that when I pedal slower the assistance pulses come at slower pace and when I increase the pedaling speed those pulses also come faster pace. <-This I suppose is simulation and if I had installed an external torque sensor to the rear dropout of my bike or to the chains, I could use torque sensor mode, which would override the need for the simulation. Am I correct?
BluOSEC@36V|15A|S06S|rear DD|MTB|Hardtail|Tunturi

User avatar
stancecoke   100 kW

100 kW
Posts: 1050
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 » Jan 20 2019 10:06am

Valopallo wrote:
Jan 20 2019 9:57am
The push and pull feeling is a bit annoying afterall.
Please reduce values of Gain I and Gain P, e.g. by factor 10 or 100. You can finetune them later, if you have found a satisfying range.
Valopallo wrote:
Jan 20 2019 9:57am

if I had installed an external torque sensor to the rear dropout of my bike or to the chains, I could use torque sensor mode, which would override the need for the simulation. Am I correct?
There are several bottom bracket torque sensors availabe.

regards
stancecoke

Diva   100 mW

100 mW
Posts: 36
Joined: Sep 03 2014 9:20am
Location: Belgium
Contact:

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

Post by Diva » Jan 21 2019 5:13pm

Hello, and thanks for the great work ;)

I currently ride with a tsdz2 motor with casahino's firmware, it works really well. But the thing is that I'm pushing the motor too far and I'm sure it won't last long. The cold weather acts as a good aircooling system, but I fear to fry everything in the summer. So I'm thinking of building a mid drive with a sensored outrunner, and power it with a KT controller and torque sensor. I'd like to be in the 700W area.
How many erpm can a KT controller handle? At the beginning of this topic, casahino was talking about 40k erpm as the maximum, is that value still valid or does the "high motor speed" option allow more? The outrunners I'm looking at are near the 100k erpm zone...

Thanks in advance for your help :)

Didier

casainho   1.21 GW

1.21 GW
Posts: 3727
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Jan 21 2019 5:45pm

Diva wrote:
Jan 21 2019 5:13pm
Hello, and thanks for the great work ;)

I currently ride with a tsdz2 motor with casahino's firmware, it works really well. But the thing is that I'm pushing the motor too far and I'm sure it won't last long. The cold weather acts as a good aircooling system, but I fear to fry everything in the summer. So I'm thinking of building a mid drive with a sensored outrunner, and power it with a KT controller and torque sensor. I'd like to be in the 700W area.
How many erpm can a KT controller handle? At the beginning of this topic, casahino was talking about 40k erpm as the maximum, is that value still valid or does the "high motor speed" option allow more? The outrunners I'm looking at are near the 100k erpm zone...

Thanks in advance for your help :)

Didier
Why don't you go with the popular and most cheap TSDZ2 mid drive motor that we did develop the OpenSource firmware for it and can handle 500W continuously and 900W peaks?? It has a motor temperature sensor and firmware reduces power when motor is to much hot. Also works with KT-LCD3 or Bafang 850C color LCD.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and displays (Bafang 850C color, SW102 Bluetooth and KT-LCD3).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

Diva   100 mW

100 mW
Posts: 36
Joined: Sep 03 2014 9:20am
Location: Belgium
Contact:

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

Post by Diva » Jan 22 2019 2:36am

Hi Casahino!

That's what I said: my bike is now powered by an opensource firmwared tsdz2. 36V motor powered by a 48V battery, it rides really nice. But the freewheel of my metal gear is stuck (after maybe 1000km), and I replaced it by a blue gear I had in stock that only lasted 20 km even if I tried not to accelerate too hard (but always at full power).
It rides almost like my former (chipped) Bosch Performance, but I rode more than 8000 km on this one without any problem or overheating (except the battery, 10s4p Samsung 29E that I changed for 30A-able LG's). I'm a bit fed up with all the issues I've had on the tsdz2.
Plus I will take part to the next Sun Trip (in 2020, from France to China with a solar bike), and I would have liked to build my own drive and test it before, so I'd use it on the trip :wink: I'd never do that with a tsdz2...

User avatar
stancecoke   100 kW

100 kW
Posts: 1050
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 » Jan 22 2019 5:17am

Diva wrote:
Jan 21 2019 5:13pm
How many erpm can a KT controller handle? At the beginning of this topic, casahino was talking about 40k erpm as the maximum, is that value still valid or does the "high motor speed" option allow more? The outrunners I'm looking at are near the 100k erpm zone...
The max speed is limited to PWM frequency / 30 erps, to make sure that we get a proper sinusodial shaped phase current.
In normal mode: PWM frequency = 15625 Hz --> max erps = 521 --> max erpm = 31250
In high speed mode: PWM frequency = 20833 Hz --> max erps = 695 --> max erpm = 41666

You could try if it works satisfying with e.g. 20 points per sine period. I don't own a motor that turns that fast (I'm preferring direct drives :-)) so I can't try it.

regards
stancecoke

Diva   100 mW

100 mW
Posts: 36
Joined: Sep 03 2014 9:20am
Location: Belgium
Contact:

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

Post by Diva » Jan 22 2019 11:02am

Ok thanks a lot. I don't think I'd be able to code what needed, so I'll try to find a motor that fit those limits :wink:
I'll surely open a tread over my build if it works...

kkm   1 mW

1 mW
Posts: 10
Joined: Sep 27 2018 3:22pm

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

Post by kkm » Jan 23 2019 4:34am

j bjork wrote:
Jan 05 2019 4:56pm

A question, how is the trottle response compeared to the standard fw? I think it is a bit slow on the kt fw.
Almosty all “factory” firmware (including KT original fw) uses “speed (rpm) control”, and not “torque (current) control” for the throttle. That is, by shifting the knob on 2-3 mm, the motor (unloaded wheel) turns will be 5-10 rpm, moving another 1 mm - 30-50 rpm, etc.
This behavior allows you to stably maintain the desired speed, especially at low speeds (5-8 km / h), the current speed depends little on small changes in the terrain, it is stable.
And yes, this mode feels like a "quick response" knob.
Unfortunately, this firmware uses a "dumb" throttle control method - "Torgue (current)". An unloaded wheel immediately starts at full speed, driving at low speeds is difficult and unstable, the throttle response is perceived as "viscous", and the acceleration speed and speed change is unpredictable even with slight inclines/rises of 0.5-1 degrees.

Unfortunately, this is the only reason why I cannot use this excellent firmware.

j bjork   1 kW

1 kW
Posts: 320
Joined: Aug 31 2018 3:01pm
Location: Linköping, Sweden

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

Post by j bjork » Jan 23 2019 8:43am

Thanks, that sounds interesting :)
Maby I should try to flash my controller this weekend..
It would be interesting to hear the developers comments on this.

User avatar
stancecoke   100 kW

100 kW
Posts: 1050
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 » Jan 23 2019 11:27am

j bjork wrote:
Jan 23 2019 8:43am
It would be interesting to hear the developers comments on this.
I can't follow kkm's arguments, he reported his experience before:
kkm wrote:
Sep 30 2018 12:15pm
Flexible OpenSource firmware works excellently on all my geared motors - Bafang SWX02, MXUS XF15R and XF08. Very quiet, there are no unpleasant vibrations and some resonances on the ebike frame (as it was on the stock firmware).
But ... Thumb throttle control... Very accurate and predictable work on the original firmware (and other Chinese controllers), the acceleration is predictable, the response of the thumb throttle is accurate, and it is easy to maintain the selected speed.

Now... I practically cannot use the throttle knob - poorly predicted work, it is difficult to control the chosen speed, "viscous" acceleration.
I never heard about this disappointing behaviour from other users...
I don't know if he set the proper voltage range for his throttle,

Perhaps some other users can give a statement, as I'm not using a throttle but a bottom bracket torquesensor.... :wink:

regards
stancecoke

j bjork   1 kW

1 kW
Posts: 320
Joined: Aug 31 2018 3:01pm
Location: Linköping, Sweden

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

Post by j bjork » Jan 23 2019 11:49am

So it should still be speed throttle, not torque?

User avatar
Marv1337n   1 W

1 W
Posts: 55
Joined: Jul 07 2018 5:16am
Location: Germany

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

Post by Marv1337n » Jan 23 2019 12:13pm

I've got a KT60SVPRKD controller with a low voltage protection of 50V. I want to use that controller with my 48V battery but unfortunately it will shut down as soon as I hit the throttle because of the LVC. I saw that you can modify the LVC, so would that fix my problem or is it a hardware problem?

User avatar
stancecoke   100 kW

100 kW
Posts: 1050
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 » Jan 23 2019 1:55pm

j bjork wrote:
Jan 23 2019 11:49am
So it should still be speed throttle, not torque?
The throttle controls the current (= torque), that's the "normal" behaviour of every throttle in any motorcycle or car.
Xnyle has build in the option assist lvl affects throttle, with this you can reduce the max amps of full throttle for low speeds. (I never tried it, as written before)
Marv1337n wrote:
Jan 23 2019 12:13pm
I saw that you can modify the LVC, so would that fix my problem or is it a hardware problem?
No hardware problem, you can define any LVC with our open firmware. But I don't know, if your LCD works with lower voltages, as a special "high voltage" version of the LCD3 exists.

regards
stancecoke

User avatar
Marv1337n   1 W

1 W
Posts: 55
Joined: Jul 07 2018 5:16am
Location: Germany

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

Post by Marv1337n » Jan 23 2019 2:04pm

stancecoke wrote:
Jan 23 2019 1:55pm
j bjork wrote:
Jan 23 2019 11:49am
So it should still be speed throttle, not torque?
The throttle controls the current (= torque), that's the "normal" behaviour of every throttle in any motorcycle or car.
Xnyle has build in the option assist lvl affects throttle, with this you can reduce the max amps of full throttle for low speeds. (I never tried it, as written before)
Marv1337n wrote:
Jan 23 2019 12:13pm
I saw that you can modify the LVC, so would that fix my problem or is it a hardware problem?
No hardware problem, you can define any LVC with our open firmware. But I don't know, if your LCD works with lower voltages, as a special "high voltage" version of the LCD3 exists.

regards
stancecoke
Yeah I've got the 60V/72V LCD3 display but it works with my 48V battery, the only thing is that it's pretty dim.
This is just meant to be a temporary solution until my 66V LiPo build is finished.

casainho   1.21 GW

1.21 GW
Posts: 3727
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Jan 23 2019 2:13pm

If I remember correctly, I implemented control of both motor current and wheel speed. The controller on firnware would be limited for the first variable to hit the max value, be it wheel speed or current. Throttle position did setup a target wheel speed and current, where half of throttle position was equal to half of max current and half of max speed (the one defined on LCD).
stancecoke wrote:
Jan 23 2019 1:55pm
j bjork wrote:
Jan 23 2019 11:49am
So it should still be speed throttle, not torque?
The throttle controls the current (= torque), that's the "normal" behaviour of every throttle in any motorcycle or car.
Xnyle has build in the option assist lvl affects throttle, with this you can reduce the max amps of full throttle for low speeds. (I never tried it, as written before)
Marv1337n wrote:
Jan 23 2019 12:13pm
I saw that you can modify the LVC, so would that fix my problem or is it a hardware problem?
No hardware problem, you can define any LVC with our open firmware. But I don't know, if your LCD works with lower voltages, as a special "high voltage" version of the LCD3 exists.

regards
stancecoke
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and displays (Bafang 850C color, SW102 Bluetooth and KT-LCD3).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

j bjork   1 kW

1 kW
Posts: 320
Joined: Aug 31 2018 3:01pm
Location: Linköping, Sweden

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

Post by j bjork » Jan 23 2019 2:17pm

stancecoke wrote:
Jan 23 2019 1:55pm
j bjork wrote:
Jan 23 2019 11:49am
So it should still be speed throttle, not torque?
The throttle controls the current (= torque), that's the "normal" behaviour of every throttle in any motorcycle or car.
Xnyle has build in the option assist lvl affects throttle, with this you can reduce the max amps of full throttle for low speeds. (I never tried it, as written before)
Sounds good, I don´t think I will need the limit. But it would be interesting to try torque throttle, and see if it will be more responsive.

eimertvm   1 µW

1 µW
Posts: 2
Joined: Jan 24 2019 9:53am

different pcb layout on the KT60SVPRCKD-JLS01

Post by eimertvm » Jan 24 2019 11:00am

For my bike am I using a kt36/48ZWS, but for my mopet/scooter I would like to use KT60 controller to get at least 2KW.
After flashing the software on the KT60SVP and powering it on with a testing voltage of 36V I blew some mosfets.
After removing all of them and retrying it with only the low side active (3 mosfets) It didn't blew. but adding a high side mosfet created a big spark.
comparing the KT36/48 to the KT60 pcb i concluded that the pin-out of the microchip is the same but the mosfet-driver-circuit is different. Only the low side is the same (sort of). The high side consist of a PNP trasistor (Y2) in the KT36/48 and a NPN transitor (Y1) in the KT60.

My question: How can I invert the duty cycle of the HIGH side. So if I want a duty cycle of 200 the chip need to been set to 55, and from 0 to 255, and from 255 to 0 etc. I am a starter in programming, only familiar with Arduino

The marking on the transistor is G1(NPN) Y1(NPN) Y2(PNP).
simple diagram in the pictures

HIGH SIDE KT36/48ZWSRM-SLS02G
KT36 48 HIGH SIDE.jpg
HIGH SIDE KT36/48ZWSRM-SLS02G
KT36 48 HIGH SIDE.jpg (54.33 KiB) Viewed 1751 times
LOW SIDE KT36/48ZWSRM-SLS02G
KT36 48 LOW SIDE.jpg
LOW SIDE KT36/48ZWSRM-SLS02G
KT36 48 LOW SIDE.jpg (57.09 KiB) Viewed 1751 times
high side right, low side left KT36/48ZWSRM-SLS02G
KT36 48, righ HIGH, left LOW.jpg
high side right, low side left KT36/48ZWSRM-SLS02G
HIGH SIDE KT60SVPRCKD-JLS01
KT60 HIGH SIDE.jpg
HIGH SIDE KT60SVPRCKD-JLS01
KT60 HIGH SIDE.jpg (62.49 KiB) Viewed 1751 times
LOW SIDE KT60SVPRCKD-JLS01
KT60 LOW SIDE.jpg
LOW SIDE KT60SVPRCKD-JLS01
KT60 LOW SIDE.jpg (41.07 KiB) Viewed 1751 times
HIGH SIDE left, Low side right KT60SVPRCKD-JLS01
KT60 righ LOW, left HIGH.jpg
HIGH SIDE left, Low side right KT60SVPRCKD-JLS01
KT60SVPRCKD-JLS01 & KT36/48ZWSRM-SLS02G
KT60 up, KT36 48 down.jpg
KT60SVPRCKD-JLS01 & KT36/48ZWSRM-SLS02G

casainho   1.21 GW

1.21 GW
Posts: 3727
Joined: Feb 14 2011 2:43pm

Re: different pcb layout on the KT60SVPRCKD-JLS01

Post by casainho » Jan 24 2019 11:16am

Nice findings!!

Here, in pwm.c file, the TIM1_OCPOLARITY_HIGH,
TIM1_OCNPOLARITY_LOW,.

There is configured polarity for OC and OCN channels. Please adjust for all 3 pwm channels.

Also first disable the PWM as seen on that piece of code, by setup TIM1_OUTPUTSTATE_ENABLE,
TIM1_OUTPUTNSTATE_ENABLE and test before enable on all of the channels, to make sure the change you did do work.

I hope stacecoke can also validate this my suggestion.


void pwm_init_bipolar_4q (void)
{
TIM1_TimeBaseInit(0, // TIM1_Prescaler = 0
TIM1_COUNTERMODE_CENTERALIGNED1,
(512 - 1), // clock = 16MHz; counter period = 1024; PWM freq = 16MHz / 1024 = 15.625kHz;
//(BUT PWM center aligned mode needs twice the frequency)
1); // will fire the TIM1_IT_UPDATE at every PWM period cycle


//#define DISABLE_PWM_CHANNELS_1_3

TIM1_OC1Init(TIM1_OCMODE_PWM1,
#ifdef DISABLE_PWM_CHANNELS_1_3
TIM1_OUTPUTSTATE_DISABLE,
TIM1_OUTPUTNSTATE_DISABLE,
#else
TIM1_OUTPUTSTATE_ENABLE,
TIM1_OUTPUTNSTATE_ENABLE,
#endif
255, // initial duty_cycle value
TIM1_OCPOLARITY_HIGH,
TIM1_OCNPOLARITY_LOW,
TIM1_OCIDLESTATE_RESET,
TIM1_OCNIDLESTATE_SET);


eimertvm wrote:
Jan 24 2019 11:00am
For my bike am I using a kt36/48ZWS, but for my mopet/scooter I would like to use KT60 controller to get at least 2KW.
After flashing the software on the KT60SVP and powering it on with a testing voltage of 36V I blew some mosfets.
After removing all of them and retrying it with only the low side active (3 mosfets) It didn't blew. but adding a high side mosfet created a big spark.
comparing the KT36/48 to the KT60 pcb i concluded that the pin-out of the microchip is the same but the mosfet-driver-circuit is different. Only the low side is the same (sort of). The high side consist of a PNP trasistor (Y2) in the KT36/48 and a NPN transitor (Y1) in the KT60.

My question: How can I invert the duty cycle of the HIGH side. So if I want a duty cycle of 200 the chip need to been set to 55, and from 0 to 255, and from 255 to 0 etc. I am a starter in programming, only familiar with Arduino

The marking on the transistor is G1(NPN) Y1(NPN) Y2(PNP).
simple diagram in the pictures

HIGH SIDE KT36/48ZWSRM-SLS02G
KT36 48 HIGH SIDE.jpg

LOW SIDE KT36/48ZWSRM-SLS02G
KT36 48 LOW SIDE.jpg

high side right, low side left KT36/48ZWSRM-SLS02G
KT36 48, righ HIGH, left LOW.jpg

HIGH SIDE KT60SVPRCKD-JLS01
KT60 HIGH SIDE.jpg

LOW SIDE KT60SVPRCKD-JLS01
KT60 LOW SIDE.jpg

HIGH SIDE left, Low side right KT60SVPRCKD-JLS01
KT60 righ LOW, left HIGH.jpg

KT60SVPRCKD-JLS01 & KT36/48ZWSRM-SLS02G
KT60 up, KT36 48 down.jpg
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and displays (Bafang 850C color, SW102 Bluetooth and KT-LCD3).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

eimertvm   1 µW

1 µW
Posts: 2
Joined: Jan 24 2019 9:53am

Re: different pcb layout on the KT60SVPRCKD-JLS01

Post by eimertvm » Jan 30 2019 3:04pm

Thank you for the help.
For the past few days I have been busy with troubleshooting the KT60SVP...
I found out that not only the low side phase is flipped, but also its mosfet driver is broken.
So I ordered replacement parts.
I will come back here to write if the suggestion worked.
casainho wrote:
Jan 24 2019 11:16am
Nice findings!!

Here, in pwm.c file, the TIM1_OCPOLARITY_HIGH,
TIM1_OCNPOLARITY_LOW,.

There is configured polarity for OC and OCN channels. Please adjust for all 3 pwm channels.

Also first disable the PWM as seen on that piece of code, by setup TIM1_OUTPUTSTATE_ENABLE,
TIM1_OUTPUTNSTATE_ENABLE and test before enable on all of the channels, to make sure the change you did do work.

I hope stacecoke can also validate this my suggestion.


void pwm_init_bipolar_4q (void)
{
TIM1_TimeBaseInit(0, // TIM1_Prescaler = 0
TIM1_COUNTERMODE_CENTERALIGNED1,
(512 - 1), // clock = 16MHz; counter period = 1024; PWM freq = 16MHz / 1024 = 15.625kHz;
//(BUT PWM center aligned mode needs twice the frequency)
1); // will fire the TIM1_IT_UPDATE at every PWM period cycle


//#define DISABLE_PWM_CHANNELS_1_3

TIM1_OC1Init(TIM1_OCMODE_PWM1,
#ifdef DISABLE_PWM_CHANNELS_1_3
TIM1_OUTPUTSTATE_DISABLE,
TIM1_OUTPUTNSTATE_DISABLE,
#else
TIM1_OUTPUTSTATE_ENABLE,
TIM1_OUTPUTNSTATE_ENABLE,
#endif
255, // initial duty_cycle value
TIM1_OCPOLARITY_HIGH,
TIM1_OCNPOLARITY_LOW,
TIM1_OCIDLESTATE_RESET,
TIM1_OCNIDLESTATE_SET);


eimertvm wrote:
Jan 24 2019 11:00am
For my bike am I using a kt36/48ZWS, but for my mopet/scooter I would like to use KT60 controller to get at least 2KW.
After flashing the software on the KT60SVP and powering it on with a testing voltage of 36V I blew some mosfets.
After removing all of them and retrying it with only the low side active (3 mosfets) It didn't blew. but adding a high side mosfet created a big spark.
comparing the KT36/48 to the KT60 pcb i concluded that the pin-out of the microchip is the same but the mosfet-driver-circuit is different. Only the low side is the same (sort of). The high side consist of a PNP trasistor (Y2) in the KT36/48 and a NPN transitor (Y1) in the KT60.

My question: How can I invert the duty cycle of the HIGH side. So if I want a duty cycle of 200 the chip need to been set to 55, and from 0 to 255, and from 255 to 0 etc. I am a starter in programming, only familiar with Arduino

The marking on the transistor is G1(NPN) Y1(NPN) Y2(PNP).
simple diagram in the pictures

HIGH SIDE KT36/48ZWSRM-SLS02G
KT36 48 HIGH SIDE.jpg

LOW SIDE KT36/48ZWSRM-SLS02G
KT36 48 LOW SIDE.jpg

high side right, low side left KT36/48ZWSRM-SLS02G
KT36 48, righ HIGH, left LOW.jpg

HIGH SIDE KT60SVPRCKD-JLS01
KT60 HIGH SIDE.jpg

LOW SIDE KT60SVPRCKD-JLS01
KT60 LOW SIDE.jpg

HIGH SIDE left, Low side right KT60SVPRCKD-JLS01
KT60 righ LOW, left HIGH.jpg

KT60SVPRCKD-JLS01 & KT36/48ZWSRM-SLS02G
KT60 up, KT36 48 down.jpg

j bjork   1 kW

1 kW
Posts: 320
Joined: Aug 31 2018 3:01pm
Location: Linköping, Sweden

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

Post by j bjork » Feb 01 2019 1:25am

Is this a problem only on the kt60? Not kt36/48 18fet?
I remember something about another user earlier in the thread who were modifing an 18fet controller with other mosfets, wires etc. to handle more power. But I think he did not get it running. I think it blew the fuse as soon as he gave throttle or something like that. Sounds like it could have been the same problem..

j bjork   1 kW

1 kW
Posts: 320
Joined: Aug 31 2018 3:01pm
Location: Linköping, Sweden

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

Post by j bjork » Feb 02 2019 2:28pm

I programmed my controller today, but there are some problems.
Before I changed fw I mesured consumption, it used about 1,5A at full speed with the wheel in the air. It was working fine.
After programming with the wheel in the air I can not get a steady rotation. I get power for maby half a second, then the wheel rotates freely for maby 2 seconds. Then power for maby half a second again.

On the ground it is noisy and draws many amps. I don´t have a bluetooth module yet, so I cant use the app. But I tried the diagnosis on the computor, but I can´t make much sense of it. I get some numbers, but not any foult messages or something like that.

Here are the settings, if you can see something compleatly wrong:

Image

I have an 18fet controller and a DD hub. I think it is a copy of a 9C 2706

j bjork   1 kW

1 kW
Posts: 320
Joined: Aug 31 2018 3:01pm
Location: Linköping, Sweden

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

Post by j bjork » Feb 02 2019 3:45pm

Rasing the correction angle seems to help, I changed from 127 to 168 then to 172. It has improved a lot. And setting all speed limits to 99, now i can get stable acceleration. But a bit sluggish.
But the only ting working on the lcd3 is battery voltage, no speed, no symbols for braking, no battery indicator.
It also seems like changing assist level has no effect. I havent tested on the road, but it works on assist 0 with the wheel in the air.
And it has a delay when I release the trottle before it stops pulling.

j bjork   1 kW

1 kW
Posts: 320
Joined: Aug 31 2018 3:01pm
Location: Linköping, Sweden

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

Post by j bjork » Feb 04 2019 1:52pm

This should mean that the halls are in the right order I think?

Image

Here I have some correction angle, I think I should get that down to 0?

Image

Image

I have tried to adjust the Motor specific angle and the correction at angle, but it dos´nt seem to help much. I don´t find much information about them in the instructions at C#ROME-B


Image

Image

Here are some more values, and does these throttle values mean that I should adjust the min throttle to almost 0 and the max to almost 249?

But the throttle is not very important now, I can probably figure that out later. The main question is how do I get the motor to run smooth?

Post Reply