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

I think the issue with the rotation direction is solved already?!

Basia said:
I chose the right combination!
I changed the phase wires yellow-yellow green-blue and blue-green.
Hall sensors changed the yellow-blue green-green blue-yellow.
the direction of rotation is correct

regards
stancecoke
 
stancecoke said:
I think the issue with the rotation direction is solved already?!

Basia said:
I chose the right combination!
I changed the phase wires yellow-yellow green-blue and blue-green.
Hall sensors changed the yellow-blue green-green blue-yellow.
the direction of rotation is correct

regards
stancecoke

Yes, I wrote that it was solved. the motor does not stop
 
stancecoke said:
Basia said:
the motor does not stop

If you disable regen in the java tool, the motor stops correctly?!

regards
stancecoke

does not depend on regen. now picked up the configuration. 131 degrees motor offset and interpolation 0. The wheel rotates well but does not stop until the end. slowly rotates after releasing throttle
 
Basia said:
stancecoke said:
Basia said:
the motor does not stop

If you disable regen in the java tool, the motor stops correctly?!

regards
stancecoke

does not depend on regen. now picked up the configuration. 131 degrees motor offset and interpolation 0. The wheel rotates well but does not stop until the end. slowly rotates after releasing throttle
Try on with yourself on top, should work well.
 
casainho said:
Basia said:
stancecoke said:
Basia said:
the motor does not stop

If you disable regen in the java tool, the motor stops correctly?!

regards
stancecoke

does not depend on regen. now picked up the configuration. 131 degrees motor offset and interpolation 0. The wheel rotates well but does not stop until the end. slowly rotates after releasing throttle
Try on with yourself on top, should work well.

change code in breake.c ? Nothing has changed
 
Basia said:
Nothing has changed

If the throttle is released, the battery current is controlled to be zero. With the wheel in the air, the battery current will be almost zero, even, if the wheel is still spinning. Just put the wheel on floor and the wheel will stop...

regards
stancecoke
 
stancecoke said:
Basia said:
Nothing has changed

If the throttle is released, the battery current is controlled to be zero. With the wheel in the air, the battery current will be almost zero, even, if the wheel is still spinning. Just put the wheel on floor and the wheel will stop...

regards
stancecoke

I stop it with my hand when I release it again it rotates
[youtube]XQ3-fZRpsYc[/youtube]
 
Yes that's normal, as casainho has removed the PI-controller for the battery current from the code. But it doesn't matter in real life, except you want to carry the scooter by hand while the system is switched on...
We had a workaround by reducing the value of adc_battery_current_offset_10b by some digits in the adc.c formerly...

Code:
  // read and average a few values of ADC battery current
  ui16_adc_battery_current_offset_10b = 0;
  for (ui8_i = 0; ui8_i < 16; ui8_i++)
  {
    ui16_counter = TIM2_GetCounter () + 10; // delay ~10ms
    adc_trigger ();
    while (!ADC1_GetFlagStatus (ADC1_FLAG_EOC)) ; // wait for end of conversion
    ui16_adc_battery_current_offset_10b += ui16_adc_read_battery_current_10b ();
  }
  ui16_adc_battery_current_offset_10b >>= 4;
  ui16_adc_battery_current_offset_10b -= 8;
  ui8_adc_battery_current_offset = ui16_adc_battery_current_offset_10b >> 2;

I don't remember, if that caused any trouble at another part of the code...

regards
stancecoke
 
stancecoke said:
Yes that's normal, as casainho has removed the PI-controller for the battery current from the code. But it doesn't matter in real life, except you want to carry the scooter by hand while the system is switched on...

regards
stancecoke

1.5 A normal current for idling?
 
sorry that was a missunderstandig due to my english knowledge :D
For max speed with wheel in the air, it's OK!

You shouldn't judge the throttle behavior with the wheel in the air, as the firmware controls the current and not the speed.

regards
stancecoke
 
stancecoke said:
Yes that's normal, as casainho has removed the PI-controller for the battery current from the code. But it doesn't matter in real life, except you want to carry the scooter by hand while the system is switched on...
We had a workaround by reducing the value of adc_battery_current_offset_10b by some digits in the adc.c formerly...

Code:
  // read and average a few values of ADC battery current
  ui16_adc_battery_current_offset_10b = 0;
  for (ui8_i = 0; ui8_i < 16; ui8_i++)
  {
    ui16_counter = TIM2_GetCounter () + 10; // delay ~10ms
    adc_trigger ();
    while (!ADC1_GetFlagStatus (ADC1_FLAG_EOC)) ; // wait for end of conversion
    ui16_adc_battery_current_offset_10b += ui16_adc_read_battery_current_10b ();
  }
  ui16_adc_battery_current_offset_10b >>= 4;
  ui16_adc_battery_current_offset_10b -= 8;
  ui8_adc_battery_current_offset = ui16_adc_battery_current_offset_10b >> 2;

I don't remember, if that caused any trouble at another part of the code...

regards
stancecoke

with this code, the wheel stops as needed only very quickly)
 
Basia said:
with this code, the wheel stops as needed only very quickly)
Great!! Can you please record a video, put on youtube and use on the tittle the name of this firmware project? So others can see it running a kick electric scooter?

So, it is finally running without issues, right?
 
casainho said:
Basia said:
with this code, the wheel stops as needed only very quickly)
Great!! Can you please record a video, put on youtube and use on the tittle the name of this firmware project? So others can see it running a kick electric scooter?

So, it is finally running without issues, right?

it seems that everything is fine! tomorrow I will check on the street. now record a video! Thank you so much!
can i connect lcd5?
 
Basia said:
casainho said:
Basia said:
with this code, the wheel stops as needed only very quickly)
Great!! Can you please record a video, put on youtube and use on the tittle the name of this firmware project? So others can see it running a kick electric scooter?

So, it is finally running without issues, right?

it seems that everything is fine! tomorrow I will check on the street. now record a video! Thank you so much!
can i connect lcd5?

[youtube]ypW0wgL6zVM[/youtube]
 
Copied from TSDZ2 thread:-

A very kind feature would be, to enable/disable the 25 km/h limit with long pressing the up/down keys. Might this be implementable?


(casainho) Sure it is. We call it, on our OpenSource firmware for KT motor controllers, the street and offroad modes.


....so is this feature now working on the KT fw? I thought this was still in the 'future improvements' category.. :)
 
geofft said:
Copied from TSZD2 thread:-

A very kind feature would be, to enable/disable the 25 km/h limit with long pressing the up/down keys. Might this be implementable?


(casainho) Sure it is. We call it, on our OpenSource firmware for KT motor controllers, the street and offroad modes.


....so is this feature now working on the KT fw? I thought this was still in the 'future improvements' category.. :)
It is on the issue list with that name, discussed and defined ready to be implemented. I wish more developers could join.
 
casainho said:
It is on the issue list with that name, discussed and defined ready to be implemented. I wish more developers could join.

It is already implemented in my fork (as a "morse-code" with the break lever), so it's only copy-paste...
Using the brake lever is better I think, as we don't need to use a custom LCD firmware. In the stock display firmware, the only implemented long press function, that sets a bit in the communication protocol, is the light switch, I think. And the brake lever works for people who don't want to use a display also.

regards
stancecoke
 
stancecoke said:
casainho said:
It is on the issue list with that name, discussed and defined ready to be implemented. I wish more developers could join.

It is already implemented in my fork (as a "morse-code" with the break lever), so it's only copy-paste...
It needs more work than that:
1. understand current firmware structure and implement for that structure
2. testing and then debugging, as hardly everything works at first time

Copy-past would make the firmware a mess. There are states that need to keep working because they implement some protections and most of the time, any addition will need to be done with care other way will brake that states.
 
geofft said:
A very kind feature would be, to enable/disable the 25 km/h limit with long pressing the up/down keys. Might this be implementable?

And show brake symbol or something after the hold period so we know its active and disapear after releasing
 
casainho said:
Copy-past would make the firmware a mess.
Copy-Paste of the improved direction detection for PAS took me just one or two hours of work. But of course you are right, most of the time I had to spend to understand how you solved things in your code. If you don't like a "quick-and-dirty"-solution, you can take the principle from the other fork and have to implement it yourself. I think you are the only one in the world, who understands the whole firmware structure :shock: I lost track of things one day :-(.

regards
stancecoke
 
Back
Top