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

Lebowski

10 MW
Joined
Jun 27, 2011
Messages
3,412
Location
beautiful Zurich, Switzerland
I finished writing the setup manual for my controller IC. I posted it here (instead of mailing it
only to the people that offered to test it) so that everyone can get an idea of the features that
my controller IC has... What do yo guys think ?

View attachment 13

View attachment user_manual_v1p11.pdf

View attachment user_manual_v1p21.pdf

View attachment user_manual_v2p21.pdf

View attachment 7

View attachment user_manual_v2p40.pdf

The following schematic and manual are for the version with the HF tone (v2.00 and higher):

View attachment 10

the following schematic is for v2.30 and higher, note that the hall connections have moved:
View attachment 8

added temp sensor support from v2.40:
temp sensor addendum.png

added field weakening in v2.50:
View attachment user_manual_v2p50.pdf

much improved hall mode in v2.60:
View attachment user_manual_v2p60.pdf

chip saves state upon entry into drive_1 to help with debugging of settings:
View attachment user_manual_v2p70.pdf

View attachment user_manual_v2p90.pdf

View attachment user_manual_v2pA1.pdf

_________________________________________________

moderator edit: I have received permission to post the following links here:

"Build your very own Lebowski controller" (by Lebowski, 8-pages)
http://endless-sphere.com/forums/viewtopic.php?f=30&t=57877

"The big Lebowski controller" (by Lebowski, 2-pages)
http://endless-sphere.com/forums/viewtopic.php?f=30&t=42655

"Micro Lebowski Controller - DIY 3kw" (by Animalector, 5 pages)
http://endless-sphere.com/forums/viewtopic.php?f=30&t=65297

"ZombieSS's power stage for Lebowski's controller" (by zombiess, 19 pages)
http://endless-sphere.com/forums/viewtopic.php?f=30&t=51342

"My new 18 FET TO-247 layout for Lebowski Controller" (by zombiess, 8 pages)
http://endless-sphere.com/forums/viewtopic.php?f=30&t=58341

"Would you like a very small Lebowski brain board?", (by zombiess, 4 pages)
http://endless-sphere.com/forums/viewtopic.php?f=30&t=60699

"Update files Lebowski controller IC, latest: v2.93"
https://endless-sphere.com/forums/viewtopic.php?f=30&t=82160
 
Thanks for all your hard work! I see no obvious errors in the manual. Love the custom throttle/regen curves!
 
Lebowski, you are a genius! Read your manual, only editorial comment is the schematic for sensing phase voltages and adjusting Ra Rb needs a few more dots at wire crosses that are connected.

Wish you much luck with your algorithm and controller!
 
bigmoose said:
Lebowski, you are a genius! Read your manual, only editorial comment is the schematic for sensing phase voltages and adjusting Ra Rb needs a few more dots at wire crosses that are connected.

Wish you much luck with your algorithm and controller!
Lebowski when bigmoose says this ^ it is just like Jesus calling someone a god! Good job and I cant wait to test it!
 
For those of you wanting to test this. Here is a board that is uber cheep to get you started. http://www.futurlec.com/dsPIC30F4011_Controller.shtml
then you just need to whip a power-stage together and let er rip! Then you can donate your old chip back to lebowski or travel down the learning to program path like I am.
 
Finished reading the manual, very well written :)

I'm concidering laying my controller project on the shelf and instead focus on the powerstage part that it needs to be coupled to :)
 
Lewbowski, I'm glad I learned to read nerd a long time ago (majority of my job is simply reading and following instructions as are man IT jobs). If I showed that manual to any lay person I think their head might explode which is why I kept giggling as I read the instructions.
 
zombiess said:
Lewbowski, I'm glad I learned to read nerd a long time ago (majority of my job is simply reading and following instructions as are man IT jobs). If I showed that manual to any lay person I think their head might explode which is why I kept giggling as I read the instructions.

serious ? I wrote it with a layman in mind ... :?:
 
Lebowski said:
zombiess said:
Lewbowski, I'm glad I learned to read nerd a long time ago (majority of my job is simply reading and following instructions as are man IT jobs). If I showed that manual to any lay person I think their head might explode which is why I kept giggling as I read the instructions.

serious ? I wrote it with a layman in mind ... :?:
Uhm.....? Fack im screwd.
 
I just have to sit down and read it. I am sure I will ask a couple. But this is super exciting!
 
Lebowski said:
zombiess said:
Lewbowski, I'm glad I learned to read nerd a long time ago (majority of my job is simply reading and following instructions as are man IT jobs). If I showed that manual to any lay person I think their head might explode which is why I kept giggling as I read the instructions.

serious ? I wrote it with a layman in mind ... :?:

Yes I'm serious, but keep in mind the layman can't follow instructions to assemble most home furniture successfully. Please don't take that as offensive, the documentation is clear to me, I just wanna print a copy out and pass it around my office to regular people and video tape their expressions / comments as they read it out loud. They already think most of what I do is some kind of rocket surgery.

Many of us on this forum suffer from abnormally functioning brains in that some of us can grasp concepts way beyond what an average person would. You did after all write all this using A Silly Mnemonics programming language :D 8) . You are not normal :p
 
One of the things I did not long before the layoffs at Honeywell in the early 90s got to me too, was to help simplify the apparently too-complex instructions (whcih were mostly pictorial already) for assembly of various flight computers, displays, wiring harnesses, etc., for the area I worked in as a final test tech.

It is extremely difficult to simplify some things down enough for the majority of people to understand them, apparently--we had lots of really stupid assembly errors from new assemblers even after the instructions were simplified and completely pictorialized (so they could begin hiring cheap non-English speakers without worrying about translations, AFAICT). Before we did the simplification, it could take a year before a new assembler coudl actually build something mistake-free. :roll:

Remember that most of these people are just the average joe/jane off the street, with zero technical knowledge or desire to learn--so it will be easier to simplify or translate a manual like yours, since anyone bothering to read it because they want to use it/build it is gonna want to learn techy stuff anyway, or they'll have a fair bit of techy knowledge to begin with. It might just not be as cross-discipline as the manual currently seems to expect. ;)


I have only glanced thru it, and I didn't have any trouble following what's in there, but I'd still have to look up a few things to be able to perform all the steps I think. But at least I'd know what I was looking for. I can imagine, however, that a fair amount of people even here on ES could have trouble with it.
 
You should see the looks I get from people when I try to explain why someone was unable to log in to their computer, I fix it and then they actually want me to answer their question of why which then leads to a very simple answer of the time sync between a server and domain controllers was off. If they actually ask me why after that I try to do my best layman's explanation of time sync, RTC clock drift, kerberos tickets, replay attacks, NTP and the different stratums and domain authentication. Usually by the time I get to the explanation of time sync (the first one) they ask me to stop and thank me. Most have now learned to just stop asking why because they get one of two answers from me.

1. I have no clue but it works now (this happens pretty often but I usually have some idea what caused the problem but don't want to get into details)
2. I fixed and know why, but do you really want to know the details?

I could probably write several pages explaining this to a lay person since it's a pretty simple concept, but you really should have some sort of base knowledge of security and time sync, real time clock drift and NTP protocol to really get it without setting aside an hour for me to go into details / examples. It's really amazing how important and complex just keeping the same time can be when you have servers spread across the globe, not to mention getting windows to actually listen and re-sync the clock when you tell it to and not just ignore your command.

A little off topic, but still relevant.

Back on topic:

Thanks Lebowski!
 
Ok so first question. Whats some good numbers for resistors Ra and Rb on the back emf sensing circuit page 8.
Now I was thinking about having my IC isolated from the main battery but it looks for this circuit its needs a common -.

Edit I forgot to mention for 80-200 v battery voltage.
 
Ok second question. On page 12 you mention setting the PWM frequency based dead time with a calc like this "PWM_freq is 1 / (50 * deadtime)"
But is dead time not more just a function of how fast your power-stage can switch. And pwm frequency is needed just high enough for the given inductance of the motor? eg. >inductance = < pwm frequency? You also mention to set the PWM frequeny with an oscilloscope? To set it with an oscilloscope what will I be wanting to watch? The current on one phase? Its best to ask now and look stupid rather then overlook something and cost my self a lot of time and money!
 
Arlo1 said:
Ok so first question. Whats some good numbers for resistors Ra and Rb on the back emf sensing circuit page 8.
Now I was thinking about having my IC isolated from the main battery but it looks for this circuit its needs a common -.

Edit I forgot to mention for 80-200 v battery voltage.

For this part, I would make Ra 10 to 15 kOhm but make sure to get a good Watt rating (3 W or higher, 200V with 10 kOhm
is (200^2)/10000 = 4 Watt but it's switched with 50% on average -> 2W, take 3W to be safe). Rb, choose the same value as
Ra but you can use small 0.25Watt resistors. For the diodes I would use something like a cheap fast MBR150 (50 V, 1A schottky,
note that the voltage rating is not important, what matters is the forward voltage with (200/10k) = 20 mA current going through it).

If you have an optically isolated output stage the circuit does not need a common ground (I have an optically isolated output
stage and only tried common ground two weeks ago)...
 
Arlo1 said:
Ok second question. On page 12 you mention setting the PWM frequency based dead time with a calc like this "PWM_freq is 1 / (50 * deadtime)"
But is dead time not more just a function of how fast your power-stage can switch. And pwm frequency is needed just high enough for the given inductance of the motor? eg. >inductance = < pwm frequency? You also mention to set the PWM frequeny with an oscilloscope? To set it with an oscilloscope what will I be wanting to watch? The current on one phase? Its best to ask now and look stupid rather then overlook something and cost my self a lot of time and money!

Page 12 was written keeping in mind that not everyone has an oscilloscope, I wanted to show a method
where you can setup the PWM correctly using only a simple cheap multimeter. Keeping this in mind, the
equation for PWM_freq of page 12 is a guideline.
Deadtime is a measure for how fast your output stage can switch. It doesn't make sense to use 100 kHz PWM
(10 usec period time) when you have a deadtime of 1 usec (with rising and falling edge taking 2 usec out
of 10 usec period time, you can see it's not very well balanced). Like you say, a short deadtime means your
output stage can switch fast meaning you can tolerate a higher PWM frequency (UNDER THE CONDITION YOUR
DRIVER STAGE DOES NOT OVERHEAT !!!!!)
If you have a low inductance motor you need a certain minimum PWM frequency meaning you need to have
a short deadtime. The output stage and its driver needs to match the motor requirements.
The "PWM_freq is 1 / (50 * deadtime)" equation means 4% of the period time is offered up to deadtime,
I think this is a good middle of the road guideline...
When you want to measure how good your drivers are doing, look at the gate-source signals of the output transistors.
The output signals (motor terminals) are not that interesting, here much more important is the shoot-through
current which you can measure with a multimeter in the battery line.
Make sure though you set the output polarity (active HIGH/LOW) correct first !
 
Lebowski said:
Arlo1 said:
Ok second question. On page 12 you mention setting the PWM frequency based dead time with a calc like this "PWM_freq is 1 / (50 * deadtime)"
But is dead time not more just a function of how fast your power-stage can switch. And pwm frequency is needed just high enough for the given inductance of the motor? eg. >inductance = < pwm frequency? You also mention to set the PWM frequeny with an oscilloscope? To set it with an oscilloscope what will I be wanting to watch? The current on one phase? Its best to ask now and look stupid rather then overlook something and cost my self a lot of time and money!

Page 12 was written keeping in mind that not everyone has an oscilloscope, I wanted to show a method
where you can setup the PWM correctly using only a simple cheap multimeter. Keeping this in mind, the
equation for PWM_freq of page 12 is a guideline.
Deadtime is a measure for how fast your output stage can switch. It doesn't make sense to use 100 kHz PWM
(10 usec period time) when you have a deadtime of 1 usec (with rising and falling edge taking 2 usec out
of 10 usec period time, you can see it's not very well balanced). Like you say, a short deadtime means your
output stage can switch fast meaning you can tolerate a higher PWM frequency (UNDER THE CONDITION YOUR
DRIVER STAGE DOES NOT OVERHEAT !!!!!)
If you have a low inductance motor you need a certain minimum PWM frequency meaning you need to have
a short deadtime. The output stage and its driver needs to match the motor requirements.
The "PWM_freq is 1 / (50 * deadtime)" equation means 4% of the period time is offered up to deadtime,
I think this is a good middle of the road guideline...
When you want to measure how good your drivers are doing, look at the gate-source signals of the output transistors.
The output signals (motor terminals) are not that interesting, here much more important is the shoot-through
current which you can measure with a multimeter in the battery line.
Make sure though you set the output polarity (active HIGH/LOW) correct first !
So more or less in my case I need to start the other way. Start with PWM frequency at X (im thinking 40 khz) then work back from there make sure my dead time works out to be 4% of X and set my current resistors to make the On Of time work with X frequency, and finaly scope my out put stage to make sure it can handle X frequency. Other wise replace what part(s) I need to make them relaible at X frequency.
 
yesterday I received the "Albis" ; thx Bas !! now I have to build a power stage (ca. 100V / 100A_peak needed) for which I require input/feedback from the experts here. I'd like to start with Shane Colton's 3ph Duo (v2.1 / v3.1) design for the power stage (http://scolton.blogspot.com/p/motor-controllers.html and http://web.mit.edu/scolton/www/3phduo.pdf). He happily uses the http://ixapps.ixys.com/DataSheet/GWM100-01X1.pdf which seems a very cost effictive full bridge (ca. 20USD?)

ixys.jpg
tp05.jpg


If this or a similar power stage is readily available I'd prefer to buy it. If I'd start from scratch but keep with the GWM100-01X1 which driver would be suitable? anybody has experiences with gate transformers?

r
 
rolf_w said:
yesterday I received the "Albis" ; thx Bas !! now I have to build a power stage (ca. 100V / 100A_peak needed) for which I require input/feedback from the experts here. I'd like to start with Shane Colton's 3ph Duo (v2.1 / v3.1) design for the power stage (http://scolton.blogspot.com/p/motor-controllers.html and http://web.mit.edu/scolton/www/3phduo.pdf). He happily uses the http://ixapps.ixys.com/DataSheet/GWM100-01X1.pdf which seems a very cost effictive full bridge (ca. 20USD?)

ixys.jpg
tp05.jpg


If this or a similar power stage is readily available I'd prefer to buy it. If I'd start from scratch but keep with the GWM100-01X1 which driver would be suitable? anybody has experiences with gate transformers?

r
rolf.
IM no expert but I think I have a good understanding of this. When you see a spec like 90amps max and 100volts max for a mosfet or H bridge etc. It means You will NEVER SEE THOSE NUMBERS. Here is why when the controller is PWMing the fets the amperage builds as the pwm fet is in on time and it builds till the controller says long enough for what ever reason (current based or pwm time is up etc) the point being when the controller says long enough the amperage has to be = or < the max of the fet rating or the fet will be destroyed. SO if you were realy good at setting up your power stage and all the settings in the controller you might get lucky to get the amps to build just to the max of the fet rating then shut off and if you acomplish this you will still get < the max of the fet ratings for phase amps. This is because the pwm will feed a pulse of up to or less then the fet max amp rating then shut off and the inductance of the motor will smooth out the current to an avarage of the on time vs off time. Make sense? Anyone think im wrong on this let me know but im pretty sure this is why many people look at the fet ratings as un realistic!
 
I kind of like the idea of this full bridge 'chip', it's compact design keeps many of the stray inductances in check.
About the 100A, I can imagine this is the maximum rated average current but that it can take much more A in peak ?

About the driver, I'm playing around with 4115's driven by the NCP5181 and it looks good so far. Driving single
4115's (for a 6 FET controller) it easily reaches 50kHz PWM freq with negligible shoot through even with sub 100 ns deadtime (66 V).
The gate charge of the full bridge chip looks to be about the same...
 
question from a novice:
xie cheng controller ( infineon chip or newer one) you cant read what values are already set in the controller ( phase amps etc etc)( unless someone has worked it out) will it be possible to read what values are already set in this chip?
 
Back
Top