Search found 831 matches

by Njay
Oct 24 2017 4:54pm
Forum: Motor Technology
Topic: High side vs Low side PWM
Replies: 74
Views: 9539

Re: High side vs Low side PWM

My scope does have a save bitmap option, but I don't know how to use it :oops: and I need to find a memory stick. Njay: Usually there's a suggestive menu button, you set the output type and go save choosing a filename (or let it choose for you). Memory stick or your smartphone, if you use one. With...
by Njay
Oct 20 2017 2:59pm
Forum: Motor Technology
Topic: High side vs Low side PWM
Replies: 74
Views: 9539

Re: High side vs Low side PWM

I would't thrust any such measurement taken with the ground lead.

p.s. Doesn't your scope have a "save bitmap" function?
by Njay
Oct 20 2017 2:44pm
Forum: Motor Technology
Topic: Micro Lebowski Controller - DIY 3kw
Replies: 496
Views: 52836

Re: Micro Lebowski Controller - DIY 3kw

I realize that amberwolf, the thing is that it seems a value rather low for the apparent beefiness of the terminals.
by Njay
Oct 20 2017 9:31am
Forum: Motor Technology
Topic: Micro Lebowski Controller - DIY 3kw
Replies: 496
Views: 52836

Re: Micro Lebowski Controller - DIY 3kw

This note in the datasheet is a bit confusing:

Maximum continuous current admitted 100 A to do not overcome the maximum temperature of terminals
by Njay
Oct 18 2017 7:42pm
Forum: Motor Technology
Topic: High side vs Low side PWM
Replies: 74
Views: 9539

Re: High side vs Low side PWM

That's more what I would expect to see for any relevant load. Motor RPM is irrelevant, it's the current that matters for this ringing. However, if you measured it using the ground lead and not the ground clip, the ringing amplitude may be much higher that it actually is. For a good measurement you s...
by Njay
Oct 17 2017 7:37pm
Forum: Motor Technology
Topic: High side vs Low side PWM
Replies: 74
Views: 9539

Re: High side vs Low side PWM

How exactly are you measuring (physically)? Where did you put the probe's tip and the GND clip (you're using the clip and not the lead, right?)?
Your switch-on spike actually looks "too" low to me, for something switching in 40ns. Information is missing. At what phase current are you measuring?
by Njay
Sep 22 2017 4:21pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I tried to optimize this code, following some ideas of NJay, mainly using a table with values centered on zero and not on 127: (...) The optimized code seems short but it uses more processing time!! :-( PWM cycle processing time: - old code: 42.4us - new optimized code: 47.2 So it takes +4.8us!! Ma...
by Njay
Sep 19 2017 12:32pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

So, I looked with oscilloscope to AN8 and seems to me that follows the shape of phase B current, but with much more noise!! Poor filtering :) You're also still dealing with low phase currents, the difference should increase as the currents get higher. I should actually say " average battery current...
by Njay
Sep 19 2017 10:04am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

AN8 is the battery current. When I wrote Ibat / duty it's really a divide operation, duty being the PWM's duty cycle but, as you pointed out, this is FOC and the current waveform is different from the "flat phase current" of non FOC.
by Njay
Sep 19 2017 9:36am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Using ISHUNT the motor current is measured, if the sw is fast enough. The motor current can also be controlled by terminating the PWM ON phase when the desired current is reached, thus providing some kind of torque control (or just providing a motor current reading to the user). I tried this and I ...
by Njay
Sep 19 2017 9:19am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

the caps smooth that usage such that the battery sees a more regular/constant current being pulled OK, now I got you, but I think there's no big difference between real battery current and the current you get from reading AD8, (as you wrote before :D ....) See this illustration. (the S06S controlle...
by Njay
Sep 19 2017 9:17am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Battery current (Ibat) alone isn't what you want because Ibat != Imotor. Older controllers apparently combined Ibat with the PWM duty cycle to estimate motor current (Ibat / duty, duty in [0;1]). In the case of FOC I guess you would want the RMS value of a phase current? Take the peak and divide by ...
by Njay
Sep 19 2017 8:44am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

The bulk capacitance is still before (I meant to write before on my other post, sorry) the current measuring resistor, so it's not measuring battery current directly, I don't understand that thing with the "bulk capacitance". As far as I read the schematic, each terminal of the shunt is connected t...
by Njay
Sep 19 2017 8:26am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Using OC the controller/motor is protected by limiting maximum motor current (controller is frequently the weaker of the 2). On OC going active, terminate the PWM ON phase regardless of the currently desired duty cycle. This is the kind of thing to do in hw or in an interrupt on OC change. Using ISH...
by Njay
Sep 19 2017 7:35am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

The bulk capacitance is still before (I meant to write before on my other post, sorry) the current measuring resistor, so it's not measuring battery current directly, it's measuring the sum of phase currents (then filtered and presented at AN8 for the average value), what you're seeing in the scopes...
by Njay
Sep 18 2017 5:08pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

I've implemented a linear function for Battery current, but I'm not satisfied yet. I've taken the moving average of 16 adc values alreacdy, but there is still very much scatter. The adc-value is not proportional to the battery current. Hm.... Per the S06S schematics in the project's site, the bulk ...
by Njay
Sep 11 2017 1:00am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Trying to get rid of the if/else... When you have uint16_t duty = ui16_svm_table[angle]; if (duty > MIDDLE_PWM_VALUE_DUTY_CYCLE_MAX) { duty = ((uint32_t)(duty - MIDDLE_PWM_VALUE_DUTY_CYCLE_MAX) * i16_duty_cycle_value) >> 9; duty = MIDDLE_PWM_VALUE_DUTY_CYCLE_MAX + duty; } else { duty = ((uint32_t)(M...
by Njay
Sep 11 2017 12:17am
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Hum, not using GCC... so, 1st of all I don't see any optimization flags on your makefile... so 1st thing to do is to add --opt-code-speed to the C flags. Can you get me the .LST file of the original code (as you have it after adding optimization flags)? Then try the files in attach to see, 1st if it...
by Njay
Sep 10 2017 7:28pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

Post that piece of 16bit code if you want, I may be able to optimize it.
by Njay
Aug 26 2017 8:09pm
Forum: Motor Technology
Topic: KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)
Replies: 4019
Views: 363960

Re: OpenSource firmware BMSBattery S/Kunteng KT controllers

OK, it works now. Some remarks: I added a linear function "y=a*x+b" to calculate the correction value from the inverse speed. ui8_position_correction_value = 135-(ui16_speed_inverse/19); You'll get better precision (due to correct rounding, to nearest value) by doing ui8_position_correction_value =...
by Njay
Aug 26 2017 9:38am
Forum: Motor Technology
Topic: Hi power inverter for Nissan leaf motor. Dyno's 302.3hp p15
Replies: 580
Views: 106359

Re: Hi power inverter for Nissan leaf motor. Dyno's 302.3hp

It's always good learning Arlo, and good reading too :)
Keep it up
by Njay
Jun 28 2017 5:26am
Forum: Battery Technology
Topic: LTC6811 Implementation Thread
Replies: 134
Views: 18210

Re: LTC6811 Implementation Thread

What's the possible programmable range of sensitivity?
by Njay
Jun 24 2017 10:56pm
Forum: Battery Technology
Topic: LTC6811 Implementation Thread
Replies: 134
Views: 18210

Re: LTC6811 Implementation Thread

I live relatively close to the sea (15Km or so) and one of the things I like the most is to walk at night on rocky beaches (sometimes rocks are sand covered, sometimes they're not) exploring the sea life. I've actually been in Santa Cruz a couple of times, but just enough time to wet my feet in the ...
by Njay
Jun 24 2017 3:11pm
Forum: Battery Technology
Topic: LTC6811 Implementation Thread
Replies: 134
Views: 18210

Re: LTC6811 Implementation Thread

Monitoring the cells is the bare minimum... if they get unbalanced, which, if I'm correctly aware, can be seen at the charge's bottom or top, the "engine check" bulb lights up and then it's up to the user to also plug the external balancer in tonight's charge. Or just prevent the user from using the...