Lebowski's motor controller IC, schematic and setup manual

Electric Motors and Controllers

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: 1468
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: 1468
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: 10971
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: 254
Joined: Mon Feb 14, 2011 2:43 pm

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

Postby CNCAddict » Tue May 08, 2012 8:04 pm

He already posted in your own thread ;)

viewtopic.php?f=3&t=38337#p559556
CNCAddict
100 W
100 W
 
Posts: 173
Joined: Wed Sep 17, 2008 7:13 pm

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

Postby casainho » Wed May 09, 2012 2:00 am

CNCAddict wrote:He already posted in your own thread ;)

viewtopic.php?f=3&t=38337#p559556

Ok, thank you, I got it -- this project is not OpenSource.
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: 254
Joined: Mon Feb 14, 2011 2:43 pm

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

Postby Lebowski » Wed May 09, 2012 3:55 am

casainho wrote:
CNCAddict wrote:He already posted in your own thread ;)

http://endless-sphere.com/forums/viewto ... 37#p559556

Ok, thank you, I got it -- this project is not OpenSource.


My controller contains unique technology (not described in literature) which
I invented myself. It's not open source.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1468
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby casainho » Sat May 12, 2012 1:16 am

Lebowski wrote:
casainho wrote:
CNCAddict wrote:He already posted in your own thread ;)

viewtopic.php?f=3&t=38337#p559556

Ok, thank you, I got it -- this project is not OpenSource.


My controller contains unique technology (not described in literature) which
I invented myself. It's not open source.

Sure. I wish you good luck with your project.

There are others as me that need OpenSource controllers, we are getting there like this shared project Open BLDC controller. Later we are also capable to go commercial, produce and sell a professional controller (even if it is OpenSource).
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: 254
Joined: Mon Feb 14, 2011 2:43 pm

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

Postby Lebowski » Sat May 12, 2012 5:32 am

since I've been busy with KiCad (to make a PCB) I now got some decent schematics.
Note that all the snubber (the RC series across the power components) component values
are not final and among other things depend on board layout !

The code running on the 12F617 for the DCDC converter (an MPLAB X project):

dcdc_converter.X.zip
(39.84 KiB) Downloaded 29 times


The 12F617 has a comparator with on one input a 0.6V reference source and the other input
is alternated between the 17V and 5V feedback signal. When the feedback signal is below
0.6V the 12F turns on the power transistor (via the ncp5181 driver) for 10 u-sec. After a pulse
a certain wait time (dead_time) is observed to prevent astronomical rise of inductor current
on startup. The 10 u-sec is timed by the CCP module for the 5V supply, the 17V uses TMR2
for timing and the pulse is switched off in the interrupt routine.
On startup the 12F waits around 0.5 sec to allow the capacitors around the gate driver to charge fully,
the first 10-usec pulse has to 'hit the money' so it needs a stable 17V from the zener diode pre-charge
before it can produce the first pulse. After startup has completed and the wait-time after each
pulse has been reduced to its minimum the 12F makes the 'power_ready' signal 'high' to turn
on the main controller IC.
Attachments
sine_controller.jpg
(188.51 KiB) Downloaded 3 times
sine_controller-output_stage_B.jpg
(127.91 KiB) Downloaded 3 times
sine_controller-gate_driver_B.jpg
(121.68 KiB) Downloaded 3 times
sine_controller-low_voltage_supply.jpg
(169.68 KiB) Downloaded 3 times
sine_controller-brainbox.jpg
(231.75 KiB) Downloaded 3 times
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1468
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby deVries » Sun May 13, 2012 3:43 am

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


Only one sunny day allowed per week, well, until the kit arrives. :twisted:

May it rain rain rain... :P
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 nieles » Tue May 22, 2012 7:22 am

Got my controller working again! i replaced the driver chip, and it works like before!

now the "bad" news, i definitely need to add some snubbers!

this is the high side gate signal
h_a_gate1.jpg
h_a_gate1.jpg (17.71 KiB) Viewed 214 times

h_a_gate.jpg
h_a_gate.jpg (18.46 KiB) Viewed 214 times

h_a_gate2.jpg
h_a_gate2.jpg (21.02 KiB) Viewed 214 times


this is the phase a to gnd signal going to the motor
h_a_source.jpg
h_a_source.jpg (17.79 KiB) Viewed 214 times

h_a_sourc1.jpg
h_a_sourc1.jpg (22.29 KiB) Viewed 214 times


and the low side gate signal. not sure what is going on here?
l_a_gate.jpg
l_a_gate.jpg (17.96 KiB) Viewed 214 times
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 » Tue May 22, 2012 7:54 am

The snubber are between the drain and source.
To chose snubber component values I follow the following cookbook:

- As you can see in your picturs, there's ringing on the drain/source voltage of the FET. Measure the frequency of the ringing.
- Experiment by placing different values of capacitors across the drain / source. Determine the capacitor value for which the
frequency of the ringing is about half to one-third of the original ringing frequecy. This gives you the capacitor value for
the snubber. For a 4115 I found 3.3 to 4.7 nF a good fit (depends on battery voltage, more voltage -> lower cap).
- calculate the impedance of the capacitor at the new (lower) ringing frequecy using X = 1 / (2 * pi * f_new_ring * C_snub)
- the snubber resistor should be taken as 1.5 times the capacitor impedance X.

Now the only thing to watch out for is the power dissipated in the snubber resistor. This is given by:

P_snub_r = f_pwm * C_snub * (V_bat)^2

First put snubbers between all drain/sources of the FET's (see also attached picture where the snubbers are the 4.7 nF and 6.8 Ohm components)

After this is done, look at the gate / source signals. Chose the gate resistors such that there's no significant overshoot which can
blow the gate oxide. Im my controller I didn't need gate resistors, the gate signals looked nice and clean after snubbing the drain/source's.
If the drain/sources are not snubbed the ringing will 'transfer' to the gate by means of the Cgd, this is what you're seeing.

sine_controller-output_stage_B.jpg
(127.91 KiB) Downloaded 3 times
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1468
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby nieles » Tue May 22, 2012 8:30 am

i have 10 ohm gate resistors in place.

i also have a 10k (or 20k) and a 15v (or 17v) zener diode beteween the gate and source of each fet.

i have ordered some 1nf 2.2nf and 4.7nf capacitors along with a few 100 low value 0.25w resistors to make a snubber.

Thanks for posting the calculations again. i have them written down somewhere, but this saves me a few hours of searching :D

Will post again when i have some progress.

can i damage something by only snubbing one phase first? i would think this is not a problem but i am not 100% sure
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 » Tue May 22, 2012 8:42 am

nieles wrote:i have 10 ohm gate resistors in place.

i also have a 10k (or 20k) and a 15v (or 17v) zener diode beteween the gate and source of each fet.

i have ordered some 1nf 2.2nf and 4.7nf capacitors along with a few 100 low value 0.25w resistors to make a snubber.

Thanks for posting the calculations again. i have them written down somewhere, but this saves me a few hours of searching :D

Will post again when i have some progress.

can i damage something by only snubbing one phase first? i would think this is not a problem but i am not 100% sure


I snubbed one phase first too, I used the 'generate test signal' from the PWM menu when I chose the snubber values.
Just don't put any power through the output stage before it's snubbed. When you use the 'generate test signal' option
all 3 PWM channels move in sync, so no effective voltage is put accross the motor. I did not have my motor connected
when I chose the snubber values. Very important is to have a 0.47 uF high voltage cap on the battery supply. Put this cap
as close as possible to the power FETs but inbetween the FET's and the battery. The job of this cap is to shorten
the (to be snubbed) inductive loop.

Make sure that the snubber caps have the correct voltage rating ! (must be higher than the battery voltage)
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1468
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby nieles » Tue May 22, 2012 8:54 am

i have 8 of these beteween V+ and gnd. close to the fets
http://www.ebay.nl/itm/470nF-100V-Phili ... 1c1afc3ca3

so i should be okay there!

the capacitors i have for the snubbers are these:
http://www.ebay.nl/itm/20-Polyester-Pol ... 1242wt_794
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 » Tue May 22, 2012 9:47 am

Niles would you not be able to reduce the ringing by reducing the voltage you are applying to the fet gates?
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: 5224
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby nieles » Tue May 22, 2012 9:53 am

not 100% sure what you mean, but i am only using 12v supply for the gates, going lower will not fully turn the fets on.
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 » Tue May 22, 2012 9:58 am

nieles wrote:not 100% sure what you mean, but i am only using 12v supply for the gates, going lower will not fully turn the fets on.

Are you using 4115 fets?
Looks like a 9 volt supply would be OK. I think it was bigmoose who pointed out to me you want to be just above the miller plateau.
Post edited:
Attachments
Capture 4115 gate charge.JPG
Capture 4115 gate charge.JPG (52.61 KiB) Viewed 189 times
Last edited by Arlo1 on Thu May 24, 2012 12:58 pm, edited 1 time in total.
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: 5224
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby Lebowski » Tue May 22, 2012 10:24 am

I use 17V for the gate drive. The nasty bit in the whole curve is the miller plateau, while
the FET is in there it's dissipating power (because it's already conducting and has
a large voltage across it). To get through the plateau quickly you need a lot of 'overvoltage'
above the plateau. So, 17V gives you 10 V overvoltage (10V above the 7V plateau) meaning
that the gate current will be 10V / whatever resistance your gate driver is (typically
5 to 7 Ohm for a NCP 5181).

My FET's are on in 0.2 usec.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1468
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

PreviousNext

Return to Motor Technology

Who is online

Users browsing this forum: salty and 7 guests