Lebowski's motor controller IC, schematic & setup, new v2.A1

Yes. I changed the throttle. I didn't read the manual correctly and thought 1,1,1 was linear throttle. Throttle 'management' will be handled by the Cycle Analyst. So I will change that.
I'll also try all other improvement ideas as well as new hall calibration. Btw: what has halls to do with drive_3? I thought it's only needed for start up?!
 
Good point.. applying load while in drive 3 would not rely on hall sensors. So it could be those other settings. But for the transition from drive 2 to 3 it would matter...

Good luck :mrgreen:
 
Animalector is right, good hall calibration matters for the transition from 2 to 3. Similar for lowering the fixed error current setting.

If you look at your hall calibration, two of them show a confidence of 8. This tells me either the hall calibration was done at too low an erpm or setup was pressed too quickly after entering drive 3.

Yep, swap the values so 10A for a fixed error current... Also, please try completely sensorless. This will give some info about the correctness of the loop coefficients.
 
i tried now in mode "0) mode: Toneless, with recovery" but the problem is the same, it just need some time to start and is not as smooth as in hall-sensor mode (of course).
i now observed that the controller seems to cut out, and revert to drive_1 when the load exceed 10a. at least i can watch my external turnigy watt meter (haven't calibrated my CA shunt yet) and when i drive it slowly, everything is ok. no-load current with all the chains and rear wheel turning is 4.5a, so everything is fine. when i let the throttle go, and then apply it again everything still is fine, as current does NOT exceed 10a. but when it's running WOT and i slightly slowly apply the brakes, current rises, it reaches 10a, and BANG. it's back at drive_1.
i still will recalibrate the halls. just in case. i for sure did it wrong. i did NOT press the "setup" button while the motor was running, after i let the throttle go. my error.

setting those values to 20/10, 10/20 or 20/20 doesn't change a thing:

Code:
j) maximum shutdown error current, fixed: 19.9 A
k) maximum shutdown error current, proportional: 9.9 A
 
seems hall config was broken somehow. i did as advised some posts ago, and now it looks fine:

Code:
 code: 0, angle: 358 deg, confidence: 0, used: no
 code: 1, angle: 95 deg, confidence: 7, used: yes
 code: 2, angle: 333 deg, confidence: 7, used: yes
 code: 3, angle: 35 deg, confidence: 7, used: yes
 code: 4, angle: 215 deg, confidence: 7, used: yes
 code: 5, angle: 153 deg, confidence: 7, used: yes
 code: 6, angle: 275 deg, confidence: 7, used: yes
 code: 7, angle: 358 deg, confidence: 0, used: no
problem is unchanged of course :)
 
If I calibrate with a 105v battery at full rpm its a low confidence level like 2-3 but if I calibrate at ~1/4 the max rpm with a 105v battery then I get 7 on all of them. Is this right?
 
izeman said:
i tried now in mode "0) mode: Toneless, with recovery" but the problem is the same, it just need some time to start and is not as smooth as in hall-sensor mode (of course).
i now observed that the controller seems to cut out, and revert to drive_1 when the load exceed 10a. at least i can watch my external turnigy watt meter (haven't calibrated my CA shunt yet) and when i drive it slowly, everything is ok. no-load current with all the chains and rear wheel turning is 4.5a, so everything is fine. when i let the throttle go, and then apply it again everything still is fine, as current does NOT exceed 10a. but when it's running WOT and i slightly slowly apply the brakes, current rises, it reaches 10a, and BANG. it's back at drive_1.
i still will recalibrate the halls. just in case. i for sure did it wrong. i did NOT press the "setup" button while the motor was running, after i let the throttle go. my error.

setting those values to 20/10, 10/20 or 20/20 doesn't change a thing:

Code:
j) maximum shutdown error current, fixed: 19.9 A
k) maximum shutdown error current, proportional: 9.9 A

So, it cuts out once battery current hits 10A ? Strange, as nothing really is battery current related...
The only thing i can think of is that the battery voltage drops (due too the load) below a certain level.
If the 5V supply would dip i would expect the chip to go to drive 0, not drive 1. So the 5V supply i think
is OK. Animalector, will the gate drive power supply be ok when the battery voltage drops ?

Also what can be is that the battery voltage measurement pin drops below 2.5V, causing the chip to revert
to a default value for battery voltage. This i can imagine will give the behavior.... Animalector did you wire
this pin via a resitive divider to the battery or did you wire it to ground ?
 
Arlo1 said:
If I calibrate with a 105v battery at full rpm its a low confidence level like 2-3 but if I calibrate at ~1/4 the max rpm with a 105v battery then I get 7 on all of them. Is this right?

No, no reason why high erpm should not give high confidence. Are you sure the special chip you use there can handle high erpm ? Not that it really matters as its only used at low speed...
 
I looked at Andy's schematics, if he's using the resistors as mentioned there then you are pretty close to the 2.5V on the battery monitoring
pin... any chance of trying with 60v or 36V ?

17.3 k*2, combined with 2.2k to gnd and a 45.8V battery gives 2.74V ...
 
Lebowski said:
Arlo1 said:
If I calibrate with a 105v battery at full rpm its a low confidence level like 2-3 but if I calibrate at ~1/4 the max rpm with a 105v battery then I get 7 on all of them. Is this right?

No, no reason why high erpm should not give high confidence. Are you sure the special chip you use there can handle high erpm ? Not that it really matters as its only used at low speed...
The motor is spinning around 2100 rpm at full rpm with 105v and the sensor is rated for 30,000 rpm. We have these in use on zero motors with 6600-7000rpm max speed and no problem. Likely its noise.
Edit: oh snap its noise on the phase signals!!!
 
izeman said:
Lebowski said:
... any chance of trying with 60v or 36V ? ...
Sure. Any voltage you tell me to try :)
Does it need to be exactly 60v? I have power supplies that can do 60v but only 7A. I have 1000w chargers that go up to 105V. Or i can put lipos in series.

Maybe first there's something else to try with your 48V battery. Your FETs are only good for 100V so I would not go over 80V...

before trying this hex, get a hexdump and save it so you can always return to your own settings. What I did in the
hexdump underneath here is change the inductor to 0uH, this should with a bit of luck make it not sensitive to the
battery voltage measurement pin. It will be less tolerant to sudden load changes though, but with a bit of luck it'll give
info about whether its the battery pin...

Code:
    0x03D3   0x03D3   0x0628   0x000C   0x0004   0x0002   0x7FBC   0x0623
    0x0000   0x018B   0x8000   0x07AD   0x03D6   0x0E92   0x03F5   0x03F0
    0x03F0   0xAAAA   0xAAAA   0xAAAA   0x02EE   0x0267   0x001E   0x0301
    0x000A   0xF74C   0x0309   0x1000   0x1000   0x1000   0xFFFF   0xFFFF
    0xFFFF   0x00B3   0x02B6   0xFFFF   0xFFFF   0x1EB6   0x0189   0x1146
    0x0000   0x079C   0x0258   0x0064   0xFFFF   0xFFFF   0xFFFF   0xFFFF
    0x0000   0x4CCD   0x000C   0x0000   0x00F0   0xFFFF   0xB333   0xFFF4
    0x0000   0xFF10   0x0000   0x07AE   0x0018   0x0000   0x01E0   0xFFFF
    0xF852   0xFFE8   0x0000   0xFE20   0x0003   0x0000   0x0078   0x0000
    0x0000   0xFFFD   0x0000   0xFF88   0x0000   0x0000   0x003C   0x0003
    0x0000   0x0000   0x0000   0xFFC4   0xFFFD   0x0000   0x0000   0x0000
    0x00F0   0x000C   0x0000   0x0000   0x0000   0xFF10   0xFFF4   0x0000
    0x0000   0x0000   0x0000   0x1400   0x0000   0x05DC   0x02E1   0x0038
    0x00F0   0x02EB   0x014F   0x0008   0x0156   0x0042   0x0008   0x1C70
    0x0000   0x03E8   0x00C8   0x4C31   0x03B6   0x6000   0x0623   0x00D2
    0xFF00   0x4341   0xEC3F   0x193F   0x983F   0x6B3F   0xC341   0xFF00
    0xFFFF   0xC519   0x764B   0x5482   0x41B3   0x35C3   0x2D7A   0x276B
    0x22C9   0x1F1E   0x1C28   0x19B5   0x17A6   0x15E6   0x1463   0x1312
    0x11EB   0x10E4   0x0FFB   0x0F28   0x0E6B   0x0DC0   0x0D23   0x0C94
    0x0C10   0x0B97   0x0B27   0x0ABF   0x0A5F   0x0A05   0x09B1   0x0962
    *
 
ok, this is really strange. at least for me ;)
i uploaded your code, which didn't change a thing. but i watched for supply voltage drop. and was surprised to see HOW MUCH if dropped w/o real load (only the wheel running freely in the air). it pumped up to 17A into the motor when accelerating.
so i removed the chain to let the motor run freely. it has a no load current of around 3A. which is some current, but not too much in my eyes. but even when i hit the throttle the amps jumps to 12A. which is a lot for only making the motor spin up to speed. it's a little geared hub.

edit: i repeated the test with 69v battery and it was exactly the same.
 
Did you re-do the motor inductance calibration before trying the 69V ?

You mentioned in another post you had 3 mac motors, 8, 10 and 12t. Can you try the other 2 motors, both at 69 V ? Can you
redo the inductance calibration before you run the motors and give us the numbers ? Can you also spin them to the
same max erpm and report the current draw from 69V ?
 
Lebowski said:
Did you re-do the motor inductance calibration before trying the 69V ?
no. does it change with voltage?

You mentioned in another post you had 3 mac motors, 8, 10 and 12t. Can you try the other 2 motors, both at 69 V ? Can you
redo the inductance calibration before you run the motors and give us the numbers ? Can you also spin them to the
same max erpm and report the current draw from 69V ?
those motors are not ready to install. it's just the bare winding with the rotor. but no gears, no case, nothing. they are good to be spun up, but that's it. would this be ok for a test?
 
Well, its just to get rid of the setting changes i made, to get rid of the 0 uH

To be honest, i find 3A at 70V quite high, it means it costs like 200W just to spin a wheel. My big 10kW hub spins at 1000rpm for 150W.
So, i'm just curious to see whether the other Macs also take that much power, or maybe something is wrong with the one on the bike...

I have no clue though what the power loss in the gears of a Mac would be.
 
Lebowski said:
.. To be honest, i find 3A at 70V quite high, it means it costs like 200W just to spin a wheel. My big 10kW hub spins at 1000rpm for 150W.
no. it's 3A at 45V and it's even a bit less. so we're talking 2.7A@45V or 120W. still a lot if we are talking about a 250W limit to be street legal in most countries of the world. i hope this is measured AT THE WHEEL and not at the battery ;)
 
izeman said:
@lebowski: could you maybe post a .hex file as your chip comes fresh from the firmware flash? i don't really think it will change a thing, but maybe it helps to start from the very beginning?

A fresh chip has 0xFFFF everywhere, don't forget to terminate with a *

About your motor, i saw you did the work to make the axle turn instead of the hub. Just wondering whether accidentally a few windings are shorted...
I once burned out and shorted most windings in one phase. The motor still ran with my controller (sensorless) but took a lot of power.
 
Lebowski said:
izeman said:
@lebowski: could you maybe post a .hex file as your chip comes fresh from the firmware flash? i don't really think it will change a thing, but maybe it helps to start from the very beginning?

A fresh chip has 0xFFFF everywhere, don't forget to terminate with a *

About your motor, i saw you did the work to make the axle turn instead of the hub. Just wondering whether accidentally a few windings are shorted...
I once burned out and shorted most windings in one phase. The motor still ran with my controller (sensorless) but took a lot of power.
thanks. i don't think the motor is damaged. one of the others maybe. once the motor is running it takes 120w. so this is fine, and i guess exactly what to expect (i raised a bit after the conversion).

i re-read all the last three pages, and more and more makes sense now.
what is the max value you would suggest for:

Code:
error current filtering (option c in the filtering menu)
 
Lebowski said:
I once burned out and shorted most windings in one phase. The motor still ran with my controller (sensorless) but took a lot of power.

just to be 100% sure i can make a resistance measurement tomorrow (using 4-wire method).
i like easter holidays as it's HOLIDAYS. but i sucks to spend these days with too many ppl of families that aren't really your's ;) too little time to spend in the workshop ...
 
Back
Top