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 » 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: 1462
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: 1462
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: 1462
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: 5211
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 276 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: 1462
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: 10348
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: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby Arlo1 » Wed May 02, 2012 9:54 am

What transistors would you sugest? I have 2n3904, 2n3906, 2n5061, and n43al lm293 iaz-5 (think its called a lm 293) in stock Would any of those 4 work?
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: 5211
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 11:02 am

Arlo1 wrote:What transistors would you sugest? I have 2n3904, 2n3906, 2n5061, and n43al lm293 iaz-5 (think its called a lm 293) in stock Would any of those 4 work?


Use the 2n3904 . The others are the wrong type (pnp instead of npn), the 2n5061 is a thryristor and the last one I can't find...
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby Arlo1 » Wed May 02, 2012 2:12 pm

Ok thanks man i will see what i can do.
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: 5211
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby John in CR » Wed May 02, 2012 6:23 pm

Lebowski wrote: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.


No worries. I've developed the patience of Job regarding a great high power sinus controller for hard to drive motors.

:idea: If I can get a battery deal done, then maybe we can barter....a big stack of great batteries to your door for a pair of high power controllers, one for use and one for backup.

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

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

Postby Lebowski » Fri May 04, 2012 2:05 pm

I all of a sudden got very motivated to get the controller PCB done, cause in
my mind I'm already working on the next holy grail of controller design for which
I need a 2nd complete controller.

The plan is to add high torque startup or even high torque at standstill, SENSORLESS.

I did some measurement on the ME 602 scooter motor and found the winding
impedances change by + or - 15 % based on the rotor position, power needs
to be supplied to the lowest inductance (of the 3) to make the motor move.

I got some special stuff in mind for measuring impedances on the fly using
radio style signal processing. One thing I want though is to change only the
software, not the hardware. It should be possible, so lots of interesting stuff
to look forward to if only I had this bl00dy PCB done. And I haven't even
started on it yet :?

Can't promise it's going to work but it'll definately be an interesting ride :P
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby walls99 » Fri May 04, 2012 2:45 pm

Lebowski wrote:The plan is to add high torque startup or even high torque at standstill, SENSORLESS.

I did some measurement on the ME 602 scooter motor and found the winding
impedances change by + or - 15 % based on the rotor position, power needs
to be supplied to the lowest inductance (of the 3) to make the motor move.


This does work quite well for me, the lowest phase inductance of the 6 (polarity counts) will give you the rotor position +/-30 degree error, you then just need to energize 90 degree ahead in your chosen direction and repeat until your fast enough to pick up the BEMF...

See here for my result: viewtopic.php?f=30&t=36479&start=15#p534016
User avatar
walls99
10 W
10 W
 
Posts: 96
Joined: Wed Mar 11, 2009 5:34 am
Location: UK

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

Postby Lebowski » Fri May 04, 2012 2:57 pm

I've seen this thread... you use something like putting a fixed voltage pulse on the inductors
and measuring the rise of current. I find this too inaccurate and want to go in a different direction.
Pulsing and measuring current is too fidely for my taste, you need to time the ADC exactly etc etc...
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
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 May 04, 2012 3:09 pm

Lebowski wrote:I all of a sudden got very motivated to get the controller PCB done, cause in my mind I'm already working on the next holy grail of controller design for which I need a 2nd complete controller.

The plan is to add high torque startup or even high torque at standstill, SENSORLESS.

That's the spirit. :shock: :twisted: We love it! More, more, more... :D

Hey, seeing all that you've accomplished this should go like clockwork -you being in Switzerland & all... :lol:
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 Jeremy Harris » Mon May 07, 2012 8:11 am

Pretty impressive work, Lebowski! Great job.

(I've been away from here for a fair while and have only just caught up with this.......)

Jeremy
Please ask questions on the forum, rather than by PM, as it helps others and you'll get a better range of answers.
User avatar
Jeremy Harris
10 GW
10 GW
 
Posts: 4635
Joined: Tue Oct 23, 2007 4:15 pm
Location: Salisbury, UK

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

Postby Ratking » Mon May 07, 2012 11:07 am

Jeremy Harris wrote:Pretty impressive work, Lebowski! Great job.

(I've been away from here for a fair while and have only just caught up with this.......)

Jeremy



Greetings Mr Jeremy, long time no see.

I hope we will maybe see you a bit more often, I really miss the contributions you gave to this forum, it helped me a lot.
Are your house coming together?
User avatar
Ratking
100 W
100 W
 
Posts: 281
Joined: Thu May 20, 2010 5:27 am
Location: Norway

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

Postby Lebowski » Mon May 07, 2012 2:39 pm

We had a rainy weekend here with unpredictable weather, so lots of time to work on the PCB.

I got familiar with KiCad by following some only tutorials and got most of the schematic of the
controller drawn...
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1462
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby deVries » Tue May 08, 2012 6:20 am

Lebowski wrote:We had a rainy weekend here with unpredictable weather, so lots of time to work on the PCB.

I got familiar with KiCad by following some only tutorials and got most of the schematic of the
controller drawn...

Light speed, warp speed, a very good speed... 8)

Ratking wrote:
Jeremy Harris wrote:Pretty impressive work, Lebowski! Great job.

(I've been away from here for a fair while and have only just caught up with this.......)

Jeremy



Greetings Mr Jeremy, long time no see.

I hope we will maybe see you a bit more often, I really miss the contributions you gave to this forum, it helped me a lot.
Are your house coming together?

Hi Jeremy Sir,

By now you're Knighted on ES, so time to come back from your adventures & rejoin the round table. We need your wisdom & advice, or, at least, have you post again soon! :D

How is your off-the-grid set-up working out? Any new ES related projects planned anytime soon? :idea:
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 Jeremy Harris » Tue May 08, 2012 2:08 pm

Thanks for the kind words, I'll post something on the hassle of trying to build a house here later.

Jeremy
Please ask questions on the forum, rather than by PM, as it helps others and you'll get a better range of answers.
User avatar
Jeremy Harris
10 GW
10 GW
 
Posts: 4635
Joined: Tue Oct 23, 2007 4:15 pm
Location: Salisbury, UK

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

Postby liveforphysics » Tue May 08, 2012 3:15 pm

Jeremy Harris wrote:Thanks for the kind words, I'll post something on the hassle of trying to build a house here later.

Jeremy



Omg! So good to see you my friend!!! Woot!!! When you left, it put a hole in this place that nobody else could fill. It's really a pleasure and privilege to have your participation here when you get the chance. We've been doing some awesome stuff here too. :-)
For ebike parts, don't be a douche, buy from http://www.ebikes.ca or http://www.MethTek.com

Justin saved the forum at great personal expense! The man is a legend and a hero!
User avatar
liveforphysics
100 GW
100 GW
 
Posts: 10960
Joined: Wed Oct 29, 2008 1:48 am
Location: Santa Cruz, CA, USA

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

Postby casainho » Tue May 08, 2012 6:45 pm

Lebowski wrote:We had a rainy weekend here with unpredictable weather, so lots of time to work on the PCB.

I got familiar with KiCad by following some only tutorials and got most of the schematic of the
controller drawn...

Hello.

Nice to know you prefer to do the task using KiCad :-)

Is this controller OpenSource? if so, is there a link to the firmware?

You know, I started to work also on my controller, OpenSource, with name EBike Smart Controller: viewtopic.php?f=3&t=38337
Smart EBike (OpenSource): Dashboard/color display with touchscreen + Motor controller + Battery pack BMS:
  1. hackable/configurable options for advanced users
  2. Bluetooth communications with SmartPhones
  3. wireless communications between each three systems
Project page with documentation and source files: www.smartebike.likesyou.org
casainho
100 W
100 W
 
Posts: 253
Joined: Mon Feb 14, 2011 2:43 pm

PreviousNext

Return to Motor Technology

Who is online

Users browsing this forum: SiriusFun and 2 guests