Search found 1168 matches

by stancecoke
Aug 29 2017 9:27am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

:-( Just one question to your old code. motor fast loop: if (ui16_PWM_cycles_counter < PWM_CYCLES_COUNTER_MAX) { ui16_PWM_cycles_counter++; } else { ui16_PWM_cycles_counter = 0; ui16_PWM_cycles_counter_total = 0xffff; //(SVM_TABLE_LEN_x1024) / PWM_CYCLES_COUNTER_MAX; ui16_speed_inverse = 0xffff; // ...
by stancecoke
Aug 29 2017 4:26am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

casainho wrote:
In Freescale Semiconductor Document Number: AN4869
Funny, I just found the same document and wanted to post the link :-), you were faster...

And, does it work?!

In this document, chapter 5.2, you can find a hint at which rotor position you should do the switch...

regards
stancecoke
by stancecoke
Aug 29 2017 2:54am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Have you checked the erpm for a certain value of ui8_duty_cycle_target in both modes, square and sine? If there is a big difference between these both erpms, you should reduce ui8_duty_cycle_target to the relating erpm in sine mode with the jump from square to sine-wave and then ramp it up slowly to...
by stancecoke
Aug 29 2017 1:21am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I have made the experience, that the original firmware of the S06ST does not switch at a certain speed from square to sine modulation. It needs a sufficient current to do the switch. With my direct drive i just had to put a little load on the wheel, then it switched very early and reliably. Starting...
by stancecoke
Aug 28 2017 2:39pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I tried your SVM-Table from the current SVM branch. The MOTOR_ROTOR_DELTA_PHASE_ANGLE_RIGHT is nearly zero in this setting. But the start up is very poor. At higher speeds I calculate the correction value like shown in the diagramm. Can the start up be improved somehow? (This is the thing, you are w...
by stancecoke
Aug 28 2017 6:44am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

So with phase current sensor to automatically adapt for different motors and have best efficiency. In your case, you can try: - buy a new controller - take out the current sensor from the broken controller to the one you have working - use the function to adjust the angle using as input the motor s...
by stancecoke
Aug 28 2017 3:59am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

So, what is the phase current sensor for?? It's just to avoid the need of manual fitting of the correction values according to your motor properties?! As far as I understand the phase current should be sinusoidal in my settings with SVM_TABLE == SINE_SVM_ORIGINAL. Perhaps the efficiency is not in o...
by stancecoke
Aug 27 2017 1:04pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Here are some photos of the labeles and the boards of the KT36 and the S06ST So it seems the S06ST is board version KTE-6S3-B, my KT36 is KTE-6S3-D and yours is KTE-6S3-D3 .... I bought the KT36 from ebay . It has a little additional board for switching bikes lights. regards stancecoke KT36 label.JP...
by stancecoke
Aug 27 2017 11:45am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Hmm, now I looked up the via for phase B current. I'm a little confused. It seems that I have an older version of board layout. There is no ACS711 (EX Package) as shown on KingQueenWong's schematic on my board. There is a space for a ACS712, but it's left empty. On the board of a (defect) S06ST the ...
by stancecoke
Aug 27 2017 8:20am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

To disable regen, we simple disable PWM signals when decrementing throttle value. Where in the code you can disable PWM? ... but how do I know at which duty_cycle should I start?? Shoudn't that be easy for a direct drive, as we know the mechanical rpm from the speed signal? I updated the feature_to...
by stancecoke
Aug 27 2017 2:54am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Question: did you saw if at max speed, your motor have a phase B current sinewave? I have not tested it yet, I still haven't identified the via on the ciruit board (I never searched for it :-)) That's braking and regen!! ... and will for sure help us implement regen/braking. OK, we have to make tha...
by stancecoke
Aug 26 2017 2:37pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

OK, it works now. Some remarks: You mixed up pins 23 and 24 in you documentation, Battery Voltage is on pin 24 (PE7 AIN9). The schematic gives the right information :-) • pin 23: BATTERY VOLTAGE • pin 24: seems to stay always at 2V There is very much scatter on the battery current signal, I think we...
by stancecoke
Aug 26 2017 5:26am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

OK, then i'll try it with global variables.
Why do you map the throttle value to a maximum of 237?

Regards
stancecoke
by stancecoke
Aug 26 2017 4:13am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I now want to implement battery current limiting and undervoltage protection. Therefore I want to read in throttle, battery current, and battery voltage in the acd_read_throttle. Is there an easy way to return all three values from the function? I don't know how to deal with arraypointers etc. I wou...
by stancecoke
Aug 25 2017 9:16am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Of course it would be fine to adjust the parameters at runtime with UART (e.g. Bluetooth-module + Cellphone-app) later, but first the user has to flash the firmware. Perhaps I can even add a Button to the Java tool for setting the option bytes :-).

Regards
stancecoke
by stancecoke
Aug 25 2017 6:11am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I just made a little java tool for setting up the main parameters. It edits the config.h-file and starts the compiling process. I think I have to read about the command-line flash tool from ST to add the flashing process to the batch-file ;-). The tool needs Java Runtime. In this way any user withou...
by stancecoke
Aug 24 2017 1:48pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

casainho wrote: But I think the feature is just finished when you record a video showing it working :-)
here you are... :D



I had to set the wheel circumference to 4 meter to have measured speed in the range the motor can turn, to proof the speed limitation function.

Regards
stancecoke
by stancecoke
Aug 24 2017 3:51am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

OK, I think a very important thing to do is to implement a motor phase current limitation. You read in the maximium current already, but this value "ui16_adc_current_phase_B_filtered" is not used for any further actions yet? Is there any possibility that Phase A or C take too much current, while Pha...
by stancecoke
Aug 24 2017 1:47am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I will not merge to master yet I think this would not make sense, as less people own such a bottom bracket sensor. Perhaps we should place all customer relevant parameters into a config.h, and activate/disable the features with ifdefs... I want to focus on the missing motor control. Are you plannin...
by stancecoke
Aug 23 2017 2:16pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Just updated the feature_torque_sensor branch. Motor is driven by the sensor now :-)
The interrupts of PAS and SPEED don't disturb the motor in any way, you can't hear a change in sound or anything...

regards
stancecoke
by stancecoke
Aug 22 2017 1:56pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

casainho wrote:I tried to connect the STLinkV2 and after some tries and verifications,
Do you have the correct wiring? I had no problems with flashing the STM32 Lishuis so far...

Regards
stancecoke
by stancecoke
Aug 22 2017 4:16am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I've just updated the feature_torque_sensor branch. I added a tutorial for setting up the toolchain with windows to reduce pain for other potential users, that are not experienced with linux 8)

regards
stancecoke
by stancecoke
Aug 21 2017 2:21pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Please just test and tell me if you could get the sine wave on phase B at max speed and what was the ui16_speed_inverse. can you post a picture where I can find the via for the current? I tested my code in hardware now. Just connected the sensor, not the motor to the controller yet. After fixing so...
by stancecoke
Aug 20 2017 11:57am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 3926
Views: 348330

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I just added a video to Youtube: pujSqUnBa7k Do you have an oscilloscope?? The other signal is the hall sensor, which is great as a trigger for the oscilloscope. Yes, I have a very old fashioned one, see my other youtube-videos :-) What is or motor RPM and eRPM? Can you please tell what is the RPM -...