Lebowski's motor controller IC, schematic and setup manual

Electric Motors and Controllers

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

Postby Arlo1 » Mon Jul 02, 2012 9:01 am

Lebowski wrote:I see you're now using the proper controller IC ? Since your video shows a blinking LED I'm assuming this
is the drive_1 LED, there's no drive_0 LED ? Can you post all the settings of all the menus ? Are you using v1.00
or v1.01 ?
I have 2 v 1.01 chips all the other chips are dead. Gordo has a v 1.01 chip as well but he is traveling till late fall lol.
I ment to post all the menu settings but I forgot and closed termal. I will run the motor and scope the gates and drivers and signals to make sure nothing is funny then I will copy all the menus and past them on here again.
Lebowski wrote:The best sequence for going into program mode is to press and hold reset, press and hold setup, release
reset, release setup. (if you press setup while its in motor mode it will flash all LED's and store the current
sensor calibration data, but only for the v1.01 chips). I'm still wondering whether the problem lies with your
computer (or better said: windows). What we can try here is to use Ubuntu Linux. If you want I can make
a bootable memory stick for you and mail it (will cost a small amount of $ to buy a 4 GB stick, or you can
mail me one). Then you would need to go into the bios of your computer and make it such that it will boot
from USB before booting from harddisk. The computer will then run Ubuntu of the stick without touching
your hard drive. I could then also put the program on which captures the real-time data of the controller
while it is running, to get data like in this post
I can do this my self but... In the end most the world is windows based so if we can get your chip to work with windows we are better off.
Lebowski wrote:
viewtopic.php?f=30&t=36602&start=90#p546422

That it forgets or scrambles all the settings, this should definately not happen. Can you check the 5V power
supply? I've noticed that if it's too low you can get this sort of thing, I use slightly higher than 5 (I use 5.2V).
Also, after you calibrate halls and backemf, and save it to EEPROM, you don't have to calibrate these again.
The chip will remember the settings when you write them to EEPROM. It does not wipe out the settings when
you enter / leave programming mode several times. You can also just change a single setting, the old calibration
data will be remembered. It basically reads the EEPROM on every startup, whether its motor or setup mode.

If you're using v1.01, it's very important you select option k of menu d, and save to EEPROM afterwards. Without
this it's not going to work (but this is mentioned in the manual)

I will test the 5v and scope it. So far it has not been a problem. As for option K in menu D uhm.... I thought it was to reset to defult settings???? I have not clicked on option K yet. I just ready the manual and I was trying to use off set calibration.... I will look at this ASAP.
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: 5218
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby Lebowski » Mon Jul 02, 2012 9:25 am

about this option k, just to explain why it is necessary..

The chip has 10 bit ADC's, so the output is in the 0..1023 range. When there's 0 current
through the sensors they produce a voltage in the middle of the supply which by the
ADC's gets translated to 512. So the offset is 512 (or: around 512 as there's a few points
of offset in each current sensor).
After every measurement the chips substracts the offset value from the measurements.
The offset should be stored in EEPROM as 512 (or there abouts) but a 'virgin' chip
has 65535 stored in the EEPROM. So what option k does is it puts 512 in the offset
variables for all 3 current sensors. Then in the EEPROM menu when you select save
the variables (512) are written to EEPROM (replacing the 65535). As long as you don't do this the
65535 will stay in EEPROM and will be used for the offset compensation, giving totally
wrong values out of the current sensors...
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 » Mon Jul 02, 2012 9:41 am

OK here is where I am at. I found it goes into program mode quicker with your instructions. But I had to release program first then release reset and click enter...

Code: Select all
[00][00][00][00]






























########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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: 20
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                  #
#                                      #
#  version 1.01                        #
#  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

a) PWM frequency: 20kHz
b) deadtime: 1999ns
c) dutycycle testsignal: 50%
d) toggle high side polarity, now active HIGH
e) toggle low side polarity, now active HIGH
f) test PWM signals
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> d

a) number of current sensors: 3
b) current sensor transimpedance: 10.00 mV/A
c) maximum motor phase current: 149.9 A
d) maximum battery current, motor use: 49.9 A
e) maximum battery current, regen: 49.9 A
f) maximum shutdown error current, fixed: 29.9 A
g) maximum shutdown error current, proportional: 29.9 A
h) IIR filter coefficient: 5
i) use additional comb filter: YES
j) use offset calibration: YES
k) restore default calibration
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> e

a) loop sample frequency: 38.01 kHz
b) 1st order phase loop integrator coefficient: 308.0000
c) 2nd order phase loop integrator coefficient: 0.0199
d) amplitude loop integrator coefficient: 12.8999
e) maximum amplitude: 100 %
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> f

a) calibrate throttle 1
b) calibrate throttle 2
c) polynomial coefficients throttle 1 (x, x^2, x^3): -0.0002, -0.0002, -0.0002
d) polynomial coefficients throttle 2 (x, x^2, x^3): -0.0002, -0.0002, -0.0002
e) use analog throttle 1: YES
f) use analog throttle 2: NO
   receive throttle over CAN: NO
g) TX throttle over CAN: YES
h) test throttle
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> g

a) sensored or sensorless: SENSORED
b} sensorless startup: SELF START
c} e-rpm limit sensorless self start: 591
d} e-rpm reached before transition: 82 %
e} minimum current push start: 0.8 A
f} push start current, error allowed: 10 %
g] erpm sensored to sensorless transition: 800
h] transition time sensored to sensorless: 499 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: YES
k) phase current for controlled slowdown: 29.9 A
l) motor maximum, forward: 231.32 k-erpm
m) motor maximum, reverse: 231.32 k-erpm
n) motor standstill voltage threshold: 0.49 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 20 Hz
q) low side pulsing width: 20 usec
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> h

a) CAN 'address': 16383
b) CAN CFG1 as per Microchip 30F manual: 65535
c) CAN CFG2 as per Microchip 30F manual: 65535
   RS232 output rate: 3802 Hz
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> e

a) loop sample frequency: 38.01 kHz
b) 1st order phase loop integrator coefficient: 308.0000
c) 2nd order phase loop integrator coefficient: 0.0199
d) amplitude loop integrator coefficient: 12.8999
e) maximum amplitude: 100 %
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> d

a) number of current sensors: 3
b) current sensor transimpedance: 10.00 mV/A
c) maximum motor phase current: 149.9 A
d) maximum battery current, motor use: 49.9 A
e) maximum battery current, regen: 49.9 A
f) maximum shutdown error current, fixed: 29.9 A
g) maximum shutdown error current, proportional: 29.9 A
h) IIR filter coefficient: 5
i) use additional comb filter: YES
j) use offset calibration: YES
k) restore default calibration
z) return to main menu

------> k


  default values restored


a) number of current sensors: 3
b) current sensor transimpedance: 10.00 mV/A
c) maximum motor phase current: 149.9 A
d) maximum battery current, motor use: 49.9 A
e) maximum battery current, regen: 49.9 A
f) maximum shutdown error current, fixed: 29.9 A
g) maximum shutdown error current, proportional: 29.9 A
h) IIR filter coefficient: 5
i) use additional comb filter: YES
j) use offset calibration: YES
k) restore default calibration
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> z

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
z) return to main menu

------> a

 Data stored in EEPROM for motor use

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
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: 5218
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby Arlo1 » Mon Jul 02, 2012 10:47 am

OK on my current sensors Leg 4 is hooked to the powerstage and leg 5 is the output to the motor. Is this right its hard to read the data sheet to see if that will give more or less then 2.5 v as current rises...
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: 5218
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby Lebowski » Mon Jul 02, 2012 11:22 am

ok you're quite far now. Things I would change in the setup:

menu g opt. i: I think you did not change this value so it might be stuck at the EEPROM default, it's
best to enter something for a virgin chip for every option 'cause else behavior might not be what you
want. Here, put something like 300 e-rpm.

Menu g, opt l and m: again, best to enter something and not leave the virgin default. Put 10 k for both
as not to over-erpm the first time.

menu f opt c: what you put here basically tells the chip to take the throttle signal (in a range of 0 to 1),
multiply this with 0 (!) and 50A phase current. For a first test I would put 0.1, 0, 0 or maybe 0.3, 0, 0 .
The 0.1 limits to 5A phase current, the 0.3 to 15A

menu c opt b: I would take a shorter deadtime, like 500 nsec but use the PWM test signal option to
make sure you have no shootthrough current.

Yes, pin 4 goes to the output stage, pin 5 to the motor. Make sure the phases match, so the output stage A
is driven by PWM channel A and the corresponding phase current sensor goes to input A. This is vital !

I saw that you have some of the regen options turned on (specifically active slowdown on reverse, and
the regen battery current is not 0). I would turn off everything regen related if you're using a lab power
supply !!!!!!! When turned on the chip will try regen no matter what, and will overvolt and possibly blow up your
power supply ! The first time I tried regen the voltage indicator on my supply showed over 110V
while it's only a 65V supply :shock: . I did some serious swea(r)(t)ing that time !


What numbers did you use to calculate the control loop coefficients ? Which value did you use for
y, and LR_delay ?
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 » Mon Jul 02, 2012 1:54 pm

Ok I will turn off all regen.... Stuff lol

I found now when I turn it on its stuck in drive 0 till I unhook the ribbon cable to my driver stage then it goes to drive 1 and I can reconect it. I am fighting with a low battery atm. I am going to get some more batteries from my shop.

I will test drive 2 led but its not coming on atm but might not be getting enought rpm. At very first I was getting drive 1-2-1 led bounce but doesnt seem to anymore.

I realy don't know how to calculate the Y and LR delays I dont understand that well at all yet. I played with numbers from what Nieles sugest from here viewtopic.php?f=30&t=36602&start=105

Here is what I am running for a set up atm
Code: Select all
Sorry had to shorten some off the top it was to long for ES lol




########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> e

a) loop sample frequency: 29.01 kHz
b) 1st order phase loop integrator coefficient: 10.0000
c) 2nd order phase loop integrator coefficient: 0.0199
d) amplitude loop integrator coefficient: 6.0000
e) maximum amplitude: 100 %
z) return to main menu

------> b]
new value -> 307

a) loop sample frequency: 29.01 kHz
b) 1st order phase loop integrator coefficient: 307.0000
c) 2nd order phase loop integrator coefficient: 0.0199
d) amplitude loop integrator coefficient: 6.0000
e) maximum amplitude: 100 %
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> z

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
z) return to main menu

------> aa

 Data stored in EEPROM for motor use

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> [00][00][00][00][00]

The first video is what Im dealing with for a kick back or pulse.... Not sure why yet.

The second video is with some plaing on the settings it seems better but could just be because I have a low battery

I also spent time to try to set the dead time. I hooked a fuse tester current sensor in line with the power stage and it read 21.9 amps at 50ns dead time and 20.5 at 2000 ns so Im not sure it makes any difference.... I think the power stage is robing power something may not be right.
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: 5218
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby Arlo1 » Mon Jul 02, 2012 2:54 pm

I think the answer lies in why its pulling 16-20 amps at low rpm... I think there is a timing issue or something wrong in the powerstage. I will be building a new power stage as soon as the fets come from zombies. I also thought maybe the coils calibrated off but I tried to recalibrate them and it just gets stuck saying waiting for motor to slow down.
I will look at the voltages on pins 5,7,8 asap.

Edit. One of my isolated powersupplies failed. It was my fault I slipped when testing signals on the fet drivers. Fixed that and now it only pulls 8 amps but the settings are likely quite wrong.
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: 5218
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby Arlo1 » Mon Jul 02, 2012 4:58 pm

ok played with it a bit more.
Code: Select all
 

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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: 20
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

a] number of e-rotations: 20
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: 20
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                  #
#                                      #
#  version 1.01                        #
#  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: 1500
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: 1500
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
.8261   -.6982   -.1983
.7958   -.7467   -.1135
.7730   -.7818   -.0537
.7507   -.8114   -.0033
.7272   -.8370   .0500
.6982   -.8612   .1007
.6732   -.8837   .1525
.6475   -.9088   .2029
.6265   -.9307   .2508
.6039   -.9503   .2914
.5804   -.9667   .3292
.5538   -.9771   .3598
.5249   -.9790   .3918
.4907   -.9796   .4211
.4556   -.9786   .4531
.4211   -.9786   .4855
.3881   -.9747   .5191
.3512   -.9695   .5487
.3103   -.9588   .5773
.2612   -.9402   .6057
.2066   -.9182   .6338
.1144   -.5996   .4312
.1171   -.8798   .6817
.0576   -.8529   .7177
-.0076   -.8233   .7568
-.0592   -.7968   .7852
-.1141   -.7681   .8126
-.1678   -.7360   .8361
-.2206   -.7064   .8630
-.2716   -.6793   .8898
-.3186   -.6564   .9127
-.3579   -.6317   .9292
-.3942   -.6085   .9390
-.4272   -.5789   .9448
-.4611   -.5499   .9423
-.4916   -.5157   .9390
-.5227   -.4824   .9356
-.5520   -.4461   .9326
-.5813   -.4095   .9225
-.6082   -.3683   .9082
-.6353   -.3195   .8853
-.6573   -.2767   .8630
-.6784   -.2346   .8441
-.7247   -.1519   .8139
-.7598   -.0946   .7922
-.7925   -.0411   .7714
-.8190   .0146   .7482
-.8459   .0674   .7214
-.8703   .1226   .6936
-.8947   .1760   .6674
-.9194   .2255   .6405
-.9402   .2709   .6182
-.9570   .3088   .5944
-.9689   .3436   .5694
-.9729   .3732   .5432
-.9759   .4034   .5139
-.9744   .4339   .4803
-.9741   .4647   .4452
-.9698   .4959   .4107
-.9652   .5245   .3756
-.9558   .5517   .3356
-.9411   .5758   .2914
-.9188   .6018   .2429
-.8975   .6292   .1885
-.8776   .6564   .1431
-.8471   .7006   .0723
-.8239   .7391   .0137
-.8026   .7675   -.0375
-.7739   .7949   -.0872
-.7467   .8151   -.1397
-.7177   .8395   -.1904
-.6930   .8642   -.2395
-.6692   .8905   -.2862
-.6497   .9130   -.3289
-.6271   .9292   -.3677
-.6036   .9387   -.4025
-.5755   .9426   -.4351
-.5453   .9414   -.4684
-.5120   .9393   -.5007
-.4776   .9362   -.5322
-.4418   .9344   -.5630
-.4064   .9277   -.5920
-.3683   .9173   -.6225
-.3216   .8981   -.6506
-.2706   .8728   -.6799
-.1791   .7052   -.5899
-.1800   .8316   -.7290
-.1135   .8087   -.7650
-.0424   .7785   -.8047
.0119   .7546   -.8319
.0643   .7278   -.8578
.1193   .6979   -.8837
.1751   .6695   -.9082
.2279   .6445   -.9323
.2734   .6182   -.9558
.3137   .5932   -.9725
.3500   .5694   -.9817
.3799   .5377   -.9875
.4098   .5053   -.9872
.4397   .4696   -.9857
.4714   .4357   -.9826
.5029   .4016   -.9783
.5313   .3646   -.9716
.5578   .3216   -.9600
.4815   .2407   -.7907
.6008   .2392   -.9240
.6307   .1834   -.8981
.6741   .1098   -.8654
.7113   .0549   -.8425
.7458   .0003   -.8193
.7727   -.0524   -.7928
.7992   -.1065   -.7659
.8258   -.1589   -.7336
.8508   -.2120   -.7061
.8773   -.2612   -.6802
.9002   -.3051   -.6567
.9173   -.3439   -.6359
.9268   -.3790   -.6130
.9341   -.4110   -.5886
.9350   -.4434   -.5603
.9341   -.4745   -.5288
.9323   -.5075   -.4956
.9280   -.5368   -.4608
.9204   -.5654   -.4254
.9094   -.5917   -.3875
.8901   -.6188   -.3454
.8660   -.6451   -.2944
.7727   -.6170   -.2206

a] number of back-emf samples: 1500
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: 1500
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
.8530   -.6914   -.1526
.8273   -.7232   -.0956
.8010   -.7548   -.0383
.7746   -.7858   .0182
.7486   -.8161   .0734
.7231   -.8455   .1268
.6981   -.8735   .1780
.6734   -.8999   .2268
.6488   -.9239   .2730
.6237   -.9450   .3166
.5978   -.9624   .3572
.5704   -.9756   .3950
.5413   -.9839   .4298
.5100   -.9869   .4618
.4762   -.9845   .4909
.4398   -.9771   .5177
.4008   -.9647   .5428
.3589   -.9486   .5666
.3144   -.9293   .5903
.2672   -.9082   .6146
.2174   -.8859   .6405
.1654   -.8634   .6683
.1112   -.8411   .6986
.0555   -.8194   .7313
-.0013   -.7983   .7658
-.0587   -.7775   .8013
-.1157   -.7566   .8366
-.1715   -.7352   .8703
-.2250   -.7127   .9011
-.2756   -.6889   .9279
-.3226   -.6635   .9495
-.3656   -.6363   .9654
-.4041   -.6075   .9755
-.4387   -.5770   .9799
-.4696   -.5450   .9792
-.4977   -.5114   .9740
-.5239   -.4761   .9653
-.5492   -.4389   .9539
-.5745   -.3993   .9403
-.6007   -.3570   .9249
-.6284   -.3116   .9082
-.6578   -.2628   .8899
-.6890   -.2107   .8703
-.7214   -.1556   .8489
-.7548   -.0982   .8259
-.7882   -.0393   .8013
-.8205   .0198   .7753
-.8513   .0781   .7484
-.8796   .1343   .7210
-.9050   .1873   .6936
-.9269   .2364   .6667
-.9451   .2813   .6404
-.9595   .3218   .6147
-.9700   .3583   .5894
-.9767   .3914   .5639
-.9797   .4221   .5372
-.9789   .4512   .5088
-.9744   .4795   .4775
-.9663   .5078   .4428
-.9546   .5366   .4039
-.9396   .5662   .3608
-.9216   .5966   .3134
-.9008   .6277   .2625
-.8778   .6594   .2085
-.8532   .6913   .1525
-.8274   .7232   .0955
-.8012   .7547   .0382
-.7748   .7857   -.0183
-.7488   .8161   -.0736
-.7232   .8454   -.1269
-.6983   .8734   -.1781
-.6736   .8998   -.2270
-.6490   .9238   -.2731
-.6239   .9449   -.3167
-.5979   .9624   -.3573
-.5706   .9755   -.3951
-.5415   .9838   -.4299
-.5101   .9868   -.4619
-.4764   .9844   -.4910
-.4400   .9769   -.5178
-.4010   .9645   -.5429
-.3591   .9484   -.5667
-.3146   .9292   -.5904
-.2673   .9080   -.6147
-.2176   .8858   -.6405
-.1654   .8632   -.6684
-.1114   .8410   -.6987
-.0556   .8193   -.7314
.0012   .7981   -.7659
.0586   .7774   -.8013
.1156   .7564   -.8366
.1713   .7350   -.8704
.2249   .7125   -.9012
.2756   .6887   -.9279
.3225   .6633   -.9496
.3654   .6361   -.9655
.4040   .6073   -.9756
.4386   .5769   -.9800
.4695   .5448   -.9793
.4977   .5113   -.9742
.5238   .4760   -.9655
.5491   .4387   -.9541
.5744   .3992   -.9405
.6007   .3569   -.9251
.6283   .3114   -.9083
.6578   .2626   -.8901
.6889   .2105   -.8704
.7214   .1555   -.8490
.7547   .0981   -.8261
.7881   .0392   -.8014
.8204   -.0199   -.7755
.8512   -.0782   -.7486
.8796   -.1343   -.7212
.9049   -.1875   -.6938
.9269   -.2366   -.6669
.9451   -.2814   -.6405
.9594   -.3219   -.6148
.9699   -.3584   -.5895
.9766   -.3916   -.5640
.9796   -.4222   -.5374
.9787   -.4513   -.5090
.9742   -.4796   -.4777
.9661   -.5079   -.4429
.9544   -.5368   -.4040
.9394   -.5663   -.3609
.9214   -.5968   -.3136
.9006   -.6278   -.2626
.8777   -.6595   -.2087

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

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> z

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
z) return to main menu

------> a

 Data stored in EEPROM for motor use

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> g

a) sensored or sensorless: SENSORED
b} sensorless startup: SELF START
c} e-rpm limit sensorless self start: 487
d} e-rpm reached before transition: 78 %
e} minimum current push start: 9.9 A
f} push start current, error allowed: 10 %
g] erpm sensored to sensorless transition: 4001
h] transition time sensored to sensorless: 1999 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: NO
k) phase current for controlled slowdown: 9.9 A
l) motor maximum, forward: 99.97 k-erpm
m) motor maximum, reverse: 99.97 k-erpm
n) motor standstill voltage threshold: 0.59 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 10 Hz
q) low side pulsing width: 20 usec
z) return to main menu

------> g
new value -> 2000

a) sensored or sensorless: SENSORED
b} sensorless startup: SELF START
c} e-rpm limit sensorless self start: 487
d} e-rpm reached before transition: 78 %
e} minimum current push start: 9.9 A
f} push start current, error allowed: 10 %
g] erpm sensored to sensorless transition: 2000
h] transition time sensored to sensorless: 1999 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: NO
k) phase current for controlled slowdown: 9.9 A
l) motor maximum, forward: 99.97 k-erpm
m) motor maximum, reverse: 99.97 k-erpm
n) motor standstill voltage threshold: 0.59 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 10 Hz
q) low side pulsing width: 20 usec
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> z

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
z) return to main menu

------> a

 Data stored in EEPROM for motor use

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
z) return to main menu

------> [00][00]






























########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> g

a) sensored or sensorless: SENSORED
b} sensorless startup: SELF START
c} e-rpm limit sensorless self start: 487
d} e-rpm reached before transition: 78 %
e} minimum current push start: 9.9 A
f} push start current, error allowed: 10 %
g] erpm sensored to sensorless transition: 2000
h] transition time sensored to sensorless: 1999 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: NO
k) phase current for controlled slowdown: 9.9 A
l) motor maximum, forward: 99.97 k-erpm
m) motor maximum, reverse: 99.97 k-erpm
n) motor standstill voltage threshold: 0.59 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 10 Hz
q) low side pulsing width: 20 usec
z) return to main menu

------> a

a) sensored or sensorless: SENSORLESS
b} sensorless startup: SELF START
c} e-rpm limit sensorless self start: 487
d} e-rpm reached before transition: 78 %
e} minimum current push start: 9.9 A
f} push start current, error allowed: 10 %
g] erpm sensored to sensorless transition: 2000
h] transition time sensored to sensorless: 1999 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: NO
k) phase current for controlled slowdown: 9.9 A
l) motor maximum, forward: 99.97 k-erpm
m) motor maximum, reverse: 99.97 k-erpm
n) motor standstill voltage threshold: 0.59 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 10 Hz
q) low side pulsing width: 20 usec
z) return to main menu

------> b]

a) sensored or sensorless: SENSORLESS
b} sensorless startup: PUSH START
c} e-rpm limit sensorless self start: 487
d} e-rpm reached before transition: 78 %
e} minimum current push start: 9.9 A
f} push start current, error allowed: 10 %
g] erpm sensored to sensorless transition: 2000
h] transition time sensored to sensorless: 1999 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: NO
k) phase current for controlled slowdown: 9.9 A
l) motor maximum, forward: 99.97 k-erpm
m) motor maximum, reverse: 99.97 k-erpm
n) motor standstill voltage threshold: 0.59 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 10 Hz
q) low side pulsing width: 20 usec
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> z

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
z) return to main menu

------> a

 Data stored in EEPROM for motor use

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
z) return to main menu

------> [00][00][00]






























########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> g

a) sensored or sensorless: SENSORLESS
b} sensorless startup: PUSH START
c} e-rpm limit sensorless self start: 487
d} e-rpm reached before transition: 78 %
e} minimum current push start: 9.9 A
f} push start current, error allowed: 10 %
g] erpm sensored to sensorless transition: 2000
h] transition time sensored to sensorless: 1999 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: NO
k) phase current for controlled slowdown: 9.9 A
l) motor maximum, forward: 99.97 k-erpm
m) motor maximum, reverse: 99.97 k-erpm
n) motor standstill voltage threshold: 0.59 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 10 Hz
q) low side pulsing width: 20 usec
z) return to main menu

------> g
new value -> 4000

a) sensored or sensorless: SENSORLESS
b} sensorless startup: PUSH START
c} e-rpm limit sensorless self start: 487
d} e-rpm reached before transition: 78 %
e} minimum current push start: 9.9 A
f} push start current, error allowed: 10 %
g] erpm sensored to sensorless transition: 4001
h] transition time sensored to sensorless: 1999 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: NO
k) phase current for controlled slowdown: 9.9 A
l) motor maximum, forward: 99.97 k-erpm
m) motor maximum, reverse: 99.97 k-erpm
n) motor standstill voltage threshold: 0.59 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 10 Hz
q) low side pulsing width: 20 usec
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> g

a) sensored or sensorless: SENSORLESS
b} sensorless startup: PUSH START
c} e-rpm limit sensorless self start: 487
d} e-rpm reached before transition: 78 %
e} minimum current push start: 9.9 A
f} push start current, error allowed: 10 %
g] erpm sensored to sensorless transition: 4001
h] transition time sensored to sensorless: 1999 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: NO
k) phase current for controlled slowdown: 9.9 A
l) motor maximum, forward: 99.97 k-erpm
m) motor maximum, reverse: 99.97 k-erpm
n) motor standstill voltage threshold: 0.59 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 10 Hz
q) low side pulsing width: 20 usec
z) return to main menu

------> a

a) sensored or sensorless: SENSORED
b} sensorless startup: PUSH START
c} e-rpm limit sensorless self start: 487
d} e-rpm reached before transition: 78 %
e} minimum current push start: 9.9 A
f} push start current, error allowed: 10 %
g] erpm sensored to sensorless transition: 4001
h] transition time sensored to sensorless: 1999 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: NO
k) phase current for controlled slowdown: 9.9 A
l) motor maximum, forward: 99.97 k-erpm
m) motor maximum, reverse: 99.97 k-erpm
n) motor standstill voltage threshold: 0.59 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 10 Hz
q) low side pulsing width: 20 usec
z) return to main menu

------> b]

a) sensored or sensorless: SENSORED
b} sensorless startup: SELF START
c} e-rpm limit sensorless self start: 487
d} e-rpm reached before transition: 78 %
e} minimum current push start: 9.9 A
f} push start current, error allowed: 10 %
g] erpm sensored to sensorless transition: 4001
h] transition time sensored to sensorless: 1999 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: NO
k) phase current for controlled slowdown: 9.9 A
l) motor maximum, forward: 99.97 k-erpm
m) motor maximum, reverse: 99.97 k-erpm
n) motor standstill voltage threshold: 0.59 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 10 Hz
q) low side pulsing width: 20 usec
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> z

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
z) return to main menu

------> a

 Data stored in EEPROM for motor use

a) write variables to EEPROM
b] reverse direction and write variables to EEPROM
z) return to main menu

------> z

########################################
#   (c)opyright 2012, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.01                        #
#  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

------> [00][00]



Now that I fixed the power supply it lets me calibrate the halls and coils properly.
I tried push start sensorless and it just wines in the motor and its locked. The drive 3 led is lit up as well. SO sensorless drive is my problem. I went back to sensored and set it to sensored self start and 4000 e-rpm for transition then it just stays in sensored mode and runs not bad.
Not sure were to go from here other then soldering the phase voltage wires to the pins because the connectors im using are not working well for me. I posted on lebowski's other thread about good connectors for single roe headder connections.
I realy need to make a new board this one has given me lots of greife. I would like to get somehting with it all smd from pcb express. I just need reliblility at this point.
I am haveing problems finding liquid tin near by as well because if i make another of nieles boards it will need to be tinned.
I am planing a new powerstage and everything so its just about time to do a big order. If anyone wants to get a group thing together for some brain boards from PCB express or someone like them let me know or post here.
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: 5218
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby Gordo » Mon Jul 02, 2012 6:48 pm

I'm here for a few days. You are welcome to all the FET's and stuff I have. Leaving @ July 15 for the EAA Airshow Oskosh. Back @ the end of the month and gone again Aug 4-15. Can't seem to catch you around the shop.
X-treme 3KW Scooter...OFF ROAD ONLY....Giant 1KW 48V 24" Hubmotor....E-Apex 1KW 48V 26" Hubmotor, built 2012-05-26
Thanks Justin, for saving ES. May Grin Tech grow and prosper.
User avatar
Gordo
100 kW
100 kW
 
Posts: 1387
Joined: Sun May 23, 2010 4:46 pm
Location: THE COLD WHITE NORTHWEST, EH?

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

Postby Arlo1 » Mon Jul 02, 2012 10:49 pm

Gordo wrote:I'm here for a few days. You are welcome to all the FET's and stuff I have.
You save your fets :)
Nomad wrote: Can't seem to catch you around the shop.

Thats because Im not there at 3am very often ;)
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: 5218
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 Jul 03, 2012 1:07 am

I think the main issue is control loop parameters menu (option e from main menu). This menu deals
with some serious engineering stuff (lots of dead French mathematicians involved), things like
differential equations and such. If you don't know what you're doing here it's better to strictly
follow the manual.

So, going through menu e,

option a): best is to choose something close (but not equal to) double the PWM frequency. I saw you use a PWM freq
of 20 kHz, to lets use 41 kHz here.

options b and c): here we follow the manual. If you want to experiment you experiment with the values of y and LR_delay
but you follow the equations for b and c. Lets take
y=512
LR_delay = 0.001 (1 milli-sec)
f_sample = 41000 (the 41 kHz from option a)
then the calculations give
option b = 12.49
option c = 0.034

option d): again, follow the manual which results in 1.065

This is the last running modes menu you posted:
Code: Select all
a) sensored or sensorless: SENSORED
b} sensorless startup: SELF START
c} e-rpm limit sensorless self start: 487
d} e-rpm reached before transition: 78 %
e} minimum current push start: 9.9 A
f} push start current, error allowed: 10 %
g] erpm sensored to sensorless transition: 4001
h] transition time sensored to sensorless: 1999 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: NO
k) phase current for controlled slowdown: 9.9 A
l) motor maximum, forward: 99.97 k-erpm
m) motor maximum, reverse: 99.97 k-erpm
n) motor standstill voltage threshold: 0.59 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 10 Hz
q) low side pulsing width: 20 usec
z) return to main menu


Keep it in sensored. Change option g to 600. Change option h to 500. Change option i to 200 (!!!! you still didn't
do this, its still in it's virgin state). Now it should work.
(fingers crossed :D )

Oh, and it definately should not pull 8 Amps at low rpm... I would not run it of one 12V battery as the 12V is probably
lower than the 15 to 20V of the FET gate drivers (?), this can have funny consequences for the gate drivers. Do you
have 2 to make 24V (higher than the gate driver supply) ?
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 Jul 03, 2012 1:43 am

Lebowski wrote:


Keep it in sensored. Change option g to 600. Change option h to 500. Change option i to 200 (!!!! you still didn't
do this, its still in it's virgin state). Now it should work.
(fingers crossed :D )

Oh, and it definately should not pull 8 Amps at low rpm... I would not run it of one 12V battery as the 12V is probably
lower than the 15 to 20V of the FET gate drivers (?), this can have funny consequences for the gate drivers. Do you
have 2 to make 24V (higher than the gate driver supply) ?

Yeh I did I changed every single option I then lowered option i as low as possible to try to help but when it wants to switch to sensorless it locks up. I am battling bad wire connections and pour solder joins on a non tinned board. Its time to start over with everythign. I am using isolated powersupplies for the hi side. I am using a 12v battery but I have to go find somethign else and try some more testing. My plan was to get about this far then rebuild with everythign pretty and rock solid!
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: 5218
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 Jul 03, 2012 1:55 am

Yeah, the 8A is a dead give away something is wrong. I wonder whether one of the FET's is
blown and always on. You can use the test option in the PWM menu to scope all three
outputs and to see whether they look OK or not (the battery current should be negligible during
PWM test). An always conducting FET would also explain why you have to disconnect the
FET board to get the IC to jump out of drive_0.

I have the feeling that it does switch into drive_3 (sensorless mode) but immediately detects
something wrong and jumps back to drive_0. Probably the drive_3 LED lights up for an instant
but this would be almost impossible to see.
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 Jul 03, 2012 2:09 am

Lebowski wrote:Yeah, the 8A is a dead give away something is wrong. I wonder whether one of the FET's is
blown and always on. You can use the test option in the PWM menu to scope all three
outputs and to see whether they look OK or not (the battery current should be negligible during
PWM test). An always conducting FET would also explain why you have to disconnect the
FET board to get the IC to jump out of drive_0.

I have the feeling that it does switch into drive_3 (sensorless mode) but immediately detects
something wrong and jumps back to drive_0. Probably the drive_3 LED lights up for an instant
but this would be almost impossible to see.

Actualy I had a blow DC/DC supply and I found it that way. But because Im out of them I used a 12v supply hooked to the wall and just run the one HI side with it then ran everything else off the battery I had it runnign pretty smooth before dinner and went down to try a couple things after and it got worse. I think its time to move on I know I cant ride any of this with how hacked I have it. SO I am going to work on a new driver stage and possibly a board layout while I am at it. I know this will all work well but I need to have good connections. Im also struggling with wires that keep loosing their connection. If I start soon it will not take me long.
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: 5218
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 Jul 03, 2012 2:24 am

did you get it to run in drive_3 at one point ? This is the mode where the controller really shines...
The sound of the motor totally changes, it becomes very quiet or you get a soft jet-engine type noise.
Also it becomes very 'loose' (difficult to describe)
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 Jul 03, 2012 12:01 pm

Lebowski wrote:did you get it to run in drive_3 at one point ? This is the mode where the controller really shines...
The sound of the motor totally changes, it becomes very quiet or you get a soft jet-engine type noise.
Also it becomes very 'loose' (difficult to describe)

No drive 3 It would not work past drive 1 It wont be hard for me to get back to this point with a new powerstage and driverstage.
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: 5218
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 Jul 03, 2012 1:08 pm

just a small update from my side. This is the low power (120V 20A peak) controller I build using
one of my PCB's. I still have to install the snubber components. This one will be used to develop
the next feature, sensorless startup under load by measuring phase inductances (to completely
get rid of the need for hall sensors).

DSC00798.jpg
DSC00798.jpg (153.67 KiB) Viewed 271 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 Jul 03, 2012 1:37 pm

You know you may not need snubbers if you shorten up the fet legs ;)
Im going to look at making a controller brain layout what pcb program you using lebowski?
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: 5218
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby Teh Stork » Tue Jul 03, 2012 3:13 pm

Lets see ringing on this phase with and withouth this mod. Add a ceramic or similar. This test must be done under load, and with a battery source - preferably.

try this.jpg
try this.jpg (24.71 KiB) Viewed 257 times
Teh Stork
1 kW
1 kW
 
Posts: 306
Joined: Wed May 25, 2011 8:02 am

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

Postby zombiess » Tue Jul 03, 2012 7:27 pm

Teh Stork wrote:Lets see ringing on this phase with and withouth this mod. Add a ceramic or similar. This test must be done under load, and with a battery source - preferably.

try this.jpg


I was about to ask where the low ESR Drain/Source cap was located. Is it under your board Lebowski or is it missing as Teh Stork pointed out?
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: 1500
Joined: Tue Feb 01, 2011 2:16 am
Location: Ventura

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

Postby Lebowski » Wed Jul 04, 2012 3:10 am

Ok, time to post my view on ringing, snubbers and the like. This is the schematic I always have in my head
when it comes to ringing etc (shows only 1 output stage):
main_schematic.jpg
main_schematic.jpg (18.42 KiB) Viewed 522 times

On the left are the two FETs together with the inducance in their connections to the board (L_sl and L_dl
for the low side FET, L_dh and L_dl for the high side FET). From the FET's the wiring goes to the
battery. Going from left to right you first get L1 and L3, the wiring inductance inbetween the FETs and
the low ESR capacitor (C). From the cap to the battery you find more wiring inductance, L2 and L4.
Each FET has an output capacitance (C_oss in their datasheets), C_h and C_l for high and low side.

Note how the low ESR cap has an inductor in series with it (L_c). This is not wiring conductance !
Every capacitor has an associated inductance. I for instance use this 470 nF cap:

http://www.digikey.com/scripts/DkSearch ... =0&cur=USD

If you look into the datasheet of this component you will find this picture somewhere:
low_esr_cap.jpg
low_esr_cap.jpg (121.92 KiB) Viewed 525 times

Coming from the low frequencies the curve goes down, indicating capacitive behavior. For high frequencies
the impedance goes up again due to the parasitic series inductor L_c. I'm using a 470 nF cap
which has the dip around 2 MHz, meaning that above 2 MHz frequencies the inductive part is dominant
over the capacitive part. You can calculate that the value of L_c is 13 nH.

Now lets assume the high side is conducting and the low side is not. All the components outside of the low side
FET can be grouped together (you know, two inductors in series can be replaced by one with the combined
value, etc etc). The low ESR capacitor, for typical ringing frequencies (10 MHz), acts as an inductor as well. All in
all we get this effective schematic:
equiv1.jpg
equiv1.jpg (2.91 KiB) Viewed 522 times

Keep in mind though that the transition from the low side FET on to the high side FET on is like putting a voltage
step on the circuit. This can be modelled by a stepped voltage source:
equiv2.jpg
equiv2.jpg (3.86 KiB) Viewed 522 times

This circuit can be simulated, it rings like crazy:
ringing.jpg
ringing.jpg (94.04 KiB) Viewed 522 times

Whats happening that, because we're using only inductors and capacitors, there's no resistance which can dampen
the ringing, there's nowhere for the energy to go. The LC parallel circuit is actually used a lot in radio electronics
to build oscillators.
The job of a snubber is to add some resistive component for the energy to dissipate in. I use RC snubbers which
are placed in parallel to the FETs. In the equivalent schematic it comes down to:
equiv3.jpg
equiv3.jpg (6.38 KiB) Viewed 522 times

The snubber components R_s and C_s are placed as close as possible to the FET. The values are chosen such that
C_s halves the frequency of the ringing (making it 3 times C_l), Rs is chosen as 1.5 times the impedance of C_s at
the ringing frequency, R_s = 1.5 / (2*pi*f_ring*C_s)
Simulating again results in:
snubbed_ringing.jpg
snubbed_ringing.jpg (80.27 KiB) Viewed 522 times

The snubber capacitor C_s has 3 times the value of C_l, it kind of 'overshouts' C_l and forces all of the ringing current
to also go through R_s. R_s then dissipates the ringing and you end up with the nice graph above.

There are inductances which cannot be snubbed due to physical constraints (board layout), such as L_dl and L_sl. The
energy stored in these when the current is all of a sudden shut off is dissipated in the FET. How much the FET can handle
is found in the specs under 'repetitive avalanche energy'.

Now if we go back to the very first schematic in this post, how are more and more low ESR caps going to help ?
And the FET's hanging a bit of the board, this increases L_dx and L_sx a bit but as long as we stay below the rated
repetitive avalanche energy... What I'm more tempted to try is to place a snubber on the supply rails close to the
FET,a high ESR cap instead of a low ESR cap in this position makes more sense to me.

What I wrote above and the supporting simulations is true for a setup where you have strong gate drivers which can
almost instantaniously turn the FETs on and off. The situation becomes different when you have very slow FET drivers. For that
case the FETs spend a long time hovering inbetween being on and off, they act as resistors. These then dampen the
ringing and absorb the associated power. Disadvantages are that the FET 'resistors' also conduct all the motor current
and thus dissipate a lot (the snubber resistors are in series with a cap so they do not take the full motor current, only
the ringing current after a voltage step). Also slow transistions mean you're limited to a low PWM frequency (bad for low
inductance motors and for high e-rpm motors) and that you cannot make very short pulses.
Last edited by Lebowski on Wed Jul 04, 2012 5:39 am, edited 1 time in total.
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 » Wed Jul 04, 2012 5:37 am

Arlo1 wrote:You know you may not need snubbers if you shorten up the fet legs ;)
Im going to look at making a controller brain layout what pcb program you using lebowski?


I used Kicad, very cool software and totally free ! It's available for Windows and Linux.

http://www.kicad-pcb.org/display/KICAD/ ... ware+Suite
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 » Wed Jul 04, 2012 5:52 am

could you run the simulations with different rise times for the green line? eg 250ns 500ns 750ns 1us.
or do we need to include the fet in the simulation for this to be accurate to the reality?

in practice what i saw was the following:
with the snubbers added to the board, running no-load the signals looked nice and clean. like the picture you posted above. i had a peak voltage of around 110-115% of VCC. (50v at the time of testing)
but when i loaded the motor (with my hand) there were some nasty voltage spikes again,no oscillation though. (blowing my controller again, this time with some nice fireworks)
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 Jul 04, 2012 6:04 am

The whole x-axis of the plot is only 1usec so... having such a long rise time is not the situation I have in my setup.
I go through the miller plateau in 35 nsec so it switches much faster than 250nsec even.
Of course to be totally accurate you need to include the FET's and preferably the FET driver. What I used
above where 'abbriviated' schematics which are still accurate and also give a lot of understanding of
what is going on. By adding the FET's etc you gain accuracy but it's much more difficult to see what's happening.

I ran a high current through the motor using the snubbers etc, my measurements did not show
a signigicant change in the graphs (peak got a bit higher but not a lot). But my motor was at
standstill (because the high torque associated with high currents leads to very high rpm)
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 Teh Stork » Wed Jul 04, 2012 6:25 am

Regarding your equivalent schematics; you're missing the decoupling capacitor in there. This will absorb the energy in the rings. It is the positive and negative rail that bounces.

My experiences with decoupling.
1. Electrolytics + small low inductance footprint ceramics = win.
2. Controll method (SVM (as you've included)), using advanced algorithms like FOC results in less current ripple.
3. Decoupling dampens both ground bounce and positive bounce. (For the record, I use gate drivers capable of negative transients - and use star-ground layout)

When you shut down the high side mosfet, you are going to bounce the positive rail if you do not decouple it.

Snubbers are good for fixing dV/dT induced turn on - but I do not think (Not real world tested, only from the theory I've read) they are a fix once you get current and inductances into the picture. Remember these inductors are magnetized before you shutoff a switch - try your simulations again with this as initial values.
Teh Stork
1 kW
1 kW
 
Posts: 306
Joined: Wed May 25, 2011 8:02 am

PreviousNext

Return to Motor Technology

Who is online

Users browsing this forum: No registered users and 7 guests