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 » Sun Jul 01, 2012 12:49 pm

Also tried one of the good chips. With no luck on push start or sensored start. Not sure what Im missing. This power stage did drive my motor this winter...
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: 65535
b] calibrate hall positions
c] table out hall signals
z] return to main menu

------> a
new value -> 26

a] number of e-rotations: 26
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

a] number of e-rotations: 26
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: 26
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

------> 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

------> c

a) PWM frequency: 0kHz
b) deadtime: 8499ns
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

------> a

new value -> 20

a) PWM frequency: 20kHz
b) deadtime: 8499ns
c) dutycycle testsignal: 4369%
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

------> b]

new value -> 1500

a) PWM frequency: 20kHz
b) deadtime: 1499ns
c) dutycycle testsignal: 4369%
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

------> 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

------> b]

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

------> a
new value -> 1500

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 failed

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 failed

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

 Waiting for motor to slow down
 Sampling...

 coil position capture failed

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 failed

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
-.7888   -.2654   .2332
-.7778   -.3241   .2944
-.7778   -.3848   .3522
-.7559   -.5086   .4731
-.7559   -.5526   .5192
-.7230   -.5950   .5646
-.7011   -.6375   .6086
-.7121   -.6811   .6507
-.7121   -.7244   .6892
-.7340   -.7625   .7232
-.7230   -.7958   .7540
-.7340   -.8220   .7774
-.7121   -.8422   .7979
-.7340   -.8609   .8162
-.7121   -.8775   .8338
-.7340   -.8926   .8540
-.7121   -.9085   .8719
-.7011   -.9255   .8880
-.6792   -.9354   .9012
-.7011   -.9418   .9107
-.6902   -.9426   .9210
-.5587   -.7744   .7602
-.6683   -.9390   .9353
-.6463   -.9374   .9444
-.6354   -.9394   .9539
-.6244   -.9422   .9583
-.6244   -.9382   .9576
-.6244   -.9338   .9550
-.6135   -.9287   .9547
-.6135   -.9239   .9558
-.6244   -.9239   .9558
-.6135   -.9259   .9495
-.6573   -.9267   .9400
-.6683   -.9204   .9243
-.6683   -.9093   .9045
-.6792   -.8914   .8807
-.6792   -.8735   .8587
-.6792   -.8513   .8349
-.6683   -.8291   .8126
-.6792   -.8033   .7847
-.6792   -.7696   .7496
-.7011   -.7315   .7071
-.6902   -.6807   .6610
-.7121   -.6125   .6046
-.6902   -.5209   .5361
-.6902   -.4717   .4962
-.7011   -.4264   .4530
-.6683   -.3772   .4046
-.6792   -.3269   .3614
-.6683   -.2769   .3160
-.6683   -.2328   .2735
-.6792   -.1920   .2347
-.6683   -.1582   .1973
-.7230   -.1297   .1574
-.7011   -.1043   .1182
-.7449   -.0793   .0769
-.7559   -.0503   .0351
-.7669   -.0190   -.0073
-.7778   .0142   -.0494
-.7888   .0476   -.0893
-.7888   .0797   -.1292
-.7888   .1094   -.1765
-.8326   .1412   -.2259
-.8874   .1781   -.2779
-.8874   .2162   -.3281
-.9202   .2705   -.3863
-.9202   .3483   -.4603
-.9093   .4058   -.5104
-.9202   .4498   -.5537
-.9421   .4895   -.5983
-.9421   .5343   -.6386
-.9421   .5776   -.6793
-.9202   .6248   -.7144
-.9312   .6696   -.7496
-.9093   .7101   -.7789
-.9202   .7383   -.8060
-.9202   .7629   -.8298
-.9202   .7791   -.8525
-.9202   .7938   -.8726
-.9312   .8081   -.8917
-.9202   .8224   -.9085
-.9312   .8390   -.9250
-.9421   .8497   -.9396
-.9531   .8565   -.9517
-.9750   .8577   -.9631
-.9750   .8529   -.9711
-.9860   .8486   -.9803
-.9969   .8505   -.9876
-.9969   .8561   -.9938
-.9969   .8668   -.9975
-.9860   .8676   -.9949
-.9969   .8652   -.9924
-.9860   .8644   -.9891
-.9750   .8660   -.9854
-.9860   .8680   -.9792
-.9750   .8688   -.9704
-.9860   .8660   -.9576
-.9750   .8557   -.9411
-.9421   .8394   -.9210
-.9531   .8208   -.8994
-.9312   .8009   -.8785
-.9202   .7795   -.8565
-.9312   .7569   -.8345
-.9202   .7299   -.8060
-.9202   .6934   -.7734
-.9312   .6597   -.7437
-.8983   .6192   -.7089
-.9312   .5558   -.6540
-.9202   .4967   -.5972
-.9312   .4502   -.5566
-.9312   .4074   -.5130
-.9312   .3630   -.4676
-.8874   .3201   -.4182
-.9202   .2733   -.3713
-.8983   .2273   -.3273
-.8983   .1860   -.2860
-.8874   .1511   -.2471
-.8983   .1194   -.2113
-.8545   .0896   -.1746
-.8107   .0614   -.1395
-.8107   .0325   -.1021
-.8216   -.0027   -.0666
-.7888   -.0372   -.0285
-.7888   -.0722   .0098
-.7888   -.1047   .0490
-.7888   -.1404   .0853
-.7888   -.1745   .1256
-.7888   -.2134   .1695

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
.2320   -.2458   .2880
.2859   -.2989   .3434
.3399   -.3541   .3992
.3913   -.4102   .4539
.4365   -.4660   .5067
.4726   -.5203   .5564
.4970   -.5720   .6023
.5086   -.6202   .6440
.5077   -.6639   .6811
.4965   -.7028   .7135
.4788   -.7368   .7417
.4591   -.7656   .7659
.4426   -.7897   .7867
.4341   -.8094   .8046
.4374   -.8253   .8204
.4546   -.8378   .8344
.4860   -.8476   .8471
.5301   -.8554   .8590
.5836   -.8614   .8703
.6422   -.8663   .8810
.7011   -.8703   .8911
.7557   -.8738   .9006
.8023   -.8769   .9094
.8380   -.8797   .9172
.8618   -.8823   .9237
.8736   -.8847   .9286
.8748   -.8870   .9318
.8670   -.8889   .9331
.8524   -.8905   .9322
.8329   -.8912   .9289
.8100   -.8910   .9234
.7846   -.8894   .9152
.7571   -.8858   .9045
.7276   -.8797   .8911
.6963   -.8706   .8751
.6636   -.8578   .8563
.6302   -.8407   .8346
.5977   -.8189   .8099
.5680   -.7921   .7822
.5431   -.7601   .7513
.5249   -.7230   .7174
.5149   -.6813   .6803
.5134   -.6354   .6404
.5197   -.5861   .5979
.5317   -.5345   .5533
.5462   -.4817   .5073
.5594   -.4288   .4605
.5673   -.3770   .4137
.5661   -.3273   .3676
.5532   -.2807   .3230
.5270   -.2376   .2804
.4877   -.1984   .2400
.4370   -.1631   .2019
.3774   -.1313   .1659
.3125   -.1024   .1315
.2462   -.0754   .0979
.1812   -.0493   .0644
.1201   -.0229   .0299
.0638   .0050   -.0063
.0120   .0354   -.0453
-.0363   .0693   -.0875
-.0832   .1072   -.1331
-.1307   .1493   -.1820
-.1801   .1956   -.2340
-.2321   .2457   -.2881
-.2860   .2988   -.3435
-.3401   .3540   -.3993
-.3914   .4101   -.4540
-.4367   .4660   -.5068
-.4727   .5202   -.5565
-.4971   .5719   -.6024
-.5087   .6200   -.6441
-.5078   .6638   -.6812
-.4967   .7027   -.7136
-.4789   .7367   -.7418
-.4592   .7655   -.7660
-.4427   .7897   -.7868
-.4342   .8093   -.8047
-.4375   .8252   -.8204
-.4547   .8377   -.8345
-.4861   .8475   -.8472
-.5302   .8552   -.8591
-.5837   .8613   -.8703
-.6423   .8662   -.8810
-.7012   .8703   -.8912
-.7559   .8737   -.9007
-.8023   .8768   -.9095
-.8381   .8796   -.9172
-.8619   .8822   -.9237
-.8737   .8846   -.9288
-.8749   .8869   -.9320
-.8671   .8887   -.9332
-.8526   .8903   -.9324
-.8331   .8910   -.9291
-.8102   .8908   -.9235
-.7848   .8892   -.9154
-.7572   .8856   -.9046
-.7278   .8795   -.8913
-.6965   .8704   -.8753
-.6637   .8576   -.8565
-.6304   .8405   -.8348
-.5979   .8187   -.8101
-.5681   .7919   -.7824
-.5432   .7599   -.7515
-.5251   .7229   -.7175
-.5151   .6811   -.6805
-.5136   .6352   -.6405
-.5198   .5860   -.5980
-.5318   .5343   -.5534
-.5463   .4815   -.5074
-.5595   .4286   -.4606
-.5674   .3768   -.4138
-.5663   .3272   -.3678
-.5533   .2805   -.3232
-.5271   .2374   -.2806
-.4879   .1982   -.2402
-.4371   .1629   -.2020
-.3776   .1311   -.1660
-.3127   .1022   -.1316
-.2463   .0753   -.0981
-.1813   .0491   -.0645
-.1202   .0227   -.0300
-.0639   -.0051   .0062
-.0121   -.0355   .0452
.0362   -.0694   .0874
.0831   -.1073   .1330
.1306   -.1494   .1819
.1800   -.1957   .2338

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

------> d

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

------> d
new value -> 20

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

------> er
new value -> 20

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

------> b
new value -> 12.5

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

------> c
new value -> 90

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

------> d
new value -> 30

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

------> e
new value -> 30

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

------> f
new value -> 30

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

------> f
new value -> 3

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

------> g
new value -> 3

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

------> hu
new value -> 5

a) number of current sensors: 3
b) current sensor transimpedance: 12.50 mV/A
c) maximum motor phase current: 89.9 A
d) maximum battery current, motor use: 29.9 A
e) maximum battery current, regen: 29.9 A
f) maximum shutdown error current, fixed: 2.9 A
g) maximum shutdown error current, proportional: 2.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

------> 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: 0.45 kHz
b) 1st order phase loop integrator coefficient: 65535.9999
c) 2nd order phase loop integrator coefficient: 65535.9999
d) amplitude loop integrator coefficient: 65535.9999
e) maximum amplitude: 200 %
z) return to main menu

------> a
new value -> 45

a) loop sample frequency: 45.04 kHz
b) 1st order phase loop integrator coefficient: 65535.9999
c) 2nd order phase loop integrator coefficient: 65535.9999
d) amplitude loop integrator coefficient: 65535.9999
e) maximum amplitude: 200 %
z) return to main menu

------> e
new value -> 100

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

------> b
new value -> 12.8

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

------> c
new value -> .0709

a) loop sample frequency: 45.04 kHz
b) 1st order phase loop integrator coefficient: 12.7999
c) 2nd order phase loop integrator coefficient: 0.0708
d) amplitude loop integrator coefficient: 65535.9999
e) maximum amplitude: 100 %
z) return to main menu

------> d
new value -> 3

a) loop sample frequency: 45.04 kHz
b) 1st order phase loop integrator coefficient: 12.7999
c) 2nd order phase loop integrator coefficient: 0.0708
d) amplitude loop integrator coefficient: 3.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

------> 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

------> 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: YES
   receive throttle over CAN: NO
g) TX throttle over CAN: YES
h) test throttle
z) return to main menu

------> a

 close or hold slight open throttle 1 for offset measurement
 press any key to begin measurement
 measured voltage: 833 mV

 fully open throttle 1
 press any key to begin measurement
 measured voltage: 4267 mV

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: YES
   receive throttle over CAN: NO
g) TX throttle over CAN: YES
h) test throttle
z) return to main menu

------> hu
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
|   1               2 F -                   X                   +
|       1           2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|         1         2 F -                   X                   +
|                 1 2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                   2 F -                   X                   +
|                  12 F -                   X                   +
|                1  2 F -                   X                   +
|                1  2 F -                   X                   +
|                1  2 F -                   X                   +
|                1  2 F -                   X                   +
|                1  2 F -                   X                   +
|                1  2 F -                   X                   +
|           1       2 F -                   X                   +
|           1       2 F -                   X                   +
|           1       2 F -                   X                   +
|           1       2 F -                   X                   +
|           1       2 F -                   X                   +
|           1       2 F -                   X                   +
|           1       2 F -                   X                   +
|          1        2 F -                   X                   +
|     1             2 F -                   X                   +
|     1             2 F -                   X                   +
|     1             2 F -                   X                   +
|     1             2 F -                   X                   +
|     1             2 F -                   X                   +
|     1             2 F -                   X                   +
|    1              2 F -                   X                   +
|1                  2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +
1                   2 F -                   X                   +

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: YES
   receive throttle over CAN: NO
g) TX throttle over CAN: YES
h) test throttle
z) return to main menu

------> 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

------> g

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: NO
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

------> 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: 38461
d} e-rpm reached before transition: 100 %
e} minimum current push start: 0.0 A
f} push start current, error allowed: 0 %
g] erpm sensored to sensorless transition: 107
h] transition time sensored to sensorless: 55705 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: YES
k) phase current for controlled slowdown: 0.0 A
l) motor maximum, forward: 230.87 k-erpm
m) motor maximum, reverse: 230.87 k-erpm
n) motor standstill voltage threshold: 319.99 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 0 Hz
q) low side pulsing width: 2184 usec
z) return to main menu

------> kg
new value -> 60

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

------> p
new value -> 20

a) sensored or sensorless: SENSORED
b} sensorless startup: SELF START
c} e-rpm limit sensorless self start: 38461
d} e-rpm reached before transition: 100 %
e} minimum current push start: 0.0 A
f} push start current, error allowed: 0 %
g] erpm sensored to sensorless transition: 107
h] transition time sensored to sensorless: 55705 milli-sec
i) return to motor start below 107 erpm
j) controlled slowdown for direction change: YES
k) phase current for controlled slowdown: 59.9 A
l) motor maximum, forward: 230.87 k-erpm
m) motor maximum, reverse: 230.87 k-erpm
n) motor standstill voltage threshold: 319.99 V
o) enable low side pulsing in drive 0: YES
p) low side pulsing rate: 20 Hz
q) low side pulsing width: 2184 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

------> hu

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: 3753 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

------> [00]
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: 5227
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 Jul 01, 2012 12:52 pm

Lebowski wrote:the standby voltage threshold is kind of a safety. As long as the motor is spinning so fast
that the back-emf is above the threshold, it will stick in drive_0. Same with the throttle, as
long as the throttle is not closed in will stay in drive_0.

I saw you entered 500 and 100 for the standby voltage. Have a look at the manual, it explains
the variable and its function. Long strory short, the controller expects a value of something like
0.5 or 1 , not all the way in the 100 to 500 range... I always use 0.5

The pulses you're seeing is the 'low side pulsing' option of menu g, which you have turned on.
This is correct, it must be turned on for your type of gate drivers. I would reduce the pulse
time (option q) to 20 usec though.

Watch out, the dressed down version you're using has a speed throttle and runs like cr@p, it's
nowhere near the real thing.

OK thanks I will try again after lunch I left the throttle closed so that will possibly be part of it. Next time I will calibrate it with the throttle slightly open. I will try to change the standby voltage too. Thanks man. :)
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: 5227
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby Lebowski » Sun Jul 01, 2012 1:17 pm

Arlo1 wrote:OK thanks I will try again after lunch I left the throttle closed so that will possibly be part of it. Next time I will calibrate it with the throttle slightly open. I will try to change the standby voltage too. Thanks man. :)



No, you can leave the throttle in any position during calibration of halls and backemf. When you
use the chip in motor mode though the throttle must be closed or it will stay in drive_0, for safety reasons
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1472
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby Arlo1 » Sun Jul 01, 2012 1:33 pm

I meen i calibrated the throttle with it fully closed and fully open so if i calibrate it slightly open and fullly open it will be under the voltage when fully closed.
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: 5227
Joined: Sun Apr 26, 2009 10:36 pm
Location: Nanaimo BC Canada

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

Postby Lebowski » Sun Jul 01, 2012 2:35 pm

Arlo1 wrote:I meen i calibrated the throttle with it fully closed and fully open so if i calibrate it slightly open and fullly open it will be under the voltage when fully closed.


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

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

Postby Arlo1 » Sun Jul 01, 2012 5:32 pm

OK so I had it spin the motor kinda.... Now the chip is getting stuck in motor mode or program mode.... As of right now its stuck in program mode with nothing touching the program or reset jumpers....

Ok edit. I found what seems to be if the coils are not calibrated it will not go to run mode. I recalibrated them and set all the other perameters and got it to turn colossus. Its very rough and misses so now I have some reading to understand what I need to adjust.
On of my problems is I tried everything under the sun to get it into program mode and all that seems to work is pushing the program and reset buttongs at the same time and pushing the enter button on the computer then after about 10-20 tries it will pop into program mode. But the problem with this is it scrambles the settings I have entered and I need to reprogram it from scratch incl the halls and coils some times.... SO here is the settings im at and how it looks on video. Its a great Canada day I got it turn colossus and now Im going to celibrate our usless queen who wastes tax payers money for no reason (she realy does nothign for our country) and I will celibrate all the crap I dont belive in lol. But I am realy happy for my electric future with all of you :)
Thanks for all your help so far lebowski. Im almost there. I can tell you 2 things that need to be worked on for the end user and 1 is getting the chip to enter programing mode. 2 is getting it to read motor coild posistions its realy not easy to do either for me.
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: 5227
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 1:04 am

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 ?

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

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)
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1472
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby Miles » Mon Jul 02, 2012 2:43 am

Lebowski,

What is the maximum commutation frequency your controller IC can handle, in unsensored mode?
User avatar
Miles
100 GW
100 GW
 
Posts: 9265
Joined: Fri Mar 16, 2007 4:15 pm
Location: London UK

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

Postby Lebowski » Mon Jul 02, 2012 3:10 am

Miles wrote:Lebowski,

What is the maximum commutation frequency your controller IC can handle, in unsensored mode?


The only answer I can give is: I don't know but very high.

At the moment the chip can take measurements, calculate everything and update the PWM dutycycle
a 100k times / sec . To properly output this you need 50kHz PWM (with 100k updates it will then individually
place every rising and falling edge of the PWM signal). And you need gate drivers etc that can handle 50k PWM.

How many samples in a sine-wave do you think a motor needs to run good ? A typical hall sensored uses only
6 point per e-rotation but I think something like 30 or higher is more realistic for the calculation. This would
give 60 * 100k / 30 = 200k e-rpm. I have never run at these speeds though, the max I did was 80 k-erpm but
with only 40k updates/sec (21 kHz PWM) (so also using 30 points per sinewave)

By the way, even if you use hall sensors, the chip switches automatically into sensorless when it gets over
a few 100 e-rpm.
Last edited by Lebowski on Mon Jul 02, 2012 3:19 am, edited 1 time in total.
User avatar
Lebowski
100 kW
100 kW
 
Posts: 1472
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

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

Postby Miles » Mon Jul 02, 2012 3:19 am

Great! 1300Hz (78,000 erpm) is the maximum that I need.
User avatar
Miles
100 GW
100 GW
 
Posts: 9265
Joined: Fri Mar 16, 2007 4:15 pm
Location: London UK

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: 5227
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: 1472
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: 5227
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: 5227
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: 1472
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: 5227
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: 5227
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: 5227
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: 5227
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: 1472
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: 5227
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: 1472
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: 5227
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: 1472
Joined: Tue Jun 28, 2011 1:38 am
Location: beautiful Zurich, Switzerland

PreviousNext

Return to Motor Technology

Who is online

Users browsing this forum: No registered users and 11 guests