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 » Thu Mar 08, 2012 7:21 am

fechter wrote:Awesome! I love the breadboard. Don't hit any big bumps.

I guess one of the next steps is to lay out a circuit board that holds all the parts other than the power stage.


yes that is the plan, working on the layout now


did some more testing in sensored mode.

the motor locking up like i showed in the last post still happens, but after some tries and turning the motor by hand i can get it to run.
whitch tells me it is probably has to do with the calibration of the current sensors. this motor has a no-load current of around 1-2A so that is part of the problem. i will get some acs714 sensors in my next mouser order to do some more testing on this.

in the vid below you can see the motor locking up in the beginning, then i got it running. the noise is coming from the frame the motor clamped in, the motor itself is really quiet. the second part of the vid shows some abnormality of the controller. after i release the throttle it almost fully spinns down, but then applies some throttle again. could be some noise on the throttle line, because i dont have the filter in place. (i did program the throttle with a small dead zone)
just remembered something, could this have something to do with the controlled slowdown?
vid:



i also did some tests with my outrunner RC motor. to get the push start working. so as you suggested i turned off the combfilter. that really didnt do anything noticeble. when i apply throttle, the motor turns 3-5 degrees to line up with a pole on the stator an then just stays there. it is really hard to turn the motor by hand when throttle is applied. an other thing that sometimes happens, it turns for a quarter turn, and then goes to drive 0.
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 » Thu Mar 08, 2012 8:24 am

I think it is indeed the noise in the throttle line, calibrate it with a bit larger deadzone. The controller IC
has the option to give internal variables out during motor use (page 27 of the setup manual), looking at the
noise on throttle 1 is plain scary (if you don't use an RC filter). The active slow-down you mention is only
used when you apply reverse, not when you close the throttle.

In the second part of the video, it this the sensorless selfstart ? It seems to be starting on its own... Or is this
hall sensored ?

I played around with hall sensored myself yesterday evening and think I found out what's going on. There's
an amazing amount of noise on the hall sensor outputs once the PWM of the output stage is activated.
I always thought my particular hall sensors were the problem, I have analog hall sensors which give a
kind of 'digital' output (they saturate because of the high magnetic field), so I thought proper digital
hall sensors would not have the noise I'm seeing. But judging from your difficulties, digital hall sensors
also suffer from this... What I use is a 2200 Ohm / 100 nF RC filter inbetween the hall sensors (+2200 ohm
pull up resistor for open collector) and the hall sensor input pins of the controller IC. Can you try this ? I would re-calibrate
both the halls and coils (main menu options a and b) after this. Again, looking at the internal variable
for the e-phase, phi, it's clear there's a lot of noise on this when there's no RC filters in the hall lines.
What I noticed is that without the hall sensors the motor feels weak in drive_1 (hall based startup),
can sometimes even go in reverse and basically sounds not health. I'll update the schematic...

The delay caused by the RC filter in the hall signals is not important as the controller transides to sensorless
at a few 100 to 1000 e-rpm.

About the current sensor offset, this will be seen as a large error current by the algorithm.... It calibrates this
away but only in drive 3. To stop it from conking out you need an appropriate value for menu d, option f (fixed
part of error current allowed). But in your case I think it's the noisy hall signals messing up.
In sensored, in drive_1 the motor runs on the hall sensor information only. After sufficiently high e-rpm is reached
it shifts into drive_2. In drive_2, over a certain amount of time, the sensorless control loop is gradually dialed in.
Then it switches to drive_3, the main sensorless mode. Messy hall signals will not dial in the sensorless loop
correctly during drive_2 so I can imagine it immediately jumps out of drive_3 to drive_0. Note, there's
no check made for error current during drive_1 and drive_2....

Sensorless selfstart of an RC motor (better said: high kV with strong cogging and low inertia) is difficult...
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1466
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby nieles » Thu Mar 08, 2012 8:59 am

Lebowski wrote:In the second part of the video, it this the sensorless selfstart ? It seems to be starting on its own... Or is this
hall sensored ?


the whole vid is in hall sensored mode.

Lebowski wrote:What I noticed is that without the hall sensors the motor feels weak in drive_1 (hall based startup),
can sometimes even go in reverse and basically sounds not health. I'll update the schematic...


yes this is what i experienced as well.


i have been meaning to ask you about the data output function, do i need anthing special to get the data from the controller when in motor running mode?
if i simply input one of the characters from the table i get no response from the controller (well i get a random character, but not a stream of data)
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 » Thu Mar 08, 2012 9:06 am

nieles wrote:i have been meaning to ask you about the data output function, do i need anthing special to get the data from the controller when in motor running mode?
if i simply input one of the characters from the table i get no response from the controller (well i get a random character, but not a stream of data)


I think that's a feature of 'termite' :D

In termite you probably type 'a'-enter.
On the 'a' the controller starts outputting data but the enter character stops it immediately. Any character
the controller receives not in the table ('a'-'h') stops the data transmission.

In Ubuntu's gtkterm, after typing the 'a' you get a lot of data back immediately...

I use a labview program that transmits a single charater and then collects the 16 bit data and plots
a real-time graph. It'd be nice if someone could program something like that in python...
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1466
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby nieles » Thu Mar 08, 2012 10:58 am

tried it with gtkterm, but the program will freeze as soon as i reset the controller out of the programming menu.

not sure what is causing this

edit:

tried another app for ubuntu: moserial.

exactly the same problem, progamming is fine, an as soon as i reset go to to motor mode the program freezes
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 » Thu Mar 08, 2012 12:36 pm

hm, maybe the programs must be started after the controller is switched into motor mode ? These programs
try to interpret any pulse on the line, also one from switching the controller on/off . Some of them freeze
on funny characters (it sends 16 raw data which is not supposed to be interpreted as ascii but as binary)

these are some results from my controller, this shows the phase in sensored mode transitioning from sensored
to sensorless:
screenshot.jpg
screenshot.jpg (78.19 KiB) Viewed 473 times


this is the scaled throttle data with throttle constant, you can clearly see the noise:
screenshot2.jpg
screenshot2.jpg (69.78 KiB) Viewed 473 times
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1466
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby nieles » Thu Mar 08, 2012 2:17 pm

i tried several different orders of starting the controller and the program. cant get the data to transmit


i tried the sensored mode with a filter on the hall signals, (a 22k resistor and a 10uf capacitor).
it still will not start properly. with the combfilter OFF, it will spin up and then go to drive 0.
but with the combfilter ON, it will spin randomly back and forth.
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 » Thu Mar 08, 2012 2:37 pm

the resistor and cap values are way to high ! The delay introduced by an RC filter is equal to R*C, 0.22 seconds with the values you used. 2200 Ohm and 100 nF like I used gives only 0.22 milli-seconds delay. Don`t forget to use 3 filters, one in each hall signal.

It's not really useful to look at the real time data in termite, you need a realtime graphingprogram. Should be easy to write for someone fluent in Python.... (hint hint :-) )
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1466
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby nieles » Thu Mar 08, 2012 2:41 pm

lol sorry.. 10nf

i understand it is not very usefull, but i would like to get the data transmission working. but if i understand correctly the problem is with the program, and not the controller chip right?
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 » Thu Mar 08, 2012 3:21 pm

yeah it needs a custom program to grab the data. Something that sends a single character (dependent on which data you want) and then captures all data the chip sends back. It's relatively simple if you know the programming language, I know Python is very general and easy but I`ve never used it before... is there a download for python under windows vista or xp somewhere with a manual ?

To capture the phase data would be very useful to see whats going on with your setup under sensored... only thing i can think of is that there's a connection wrong somewhere. For each of the 3 motor phases the pwm outputs, current sensor and backemf measurement channel must be correct...

maybe scope the hall signals after the filters to see what they look like, i know the chip has pull-up resistors but they should be off (because the 22kOhm is rather high).

I hope someone can point me to a good easy programming solution so i can write the datacapture program under windows.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1466
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 Mar 09, 2012 3:22 pm

I'll have a look at running calibration on 2 current sensors before the controller goes into drive_3.... Also
will try to install Python on my windows XP machine to see if I can write a real-time data capture and plot
program...
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1466
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby nieles » Sun Mar 11, 2012 3:38 pm

not sure how usefull it its, but maybe this can help you with the python data capture
http://www.blendedtechnologies.com/real ... python/231
http://eli.thegreenplace.net/2008/08/01 ... thon-guis/
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 » Sun Mar 11, 2012 5:45 pm

just finished a pcb for the controller

albis controller board (2).jpg
albis controller board (2).jpg (130.85 KiB) Viewed 395 times


the only thing missing are the filters for the hall sensors. (will update this tomorrow)

all i need to do now is mirror and scale the artwork for the tonor transfer

i can post a pdf file here if anyone is interested?
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 » Sun Mar 11, 2012 8:10 pm

Cool niles. So.... I tried with the 7kw colossus (80-100) and no luck sesnros are glued so then I went to the big colossus and got it to calibrate the coils but its still glitchy and I can not get termite to comunicate right when I first open it. And I push the reset button and it does nothing even though it should I have to cycle the main power to get termite to comunicate.
Code: Select all
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -00   -.5400
.5000   000   ..5200   00   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400


a] number of e-rotations: 30
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------> b]

Spin the motor then press any key to start measurement
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
ÿ






























########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  experimental, use at your own risk  #
########################################


a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
z) store parameters in EEPROM for motor use

------> 

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  experimental, use at your own risk  #
########################################


a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
z) store parameters in EEPROM for motor use

------> a

a] number of e-rotations: 30
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------> c

hall 1, hall 2, hall 3
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   .5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   -.5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
-.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   -.5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   .5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400


a] number of e-rotations: 30
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------> 

a] number of e-rotations: 30
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------> 

a] number of e-rotations: 30
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  experimental, use at your own risk  #
########################################


a] calibrate hall sensors
b] determine coil positions
c) PWM parameters
d) current settings
e) control loop parameters
f) throttle setup
g) running modes
h) CAN bus setup
z) store parameters in EEPROM for motor use

------> b

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b]

Spin the motor then press any key to start measurement
 Sampling...

 coil position capture failed

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b

Spin the motor then press any key to start measurement
 Sampling...

 coil position capture failed

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> b]

Spin the motor then press any key to start measurement
 Sampling...

 coil position capture successfull
 data arrays now contain sampled back-emf waveforms

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> c

 data arrays now contain reconstructed back-emf waveforms

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu

------> d

data A, data B, data C
.9232   -.3459   -.6034
.9382   -.3807   -.5799
.9514   -.4144   -.5557
.9615   -.4473   -.5300
.9674   -.4798   -.5018
.9684   -.5119   -.4705
.9638   -.5438   -.4355
.9537   -.5752   -.3966
.9385   -.6063   -.3539
.9190   -.6367   -.3076
.8964   -.6665   -.2583
.8718   -.6958   -.2066
.8463   -.7245   -.1535
.8209   -.7528   -.0997
.7960   -.7805   -.0458
.7721   -.8077   .0073
.7488   -.8343   .0593
.7259   -.8599   .1097
.7028   -.8842   .1584
.6790   -.9066   .2051
.6542   -.9267   .2497
.6279   -.9440   .2924
.5999   -.9579   .3329
.5704   -.9680   .3716
.5393   -.9742   .4085
.5067   -.9763   .4437
.4725   -.9744   .4775
.4366   -.9686   .5101
.3988   -.9593   .5421
.3585   -.9467   .5733
.3154   -.9312   .6045
.2692   -.9130   .6355
.2196   -.8927   .6669
.1669   -.8702   .6983
.1116   -.8458   .7300
.0544   -.8201   .7616
-.0035   -.7931   .7927
-.0609   -.7652   .8229
-.1165   -.7368   .8517
-.1692   -.7082   .8785
-.2183   -.6796   .9029
-.2635   -.6514   .9246
-.3049   -.6233   .9431
-.3431   -.5953   .9581
-.3789   -.5670   .9698
-.4135   -.5377   .9776
-.4478   -.5069   .9819
-.4827   -.4737   .9823
-.5186   -.4374   .9789
-.5557   -.3975   .9717
-.5935   -.3536   .9607
-.6313   -.3056   .9458
-.6679   -.2540   .9273
-.7027   -.1994   .9055
-.7345   -.1425   .8806
-.7630   -.0846   .8533
-.7878   -.0268   .8242
-.8094   .0297   .7941
-.8280   .0840   .7637
-.8448   .1355   .7337
-.8605   .1838   .7049
-.8759   .2286   .6775
-.8916   .2703   .6516
-.9075   .3092   .6270
-.9233   .3457   .6033
-.9383   .3806   .5798
-.9515   .4143   .5556
-.9616   .4472   .5298
-.9676   .4797   .5016
-.9685   .5118   .4703
-.9640   .5437   .4354
-.9539   .5751   .3965
-.9386   .6062   .3537
-.9192   .6366   .3074
-.8966   .6665   .2582
-.8720   .6957   .2065
-.8465   .7244   .1534
-.8211   .7527   .0996
-.7962   .7804   .0458
-.7723   .8076   -.0074
-.7489   .8342   -.0594
-.7261   .8598   -.1098
-.7030   .8841   -.1585
-.6792   .9065   -.2052
-.6544   .9267   -.2498
-.6280   .9439   -.2925
-.6001   .9578   -.3330
-.5705   .9679   -.3717
-.5394   .9741   -.4086
-.5068   .9761   -.4438
-.4726   .9742   -.4776
-.4367   .9684   -.5103
-.3990   .9591   -.5422
-.3587   .9465   -.5734
-.3156   .9310   -.6046
-.2694   .9129   -.6356
-.2198   .8925   -.6669
-.1671   .8700   -.6984
-.1117   .8457   -.7301
-.0545   .8199   -.7617
.0033   .7929   -.7928
.0608   .7650   -.8230
.1164   .7366   -.8517
.1691   .7080   -.8786
.2182   .6795   -.9030
.2634   .6512   -.9247
.3048   .6232   -.9432
.3429   .5952   -.9582
.3788   .5668   -.9698
.4133   .5376   -.9777
.4476   .5068   -.9819
.4826   .4735   -.9824
.5185   .4373   -.9791
.5556   .3973   -.9718
.5934   .3534   -.9609
.6312   .3055   -.9460
.6679   .2539   -.9275
.7026   .1992   -.9057
.7345   .1424   -.8807
.7630   .0845   -.8535
.7877   .0267   -.8244
.8093   -.0298   -.7943
.8279   -.0841   -.7638
.8447   -.1357   -.7339
.8604   -.1840   -.7051
.8759   -.2288   -.6777
.8915   -.2704   -.6517
.9075   -.3093   -.6271

a] number of back-emf samples: 850
b] calibrate coil positions
c] reconstruct waveforms based on extracted parameters
d] table out data arrays
z] return to main menu
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: 5222
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby Arlo1 » Sun Mar 11, 2012 8:29 pm

I have to be honest I dont understand how to determin these?
Code: Select all
b) 1st order phase loop integrator coefficient: 12.7999
c) 2nd order phase loop integrator coefficient: 0.0709
d) amplitude loop integrator coefficient: 3.0000


Is it based on inductance vs resistance. ? Industance is 8uh and Resistance is .09 ohms.
Last edited by Arlo1 on Sun Mar 11, 2012 11:40 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: 5222
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby Arlo1 » Sun Mar 11, 2012 10:53 pm

Ok so I have another non responsive chip its likely something I did. so here is the scematic. Click the atached file to see a better picture.
I wonder if the crystal on the board is the problem?
Attachments
Capture layout (800 x 490).jpg
Capture layout (800 x 490).jpg (116.73 KiB) Viewed 1020 times
SCH-ET-BASE dsPIC30F.pdf
(31.49 KiB) Downloaded 59 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: 5222
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby nieles » Mon Mar 12, 2012 2:38 am

Arlo1 wrote:I have to be honest I dont understand how to determin these?
Code: Select all
b) 1st order phase loop integrator coefficient: 12.7999
c) 2nd order phase loop integrator coefficient: 0.0709
d) amplitude loop integrator coefficient: 3.0000


Is it based on inductance vs resistance. ? Industance is 8uh and Resistance is .09 ohms.



these are the settings i used for the "small" colossus:

settings:
menu E:
b: 13.5 ( 3*1024/228 )
c: 0.02 ( 1024/(228^2) )
d: 0.6 ( 20000/458*0.002*38000 )
e:100%

x: 3*0.002*38000=228
y: 1024


this is for 20khz pwm with 38khz sample update
they work pretty well for sensorless push start. so start there.
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 » Mon Mar 12, 2012 3:30 am

These are the calculated values for the big colossus as stated in the manual:
PWM frequency: 20khz
F sample: 38khz

x: 3*0.000089*38000=10
y: 1024


settings:
menu E:
b: 307.2 ( 3*y/x =>3*1024/10=307.2)
c: 0.02 ( y/(x^2) =>1024/10^2=10.24 )
d: 12.9 ( 20000/458*0.000089*38000 )
e:100%

you might want to upp the PWM frequency when using the big motor.
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 » Mon Mar 12, 2012 5:07 am

Arlo1 wrote:Cool niles. So.... I tried with the 7kw colossus (80-100) and no luck sesnros are glued so then I went to the big colossus and got it to calibrate the coils but its still glitchy and I can not get termite to comunicate right when I first open it. And I push the reset button and it does nothing even though it should I have to cycle the main power to get termite to comunicate.
Code: Select all
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -00   -.5400
.5000   000   ..5200   00   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400
.5000   .5200   -.5400



I don't like this bit, something happens here in the communication. Maybe the there was a powerglitch ?
I looked at the schematic of the board you're using, I don't think the Xtal is the problem though I don't like
its connected to pin 14 (where there's supposed to be the drive_0 LED).

Looking at the schematic, there's a ferrite between the 1000uF cap and the main processor. This ferrite
a little bit isolated the supply after it, meaning the chip does not 'see' the 1000uF (to a small extent).
Comined with the glitch in the communication, I would solder at least 4 caps around the main processor,
preferably 47 uF or something like that (more of 10 uF or less of 100 uF should also be good).

I've seen really weird stuff hapenning when there's not enough capacitance. I remember the first time
testing the PWM, I would only see groups of 3 PWM pulses on the scope. I thought I programmed something wrong,
something which turned the PWM on and off. When I zoomed out though I saw the groups were 50 msec or
so apart and I realised the chip was resetting itself after 3 PWM pulses because the supply dropped (caused
by the sudden PWM activity). I added 200 uF worth of caps and this took care of the issue...

I wonder whether the problem lies with the MAX3232 interface chip, it has a lowest max rating of 120 kbaud, close
to the 115.2 kbaud I'm using. I also wonder whether it needs some toggling on the lines to get the boodstrap
supply going, I don't know never used these chips myself. If you got some bipolar transistors lying around i would
disconnect the MAX3232 and connect directly to RF4 and 5. The resetting difficulties you have are definitely not
normal.

It's a pity you did not plot the raw back-emf data (output the data arrays immediately after the back-emf sampling),
only the reconstructed version.... The reconstructed looks good though, not really sinewaves but good 120 degree
spacing. Same goes for the halls, looks good.

Screenshot.jpg
Screenshot.jpg (46.88 KiB) Viewed 998 times


I would calculate the parameters you mentioned in your post with an LR_delay of 0.5 msec, the 0.089 msec (8u/0.09) from the
L and R values you post seems scarely low :D .

The new chips go in the mail this afternoon, you're getting the updated version 1.01 . This version has as extra features
the pulsing of the low side FET's during drive_0 (see new manual which I will post later this week in the very first post
of this thread). Also it has the possibility to store the calibration data of the current sensors by pressing the setup
button during motor use (also see updated manual)
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1466
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby Lebowski » Mon Mar 12, 2012 7:55 am

nieles wrote:i can post a pdf file here if anyone is interested?


Yes please :D

Maybe put in 2 more 47uF or so decaps and add a TO220 style 7805 for the supply ?
You can always replace the 7805 with a wire if you don't need it...
How about moving the connector in the top right a bit more to the top and adding
a 47uF next to the 100nF that is already there. Maybe add the transistor RS232 interface,
again, no need to put the components in when you don't need them but some people might...
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1466
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby Lebowski » Mon Mar 12, 2012 2:16 pm

I posted an updated schematic and user manual in the first post of this thread (version 1.01).
RC filters where added in the hall sensor lines. The user manual explains the extra options in
the version 1.01 controller IC's.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1466
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 Mar 13, 2012 5:33 pm

made some changes to the layout and added some parts.

in the bottom right should be some room for a 7805.
i will make a new version with the 7805 added.

as for size reference the pcb is 59x89mm
albis controller board 1.1 (1).jpg
albis controller board 1.1 (1).jpg (130.81 KiB) Viewed 940 times


this is a pdf file in A4 format for tonor transfer etching a pcb.
albis controller pcb 1.2 (8x mirrored for etch).pdf
(340.67 KiB) Downloaded 50 times

(adjust the scaling to 100% and measure with the 30f chip if all 40 holes match on a test print first!)

i kept the corners clean, to mount the pcb. if you do this, keep in mind the copper is the GND plane
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 » Mon Mar 26, 2012 2:45 am

last piece of the puzzle: 150V to 18V and 5V DCDC converter. Uses a leftover 4115, a 5210 PMOS , a NCP5181 dual gate
driver IC and a 12F617 PIC processor as controller and voltage regulator. It uses zener diodes for startup voltage
generation, after startup it supplies itself from the generated 5V / 18V

DSC00732.jpg
DSC00732.jpg (94.55 KiB) Viewed 860 times
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1466
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby Arlo1 » Tue Mar 27, 2012 12:45 am

Lebowski wrote:last piece of the puzzle: 150V to 18V and 5V DCDC converter. Uses a leftover 4115, a 5210 PMOS , a NCP5181 dual gate
driver IC and a 12F617 PIC processor as controller and voltage regulator. It uses zener diodes for startup voltage
generation, after startup it supplies itself from the generated 5V / 18V

DSC00732.jpg

Very cool lebowski! Ill be back on this soon very soon! The kinda good news is I have major issues with my usb-serial converter tonight trying to program my car so. I will look at buying or finding another usb-serial converter.
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: 5222
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby fechter » Tue Mar 27, 2012 8:29 am

Lebowski wrote:last piece of the puzzle: 150V to 18V and 5V DCDC converter. Uses a leftover 4115, a 5210 PMOS , a NCP5181 dual gate driver IC and a 12F617 PIC processor as controller and voltage regulator. It uses zener diodes for startup voltage generation, after startup it supplies itself from the generated 5V / 18V


I've been trying to find something simple that does that for quite a while. I've looked at various off line switching chips like the Viper as a buck converter. Here's a datasheet:
http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00279018.pdf
The problem I had was making work at lower voltages, but some kind of startup supply could solve that. The Viper has almost everything you need in one chip, and it's cheap.
"One test is worth a thousand opinions"
User avatar
fechter
100 GW
100 GW
 
Posts: 9352
Joined: Sun Dec 31, 2006 3:23 pm
Location: California Bay Area, USA

PreviousNext

Return to Motor Technology

Who is online

Users browsing this forum: No registered users and 3 guests