build your very own Lebowski controller !

Electric Motors and Controllers
User avatar
Arlo1   100 GW

100 GW
Posts: 8112
Joined: Apr 26 2009 10:36pm
Location: Nanaimo
Contact:

Re: build your very own Lebowski controller !

Post by Arlo1 » Feb 01 2018 4:39pm

You should try a 650a 700v fuse ;)

Actually last time the contactor blew up as the old contactors I was using are rated for less the the fuse ;) :mrgreen:
My Leaf motor controller build. http://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!!!
Support me on Patreon. https://www.patreon.com/user/posts?u=6842045
http://www.undergroundelectrics.ca/

progrock   100 W

100 W
Posts: 219
Joined: Oct 02 2017 8:47am

Re: build your very own Lebowski controller !

Post by progrock » Feb 01 2018 10:33pm

I suppose that's likely more or less what happened... just kinda strange with the throttle setup I did... the low end was set to 1.2-1.3v range, and without me hitting the throttle, it doesn't even get close to that. But, the good new is, after fixing everything, I just ran setup again, still with those 2 checks disabled, and it appears to work..... WELL... one small thing... it's in "reverse". What would be the easiest way to fix that... should I rotate the phase cables?... or is there a better way. I suppose technically it's not actually in reverse, otherwise it would be much slower, it's just running backwards.

At least things are looking better.. I'll have to play around with the settings some more, and see if I can get things working right while enabling those 2 checks again, but either way, I'm just happy things look like they are working... and am excited that I can give it a test drive soon... though I need to fashion some form of a case. Got a bunch of 20x20mm t-slot aluminum rods... was gonna cut them to size to form a frame... then either print or cut something for the sides... shouldn't be too hard, though likely a bit bulkier than other options, but may just be a temporary solution.

EDIT: OK, so I rotated 2 phase wires, figuring that was the easiest solution (considering it's sensorless, pretty cool that it's just 3 wires... and I suppose you're always gonna be in forward or reverse... no need to worry about phase sensors, and making sure they are matched correctly...). I also narrowed down my problem to a single setting, and it was actually not the 1 of the 2 I thought it was. The controller stays in drive_0 when option 'm' on the recovery config is enabled... the "check for spinning motor, drive_0" option. Presumably this is detecting a shorted FET, since the motor isn't spinning... which is strange, since when I test the FETs, they all appear to be functional. But, probably gonna get some fresh FETs anyway.

EDIT2: OH, and I figured out what happened, why the motor had seemingly spun out of control.... though seems kinda strange to me. What happened was, the throttle connection had either slid off, or far enough off the pins to lose their connection. Which seems a little strange to me... I would have assumed that removing the throttle connection would cause there to be no signal on the throttle pin, not a high signal.

User avatar
Lebowski   1 GW

1 GW
Posts: 3172
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: build your very own Lebowski controller !

Post by Lebowski » Feb 02 2018 12:11pm

The throttle inputs of the controller IC are basically the first stages of the AD converter. How those respond to an open input is very much dependent on the AD circuit...

For the motor standstill check, try to measure pins 5,7 and 8 (DIL version). For the chip to declare the motor to be at standstill the voltages on these 3 pins should be 2.5 V +- (menu n, option b) .

If for some reason you have omitted this part of the circuitry (as it is only used for the standstill / all FETs off check) then you have to disable this check.

jackbauer   1 mW

1 mW
Posts: 19
Joined: May 04 2017 2:42pm

Re: build your very own Lebowski controller !

Post by jackbauer » Mar 03 2018 1:44pm

Hello, First post but long time lurker. I have a singing motor :
https://www.youtube.com/watch?v=iXtxKEMw0uI
any ideas what I'm doing wrong? First time working with the Lebowski so am probably screwing up.A lot:)

User avatar
Lebowski   1 GW

1 GW
Posts: 3172
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: build your very own Lebowski controller !

Post by Lebowski » Mar 03 2018 2:53pm

It should not go to drive 3 immediately... what version do you have and can you post the hex ? Can you update to version 2.A1 ?

jackbauer   1 mW

1 mW
Posts: 19
Joined: May 04 2017 2:42pm

Re: build your very own Lebowski controller !

Post by jackbauer » Mar 03 2018 4:24pm


User avatar
Lebowski   1 GW

1 GW
Posts: 3172
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: build your very own Lebowski controller !

Post by Lebowski » Mar 03 2018 5:18pm

jackbauer wrote:
Mar 03 2018 4:24pm
Made some progress :
https://www.youtube.com/watch?v=k1_OjpYzYFg
To get better starting sensorless you need to experiment a bit with the wiggle rate and range in the miscellaneous menu (option n from the main menu i believe)

kiwifiat   100 W

100 W
Posts: 107
Joined: Mar 16 2013 5:49pm
Location: Vancouver, Canada

Re: build your very own Lebowski controller !

Post by kiwifiat » Mar 04 2018 2:18am

One of the three motors I have running sensorless on lebowski controllers took quite a bit of effort to get running and it was this post by Arlo1 that turned out to be the solution:

https://endless-sphere.com/forums/viewt ... 6#p1189826

Changing the default setting of menu item G under "Control loop coefficients" from 0.0299 to 0.3 was all that was required to get my RC motor running. I tried running through all combinations of wriggle rate and range all to no avail. I tried increasing the pwm frequency to get a higher loop sample frequency and that didn't help either. So thanks to Arlo1 for doing all that legwork and to Lebowski for the awesome controller chips. So you may want to take a look at item G on the contol loop coefficients menu and see if increasing it helps with sensorless starts.
The only source of knowledge is experience.
Albert Einstein

jackbauer   1 mW

1 mW
Posts: 19
Joined: May 04 2017 2:42pm

Re: build your very own Lebowski controller !

Post by jackbauer » Mar 04 2018 2:53am

Thanks guys:) I'm going to try some experiments today and also try using a resolver to digital converter to run sensored mode. Can anyone point me towards a tutorial on firmware upgrades?

kiwifiat   100 W

100 W
Posts: 107
Joined: Mar 16 2013 5:49pm
Location: Vancouver, Canada

Re: build your very own Lebowski controller !

Post by kiwifiat » Mar 04 2018 3:40am

jackbauer wrote:
Mar 04 2018 2:53am
Thanks guys:) I'm going to try some experiments today and also try using a resolver to digital converter to run sensored mode. Can anyone point me towards a tutorial on firmware upgrades?
Try this:

https://endless-sphere.com/forums/viewt ... 0#p1206710
The only source of knowledge is experience.
Albert Einstein

jackbauer   1 mW

1 mW
Posts: 19
Joined: May 04 2017 2:42pm

Re: build your very own Lebowski controller !

Post by jackbauer » Mar 04 2018 4:04am

Great thanks. Update in progress.

User avatar
amberwolf   100 GW

100 GW
Posts: 25097
Joined: Aug 17 2009 6:43am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group
Contact:

Re: build your very own Lebowski controller !

Post by amberwolf » Mar 04 2018 4:18am

jackbauer wrote:
Mar 03 2018 1:44pm
Hello, First post but long time lurker.
Good seeing you here (from DIY Electric Car forums); I recall many controller threads/builds/"hacks" over there. :)

jackbauer   1 mW

1 mW
Posts: 19
Joined: May 04 2017 2:42pm

Re: build your very own Lebowski controller !

Post by jackbauer » Mar 04 2018 4:30am

Thanks:) Finally decided to check out the Lebowski. Anyway, update to 2A1 done , most of the params back in. Now when i reset I get two sets of 2 leds flashing back and forth and no pwm generation. Did the FOC calc. Found I had to do it at 20A or it produced an overflow. Hex attached.
Attachments
2a1_norun.txt
(2.28 KiB) Downloaded 38 times

jackbauer   1 mW

1 mW
Posts: 19
Joined: May 04 2017 2:42pm

Re: build your very own Lebowski controller !

Post by jackbauer » Mar 04 2018 5:18am

Ok fixed that (rtfm!). Now have a howling motor so need to start playing with settings:)

User avatar
Lebowski   1 GW

1 GW
Posts: 3172
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: build your very own Lebowski controller !

Post by Lebowski » Mar 04 2018 5:21am

jackbauer wrote:
Mar 04 2018 5:18am
Ok fixed that (rtfm!). Now have a howling motor so need to start playing with settings:)
Hexes are not portable from one version to the next, so after updating you have to start the whole setup menu process from scratch. Variables will have moved to different locations in the hex, some will have been removed, others will have been added... so no hex portability whatsoever.

To empty the setting memory, use '!' as if you are updating, but then reset the chip. At the start of the update it wipes the setup memory..

jackbauer   1 mW

1 mW
Posts: 19
Joined: May 04 2017 2:42pm

Re: build your very own Lebowski controller !

Post by jackbauer » Mar 04 2018 5:33am

Working! The starts in sensorless are much better now. The rotor kicks back and forth a few time then starts motoring. Please forgive my ignorance but in terms of electrical RPM I'm guessing this relates to rotor RPM by the number of poles in the stator?

User avatar
Lebowski   1 GW

1 GW
Posts: 3172
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: build your very own Lebowski controller !

Post by Lebowski » Mar 04 2018 5:39am

Electrical rpm is basically the frequency of the sine waves going to the motor (but per minute, not per second).

The ratio with the motor rpm depends on the amount magnets in the rotor (not the poles in the stator). Typically the ratio is the number of magnets divided by two (= amount of 'pole pairs'). So lets say 10 magnets gives you a ratio of 5 between rpm and e-rpm. For such a motor 12000 erpm would be 2400 rpm.

jackbauer   1 mW

1 mW
Posts: 19
Joined: May 04 2017 2:42pm

Re: build your very own Lebowski controller !

Post by jackbauer » Mar 04 2018 7:25am

So trying to calibrate the hall sensor mode. Got vaild UVW signals from the PGA411 resolver to digital chip. Some noise on the signals but using 1k/1N filter on the brain board. Entering the cal mode as per the instructions. The motor tries to spin up then stops and does a big regen. Never spins very fast. Could this be down to noise or phasing of the hall signals? Thanks:)

jackbauer   1 mW

1 mW
Posts: 19
Joined: May 04 2017 2:42pm

Re: build your very own Lebowski controller !

Post by jackbauer » Mar 04 2018 8:34am

ok so i have nice clean pulses on the pins of the micro at 93Hz but only 2v peak. I'm guessing this is not enough for the micro?

jackbauer   1 mW

1 mW
Posts: 19
Joined: May 04 2017 2:42pm

Re: build your very own Lebowski controller !

Post by jackbauer » Mar 04 2018 8:53am

Turns out the PGA411 has a Vio pin that you can choose what I/O voltage the pins work at. I had it at 3v3 of course. Now have very nice 5v square waves at the 3 hall pins. Motor still behaves as above. Don't think I'm getting into hall calibration mode for some reason.

jackbauer   1 mW

1 mW
Posts: 19
Joined: May 04 2017 2:42pm

Re: build your very own Lebowski controller !

Post by jackbauer » Mar 04 2018 9:24am

Looks like I'm dropping back to drive0 as soon as the motor tries to pickup speed. Signals confirmed good and clean at the micro pins.

jackbauer   1 mW

1 mW
Posts: 19
Joined: May 04 2017 2:42pm

Re: build your very own Lebowski controller !

Post by jackbauer » Mar 04 2018 9:49am

Reduced the braking currents to zero and I can now accelerate the motor in calibration mode. Drive 2 and 3 leds stay on but no matter how long i wait all the leds don't activate. Seems like calibration is not happening for some reason.

User avatar
Lebowski   1 GW

1 GW
Posts: 3172
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: build your very own Lebowski controller !

Post by Lebowski » Mar 04 2018 10:00am

made a video about how to run the hall sensor calibration:

User avatar
Lebowski   1 GW

1 GW
Posts: 3172
Joined: Jun 28 2011 1:38am
Location: beautiful Zurich, Switzerland

Re: build your very own Lebowski controller !

Post by Lebowski » Mar 04 2018 10:53am

jackbauer wrote:
Mar 04 2018 9:49am
Reduced the braking currents to zero and I can now accelerate the motor in calibration mode. Drive 2 and 3 leds stay on but no matter how long i wait all the leds don't activate. Seems like calibration is not happening for some reason.
Are you sure the motor can reach the set speed for the measurement ? If the measurement speed is set to 5k but the supply is too low for reaching that, it will wait indefinitely...

To see the speed it can do, set it back to sensorless, turn on the online save in the z menu. Run the motor at full speed and press setup to save. In the setup menu under y) you can see what the motor was doing when the data was saved...

jackbauer   1 mW

1 mW
Posts: 19
Joined: May 04 2017 2:42pm

Re: build your very own Lebowski controller !

Post by jackbauer » Mar 04 2018 2:19pm

Got it running. Thanks for the help :) Turned out it needed a tiny bit of braking current set. I had it at zero to stop it regening into the power supply.
https://www.youtube.com/watch?v=TH14ry6TOy8

Post Reply