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

Electric Motors and Controllers
User avatar
izeman
10 GW
10 GW
Posts: 4500
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by izeman » Apr 30, 2017 6:33 am

kywalda wrote:With the original controller (square wave with 36A max phase current) I had not problem to start on an incline of 10%. So somehow it must be possible...
so you say with your old controller you had no problem starting the bike with 36A phase, and no you can't with 100A phase? wow
36A sounds VERY little. i can't imagine making my bike move with that low phase current. i never set it below 80A, with no type of controller.

User avatar
izeman
10 GW
10 GW
Posts: 4500
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by izeman » Apr 30, 2017 6:37 am

Arlo1 wrote:For dead time the proper way is to calculate it by subtracting all the shortest on times from all the longest off times.
could you please tell me how to calculate it, and what data you need for it? i set mine to 1.000, as andy suggested it, but i'm not sure if this really is the optimal value, or just a guess. the FETs are IRFB4168.

User avatar
Arlo1
100 GW
100 GW
Posts: 8493
Joined: Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada
Contact:

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by Arlo1 » Apr 30, 2017 9:34 am

izeman wrote:the question is: how do you know that you've found the perfect hall settings? measuring torque at start is nothing you can quantify. it's just a feeling.
Torque is totally measurable. You can do it so many ways. Clamp the rear wheel and hang weights on the front.. Use a dyno etc.
My Leaf motor controller build. https://endless-sphere.com/forums/viewto ... 27#p963227
My YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
RC and most types of Lithium batteries you MUST know your individual cell voltages charging and discharging.
Don't keep them were you cant afford smoke or fire!
Never above 4.2v never below 2.7v EVER!!!
HI power controller design. Game Changer

User avatar
Arlo1
100 GW
100 GW
Posts: 8493
Joined: Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada
Contact:

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by Arlo1 » Apr 30, 2017 9:38 am

izeman wrote:
Arlo1 wrote:For dead time the proper way is to calculate it by subtracting all the shortest on times from all the longest off times.
could you please tell me how to calculate it, and what data you need for it? i set mine to 1.000, as andy suggested it, but i'm not sure if this really is the optimal value, or just a guess. the FETs are IRFB4168.
You have to read the data sheets. You need to take all components from the Brain to the Fets and all in between. Use the data sheets and look for the delays. Add all the longest off delays up and add all the shortest delays up this is with your design/system so if you have 15v at the gates you need to take that into consideration and you need to also look for the data with the resistance value you use. You then subtract the shortest total from the longest total.

You do this for the Brain, Drivers, Boost stage, Fets and all other things effecting the switching time diodes resistors etc.
My Leaf motor controller build. https://endless-sphere.com/forums/viewto ... 27#p963227
My YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
RC and most types of Lithium batteries you MUST know your individual cell voltages charging and discharging.
Don't keep them were you cant afford smoke or fire!
Never above 4.2v never below 2.7v EVER!!!
HI power controller design. Game Changer

User avatar
izeman
10 GW
10 GW
Posts: 4500
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by izeman » Apr 30, 2017 10:51 am

Arlo1 wrote:
izeman wrote:the question is: how do you know that you've found the perfect hall settings? measuring torque at start is nothing you can quantify. it's just a feeling.
Torque is totally measurable. You can do it so many ways. Clamp the rear wheel and hang weights on the front.. Use a dyno etc.
sure. but nothing you can do every test. you have to install something, find the same circumstances and measure. not easy on a bike. i go into first gear and try to go up stairs, putting the front wheel directly at the lowest stair and hit the throttle. sometimes it works, sometimes it doesn't even with the very same setting.

User avatar
izeman
10 GW
10 GW
Posts: 4500
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by izeman » Apr 30, 2017 10:53 am

Arlo1 wrote:You do this for the Brain, Drivers, Boost stage, Fets and all other things effecting the switching time diodes resistors etc.
so nothing that i'm slightest capable of ;)

User avatar
Arlo1
100 GW
100 GW
Posts: 8493
Joined: Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada
Contact:

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by Arlo1 » Apr 30, 2017 11:06 am

izeman wrote:[and try to go up stairs, putting the front wheel directly at the lowest stair and hit the throttle. sometimes it works, sometimes it doesn't even with the very same setting.
This is worth noting. I made this better by changing the timing. But reverse got a little worse.

Driving my car around town I found hill starts were tricky if a car was behind me it made it a bit scary because sometime the motor would be in a spot where it didn't have enough torque to move (kind of inbetween phases) but if I could roll back a slight bit it woudl gain torque then take off.

When I retarded the hall timing it went away but the problem is now in reverse. Its not a big deal because reverse hill starts are not common but going forward up hills is. If you think of it this way the 6 steps of hall info does not tell the brain enough data to know where the torque is. But is gives you a ball park window of which phase to feed current to. If the timing is off by a few deg then it will try to fed the wrong phase power like feed the next phase power to early which is like having the timing advanced 90 deg or something. So it applies a little torque but not much.
My Leaf motor controller build. https://endless-sphere.com/forums/viewto ... 27#p963227
My YSR build http://www.youtube.com/watch?v=BRo8r5g4NBg
RC and most types of Lithium batteries you MUST know your individual cell voltages charging and discharging.
Don't keep them were you cant afford smoke or fire!
Never above 4.2v never below 2.7v EVER!!!
HI power controller design. Game Changer

Animalector
10 kW
10 kW
Posts: 791
Joined: Mar 17, 2012 4:50 pm
Location: Mareeba - Queensland

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by Animalector » May 01, 2017 4:34 am

There's not much in there except our driver chip which is pretty fast. I'll have a look at it one day. Been ages since I sat down and looked at the Lebowski layout. I'm keen to get back into it. But yeah time just flies..

User avatar
izeman
10 GW
10 GW
Posts: 4500
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by izeman » May 01, 2017 5:27 am

Animalector wrote:There's not much in there except our driver chip which is pretty fast. I'll have a look at it one day. Been ages since I sat down and looked at the Lebowski layout. I'm keen to get back into it. But yeah time just flies..
that would be much appreciated. you once said "set it to 1.000, should be ok" or something like that :)
maybe this got some influence on the whole controller, so if there's a better guess, it's warmly welcome! :D

Animalector
10 kW
10 kW
Posts: 791
Joined: Mar 17, 2012 4:50 pm
Location: Mareeba - Queensland

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by Animalector » May 01, 2017 5:30 am

I'll put some brain power against it tomorrow... Maybe...

User avatar
Lebowski
1 GW
1 GW
Posts: 3110
Joined: Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by Lebowski » May 02, 2017 3:24 am

kywalda wrote:Hi Bas,
finaly I got your controller running on my E-Max scooter :D

It is running very smooth and quick (about 70km/h at 16s LiFePo). Regen works like a charme.

But it has a very low torque when starting at sensored mode. What are the parameters to give more power in this mode. And how can I define when it will switch to drive_23?
And (it's not a real problem) when the motor spins down and enters the sensored mode there is a little "bump" (the wheel is braked for some ms).

Maybe you'll have a hint.
sorry I only saw your post just now. I will have a look at your hex later today (at home) and let you know if I see anything out of order.

About the torque at start, remember that it does not have 'block' time or anything like that, so it does not allow uncontrolled high current at start. This can make it feel weak at start but it makes the FETs survive, which is not bad :) . And second, the max phase current in the menu is a Peak current, not RMS. so 100A peak phase current is around 70A RMS (and can result in maximum 85A DC battery current).

When it switches from drive 2 (via 23) to 3 , this is in the erpm menu (options e and f). You can try to make it go earlier into sensorless (drive 3) by reducing the numbers there.

Did you have the fieldweakening turned on to get to 70km/h ?

User avatar
Lebowski
1 GW
1 GW
Posts: 3110
Joined: Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by Lebowski » May 02, 2017 3:30 am

As mentioned above, the delay in the system is important. I don't think it comes from the gate drivers, I would have a look at the RC filters in both the hall and current sensor lines...

User avatar
Lebowski
1 GW
1 GW
Posts: 3110
Joined: Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by Lebowski » May 02, 2017 4:20 am

izeman wrote:Unfortunately i can't calibrate in reverse as it's got a freewheel. But your tips sound interesting. Afair lebowski said not to calibrate the current sensors, but i saw quite a difference between the three of them so i think it may still be worth a try.
No reason why you should not be able to run it in reverse ? Then the motor is just spinning but the output shaft and wheel are not, for the controller this makes no difference. It should be able to start sensorless (a requirement for hall calibration) without needing a little push.

User avatar
Lebowski
1 GW
1 GW
Posts: 3110
Joined: Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by Lebowski » May 02, 2017 6:14 am

About this 'block time'... If you want something like that it can be done:

- put in bigger current sensors for 200 or even 300A (the peak phase current must ALWAYS be in current sensor range)
- still keep the 50A battery current though.

This will give you lots of torque at start but keeps the lower battery current. It will be very stressful on the FETs, but instead of using a time limit like blocktime:

- add a current sensor very close to (better: on top of) the FETs and use the temp sensor menu to specify the phase current per degC dial back.

This should protect the FETs from overheating and automatically reduces phase current when they get hot (so limiting the time the controller can output the really high current)

kywalda
10 mW
10 mW
Posts: 22
Joined: Apr 29, 2016 2:22 pm

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by kywalda » May 02, 2017 11:54 am

Lebowski wrote:About this 'block time'... If you want something like that it can be done:

- put in bigger current sensors for 200 or even 300A (the peak phase current must ALWAYS be in current sensor range)
- still keep the 50A battery current though.

This will give you lots of torque at start but keeps the lower battery current. It will be very stressful on the FETs, but instead of using a time limit like blocktime:

- add a current sensor very close to (better: on top of) the FETs and use the temp sensor menu to specify the phase current per degC dial back.

This should protect the FETs from overheating and automatically reduces phase current when they get hot (so limiting the time the controller can output the really high current)

This is just the way how I solved the problem with the low torque on start.

But I still have the "rumbles" when returning from dr23 to dr2. Especially when I use regen. In the manual the recovery menu is very little commented. I hope to find a solution there. What do all the parameters talk about?
And last the ramp of regen in erpm menu does not take any effect. When I enter 1000 to 2000 erpms (or higher values) it still gives full regen when the scooter come to stillstand. I expect regen would be off below 1000 erpm...

kywalda
10 mW
10 mW
Posts: 22
Joined: Apr 29, 2016 2:22 pm

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by kywalda » May 02, 2017 12:04 pm

I also noticed, that if you put in erpm menu a 0 to 0 value to the reverse ramp (I do not use the reverse function), the controller will not work in forward. So I entered some "dummy values" to the reverse ramp. Just for your information.

kywalda
10 mW
10 mW
Posts: 22
Joined: Apr 29, 2016 2:22 pm

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by kywalda » May 02, 2017 12:11 pm

Lebowski wrote: Did you have the fieldweakening turned on to get to 70km/h ?
Yes - about 50% of phase current.

User avatar
izeman
10 GW
10 GW
Posts: 4500
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by izeman » May 02, 2017 12:40 pm

Lebowski wrote:No reason why you should not be able to run it in reverse ? Then the motor is just spinning but the output shaft and wheel are not, for the controller this makes no difference. It should be able to start sensorless (a requirement for hall calibration) without needing a little push.
how would i make it turn in reverse? by making the throttle reverse instead of forward?

User avatar
izeman
10 GW
10 GW
Posts: 4500
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by izeman » May 02, 2017 12:43 pm

Lebowski wrote:This should protect the FETs from overheating and automatically reduces phase current when they get hot (so limiting the time the controller can output the really high current)
wouldn't the very high phase current only occur during start in drive2? phase current will go down to battery current lineary as voltage rises, wouldn't it? so high current is there for a short time only?!

User avatar
Lebowski
1 GW
1 GW
Posts: 3110
Joined: Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by Lebowski » May 02, 2017 12:50 pm

izeman wrote:
Lebowski wrote:No reason why you should not be able to run it in reverse ? Then the motor is just spinning but the output shaft and wheel are not, for the controller this makes no difference. It should be able to start sensorless (a requirement for hall calibration) without needing a little push.
how would i make it turn in reverse? by making the throttle reverse instead of forward?
It has a pin for a reverse switch (maybe routed to your throttle connector ?)

kywalda
10 mW
10 mW
Posts: 22
Joined: Apr 29, 2016 2:22 pm

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by kywalda » May 02, 2017 12:53 pm

izeman wrote:
Lebowski wrote:This should protect the FETs from overheating and automatically reduces phase current when they get hot (so limiting the time the controller can output the really high current)
wouldn't the very high phase current only occur during start in drive2? phase current will go down to battery current lineary as voltage rises, wouldn't it? so high current is there for a short time only?!
Why will voltage rise? Isn't it constant (battery voltage)? So when climbing a hill with full throttle in dr3 the phase current will rise to max.

User avatar
Lebowski
1 GW
1 GW
Posts: 3110
Joined: Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by Lebowski » May 02, 2017 12:57 pm

kywalda wrote:
Lebowski wrote: Did you have the fieldweakening turned on to get to 70km/h ?
Yes - about 50% of phase current.
looking at the hex, your pwm freq is very low at 8kHz, what output stage do you run ? deadtime is extremely low at 300 nsec (for an 8kHz output stage). Typically you see 6kHz adn 2000 nsec deadtime for big IGBT's, or 20kHz and 500 nsec for FETs...

there is no fieldweakening current in the hex...

User avatar
Lebowski
1 GW
1 GW
Posts: 3110
Joined: Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by Lebowski » May 02, 2017 12:59 pm

kywalda wrote:
izeman wrote:
Lebowski wrote:This should protect the FETs from overheating and automatically reduces phase current when they get hot (so limiting the time the controller can output the really high current)
wouldn't the very high phase current only occur during start in drive2? phase current will go down to battery current lineary as voltage rises, wouldn't it? so high current is there for a short time only?!
Why will voltage rise? Isn't it constant (battery voltage)? So when climbing a hill with full throttle in dr3 the phase current will rise to max.
Typically (no field weakening) battery current = % of max output voltage * phase current * 0.85

so as your speed goes up the output voltage goes up, meaning phase current goes down (in case you are battery current limited). And in drive_2, with a low % of output voltage (low speed) battery current is low even with high phase current

User avatar
Lebowski
1 GW
1 GW
Posts: 3110
Joined: Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by Lebowski » May 02, 2017 1:00 pm

kywalda wrote:I also noticed, that if you put in erpm menu a 0 to 0 value to the reverse ramp (I do not use the reverse function), the controller will not work in forward. So I entered some "dummy values" to the reverse ramp. Just for your information.
will have a look, thanks !

User avatar
izeman
10 GW
10 GW
Posts: 4500
Joined: Jun 21, 2011 8:25 am
Location: vienna, austria
Contact:

Re: Lebowski's motor controller IC, schematic & setup, new v

Post by izeman » May 02, 2017 1:07 pm

kywalda wrote:Why will voltage rise? Isn't it constant (battery voltage)? So when climbing a hill with full throttle in dr3 the phase current will rise to max.
https://endless-sphere.com/forums/viewt ... =2&t=35278

Post Reply