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.j bjork said:A question, how is the trottle response compeared to the standard fw? I think it is a bit slow on the kt fw.
I can't follow kkm's arguments, he reported his experience before:j bjork said:It would be interesting to hear the developers comments on this.
I never heard about this disappointing behaviour from other users...kkm said: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.
j bjork said:So it should still be speed throttle, not torque?
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.Marv1337n said:I saw that you can modify the LVC, so would that fix my problem or is it a hardware problem?
stancecoke said:j bjork said: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)
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.Marv1337n said:I saw that you can modify the LVC, so would that fix my problem or is it a hardware problem?
regards
stancecoke
stancecoke said:j bjork said: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)
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.Marv1337n said:I saw that you can modify the LVC, so would that fix my problem or is it a hardware problem?
regards
stancecoke
stancecoke said:j bjork said: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)
eimertvm said: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
casainho said: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 said: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
Marv1337n said:Does the standard KT controllers come with a higher Phase Amps than Battery Amps?
Iphase = Ibattery/duty cycle
I think you mean a limiter for both type of currents. Yes, Kunteng hardware permits that limit and my code does that, even because I think we should limit motor/phase current to protect the controller. I think Stancecoke code does not implement this limit.Marv1337n said:POST A REPLY
Post icon:
None
Subject:
Re: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW
| |
Smilies
:thumb:
Figured I ask here because I guess the developers of this firmware knows this best.
Does the standard KT controllers come with a higher Phase Amps than Battery Amps? e.g. 45A from the Battery but 70A goes to the motor?
// *************************************************************************** //
// MOTOR CONTROLLER
// Choose your controller max current and max regen current
//
// S06S controller holds 15 amps as max current
#define ADC_MOTOR_CURRENT_MAX 43 // each unit = 0.35A; 43 = 15A (tested on S06S motor controller)
#define ADC_MOTOR_REGEN_CURRENT_MAX 28 // CAN'T be more than 66 units!! each unit = 0.35A; 20 = 10A but the brake/regen must be only for a few seconds!!
// *************************************************************************** //
// BATTERY
#define ADC_BATTERY_CURRENT_MAX 42 // each unit = 0.35A | in this example, 42 * 0.35 ~= 15 amps
#define ADC_BATTERY_REGEN_CURRENT_MAX 5 // CAN'T be more than 66 units!! each unit = 0.35A
/****************************************************************************/
// PWM duty_cycle controller:
// - limit battery overvoltage
// - limit battery undervoltage
// - limit battery max current
// - limit battery max regen current
// - limit motor max current
// - limit motor max regen current
// - limit motor max ERPS
// - ramp up/down PWM duty_cycle value
if ((UI8_ADC_BATTERY_CURRENT > ui8_adc_target_battery_current_max) || // battery max current, reduce duty_cycle
(ui8_adc_motor_current > ui8_adc_target_motor_current_max) || // motor max current, reduce duty_cycle
(ui16_motor_speed_erps > MOTOR_OVER_SPEED_ERPS) || // motor speed over max ERPS, reduce duty_cycle
(UI8_ADC_BATTERY_VOLTAGE < ((uint8_t) ADC_BATTERY_VOLTAGE_MIN))) // battery voltage under min voltage, reduce duty_cycle
{
if (ui8_duty_cycle > 0)
{
ui8_duty_cycle--;
}
}
casainho said:I think Stancecoke code does not implement this limit.
Sorry, I remember now. I remember that you did implement like I did on TSDZ2 firmware.stancecoke said:casainho said:I think Stancecoke code does not implement this limit.
Sorry, you are not up to date, the phase current limitation is implemented since several month
regards
stancecoke