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

hi i don't think they is any thing wrong with you motor. 3a dose not sound to much for a mac motor with plenty gearbox,

i don't own this motor , but it about the same has a upgraded cyclone 600/1200 watt motor 3a noload

i Hopeing to use this 3000watt Lebowski's motor controller soon my self.

i hope i am not in the same boat has you, ? with this controller :cry:

thank you
 
Sorry I haven't contributed much. But I've actually been working for my old boss this long weekend so haven't had time to scratch myself.

The R_mot resistors are 17k3 for battery voltage detection. Use this to calculate. The voltage regulator will run 15v from 30v to 140v. With output current max of
250mA which should be enough. Otherwise everything is the same as lebowski's schematic only changes being the FET type the usb chip and the voltage regulators

izeman that's a great video. It really shows what's going on well. Sorry but I got no suggestions for you. :twisted:
 
Lebowski How do I adjust the settings for drive 2? I can't pin the throttle in drive 2 see video.
You manual doesn't say anything about option H maximum phase current in drive 2 (HF only) is that HF only or can we adjust it for sensored start up?
Also maybe I can adjust some things in the recovery menu?
Code:
0x08FA  0x06BB  0x0E74  0x0018  0x0003  0x000C  0x7FBC  0x00CB                  
0x0000  0x0022  0x8000  0x0196  0x0152  0x0141  0x03AD  0x03B9                  
0x03AF  0xAAAA  0xAAAA  0xAAAA  0x0BB8  0x0B9A  0x008F  0x0D05                  
0x0003  0xF62C  0x0640  0x1000  0x0000  0x0000  0xFFFF  0xFFFF                  
0xFFFF  0x0054  0x03AB  0xFFFF  0xFFFF  0x0339  0x0065  0x0177                  
0x0000  0x01C0  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  0xF563  0x0187  0x0F32  0x097B  0x0152  0x0048                  
0x01E6  0x0CA4  0x05B0  0x0024  0x0438  0x0042  0x0010  0x0E10                  
0x0000  0x01F4  0x00C8  0x1194  0x03B6  0x6000  0x010F  0x05B2                  
0xFF00  0x853D  0xDA3D  0xB03D  0x303D  0x5A3D  0x053D  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                  
*

[youtube]i1PJaJQeTDk[/youtube][/quote]
 
it seems to trip the desat and turn off the controller IC, right ? Any idea whether the controller IC was in drive 2 or tripping out of 2 into 1, which
then caused the desat ?

anyways, there are some things not totally optimal:
Code:
j) maximum shutdown error current, fixed: 54.0 A
k) maximum shutdown error current, proportional: 45.0 A

the fixed part under j is a bit high, I would lower it if possible. Reason is that it is used as a cheat when running in drive_2 under hall sensors.
The halls only give very crude phase info, 60 degree steps (360/6). When the motor starts moving the controller starts to see error current (as the
60 degree phase grid means the phase is never 100% perfectly the same as the motor). In drive 2, once the error current goes over the fixed limit
of option j, it goes 'f#ck them halls, I go sensorless' . It stays in drive 2, but it is cheating and not only running on hall info. Therefore, don't make
option j too high.

In drive 2 when the motor is standing still or running slow, it can be forced to rotate fast (like when you do a slide with a hub motor in your bike, and
you release the brake). The controller must detect this and go to drive 1 (to sync with the now all of a sudden fast spinning motor).
The detection for this (so basically, when it conks out of drive 2 back to 1) is in the recovery menu.

Code:
p) current to check: total current
q) fixed part: 36.0 A
r) proportional to throttle current, factor: 150 %
s) current filter 50% step response time: 5.0 msec

Since I don't know what is better you can choose between total current level or error current detection. The level with which it compares is based on a fixed
part and the throttle current. The measured current is filtered to remove spikes. Try playing around here, especially since your frequencies are so slow I would
increase option s to 10 or 20 msec. Maybe increase the fixed part, though especially the 150% with a pinned throttle will already give quite a high limit.

Something else that may help: you could reduce the rate at which the controller can increase the voltages (and thus the current). This is controlled in the
control loop coefficients,
Code:
  amplitude control loop
h) 1st order: 60
i) 2nd order: 3.0000
j) 3rd order: 0.0000
change h and i by multiplying with the same factor (such that the ratio stays 20), for instance try 40 and 2 for h and i respectively...


P.S. how can the controller IC be responsible for tripping the output stage desat ? These are totally unrelated, no ?
 
Awesome I will try to look at that stuff next time I sit down with it.
Another question what do I have to change for higher voltage. Just the voltage setting under battery? Or do I need to redo the inductance measurement?
 
Arlo1 said:
Awesome I will try to look at that stuff next time I sit down with it.
Another question what do I have to change for higher voltage. Just the voltage setting under battery? Or do I need to redo the inductance measurement?

Both, but redoing the inductance is most important
 
i still haven't got my motor running correctly. with lebowski's help i started to do the basic test like measuring current sensor output and testing the output fets and stuff. all this is working fine.
connecting a DD hs3540 to the controller makes the motor run super smooth and very nice. so it must have something to do with the MAC motor.

[youtube]tCf7ORpsthk[/youtube]

so i took another of my MACs and connected it, but the result was exactly the same. i don't expect to motors to have the same strange abnormal problems, so i guess it must be the same for all MACs, and the motor is undamaged. playing with "amplitude control loop" (menu 'g') didn't help at all:

[youtube]FwMuWe5OfJo[/youtube]

so we started playing with "phase control loop" and now i got a nice running mac. as long as no real load is there. this is all sensorless, so it's a bit a rough start until it starts to spin:

[youtube]_moBo2M0O1A[/youtube]

after that i took the controller back to the bike to test the good looking settings with the motor under some load.
yes. it's definately better. but far from perfect. and it still is cogging a lot if the load is too high (still somewhere around 400-500W total). if i handle the throttle gently i can spin the motor up to full speed even with the back wheel driven on the smallest gear (so up to 65km/h). if i go WOT from standstill the controller is cutting out.
and when the motor is running full speed (so no change in current anymore) and i start to simulate some load by gently pulling the brake lever, it's doing fine until i reach around 10A battery current and it cuts out again.
with lebowski's and animalector's excellent remote support i still hope that the problems can be sorted out ...
 
Lebowski said:
P.S. how can the controller IC be responsible for tripping the output stage desat ? These are totally unrelated, no ?
If it bucks and kicks at all the over current can happen very fast. So maybe.. I know what you are saying but if the settings are off I think this is a possibility.
I tried a lot of things as I will list in anther reply and tomorrow I will hook the scope up to the current sensors and see if I can capture the current its tripping at.
 
Lebowski said:
it seems to trip the desat and turn off the controller IC, right ? Any idea whether the controller IC was in drive 2 or tripping out of 2 into 1, which
then caused the desat ?

anyways, there are some things not totally optimal:
Code:
j) maximum shutdown error current, fixed: 54.0 A
k) maximum shutdown error current, proportional: 45.0 A

the fixed part under j is a bit high, I would lower it if possible. Reason is that it is used as a cheat when running in drive_2 under hall sensors.
The halls only give very crude phase info, 60 degree steps (360/6). When the motor starts moving the controller starts to see error current (as the
60 degree phase grid means the phase is never 100% perfectly the same as the motor). In drive 2, once the error current goes over the fixed limit
of option j, it goes 'f#ck them halls, I go sensorless' . It stays in drive 2, but it is cheating and not only running on hall info. Therefore, don't make
option j too high.
I lowered the shut down to 30A and seems ok. Remember Im hoping to run something like 600-800 amps so I was thinking having a 54 amp setting was not bad and I was thinking the mv/A is low on my sensors that are rated for 950 amps so It won't want to work well at a low amperage.
lebowski said:
In drive 2 when the motor is standing still or running slow, it can be forced to rotate fast (like when you do a slide with a hub motor in your bike, and
you release the brake). The controller must detect this and go to drive 1 (to sync with the now all of a sudden fast spinning motor).
The detection for this (so basically, when it conks out of drive 2 back to 1) is in the recovery menu.

Code:
p) current to check: total current
q) fixed part: 36.0 A
r) proportional to throttle current, factor: 150 %
s) current filter 50% step response time: 5.0 msec

Since I don't know what is better you can choose between total current level or error current detection. The level with which it compares is based on a fixed
part and the throttle current. The measured current is filtered to remove spikes. Try playing around here, especially since your frequencies are so slow I would
increase option s to 10 or 20 msec. Maybe increase the fixed part, though especially the 150% with a pinned throttle will already give quite a high limit.
I never tried switching option p to error current... I will. I tried option s up to 10 then 20 and back to 5 then 4 then 3 and it seemed better at the lower numbers. But I might have been looking at the wrong things I will test this again now that I re-read this post. I am having some problems with it going back to drive 1 on deceleration (throttle off) and I found raising the Erpm for 2-3 to 2000 and 3-2 to 1000 helped it. I tried the 150% to 120 then 100 and it seamed maybe better... I will keep at it.
lebowski said:
Something else that may help: you could reduce the rate at which the controller can increase the voltages (and thus the current). This is controlled in the
control loop coefficients,
Code:
  amplitude control loop
h) 1st order: 60
i) 2nd order: 3.0000
j) 3rd order: 0.0000
change h and i by multiplying with the same factor (such that the ratio stays 20), for instance try 40 and 2 for h and i respectively...
This is a cool option and would help my bike a lot like pour mans traction control :)
I did this and this helped a lot. I can now roll the throttle in drive 2 and it only trips the desat every second time or so if I pin the throttle fast. It seems if the motor is moving at all its fine. REMEMBER the motor is unloaded so its just a big heavy (30-40lb) inner magnet rotor that has to start moving.
 
Funny that reducing option s in the recovery menu (the filtering) improves things, it should actually improve when you increase this number. I would not fix things by increasing the 2->3 and 3->2 erpms, they should be low. Then probably the fixed error current is too low (in the main current menu), I didn't realize you have 900A sensors when suggesting the lower current value there.

That it conks out when closing throttle, this can have to do with the inductor calibration, did you calibrate it at the voltage you're running at ?

If you pin the throttle fast and it conks out at low erpm, probably the in the recovery menu the fixed current part must be bigger and the value for filtering must be higher. Options p to s in the recovery
menu have to do with error detection in drive_2
 
Lebowski said:
Funny that reducing option s in the recovery menu (the filtering) improves things, it should actually improve when you increase this number. I would not fix things by increasing the 2->3 and 3->2 erpms, they should be low. Then probably the fixed error current is too low (in the main current menu), I didn't realize you have 900A sensors when suggesting the lower current value there.

That it conks out when closing throttle, this can have to do with the inductor calibration, did you calibrate it at the voltage you're running at ?
Be carefull on the words you use :) Closing the throttle can mean either way and yes It has been calibrated at the current voltage

If you pin the throttle fast and it conks out at low erpm, probably the in the recovery menu the fixed current part must be bigger and the value for filtering must be higher. Options p to s in the recovery
menu have to do with error detection in drive_2
I will look at the hardware again. I remember the gate gets to ~13v quick. The desat cap delays the desat voltage until around the 13v mark but there will be more voltage drop on the igbt at that point then at 15v which I have at the end of the switching period. Its possible to get the rotor moving its giving 1 pulse of ~200-300 amps even though I have the phase current set to 120 amps and this amperage is at the time when the igbt is only 12-13v at the gate so I will look at this.
It could also be noise.
It could also be settings. :) I will try more today thanks again.
 
Lebowski what pin will be used for Temp sensing from the brain? Is it 3 wires. 5v Signal and Gnd?
 
sorry for the odd question
do you depend on this project for your income ? if No

when are planning on making the source code public ? or never !!

thanks
 
Lebowski. Is there anyway to limit or adjust the current settings in sensored start during sensored operation? It looks like the current is a lot higher during startup.
 
Lebowski said:
Arlo1 said:
Lebowski. Is there anyway to limit or adjust the current in snesored start during sensored operation? It looks like the current is a lot higher during startup.

? can you explain more ?
How do I change the current settings in drive 2? I am wondering if I can lower the current in drive 2 but keep drive 3 the same? Using hall sensored start.

Option H says "maximum phase current in drive 2" then in brackets it says "HF only" so this does not adjust the phase current when using hall sensored start and in drive 2 does it?
 
Arlo1 said:
Lebowski said:
Arlo1 said:
Lebowski. Is there anyway to limit or adjust the current in snesored start during sensored operation? It looks like the current is a lot higher during startup.

? can you explain more ?
How do I change the current settings in drive 2? I am wondering if I can lower the current in drive 2 but keep drive 3 the same? Using hall sensored start.

Option H says "maximum phase current in drive 2" then in brackets it says "HF only" so this does not adjust the phase current when using hall sensored start and in drive 2 does it?
There is no separate max phase amp current setting for drive_2 ... except for the HF mode. What effect do you see that the current is much higher
in drive_2 with hall sensors, are you talking phase current or battery current ? Thing to keep in mind here is that in drive_2 it is starting up and doesn't know the
precise motor phase (halls at best give you a 60 degree window in which the phase is). It needs accurate phase info to do a correct phase to battery current
conversion.
 
I'm talking phase current. And this is causing overshoots in sensored start up. This will also limit the torque I can produce. If the current in drive two could be reduced to a ℅ of the current in drive 3 it would allow me to run max current and there for HP in drive 3 when when things smooth out in sensorless operation.
 
hi Bas
your new IC v2.4 (8 thermo sensors) is out, is there an update 2.4 manual and pcb? :?:

thank you!
 
Back
Top