Lebowski's motor controller IC, schematic and setup manual

Electric Motors and Controllers

Re: Lebowski's motor controller IC, schematic and setup manu

Postby nieles » Tue Apr 03, 2012 4:36 pm

after an other evening of trouble shooting, i have narrowed it down to my new pcb.

i went back to my breadboard and was be able to program the chip. this rules out: my serial adapter, the chip itself and my termite settings.
i also tested the chip with only one 100nf and one 100uf capacitor, and was still be able to go in to programming mode. i have 3 100nf and 3 47uf capacitors on the pcb, so that is not the problem either

tomorrow i will check my schematics and my pcb for faults, then i am out of ideas to try
does anyone have any suggestions i could try?

one more observation i made when trying to program the chip while on the pcb; when i do an reset i get the main menu instanly.
normally i have to press "enter" first, an the controller then responds by sending the main menu.
so this tells me the board is somehow receiving a signal and interprets it as a "enter"
nieles
1 kW
1 kW
 
Posts: 469
Joined: Mon Jul 14, 2008 5:39 pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Postby Lebowski » Wed Apr 04, 2012 12:44 am

I still have the feeling you're plugging in your FT232 board 180 degrees rotated. If you look at your
board layout (the first one , march 12, 12.45 AM), the TX (from chip to the PC) is in the middle with the gnd
on top and the RX (signals coming from the PC) at the bottom. If you rotate your FT232 180 degrees
the TX to the PC is still in the middle but your ground is connected to the RX and the RX to gnd.

As long as you don't type anything the RX is quiet and acts like a GND, the PC still receives characters
correctly because the TX pin is the middle one. When you type something then all goes wrong...
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1471
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Postby nieles » Wed Apr 04, 2012 1:58 am

copper side, board side.JPG
copper side, board side.JPG (60.01 KiB) Viewed 698 times


this is what the copper looks like next to the board.(i have flipped and rotated the copper so it is in the same direction as the board)

so from the top we have gnd,tx,rx

i am 100% sure i plugged gnd to the top pin of the programming header
nieles
1 kW
1 kW
 
Posts: 469
Joined: Mon Jul 14, 2008 5:39 pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Postby Lebowski » Wed Apr 04, 2012 11:59 am

Schematic of my 18V / 5V power supply:
DSC00735.jpg
DSC00735.jpg (71.75 KiB) Viewed 677 times

DSC00736.jpg
DSC00736.jpg (100.46 KiB) Viewed 677 times
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1471
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Postby Lebowski » Thu Apr 05, 2012 2:36 pm

Complete controller PCB now finished :D ain't she a beauty :mrgreen:
I decided to put everything on one eurocard PCB (initially I planned to use
an old laptop supply for the low voltage domains but i put on my own supply).

To wire it up it has the battery supply (far left), the three motor wires
and the three throttle wires. That's it !

The one in the picture is build with minium 150 V components (4115's etc etc)
and is build for max 20 A phase current amplitude (which all boils down to
around 2 kW effective).

Soldering the whole thing was a bitch though, lots and lots of work. Therefore
after my bike build I'll design a PCB (using KiCad) which can be processed
at Olimex to make beautiful professional circuit boards. First a 6 FET, maybe
later a 12 FET version. I think a 6 FET with 4110's can easely handle 4 to 6 kW....

The board has my controller IC, a 12F617 as the power supply brain, 5181's
1.5 Amp FET gate drivers, all high voltage FET's are neatly snubbed and have
200 nsec switch on times (4115's) and 100 nsec switch off times.

now I have to wrap a box around it and complete my bike (new thread coming :D )

DSC00737.jpg
DSC00737.jpg (102.52 KiB) Viewed 657 times
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1471
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Postby hjns » Sat Apr 07, 2012 1:28 am

Wow Lebowski,

I am very impressed. You think you can ride all the way to Basel and show me? :mrgreen:
Alternatively, make sure to make some nice movies. I am sure it will be great to see your face the first time you can ride that controller!!
Henk

High speed commuter w/ modified Lyen 18 FET 4110, 12AWG traces, extra Caps, beefed up shunt, modified Cromotor w/ thermistor, 10AWG phase wires. CAv3B22 with power-throttle limited to 8kW and 130oC motor winding temp, w/ GPS-enabled CA analogger. 20S 13.5Ah Lipo Zippy pack. Fusion FS frame, Fox RL rear shock, Fox F100 front fork, Schwalbe Fat Bob tires, HALO SAS 26inch rims with custom 12G(r) and 14G(f) black Sepim spokes from JRH and laced myself.
Commuter Cromotor build
User avatar
hjns
100 kW
100 kW
 
Posts: 1066
Joined: Sat Aug 20, 2011 11:05 pm
Location: Basel, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Postby Lebowski » Sat Apr 07, 2012 4:17 am

hjns wrote:the first time you can ride that controller!!


I started building my electric bike, I remember it like yesterday, in October 2010.... :mrgreen: first ride 's been a long time coming
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1471
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Postby nieles » Sat Apr 07, 2012 4:24 am

got my controller working again!

i have no idea what is wrong with the first pcb, but i ditched it and made a new one.
the new pcb worked on the first try, so i am happy. i hope i can finish the controller today,
and do some testing tomorrow (if the weather permits, its a bit rainy here the last few days)
nieles
1 kW
1 kW
 
Posts: 469
Joined: Mon Jul 14, 2008 5:39 pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Postby Arlo1 » Sat Apr 07, 2012 9:24 am

Sweet guys. I will be back on mine as soon as this is done. I put up my last big coat of mud last night. Im bagged I spend the last 2 days sanding and mudding. And the 3 days before that putting up genie clips furring channel insulation and drywal. Soon I will be back to my electric life!
Attachments
006_renamed_32005.jpg
006_renamed_32005.jpg (64.69 KiB) Viewed 589 times
Thanks Justin of http://www.ebikes.ca/
Also a thanks to Methy at http://www.methtek.com/ :)
And Dave who has some good deals on STUF
RC lipo and most other types of Lithium batteries you MUST know your individual cell voltages while charging and discharging.
Batteries of all kinds need respect they can burn your house down, so don't sleep with them under your bed or any other were you cant afford smoke or fire!
[color=#FF0000][b][size=150]Never above 4.2v never below 2.7v EVER!!!
User avatar
Arlo1
100 GW
100 GW
 
Posts: 5225
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

Re: Lebowski's motor controller IC, schematic and setup manu

Postby Goethe » Mon Apr 16, 2012 9:28 am

Amazing job you have done Lebowski!

I would very much like to contribute to the work with integrating your code/chip in ebike controllers. I have been building ebikes for a while and have pretty good theoretical and practical skills with electronics and electric propulsion. My daily job is as a SW developer at Volvo Cars and doing the functionality for the EV node in the Volvo C30 electric. http://green.autoblog.com/2011/04/05/first-drive-volvo-c30-electric-lovely-except-sky-high-price/

I have both rc and hub-motors of different types and some sensored and sensorless Lyen controllers that I can laborate with. Right now I'm building DH bikes with HS3525 and HS3540.
So if you're interested in one more test pilot I would would happily join :!:

My first EV build: http://endless-sphere.com/forums/viewtopic.php?f=28&t=19592&hilit=civil+disobedience



/Goran Jonasson
User avatar
Goethe
10 W
10 W
 
Posts: 75
Joined: Tue Dec 08, 2009 7:33 pm
Location: In Sweden with polar bears and Santa as neighbours

Re: Lebowski's motor controller IC, schematic and setup manu

Postby nieles » Mon Apr 16, 2012 2:16 pm

hi,

did some testing this weekend, but didnt get very far.

first i had my limits at 50a phase and 30a battery current. and it was kinda lame to ride totally no acceleration.
then i upped the current limits to 75a phase and 50a battery current. (i forgot to upp the fault current, still at 5a for option f and g) and it was cutting out everytime i gave it too much throttle. so i rode back home. 10 meters before i was there, the controller shut down again to drive 0. only this time it would not go to drive 1 again. so i brought the controller inside and scoped all the signal lines to the controller. one of the phase voltage sense lines was at 0.2v.. so what could this be? when i unplug my powerstage from the controller board the lines are at 2.5v again. i am thinking it is either my bottom c phase fet, or the fet driver on phase c. i hope it is the driver.. because i have one of those spare.. not any of the same fets:P (i do have some better fets, but then i need to replace all of them)

any ideas how i could check what the problem is? maybe the test signals without a battery connected? and see what the output looks like?

Niels
nieles
1 kW
1 kW
 
Posts: 469
Joined: Mon Jul 14, 2008 5:39 pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Postby nieles » Sat Apr 21, 2012 1:59 pm

as it turns out, the driver is shot, and the fet is fine.

this is the output of the high side phase b driver (fine)
P4210028 (1).JPG
P4210028 (1).JPG (40.22 KiB) Viewed 284 times


this is the output of the high side phase c driver
P4210032 (1).JPG
P4210032 (1).JPG (32.4 KiB) Viewed 284 times


only the high side is not working, the low side is working fine.
nieles
1 kW
1 kW
 
Posts: 469
Joined: Mon Jul 14, 2008 5:39 pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Postby Arlo1 » Mon Apr 23, 2012 12:36 am

For those of you waiting on the edge of your seat. I have about 3 hours of working on this since I got my chips from lebowski. I have bit to many things on the go. This is my own personal top priority but the girlfriend and the drag race hi and work and business come first. So soon but this is to everyone out there. DONT THINK POURLY OF THIS BECAUSE NO ONE HAS IT WORKING YET WE ARE JUST BUISY PEOPLE! I am sure this is going to be amazing!
Thanks Justin of http://www.ebikes.ca/
Also a thanks to Methy at http://www.methtek.com/ :)
And Dave who has some good deals on STUF
RC lipo and most other types of Lithium batteries you MUST know your individual cell voltages while charging and discharging.
Batteries of all kinds need respect they can burn your house down, so don't sleep with them under your bed or any other were you cant afford smoke or fire!
[color=#FF0000][b][size=150]Never above 4.2v never below 2.7v EVER!!!
User avatar
Arlo1
100 GW
100 GW
 
Posts: 5225
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

Re: Lebowski's motor controller IC, schematic and setup manu

Postby deVries » Mon Apr 23, 2012 1:13 am

Arlo1 wrote:For those of you waiting on the edge of your seat. I have about 3 hours of working on this since I got my chips from lebowski. I have bit to many things on the go. This is my own personal top priority but the girlfriend and the drag race hi and work and business come first. So soon but this is to everyone out there. DONT THINK POURLY OF THIS BECAUSE NO ONE HAS IT WORKING YET WE ARE JUST BUISY PEOPLE! I am sure this is going to be amazing!

I'm certainly on the edge of my seat & have fallen off a few times too. :lol: :twisted:

I'm sooo pissed I don't have the electronics skills to do what you guys are doing, but I hope one of you can come-up with a kit or something that someone like me could assemble too. :idea: :D

It IS really frustrating just having to sit back and watch what I think is the greatest controller development project EVER on ES. We're fracking damn lucky to have you guys doing this. It's the best controller porn I've known. :P :shock: I can feeel it running smooth and silent... running deep into our wet-dreams of controller bliss. :twisted: :lol: :D

P.S. Hurry-up already, anyway! :twisted: :D
deVries
1 MW
1 MW
 
Posts: 1652
Joined: Thu Jul 10, 2008 11:29 pm
Location: Solar Powered 3000w Austin Texas

Re: Lebowski's motor controller IC, schematic and setup manu

Postby zombiess » Fri Apr 27, 2012 1:43 am

I got the chip and want to play with it so bad. Six months ago I had nothing but time, now there aren't enough hours in the day :( I hope to catch up on some of my own projects soon so i can start on this. If someone has a PCB designed it would be super fast even for me to start playing around. Maybe I can find some free time soon to get some designed and made. Gonna need something awesome like this for my mega powerstage.
Greyborg Hub Motor, Lyen 18FET, Customized full suspension kids MTB. Top Speed 61 MPH
9C 8x8, 24S2P LiPo, Lyen 12 FET, Diamondback Recoil Comp. Top Speed 42 MPH
GreyborgUSA Dealer
zombiess
1 MW
1 MW
 
Posts: 1505
Joined: Tue Feb 01, 2011 2:16 am
Location: Ventura

Re: Lebowski's motor controller IC, schematic and setup manu

Postby nieles » Fri Apr 27, 2012 2:13 am

i have a single layer pcb design (for the controller chip only). i can send you the eagle file if you want?
Last edited by nieles on Fri Apr 27, 2012 2:24 am, edited 1 time in total.
nieles
1 kW
1 kW
 
Posts: 469
Joined: Mon Jul 14, 2008 5:39 pm
Location: The Netherlands

Re: Lebowski's motor controller IC, schematic and setup manu

Postby Lebowski » Fri Apr 27, 2012 2:18 am

At the moment I'm finishing my bike build (maybe this coming 4-day weekend :D ), after that
I want to make a 16x10 cm PCB containing a full 6 FET (hopefully TO247) controller
(including 100V or 150V to 18V/5V supply, controller IC, proper gate drivers and output stage).
For a 1 motor bicycle you then only need to connect analog throttle, the battery, the
3 motor wires and optionally the 5 hall sensor wires.
I think a PCB will make it very easy for everyone to build a controller. Just order the parts
from digikey (I will try to make a parts list), solder everything to the PCB, setup the controller
IC with your laptop and your vector based, sinewave out with automatic timing compensation
controller is done !
If the 6 FET proves itself I'll do a 12 FET or more version if there's a demand for it.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1471
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Postby Lebowski » Fri Apr 27, 2012 3:22 am

---- post deleted ----
Last edited by Lebowski on Fri Apr 27, 2012 12:41 pm, edited 3 times in total.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1471
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Postby deVries » Fri Apr 27, 2012 4:24 am

Lebowski wrote:At the moment I'm finishing my bike build (maybe this coming 4-day weekend :D ), after that
I want to make a 16x10 cm PCB containing a full 6 FET (hopefully TO247) controller
(including 100V or 150V to 18V/5V supply, controller IC, proper gate drivers and output stage).
For a 1 motor bicycle you then only need to connect analog throttle, the battery, the
3 motor wires and optionally the 5 hall sensor wires.
I think a PCB will make it very easy for everyone to build a controller. Just order the parts
from digikey (I will try to make a parts list), solder everything to the PCB, setup the controller
IC with your laptop and your vector based, sinewave out with automatic timing compensation
controller is done !
If the 6 FET proves itself I'll do a 12 FET or more version if there's a demand for it.

I'm very excited to try this setup once you've got it ready. Hopefully will be buying many of these over time. Thanks for taking this to the next level of offering an order & parts kit. 8) :D
deVries
1 MW
1 MW
 
Posts: 1652
Joined: Thu Jul 10, 2008 11:29 pm
Location: Solar Powered 3000w Austin Texas

Re: Lebowski's motor controller IC, schematic and setup manu

Postby Lebowski » Sun Apr 29, 2012 1:04 pm

Before I'm putting my controller on my bicycle I wanted to play around
a little at try to spin a 10 kW Enertrac scooter hubmotor (which spkpn
gave to me, thanks dude !). It was kind of boring as it worked right
out of the box and I didn't need to change any settings w.r.t. my own
motor. in the video the e-rpm is limited to 1000 for safety... Or, you know, I'm
scared to think what would happen if this 30 kg (65 pounds) piece of metal
is spinning at high rpm and breaks lose of it's two tiny 6mm mounting bolts...

User avatar
Lebowski
100 kW
100 kW
 
Posts: 1471
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Postby deVries » Mon Apr 30, 2012 5:45 am

Lebowski wrote:Or, you know, I'm
scared to think what would happen if this 30 kg (65 pounds) piece of metal
is spinning at high rpm and breaks lose of it's two tiny 6mm mounting bolts...


Awesome! Two serious weapons in this video. :lol: :shock: :twisted:
deVries
1 MW
1 MW
 
Posts: 1652
Joined: Thu Jul 10, 2008 11:29 pm
Location: Solar Powered 3000w Austin Texas

Re: Lebowski's motor controller IC, schematic and setup manu

Postby Arlo1 » Wed May 02, 2012 1:43 am

Ok guys.... Where do I go from here.... I guess I will try a simple board build up with just the basics and get it working with a reset button properly?
I think my IOgear usb-serial adapter is giving me issues when I went to program my car two weeks ago it was a PITA and I had to remove the driver and re-install it.
SO whats a good serial adapter? Damb if I start from scratch I will need a max 232 which meens I need to put in another order....

Tonight I started with some new dspic chips and a dummy program lebowski give me to get a working setup before I fry anymore of his chips. I found the dspic was getting warm to the touch without doing anything I was just trying to get thought the setup menu. I also found even though the reset button puts the mclr pin to 0v it doesnt always wake up the menu so I think the serial adapter is to blame. Also leblowski shows a 2200 ohm resistor between the 5v and mclr which I dont have maybe I should?
Thanks Justin of http://www.ebikes.ca/
Also a thanks to Methy at http://www.methtek.com/ :)
And Dave who has some good deals on STUF
RC lipo and most other types of Lithium batteries you MUST know your individual cell voltages while charging and discharging.
Batteries of all kinds need respect they can burn your house down, so don't sleep with them under your bed or any other were you cant afford smoke or fire!
[color=#FF0000][b][size=150]Never above 4.2v never below 2.7v EVER!!!
User avatar
Arlo1
100 GW
100 GW
 
Posts: 5225
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

Re: Lebowski's motor controller IC, schematic and setup manu

Postby Lebowski » Wed May 02, 2012 3:01 am

I use a RS232 cable like this :

rs232.jpg
rs232.jpg (21.74 KiB) Viewed 279 times


I tried 2 different brands of cable and a laptop which has the 9 pin RS232 build in, all worked
without any problems. Note that I use the 2 transistor interface as shown in the schematic, not
a MAX232 chip.

I never noticed the 30F getting warm to the touch ? try to measure the current from the 5V supply, it
should be a bit less than 200 mA... The reset button should work immediately and not 'sometimes'.

Arlo, try taking baby steps. Solder or breadboard from the beginning and after every step check supply
current and functionality (use a socket if you want to solder so you can swap chips and re-program using
the board you have already). First only solder all supplies and the mclr & setup pins (use switches or
jumpers for these last 2). Put chip in setup and measure supply current (less than 200 mA). If you have
a RS232 cable like mine, add the 2 transistors for the RS232. At this point (so without anything else
connected but supplies and RS232) you can already go into the menus and change all settings.
When this works, add hall sensor input lines and try hall calibration. After this, add the bit with
the 6 diodes and all resistors (2200 ohms, Ra, Rb). Now you should be able to measure backemf (main menu b).
Ask and plot all graph outputs to make sure all is OK. Every time you add some circuitry, measure
supply current to make sure it's not over 200 mA. When all is OK, connect FET drivers and FET's. Setup
the PWM and make sure it works like it should using the 'test PWM' options. Again check supply
currents. Take baby steps, that's how I did it.

The dummy program you got can spin a motor but use only at very low RPM ! It will only do a very bad sensored....
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1471
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

Re: Lebowski's motor controller IC, schematic and setup manu

Postby John in CR » Wed May 02, 2012 7:17 am

Lebowski,

How do you plan to drive that double wide Enertrac motor? That's the controller I want to build with your IC. :mrgreen:

Maybe I should start with a 6 fet, since the 6fet Kelly on my daughter's scooter, drives the motor quite noisily. Is it at a stage where relative beginners, but quick learners can give it a go? What's the minimum equipment required more than a good soldering iron and cheap multimeter? Soldering skill level required?

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

Re: Lebowski's motor controller IC, schematic and setup manu

Postby Lebowski » Wed May 02, 2012 7:50 am

I've no plans yet for the Enertrac motor, the hub part has been removed to there's no easy installing.
I had a good look at it and it should be quite easy to attach a sprocket to it. Maybe I could use it
to install in my 1979 FXS and run a chain to a dry clutch but that would be sacrilege. Plus it would cost
a ton in batteries.

The next step for my controller is to make a PCB containing everything, I think once that's done it's
at a stage where a soldering iron and multimeter should be enough :D . At that point it's just a matter
of ordering a list of parts from Digikey, solder everything in the right place and set it up with a PC.

No clue though how long designing the PCB will take, never done that before (I've drawn 40nm IC layouts
though but it's not the same :D ). I guess learning the PCB tool will be the hard part.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1471
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

PreviousNext

Return to Motor Technology

Who is online

Users browsing this forum: No registered users and 3 guests