build your very own Lebowski controller !

Electric Motors and Controllers
Post Reply
User avatar
Lebowski
1 GW
1 GW
Posts: 3093
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

build your very own Lebowski controller !

Post by Lebowski » Thu Mar 06, 2014 11:46 am

This thread in essence describes how to build a Lebowski style controller. A Lebowski style controller is a sine wave controller
with Field Oriented Control, which is a fance way of saying it runs very quietly and efficiently (as the timing of the signals
is near perfect). The controller has two analog throttle inputs that can independently be used for throttle and variable regen.
The controller works by controlling the torque of the motor which gives very smooth performance on the street.

Except for the actual controller IC (the brain as it where), the rest of the controller is open source. You can contact me about getting
a brain, or you can program your own if you feel you want to give it a go. I have two versions, one that runs with hall sensors or sensorless
in case of a direct drive hubmotor, and one that can provide torque from standstill without using hall sensors (it very fancily replaces the
hall with a mechanism where the controller puts a high frequency tone to the motor and measures the position dependent motor
inductances).

teaser picture of the finished controller (6 FET version, PCB is good for upto 24 FETs):
DSC01471.jpg
DSC01471.jpg (137.53 KiB) Viewed 12348 times
Last edited by Lebowski on Sat Mar 15, 2014 12:20 pm, edited 4 times in total.

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

Re: build your very own Lebowski controller !

Post by Lebowski » Thu Mar 06, 2014 11:46 am

I thought about making PCB's available for sale but the shipping costs make that it is easier that you order the PCB from
your local PCB shop.

The PCB uses a PIC 12F617 for the dual power supply, this is the MPLABX database with the program and the .hex file
for easy programming. If you don't have a programmer, you can ask me about getting a programmed 12F617.
The attachment dcdc_converter.X _6_mar_2014.zip is no longer available
dcdc_converter.X _6_mar_2014.zip
for a PIC 12F617
(40.54 KiB) Downloaded 410 times
Or use the hex file straight away:
dcdc_36_to_80_V.X.production.hex.zip
for 36 to 80 V
(461 Bytes) Downloaded 51 times
dcdc_60_to_150_V_.X.production.hex.zip
for 60 to 150V
(466 Bytes) Downloaded 58 times
Starting from v2.30 hall support is available on verion 2. The PCB has changed slightly as 2 of the hall connection pins
have moved:
30F_pcb_v2p30.zip
(548.44 KiB) Downloaded 297 times
The manual for v2.10 of the controller IC:
user_manual_v2p10.pdf
(246.15 KiB) Downloaded 345 times
for v2.21:
user_manual_v2p21.pdf
(253.34 KiB) Downloaded 176 times
for v2.30, now with hall sensor mode and making v1.xx obsolete:
user_manual_v2p30.pdf
(271.07 KiB) Downloaded 278 times
v2.40 adds temperature sensor support, upto 8 independent sensors:
user_manual_v2p40.pdf
(274.18 KiB) Downloaded 332 times
30F_pcb_v2p40.zip
(418.58 KiB) Downloaded 290 times
Last edited by Lebowski on Sun Sep 18, 2016 12:33 pm, edited 10 times in total.

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

Re: build your very own Lebowski controller !

Post by Lebowski » Thu Mar 06, 2014 11:46 am

You need KiCad to look and the PCB to see which component goes where. KiCad is available for free on the internet
for Windows and Linux (Mac too maybe ?), I myself use the one that comes with Ubuntu 12.04 LTS , but the later
versions etc should all work the same.

this is the PCB I had made (for the Europeans: I used http://vrint-pcb.com/ ):
DSC01419.jpg
DSC01419.jpg (141.3 KiB) Viewed 12966 times
When you open the database to have a look at the board it looks kinda messy and crowded:
sc1.jpg
sc1.jpg (194.04 KiB) Viewed 12966 times
on the right hand sight yo can see the layers that are selected, start by switching a bunch of them off until
you're left with the silkscreen and a bunch of text:
sc2.jpg
sc2.jpg (188.95 KiB) Viewed 12966 times
on the right in the visibles window you can now switch off both 'values' and 'references' to end up with a very clear picture:
sc3.jpg
sc3.jpg (177.23 KiB) Viewed 12966 times
now if you turn on 'references' you can see the component references (like R56, C47 etc) which makes it possible
to see where the components are in the schematic
sc5.jpg
sc5.jpg (186.19 KiB) Viewed 12965 times
and when you select 'values' you have a good guide for soldering in all your parts
sc4.jpg
sc4.jpg (190.48 KiB) Viewed 12965 times
talking about parts, I ordered all my parts from Digikey. To get a list with Digikey ordering references,
open the schematic and select 'generate bill of materials' at the top
sc6.jpg
sc6.jpg (61.83 KiB) Viewed 12962 times
make sure you select 'all existing user fields'
sc7.jpg
sc7.jpg (68.23 KiB) Viewed 12962 times
KiCad will now generate a .csv file which can be opened with a spreadsheet program:
sc8.jpg
sc8.jpg (111.5 KiB) Viewed 12962 times
The column under 'D' shows the part numbers as I ordered them from Digikey. In the picture above many parts don't
have a Digikey number yet, but by the time I upload the database most of them should be there (I'm not going to include
resistors though, that's a ton of work !)
Last edited by Lebowski on Thu Mar 06, 2014 12:36 pm, edited 4 times in total.

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

Re: build your very own Lebowski controller !

Post by Lebowski » Thu Mar 06, 2014 11:47 am

Start by soldering all the components for the power supply. This so that its output voltages can be measured and adjusted, before soldering the rest of the components.
The power_supply schematic in KiCad will show you which components are part of the power supply.
DSC01420.jpg
DSC01420.jpg (133.01 KiB) Viewed 12851 times
The power supply contains one heavy component, the 1.5 mH inductor. Because of all the bouncing around when the controller is used on a vehicle the big inductor
should be fixed to the PCB. I used a plastic 3mm screw, I imagine epoxy glue would also work.

The power supply contains three resistors of which you will have to determine the value yourself. The first one determines the current through the zener diodes. The resistor
value can be calculated using the minimum battery voltage, which in my case is 80V (I intend to run between 20s and 30s, so 80 to 120V).
In the board view the component value is not given, instead it's marked R_zen
sc12.jpg
sc12.jpg (112.18 KiB) Viewed 12851 times
The equation is given in the power_supply schematic
sc13.jpg
sc13.jpg (63.81 KiB) Viewed 12851 times
For 80V for instance the value works out to 42600 Ohm, which I rounded to 39k.

Two other resistors have to do with adjusting the 5V and 15V to the correct values.
sc10.jpg
sc10.jpg (125.46 KiB) Viewed 12851 times
Because all resistors are created different and also the internal reference voltage of the 12F617 varies from chip to chip, some adjustment mechanism is necessary to accurately
obtain the correct voltages. The schematic is designed such that when you leave out R_5V and R_15V, both voltages will be a little bit too low. So, after soldering the complete
power supply the way to go about things is to attach your battery (don't forget a FUSE !!!) and measure the 5V and 15V on the board. The measured values will be too low. To increase
them to the correct value the equations as given in the schematic should be used.
sc9.jpg
sc9.jpg (99.17 KiB) Viewed 12851 times
The obtained resistor values should be rounded up. In my case both worked out to be 10k Ohm. Note that the '5V' power supply should actually be a little bit higher for reliable
operation (memory writing when in the setup menus), with the give equaltion it should end up at 5.1V

To measure the 5V the hall connector pins can be used
DSC01425.jpg
DSC01425.jpg (84.55 KiB) Viewed 12851 times
For 15V, measure on the jumper (the jumper is there to interrupt the power supply to the gate drivers, this is necessary when you want to flash a new program to the 30F4011)
DSC01424.jpg
DSC01424.jpg (115.27 KiB) Viewed 12851 times
Last edited by Lebowski on Fri Mar 07, 2014 12:17 pm, edited 4 times in total.

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

Re: build your very own Lebowski controller !

Post by Lebowski » Thu Mar 06, 2014 11:47 am

Next up are the gate drivers for the output stage. The PCB was designed to be flexible and can drive 6, 12, 18 or 24 FETs.
To make sure the FETs are driven properly for a 6 or 12 FET one gate driver IC is used per channel A, B and C, for a 18 or 24 FET
2 gate driver IC's per channel are used.
toplevel.jpg
toplevel.jpg (110.36 KiB) Viewed 12796 times
Going from left to right through the top level schematic, first there is the power supply, then the processor block containing the
controller IC and then to the right you can see how each output of the processor block is connected to two output stage driver
blocks (each output stage driver block contains one gate driver IC).
sc1.jpg
sc1.jpg (89.84 KiB) Viewed 12796 times
The picture above shows the content of an output stage driver block. On the bottom is the gate driver IC with its bootstrapped power
supply. The high and low side outputs of the gate driver IC have two sets of diodes / resistor combos, each combo to be used with
one FET.
For a 6 FET you only need to place the components for one gate driver block and one diode/resistor combo each for the high and low
side FETs. For a 12 FET, one gate driver block per channel and two diode/resistor combos. For 18 FETs, two gate driver blocks per
channel, one using both diode/resistor combos and one only a single diode/resistor combo. And finally for 24 FETs, place everything.

on the board it looks like this:
DSC01434.jpg
channel B for a 6 FET
DSC01434.jpg (120.98 KiB) Viewed 12795 times
DSC01435.jpg
channel B for a 12 FET
DSC01435.jpg (132.18 KiB) Viewed 12795 times
DSC01436.jpg
and for an 18 FET (I don't have enough parts to show you guys a 24 FET :-( )
DSC01436.jpg (159.03 KiB) Viewed 12795 times
Since I'm building a 6 FET, my driver stages look like this:
DSC01438.jpg
DSC01438.jpg (133.26 KiB) Viewed 12704 times
For the RS232 connection I only need 3 wires, but to prevent wrong myself from plugging it in wrong I use a 4 pin connector with one pin
removed on the male side and one hole blocked on the female side. The (female) RS232 plug can go straigt into your computer or RS232 <-> USB cable.
DSC01441.jpg
DSC01441.jpg (119.84 KiB) Viewed 12704 times
DSC01440.jpg
DSC01440.jpg (65.53 KiB) Viewed 12704 times
Now the board can be populated until complete. Follow the text in the schematic for whether you have a 1.xx or 2.xx controller IC.
(the board below is for a 2.xx , the hall sensor resistors are not populated but the battery voltage measurement components are)
DSC01443.jpg
DSC01443.jpg (153.38 KiB) Viewed 12704 times
Last edited by Lebowski on Mon Mar 10, 2014 3:49 am, edited 5 times in total.

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

Re: build your very own Lebowski controller !

Post by Lebowski » Thu Mar 06, 2014 11:47 am

The output stage will be build according to the principles outlined in this thread:
https://endless-sphere.com/forums/viewto ... 30&t=55641

To mount the FETs choose some sort of platform attachable to a heatsink. I use a 4mm thick L-piece of aluminium which I can later
(with the short leg of the L) mount to the wall of my controller box, with the heatsink on the outside of the box.
DSC01444.jpg
DSC01444.jpg (74.56 KiB) Viewed 12574 times
DSC01445.jpg
DSC01445.jpg (56.84 KiB) Viewed 12574 times
The L-piece has 6 small holes where the FETs will be screwed down and 3 big holes though which the 3 motor phases exit.
The FETs need to be isolated from the aluminium to prevent shorts (as the tabs are also connected to the drain of the FETs)
DSC01446.jpg
digikey part numbers:
for mica plates see picture, the specially shaped little plastic rings are Digikey part nr. HS418-ND
DSC01446.jpg (79.3 KiB) Viewed 12574 times
Take 2 FETs (I use 4115's for this design, part nr. same as the 4115 in the PCB's power supply) for each motor phase. Cut the
gate tab short, for one FET bend the drain up, for the other the source. Attach opposite of each other as shown in the picture below.
(Note: the mica isolation plates will be added later, I did not want to risk damaging them during soldering)
DSC01449.jpg
DSC01449.jpg (57.03 KiB) Viewed 12574 times
Place the FETs for all three phases, solder the legs together that meet in the middle over the hole for the phase wire. Make sure the
legs that are sticking up are exactly opposite each other (this is the reason the 2 times 3 holes for attaching the FETs are not alligned
exactly opposite each other, but have an offset such that the legs sticking up are exactly opposite)
DSC01451.jpg
DSC01451.jpg (78.01 KiB) Viewed 12574 times
Attach the phase wires
DSC01452.jpg
DSC01452.jpg (79.73 KiB) Viewed 12571 times
take a copper sheet and some scissorts and cut two rectangles (I used 6 cm x 2 cm x 0.6 mm), these will be the power supply 'wires' from the
battery. Solder the copper pieces on each side to the legs sticking up. Add a 470nF and a 220uF capacitor as shown in the picture, keep connections
as short as possible !
DSC01453.jpg
470nF: digikey part nr. 495-4996-1-ND
220uF:digikey part nr. P13512-ND
DSC01453.jpg (96.45 KiB) Viewed 12571 times
view from the top
DSC01456.jpg
DSC01456.jpg (75.36 KiB) Viewed 12571 times
to connect the output stage to the PCB wires should be attached to each FETs gate and source. It is very important that the wires are
tightly twisted as shown in the picture ! (else you'll have too much inductance in the gate path and will get ringing)
DSC01458.jpg
yellow on the gates of the high side, green for the gates of the low side, black blue and red on the sources to differentiate the motor phases
DSC01458.jpg (122.36 KiB) Viewed 12571 times
DSC01459.jpg
DSC01459.jpg (111.91 KiB) Viewed 12571 times
while you're at it, solder the phase wires from the FETs to the 'FETs' side of the current sensors. Later on, make 100% sure the gate drives and current
sensors are matched up, the FETs driven by gate drivers 'A' must have their phase wire soldered to current sensor 'A' !!!!
DSC01460.jpg
DSC01460.jpg (141.01 KiB) Viewed 12571 times
Last edited by Lebowski on Mon Jun 09, 2014 1:48 am, edited 7 times in total.

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

Re: build your very own Lebowski controller !

Post by Lebowski » Thu Mar 06, 2014 11:48 am

The gate drive connections on the PCB are marked 'hi' and 'lo' for high and low side respectively.
DSC01462.jpg
DSC01462.jpg (119.14 KiB) Viewed 12481 times
The connection marked 's' is the source connection for the FET, the other one the gate.

In the following two pictures you can trace all the FET connections to the PCB
DSC01465.jpg
DSC01465.jpg (113.37 KiB) Viewed 12481 times
DSC01466.jpg
DSC01466.jpg (91.47 KiB) Viewed 12481 times
time to finish up ! Solder the output wires to the motor to the current sensors (on the 'motor' side), and solder the PCB power supply
to where the battery wires are connected to the copper plates of the output stage
DSC01467.jpg
DSC01467.jpg (107.54 KiB) Viewed 12481 times
don't forget to put the mica isolation plates between the FETs and the heatsink. Put some (oven or baking) paper between the two copper
plates. Measure with an ohm-meter to make sure there are no dead shorts anywhere (about 1000 Ohm between the supply plates is normal).
DSC01468.jpg
DSC01468.jpg (98.17 KiB) Viewed 12481 times
some good practise tips: add a cable pull relief
DSC01469.jpg
DSC01469.jpg (104.84 KiB) Viewed 12481 times
I decided to make holes for the two power supply LEDs, I used plenty of hot glue to make it (kinda) water proof:
DSC01470.jpg
DSC01470.jpg (103.88 KiB) Viewed 12481 times
Done ! All ready for connecting the throttle and setting up the controller IC :D
DSC01471.jpg
DSC01471.jpg (137.53 KiB) Viewed 12481 times
I always use cable operated throttles:
DSC01492.jpg
DSC01492.jpg (138.69 KiB) Viewed 12265 times
Notice the ducktape on the output stage. This tape serves two (ok, actually three) purposes: it keeps the oven paper in place that prevents the two copper
plates from creating a short. Secondly, it keeps the two copper plates close together ensuring minimal inductance. And thridly, everything is just better
with ducktape :mrgreen:
DSC01491.jpg
DSC01491.jpg (141.07 KiB) Viewed 12265 times
Last edited by Lebowski on Mon Mar 24, 2014 2:59 am, edited 3 times in total.

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

Re: build your very own Lebowski controller !

Post by Lebowski » Thu Mar 06, 2014 11:48 am

The following images are screenshots of the terminal program I use for setting up the chip. These are for version 2.00, just to show that setup is easy.
The program I use is gtkterm under Linux, for Windows you can use Termite

This is the main menu from v2.00
sc1.jpg
sc1.jpg (58.58 KiB) Viewed 12333 times
best is to always go through the menu's in alphabetical order. When you change something in menu a it's recommended you look
through all subsequent menus to make sure nothing changed, as some parameters share a dependency.
sc2.jpg
sc2.jpg (42.39 KiB) Viewed 12333 times
With the PCB as it is the PWM setup is shown as above, 21 kHz freuquency and 400ns deadtime. This menu also shows an
autocomplete function under option g: whenever a menu has an autocomplete it will fill in all the options after the autocomplete
option, so here the chip enters option h by itself. Typically the autocomplete uses information from previous options (here for
instance option h is calculates as two times the PWM frequency minus 1) and information from previous sub-menus.
sc3.jpg
sc3.jpg (58.59 KiB) Viewed 12333 times
I'm going through the submenu's in order, so above shows the current settings menu. The current sensor transimpedance can be
found in the datasheet of the sensor, for the ACS768 series it typically is 2000/I_max mV/A . Above is for 50A sensors. After entering
the maximum motor phase and battery currents, the chip can autocomplete the rest. Autocompleted options, by the way, can be
overrided by selecting them and typing a new value.
sc4.jpg
sc4.jpg (49.04 KiB) Viewed 12333 times
the throttle menu is the same as for v1...
sc5.jpg
sc5.jpg (27.75 KiB) Viewed 12333 times
At the moment the battery voltage is only used later on to calculate the measured inductance/resistance. I can imagine that in future versions
here you can set the low voltage cutoff
sc6.jpg
sc6.jpg (43.6 KiB) Viewed 12333 times
This menu is for the calibration of the current sensors in combination with the motor. Option a resets b and c, and autocompletes d. When you
select option b the motor will make a horrible noise for about a second. Option c, it will make a horrible noise and rotate the motor, so watch out
and make sure the motor can rotate freely. If for some reason it jerks too much (cogging), increase the position force current in the current settings menu).

With option c, after it's run the chip will display the measured gains. The total should be about 300%. Sometimes the measurement goes wrong and
all three sensors will display about 189%. In this case, you MUST select option a to reset all the settings and try again.

Option c measures not only the gain of the current sensors but also small differences in the motor windings. For instance, if one winding for whatever
reasons has a different resistance this will show up as a different gain. Therefore, do not change the wiring around after running this calibration as
the values will then no longer be valid. In such a case, you must re-run.
sc7.jpg
sc7.jpg (45.23 KiB) Viewed 12333 times
These are the controll loop parameters. The whole menu autocompletes. If the controller during use refuses to go into drive 3, typically options
b,c and d must be all increased with a (common) factor (I use 1.5). Don't go overboard though as higher numbers here increase the amount of
noise in the system.
sc8.jpg
sc8.jpg (40.38 KiB) Viewed 12332 times
This menu autocompletes.
sc9.jpg
sc9.jpg (39.27 KiB) Viewed 12332 times
This menu autocompletes for options b and c. You need to select option d, after which the motor will make a horrible noise. After this the chip will
display the measured motor resistance and inductance. For the values to be correct the battery voltage entered earlier must be correct.
sc10.jpg
sc10.jpg (37.48 KiB) Viewed 12332 times
These options are the same as for v1, menu autocompletes.
sc11.jpg
sc11.jpg (104.31 KiB) Viewed 12332 times
this is the save menu. Option a saves everything to ROM so that the chip can read all the settings before starting to run the motor. Option b gives you a hex dump which
you can copy/paste into a text file for later use. Many terminal programs have the option to transmit a text file over RS232. This can be used in combination with option c
to read in previously saved settings in one go. Remember though, the settings include throttle and current sensor calibration, so if the throttle or current sensors are different
(maybe because you have a different controller) these settings are not correct.
AFTER READING IN THE SETTINGS FROM A TEXT FILE, OPTION A MUST STILL BE USED TO WRITE THE SETTINGS TO ROM !!!
Option d finally allows the on-line current sensor calibration to be stored. If you short the setup pins in motor mode all LEDs will flash and the
new calibration data will be written to ROM. This will also disable this option, so online data can only be written once. The online calibration data
is only gathered in drive 2, so keep the motor there for a few revolutions before writing to ROM with the setup pins. The current sensor gain data
will be overwritten, so if you want to see the new measured data you can go into that menu

Finally, the 4 drive modes are:
drive 0: waiting for the motor to stop spinning before the controller can take controll of the motor.
drive 1: the motor will be forced into a certain position and the HF tone will start. The motor must be able to turn freely (don't sit on the bike yet !) but will only move for a very small amount.
drive 2: the motor is run with the HF tone
drive 3: the motor is running sensorless without HF tone.

oops, seems I've forgotten one menu, will add this later (the erpms menu)
Last edited by Lebowski on Mon Mar 24, 2014 3:40 am, edited 5 times in total.

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

Re: build your very own Lebowski controller !

Post by Lebowski » Thu Mar 06, 2014 11:48 am

9........

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

Re: build your very own Lebowski controller !

Post by Lebowski » Thu Mar 06, 2014 11:48 am

10...... done ! I hope...

User avatar
speedmd
100 MW
100 MW
Posts: 2730
Joined: Wed Nov 14, 2012 12:16 pm
Location: new england

Re: build your very own Lebowski controller !

Post by speedmd » Thu Mar 06, 2014 11:49 am

Is this a tease :?: Please, please share more :!: :lol:

User avatar
liveforphysics
100 GW
100 GW
Posts: 14414
Joined: Wed Oct 29, 2008 1:48 am
Location: Santa Cruz, CA, USA

Re: build your very own Lebowski controller !

Post by liveforphysics » Thu Mar 06, 2014 11:51 am

I'm so excited! I never built the first one you were kind enough to send me, but Im currently craving a good sensorless! (Just over frocking around with encoders/sensors).

This is so awesome! There is no better PMAC controller brain in the world that I've ever seen. Not just the best, a head and shoulders ahead of the next best.
Each carcinogen vapor exposure includes a dice roll for cancer.

Each mutagen vapor exposure includes a dice roll for reproductive genetic defects in your children.

Each engine start sprays them into a shared atmosphere which includes beings not offered an opportunity to consent accepting these cancer experiences and defective genetics life experiences.

Every post is a free gift to the collective of minds composing the living bleeding edge of LEV development on our spaceship.

flathill
100 kW
100 kW
Posts: 1397
Joined: Tue Jul 06, 2010 9:26 pm

Re: build your very own Lebowski controller !

Post by flathill » Thu Mar 06, 2014 4:50 pm

thanks for making this available open source!

once we all get our cassette motors we can tune it to work perfectly with signal injection for sensorless startup

is the pilot tone adjustable?

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

Re: build your very own Lebowski controller !

Post by Lebowski » Fri Mar 07, 2014 2:05 am

flathill wrote:thanks for making this available open source!

once we all get our cassette motors we can tune it to work perfectly with signal injection for sensorless startup

is the pilot tone adjustable?
The tone is adjustable in amplitude. Its frequency has a fixed relation to the (adjustable) sampling rate...

Futterama
1 kW
1 kW
Posts: 444
Joined: Sun Sep 01, 2013 1:47 pm
Location: Denmark, Scandinavia, Northern Europe

Re: build your very own Lebowski controller !

Post by Futterama » Fri Mar 07, 2014 5:52 am

This is only the brain, skull and spine, right? No arms or legs?

:roll:

I mean, this is controller IC, gate drivers and no output stage, right? :lol:

Edit: Oh, and an indication of the total cost of components would be nice, just something in the ballpark.

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

Re: build your very own Lebowski controller !

Post by Lebowski » Fri Mar 07, 2014 6:12 am

Futterama wrote:This is only the brain, skull and spine, right? No arms or legs?

:roll:

I mean, this is controller IC, gate drivers and no output stage, right? :lol:

Edit: Oh, and an indication of the total cost of components would be nice, just something in the ballpark.
The PCB holds the controller IC, gate drivers, current sensors and low voltage power supply (to make the 15V and 5V the gate drivers
and controller IC needs out of the battery voltage). The only thing not on the PCB is the output stage, which should be
build according to the low impedance output stage thread (which is an output stage not really suitable for a PCB):

https://endless-sphere.com/forums/viewto ... 30&t=55641

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

Re: build your very own Lebowski controller !

Post by Lebowski » Sat Mar 08, 2014 3:14 am

updated

John in CR
100 GW
100 GW
Posts: 13739
Joined: Tue May 20, 2008 12:58 am
Location: Paradise

Re: build your very own Lebowski controller !

Post by John in CR » Sun Mar 09, 2014 10:52 am

Can I send you one of my double motors with 6 phases, so you can see if 2 of your brains can run with adjacent windings? If there's no interference, then it makes high powered sensorless a real possibility. Motor control is still holding me back in a big way.

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

Re: build your very own Lebowski controller !

Post by Lebowski » Tue Mar 11, 2014 6:21 am

John in CR wrote:Can I send you one of my double motors with 6 phases, so you can see if 2 of your brains can run with adjacent windings? If there's no interference, then it makes high powered sensorless a real possibility. Motor control is still holding me back in a big way.
I think in your case (with the 6 phase motor) a master slave setup is best. I had a think about it and it should be possible to have a
master controlling 3 phases, and a slave powering the other 3 phases. The slave can be set to run at a programmable phase difference
(which in your case would need to be 30 degrees). It would need data communication at about 640 kbit/sec (16 bit at 40kHz f_sample)
which should be possible with the SPI interface. Problem is I still don't know whether this would influence the sensorless operation, but
I have the feeling it should be OK. Second thing (big problem !) is that there would be no error detection on the slave controller, meaning
that it wouldn't notice a blown FET (normally it sees this). And lastly, it would be such a large amount of work, take so much time....

Sending me a motor would be of no use as it would need to be tested under load (so you need vehicle and batteries too) ...

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

Re: build your very own Lebowski controller !

Post by Arlo1 » Thu Mar 13, 2014 11:04 pm

This is a good idea dude. Thanks for making/posting this. The forum needs this.
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
Skalabala
1 kW
1 kW
Posts: 419
Joined: Wed Feb 05, 2014 2:59 pm
Location: South Africa

Re: build your very own Lebowski controller !

Post by Skalabala » Fri Mar 14, 2014 8:45 am

Hi Lebowski :)
What reasons will you give me if I ask you why to use your controller and not an infinion based one that can be bought on Ebay for cheap?
I would like to have a controller to use any kind of brushless motor on :)
But after reading for the past month on the forum it feels impossible to make an decision on what controller to have.
Can I buy a Kit from you? And assemble my self? And then build probably 9fet 4110 power stage?

Regards :)
Image
Boosted cars are like hot women. A little edgy, every guy wants one, some guys can't handle them, and if you throw a little alcohol in them they'll rock your world! Born a Jap raised as a boer!

User avatar
speedmd
100 MW
100 MW
Posts: 2730
Joined: Wed Nov 14, 2012 12:16 pm
Location: new england

Re: build your very own Lebowski controller !

Post by speedmd » Fri Mar 14, 2014 10:26 am

Seriously? Well, I can say like, both are red! :lol: :lol:
Image
Image

User avatar
zener
1 kW
1 kW
Posts: 367
Joined: Thu Jan 16, 2014 5:48 pm

Re: build your very own Lebowski controller !

Post by zener » Fri Mar 14, 2014 12:32 pm

But only noe is swiss made :mrgreen:

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

Re: build your very own Lebowski controller !

Post by Lebowski » Fri Mar 14, 2014 2:20 pm

added the KiCad file to the second post, contains schematics and PCB design. Also, the subdirectory 'gerbers' contains all the files you
need to send to your local PCB shop to have the PCB made.

Also added the first part of the output stage construction.

Futterama
1 kW
1 kW
Posts: 444
Joined: Sun Sep 01, 2013 1:47 pm
Location: Denmark, Scandinavia, Northern Europe

Re: build your very own Lebowski controller !

Post by Futterama » Fri Mar 14, 2014 2:39 pm

Great work Lebowski, both with the hardware and the guide 8)

Post Reply

Who is online

Users browsing this forum: HighHopes and 3 guests