Search found 1226 matches

by casainho
Feb 24, 2018 6:25 am
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

Done about protecting battery undervoltage on slow loop only. I did a ride of 40 minutes but wasn't enough to discharge enough my battery (flat lands here) so I could test this new feature. Here is the relevant piece of code (it is now on master branch): /********************************************...
by casainho
Feb 22, 2018 6:36 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

As I understand in one pwm cycle if it senses overvoltage it lowers duty cycle - so it tries to hold max regen current set possible to maintain that voltage? If yes, its more important to have this at undervoltage, but both is best if possible. Overvoltage only happens when current is "negative", f...
by casainho
Feb 22, 2018 5:07 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

What differences there are between displays? Dunno which one to take between S-LED890, S-LCD1, S-LCD3, S-LCD5, S-LCD6. Also, is it ok if the original motor is sensorless (it has dedicated speed sensor cable)? About the motor controller, please read which ones were tested: https://opensourceebikefir...
by casainho
Feb 22, 2018 11:50 am
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

@Casainho - I suggest adding battery low voltage to fast loop also if possible, tuned well, you will apreciate that when running out of juice with batteries that have noticeable voltage sag. (Actually the better ones-I can explain) overvoltage is less neccesary to have at fast loop than lowvoltage,...
by casainho
Feb 22, 2018 11:35 am
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

racingame wrote:
Feb 22, 2018 11:25 am
Does this work also with mid-drive motors like the Bafang BBSHD? I'd like to buy the S12S for a 48V battery pack.
I think Stancecoke is the only one that tested on such motors.
by casainho
Feb 22, 2018 10:11 am
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

The code is now on master. I tested with some real rides and works well. Only one thing: on a geared motor, external speed sensor is a must other way motor blocked detection will fail. Fast loop/PWM cycle limits: // - limit battery overvoltage // - limit battery max current // - limit motor max curr...
by casainho
Feb 21, 2018 8:30 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

Forgot to say that battery undervoltage is done on slow loop: it just stops the motor and signals that state to LCD.

Don't know if is logic to have battery limits in different places and done at very different frequencies. Anyway, for now it is done like that and works for me.
by casainho
Feb 21, 2018 8:11 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

My smaller "big" bike can take 50A battery regen current if overvoltage limited... just saying VESC config looks good, would love to have same with kunteng :) and I hope the way you are implementing will do the job for this summer. At slow loop 10Hz, using PI controller, only motor phase current is...
by casainho
Feb 21, 2018 7:30 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

So yes, both regen motor and battery currents should be controlled. Motor regen current depends more on hardware so it probably is the same value as motor current. Battery and battery regen currents are different, because batteries charge at lower rates. Here is a VESC configuration tool showing all...
by casainho
Feb 21, 2018 7:15 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

I already took the shunt oscilloscope screenshots: https://opensourceebikefirmware.bitbucket.io/development/heets_and_application_notes--Endless-sphere.com_forum_messages--2018.02.20_-_Reading_motor_phase_current_from_the_DC_link_current_(shunt).html But yes, the yellow line is the voltage on shunt ...
by casainho
Feb 21, 2018 5:54 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

So I want to implement limit max motor and battery currents. Do you guys know if I should do also limit battery and motor max currents? -- because before I were just limiting battery current for regen...
by casainho
Feb 20, 2018 3:17 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

The S06S has 2 signals from shunt, one filtered (battery current) and other not filtered (motor phase current). I'm not happy with this wording at all. It's not the real battery current, as the shunt is placed between the gnd of the MOSFETs and the big capacitors. And it's not the real phase curren...
by casainho
Feb 20, 2018 12:01 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

So, current code should be good to protect powerful fast motors as Onya is being asking, I hope. So how is that "phase current limiting" implemented now? If its the simple calculation and there is a delay in dcA there will be delay in limiting..? Can we get rid of that low pass filter? Optional: st...
by casainho
Feb 20, 2018 9:46 am
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

Alert!! Some S06S controllers has a phase B current sensor ACS712 instead of ACS711. The ACS712 output voltage for 0 amps is 2V and not 2.5V as on ACS712 and this means the "very low resolution FOC" code must be adapted for this difference -- my current code: main.h: //#define ADC_PHASE_B_CURRENT_Z...
by casainho
Feb 20, 2018 9:29 am
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

... 3. The mathematical model says that: battery current = duty_cycle * motor phase current. As the duty_cycle was 33%, so the motor phase current should be (battery current / 0.33) = 2.5/0.33 = 7.6 amps <--- the measured values seems to be inline with the mathematical model. To be honest, I don't ...
by casainho
Feb 20, 2018 5:51 am
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

100A is good enough for stock 6fet for sure (easier to add resistor still..), but I have one modified and want to try 72v/60A,120pA :twisted: (once the phase current limiting is ready) The phase current limit is now done, as I explained in my last post. Now I want to try it on a real ride and I don...
by casainho
Feb 19, 2018 11:46 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

I think I got the motor phase current from the shunt, by following the ST application note. I also did some tests and did a log, where I did validate the results with the mathematical model. My notes: https://opensourceebikefirmware.bitbucket.io/development/heets_and_application_notes--Endless-spher...
by casainho
Feb 19, 2018 8:14 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

For doing FOC, we really need an STM32, no point to try do with STM8. Ideally, we would find a "cheap" motor controller that original firmware does FOC, like this ones: http://en.ertcz.com | https://ertcz.en.alibaba.com/ Just theoretical question. Is stm32 exactly pin compatible and really easy to ...
by casainho
Feb 19, 2018 12:06 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

Yes, actually not even 0.5 second with really fast motor, because 40A from battery can be 200A to motor. (=at mofets) Didn't know about that!! Now I recall Stancecoke and others telling that "motor current" on firmware is instead battery current but I always thought they were equal. I need to read ...
by casainho
Feb 19, 2018 11:59 am
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

Or hardware modification, which I will like the best, but is really hard. A) Adding 1 more hall current sensor to the last free AIN pin. (Sensor can be on wire, so not that hard do do for me) adding 2 more will be best but we dont have enough free pins? Or B) Using mosfets as shunts (is done on som...
by casainho
Feb 19, 2018 6:44 am
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

I was able to filter out the torque signal when user is not pedaling and it works well, as expected. I hope that now my son will not be able to cheat :-) The idea is that there is a startup phase where the torque signal is not filtered out. This startup phase has a duration of 5 seconds and after th...
by casainho
Feb 19, 2018 4:46 am
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

honya96 wrote:
Feb 19, 2018 4:43 am
Paralel resistor can help only if the phase current is limited, but here its not.
Maybe it is possible to limit, who knows???
I want to read more about this to learn if is possible.
by casainho
Feb 18, 2018 11:20 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

So they use different versions because there is "phase over current" cut/protection on stock fw - I guess. I would say they use different versions so the sensor can hold the phase current. If you are looking to increase the phase current and battery current, I would put the power resistor in parall...
by casainho
Feb 18, 2018 1:44 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

Great, that the PI-controller works satisfying now! Are you using human power related assistance now, or still just the torque-signal? Was a little accident and I don't remember last time such happened. Not using human power, maybe will test later. The biggest issue is my son not pedalling and rest...
by casainho
Feb 18, 2018 1:02 pm
Forum: Motor Technology
Topic: Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 1769
Views: 47765

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

See that on firmware, we use only the sensor output voltage (for "FOC") near 2.5V output (0 amps), so I would say would be no problem if the sensor is working on overcurrent. Dont understand yet exactly how it works.. but does that mean the model(50,100A..) does not matter really if we dont use it ...