• Howdy! we're looking for donations to finish custom knowledgebase software for this forum. Please see our Funding drive thread

A Lebowski controller in a 9 FET 'Infineon' case


100 W
Aug 21, 2010
Bethel, Alaska
I intended to order boards for this, as well as for the rest of my bike system, the first week of Oct, (but am not going to make it), and would appreciate any advice or criticism. Anybody have experience with dirtypcbs.com?

I will put a variety of drawings, gerbers, renders, eventually schematics, etc., in a zip file, at the end of this post. As I add or change drawings I will update it. No schematics for the motor controller part of the project yet (mostly just followed Lebowski’s), but I intend to draw a full set of schematics, with mods and options, well before I have the boards made.

I’d been working on a plan to build a processor board to control 2 motor controllers, mostly to control the current distribution to the 2 motors, but also for voltage controlled brakes (thank you for doing it for me Dude) and (eventually) anti spin. I then decided to revive the idea of a system for simplified wiring that I posted back in 2011, which would use 3 wires (12v+, 12v-, and a Serial I/O (or LAN)), then a month ago (or so, I’ve lost track of time), it occurred to me that I should see if Lebowski was still selling chips, and came across his controller thread.
But, it’s big for my bike as drawn, even if I found the ideal housing. So I got to looking around for enclosures I might design a board(s) for, and realized I have several 9 FET Infineon style cases, so started an effort to fit a controller using his motor control chip and electronics into that tiny case. Also, I wanted to try and use TO247 transistors.

I split his circuit into 4 parts. The power supply mounts sideways, with the caps, inductors, and other tall parts, sticking out over the low side FETs. The drivers are on their own board (6 FET only), as are the current sensors (with one extra to measure batt current for my processor). I added a second processor to the mix, primarily to interface the motor controllers to my bikes serial interface.
(The top view is more outdated than the other 2. Also, there are more, higher res pix, gerbers, etc, in the zip.)

I followed Lebowski’s design to the best of my ability, and even where I customized it, it should be able to function exactly as he designed it. Also I used surface mount for the resistors and most of the caps. I drew it as having a soldered together heat sink, but will machine it from one piece of aluminum.

I asked him, and Lebowski thought my capacitor arrangement on the sides of the bus bars should work, although I’ve changed it slightly since. (I went from one .88” cap to two .63” caps. 7.5mm lead spacing instead of 10, and higher total ripple current. I would use ESR rated caps with 5mm lead spacing, but they are too long to fit in this case.) I admit it’s beyond me to gauge the effects of my changes. The necessarily large holes in the + and - buss bars will cause the inductance to change, like a trace that gets wider and narrower. The possible effect of connecting the caps to them at different places (because of the lead spacing) is completely beyond me. Comments on the output cap arrangement would be welcome.

The TO247 are insulated around the edge, (and through the hole) allowing me to put them almost against each other, so the output stage is only a little over ¼” longer with them, than TO220. I’m still going to try and squeeze the processor board by another 1/10” (the others are easy). Actually, unless I could figure a way to shrink the PS, going to TO220 wouldn’t gain me any space at all.

The angles in the corners of the case, and its narrowness, keep me from using an esr rated cap. (See the end view.)

The power supply board is pretty much to Lebowski’s design. I left off the LEDs, but put resistors (marked ‘pd’ for pull down) to each supply in case they’re needed. For my modified system I intend to supply ‘15v temp’ from my bikes 12v, and the power to the 12F617 from one of ‘my’ processors pins, ‘PS on’. This will allow me to control power to the motor controller, and eliminates the zener current during power down. The zeners and associated parts are include on the board, so it can be built ‘true Lebowski’. This board has the high voltage stage clearance at .025” min.
power supply.jpg
(Can somebody tell me how to change a black and white ‘silk screen’ image to a yellow and transparent layer in photoshop?)

The Current measurement board is simple, and includes the HV part of the phase feedback circuits. I also included a B+ current ic, which if I can figure out how to extrapolate accurate battery current from The Dude’s RS232 info, may only appear on the 1st prototype. Oh, I used holes for the wires and slots for the current sensor legs, but still intend to solder the wires solid to the current sensor as well as the hole. I added an electrolytic that isn’t in this pic.current.jpg

The driver board is very close to the original except for substituting surface mount components, and eliminating the drive for the second set of fets (questionable whether there would be enough drive for 2 of most TO247s anyway). The electrolytics can be either surface mount or through hole(.315/.197). A few days ago I got the bright idea of moving everything, except the ICs and bootstrap diodes, on the top, to the bottom, and vice versa. This puts the smt electrolytic caps on the bottom of the board where they nest among the processor board’s caps, and allows me more room below the processor board for wires. About the only thing I added to this board was an optional mlcc at the anode of each bootstrap diode. The HV portion is clearanced at .045” (probably for no good reason, unless you can find a pin compatible IC with the drive voltage rating for IGBTs). Moving the caps to the bottom allowed this board to move higher, so now I need to narrow it, to clear those angled corners…. Added resistors to all 6 outputs. If I power the board down but leave the main supply up, the gates could float, which would negate any power saved by shutting down, not to mention frying the FETs. LOL driver.jpg

The processor board follows Lebowski’s schematic, except I added a second processor, primarily to interface to the serial input/output line I intend to use on my bike. (I’ll start another thread on that in a week or so, and post a link back here (lots of drawing and redrawing to do). ‘My’ processor uses its own 5v supply from the bikes 12v system. processor.jpg

I don’t have a schematic drawn for this board yet (the schematic most needed for this part of the project)(Nor do I have the resistors all specified yet.), but the following is a description of the added processor’s pinout.
Pin 1, as well as 27 and 28 are only connected to the programming header.
2, 9, and 10, NC
3 is an op amp output internally connected to a DAC, and is connected to throttle input 1.
4 is an analogue input, shared and connected to the B+ voltage tap (which resides on the PS board)
5 is the Serial out to the bikes S I/O.
6 is the Serial input from the bikes S I/O
7 is the input from the B+ current sensor.
11, 12, and 13 are connected to the hall sensor inputs. If hall sensors are connected to the motor controller, this gives my processor an alternate timing (wheel speed) input. On the other hand if the hall signals are only available on my bikes SIO, then these lines would allow me to drive the hall inputs on Lebowski’s chip (I have no expectation of using the hall sensors for anything other than, possibly, wheel speed data (for anti spin), but the connections are there if I or someone else does need it).
14 is the PS on signal, and will actually be used as Vdd to the 12F617.
15, 16, 17, and 18 are connected to the LED outputs on Lebowski’s processor, and their status will be posted on the bikes LAN, so both motor controller’s status can be displayed on the handlebar display.
21 is connected to ‘reverse’. Since I started this design a few months ago, I’ve come to realize that I often get into situations where reverse would be nice. I was in a bog that was over the front axle and motor this spring that would have been easier to back out of than it was to push on through.
22 is an op amp output internally connected to a DAC, and is connected to throttle input 2.
23 is connected to the other processors RS232 out.
24 is connected to power good from the power supply (also connected to ‘enable’ on Lebowski’s chip). I can put a signal on the LAN that the 5 and 15v supplies came up, or an error message if they don’t.
25 is connected to the other processors RS232 in.
26 is connected to setup, so that, with the RS232 connections, I can change motor setup parameters from the handlebars.

I don’t expect the programming on this IC to be very extensive, but would like to be able to specify a current or RPM from the LAN, and have it maintain it unsupervised (I don’t mean unsupervised to the extent it wouldn’t be fail safe). I would also like to be able to tell it to return to the RPM of n mS ago, as part of my anti spin scheme.
Assuming I can get the info I’m currently using input pins for, from the RS232, this part could be replaced with an 18 pin IC, but until I see it, I want to have something I know will work. I could be convinced otherwise. The throttle info could be put in through the CAN interface, but would only save me one pin, and it’s doubtful if response time would be any better.

I should note before I continue, that I can’t even current test the controller I’m building, as my motors are 10 and 12 turn, 28mm, 9C (I’ve thought about tying 3 giant coils to the rear rack and paralleling them with one of the motors LOL). IF I could find out whether the Clyte3540 has an even number of strands, so I could separate and series it to a 3520, I MIGHT be looking for one, IF I could get it cheap enough….

I think these boards would be useful for a multi output stage setup. This drawing is for a 36 fet, using 2 power supply boards and a separate driver for each ‘stage’ (the box is drawn 6-1/2”X7-3/4”, without the needed heat sinks).View attachment 2
What do you think of my bus bars for joining the 6 10ga wires to the 2 or 4ga input/output wires? All the 10ga wires would be the same length, and attached to the bus bars about the same distance from where the heavy wire connects. The plus and minus bars could be bolted together, with kapton between, for minimum inductance, and the phase bars would be stacked below them with standoffs between. Lebowski is a very conservative engineer, and I suspect (without getting extreme and running calculations) that his power supply would supply the 5v and 15v to 3 driver boards, but I’m almost sure it would do 3 driver boards (say as the second PS in a 30 FET setup) as long as you left the 5 volt parts off that board (would require minor reprogramming). You could use the power good from the 5/15 board, to power the 12F617 on the 15 only board(s), and then use its power good for ‘enable’. I actually added extra connections to both my processor board and the driver board so 2 driver boards could be connected to the former, or the later could be daisy chained easily. A 24 fet could probably be built 4-1/2 or 5”, by 2-1/2”, by 10” or so, WITH the heat sink (that would fit on a bicycle easy enough). :twisted: It just occurred to me that if the driver boards were turned 90 degrees CCW, and mounted to the bottom of the heat sinks below the FETs, the gate leads could be kept to 15mm or so (would probably require resorting to using actual connectors where I just drew them in as convenient pad arrays).

The rest of my bikes system will include, (all interconnected by the afore mentioned 3 wire harness, and each connection uniquely serial numbered), BMS(s) , charger(s), motor controller(s), in motor unit(s) (hall data, temperatures, and fan or relay control), hall sensor unit(s) (for suspension position, pas, steering angle), lights and turn signals (I’m going to narrow them down some from the current 6-1/2”), the handlebar unit (display, inputs for buttons and switches (cruise, lights, turn, limits override, 3way, etc.), throttles, analog brakes, ?). Since its pretty open, anything could be added to the system (GPS, compass, anemometer, camera control, bluetooth, even motion alarm and audio). I would like to be able to change anything, from the current/speed limits, to the song playing, without taking either hand from the handlebars.

For the rest of the system: https://endless-sphere.com/forums/viewtopic.php?f=2&t=73053

Thanks for reading.
View attachment Lewbowsik in 9 FET.zip
Sorry to have taken so long to post an update.

I have all the parts to build 3 controllers, one with IRFB4115s, one with FDH055N15As, and the third will depend on the tests with the aforementioned FETs.

But, I decided the project needed a 3d printer to complete like I want to (as well numerous other projects, both bike and non-bike). I ordered a kit in Sept, and STILL don't have a 3d printer operational due to what is often referred to as a 'comedy of errors', mine mostly in my choice of who to do business with.... But, all my money and spare time have been going into project 3d printer (I've designed my own, which I will build as soon as I get the one I have now operational, so I can print it), and I still don't have the money to order the PC boards made.

On top of which I hurt myself in early Oct, and have only ridden once since (that one time hurt me), so the bicycle has gotten lower priority of late.

I still plan to finish the project, it's just gotten back burnered.

As I read your post here, I wonder why you chose the Lebowski chip in DIP package and not the smaller SMD package that he also offers. If you at some point need more room, you could switch the big DIP chip to the smaller TQFP chip. It's doesn't sound like you would have any problems soldering the SMD chip.

I'm sorry to hear that you got hurt, and that you got trouble with you 3D printer. I recently bought a 3D printer too, it was also my Lebowski controller project that drove me down that path (I will be printing plastic enclosures to my specs). I chose this one and I'm happy with it:
Hi Futterama,

I wasn't aware he was offering a smt part when I started the project, although it was almost inevitable. Actually I specified this project (the whole bike electronics project, not the subject of this post), before I updated it with Lebowski's controller, and I decided at the start to use all through hole for solid state parts, although I did change over to some smt diodes.

I have a friend who has a rework station, but I'm still using an old fashion soldering station. I've destroyed silicon smt soldering by hand (low mass transistors is all), and thought through hole would be more dependable, both for me, and for others if someone wanted to use my left over boards. I've been using smt resistors for decades, just to avoid drilling thousands of holes in hand made boards.

I've managed to fit everything in without making things too difficult to solder, and if I did revise, I would probably buy new chips rather than unsolder and transfer them (I'm assuming Lebowski will make farther revisions anyway). There's almost nothing on the processor board but the 2 PIC chips, so a revision wouldn't waste much other than the processors. One of the advantages of multiple boards.

Yes, the 3d printer has been something of a fiasco. I could write a 10,000 word post, so will avoid going into detail here, but will eventually have the machine I want, and I've learned more than I would have with an over the counter machine (Always try and find a silver lining).