Lebowski's motor controller IC, schematic & setup, new v2.A1

Lebowski said:
Arlo1 said:
Lebowski said:
but also try 49 kHz again with b&c like I gave you (maybe 2 or 4 times higher for both), but with going through menu G and the FOC menu again (stay reasonable for the foc menu with the current
settings, 50A is enough !).
What do I need to change in menu g? This is why I asked btw if I needed to change anything else... ;)

yeah sorry I forgot. I always use the same settings so I go through the menu's at a high speed on muscle memory alone :D

Many counters like for transition time are counted down with the sample rate, so going from 38 to 49 makes the selected time shorter.
Other things like (transition and/or maximum) erpm settings are proportional to the sample rate, so from 38 to 49 makes most erpm
settings higher. And there are settings dependent on timers which are not changed. I don't know exactly which is which, but if you
change the sample rate and ask for menu g many numbers will have changed. Same in the FOC menu, change the sample rate and the
inductance the system uses changes, so you need to re-calibrate...

OK So I set it up to the settings you sugested again and looked in menu g and did not see anything....
I did not try running it this way again because I have sucsess with the 38khz f sample.. I need to try a unloaded tranition to sensorless again but I think that might just bee happening to fast so maybe I should lower the % before transition starts?? Or did you say that was only for sensorless.?
 
Yes it seems better with it on... First off the controller shuts down with it off. But the data I did get (did foc off first then foc on after) shows the foc helps.
 

Attachments

  • foc on off (800 x 561).jpg
    foc on off (800 x 561).jpg
    42.9 KB · Views: 2,887
wasn't that a graph from when the settings where still messed up ? Maybe do a back-to-back run, run without FOC after you've had a succesfull run with FOC ? It should be less sensitive to cutting out without the FOC... oh wait maybe not... please try !
 
Lebowski said:
wasn't that a graph from when the settings where still messed up ? Maybe do a back-to-back run, run without FOC after you've had a succesfull run with FOC ? It should be less sensitive to cutting out without the FOC... oh wait maybe not... please try !
It runs great WITH FOC! It cuts out WITHOUT FOC. Do you realy want me to try again?? Are you going to start buying my mosfets....? :)
No the FOC on and FOC off graph was before I tried the 49 kHZ f sample.
 
Got the nex chips lebowski. I ordered 20 more packs of lipo today :) Have everything to build 150v controller ;)
Anything I need to know about the new chips?
 
Arlo1 said:
Got the nex chips lebowski. I ordered 20 more packs of lipo today :) Have everything to build 150v controller ;)
Anything I need to know about the new chips?

There are two things which will be interesting for you:
- the old ones started to clip the sinewaves (into trapezoidal) at 100% amplitude, the new ones at 111% amplitude (so it will drive pure sinewaves at an 11% higher voltage than before).
but only if you use pure sine waves (use this 'convert to sine'-option after you've measured backemf)
- Next to inductance it will also show the resistance the system sees. It has a fixed 'offset' in a sense that is also measures the resistance due to the deadtime. But when you keep measurement
current, frequency and all PWM settings the same you can use this feature to see effects of battery and motor wiring resistance.

another useful feature I find, after you've done calibration of the current sensors and you press the button to store the results... in the old one you had to go into the menu
system again to turn off the calibration, in the new one the calibration will be turned off automatically when the results are stored. It will only flash all LED's once, not repeatedly
on (repeatedly) pressing the button.
 
Lebowski I got everything together and when I turn the throttle all three hi sides turn on and off in sink and all three low sides turn on and off in sink. So the motor doesn't turn. It's like a throttle based pwm test mode....
 
code>>> If you are wondering I did play with different settings on the mv/amp setting in the current settings. I started where it used to be. Then I ran 2.5 amps in a wire looped 3 times through the current sensor and got 2.51v out of the sensor while the other two were at 2.47v so 2.51-2.47=.04v for 2.5 amps with 3 loops so it would be 1/3 for 1 loop = .01333333/2.5amps so .00533333 v per amp SO I tried a setting of 5mv per amp to see if it would be any different. I tried FOC on and FOC off as well. It mesured 11uH and .111 ohms I think it was... I will try it again. But I turned FOC off just to see if it was the problem.

Code:
########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
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

------>  

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 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
z) store parameters in EEPROM for motor use

------> b 

a] number of back-emf samples: 300
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] 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: 300
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] 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: 300
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] 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 successfull
 data arrays now contain sampled back-emf waveforms

a] number of back-emf samples: 300
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] table out data arrays
z] return to main menu

------> e 

data A, data B, data C
.9434	.4030	.8918
.9299	.4022	.9005
.9172	.4038	.9124
.8997	.4006	.9180
.8831	.3975	.9259
.8720	.4030	.9394
.8505	.4038	.9426
.8236	.4014	.9418
.7950	.4014	.9434
.7633	.3991	.9442
.7347	.3975	.9465
.7109	.3999	.9537
.6839	.3991	.9561
.6530	.3959	.9521
.6252	.3983	.9529
.5982	.3975	.9505
.5697	.3975	.9481
.5443	.3975	.9481
.5181	.3959	.9465
.4919	.3927	.9410
.4713	.3935	.9378
.4427	.3919	.9259
.4157	.3991	.9164
.4062	.4133	.9180
.4118	.4435	.9338
.4118	.4673	.9442
.4133	.4935	.9537
.4133	.5173	.9561
.4086	.5427	.9545
.4062	.5697	.9537
.4046	.6022	.9553
.3999	.6300	.9553
.3983	.6601	.9553
.4054	.6990	.9648
.4086	.7323	.9664
.4110	.7640	.9680
.4149	.7958	.9688
.4125	.8228	.9688
.4125	.8489	.9688
.4125	.8712	.9680
.4094	.8862	.9608
.4094	.8989	.9505
.4070	.9093	.9386
.4062	.9219	.9259
.4070	.9323	.9124
.4125	.9473	.9029
.4133	.9553	.8862
.2737	.6411	.5879
.2777	.6458	.5744
.1380	.3245	.2816
.4141	.9648	.8236
.4110	.9648	.7847
.4078	.9656	.7514
.4046	.9672	.7196
.3991	.9656	.6855
.3983	.9672	.6546
.3991	.9656	.6244
.4006	.9664	.5958
.4078	.9703	.5712
.4125	.9759	.5498
.4149	.9751	.5268
.4133	.9688	.5030
.4118	.9600	.4800
.2745	.6347	.3094
.4054	.9378	.4395
.4014	.9196	.4133
.4086	.9116	.3951
.4284	.9212	.3919
.4554	.9338	.3951
.4848	.9450	.4006
.5181	.9545	.4070
.5490	.9584	.4094
.5816	.9616	.4110
.6101	.9632	.4094
.6427	.9664	.4070
.6696	.9656	.4014
.6958	.9640	.4006
.7204	.9600	.3975
.7474	.9561	.3967
.7807	.9600	.4030
.8140	.9648	.4086
.8450	.9688	.4141
.8696	.9711	.4149
.8894	.9711	.4165
.9005	.9624	.4118
.9085	.9553	.4118
.9140	.9370	.4038
.9227	.9212	.3991
.9315	.9061	.3975
.9418	.8918	.3983
.9529	.8783	.4014
.9584	.8601	.4030
.9656	.8386	.4078
.9696	.8125	.4110
.9727	.7823	.4125
.9743	.7490	.4102
.9799	.7212	.4094
.9799	.6895	.4054
.9799	.6617	.4054
.9775	.6300	.4038
.9727	.5958	.3999
.9703	.5633	.3983
.9696	.5371	.3967
.9719	.5165	.3999
.9719	.4959	.4038
.9648	.4744	.4038
.9529	.4506	.4038
.9402	.4268	.4038
.9291	.4062	.4070
.9315	.3943	.4213
.9370	.3903	.4427
.9426	.3887	.4657
.6355	.2602	.3221
.9521	.3919	.5133
.9553	.3935	.5411
.9672	.4014	.5911
.9751	.4054	.6292
.9807	.4070	.6633
.9791	.4038	.6911
.9767	.4006	.7164
.9743	.3991	.7434
.9672	.3935	.7664
.9664	.3935	.7958
.9648	.3927	.8212
.9664	.3959	.8474
.9640	.3983	.8672
.9577	.4006	.8847
.6339	.2673	.5966

a] number of back-emf samples: 300
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] table out data arrays
z] return to main menu

------> d 

 data arrays now contain reconstructed back-emf waveforms

a] number of back-emf samples: 300
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] table out data arrays
z] return to main menu

------> e 

data A, data B, data C
.5944	-.5232	.5396
.5796	-.5232	.5676
.5581	-.5327	.5873
.5288	-.5491	.6004
.4911	-.5691	.6091
.4453	-.5890	.6156
.3917	-.6054	.6216
.3317	-.6162	.6283
.2668	-.6202	.6362
.1984	-.6183	.6447
.1280	-.6122	.6528
.0571	-.6044	.6591
-.0132	-.5977	.6623
-.0823	-.5944	.6617
-.1493	-.5959	.6571
-.2140	-.6022	.6490
-.2756	-.6118	.6389
-.3338	-.6225	.6283
-.3880	-.6312	.6192
-.4376	-.6347	.6133
-.4818	-.6301	.6116
-.5202	-.6159	.6144
-.5523	-.5912	.6213
-.5782	-.5569	.6307
-.5980	-.5147	.6411
-.6125	-.4669	.6506
-.6226	-.4160	.6575
-.6293	-.3638	.6611
-.6339	-.3115	.6611
-.6373	-.2592	.6582
-.6402	-.2059	.6542
-.6432	-.1503	.6506
-.6462	-.0904	.6497
-.6489	-.0253	.6528
-.6508	.0455	.6602
-.6512	.1210	.6716
-.6498	.1991	.6853
-.6464	.2758	.6985
-.6409	.3468	.7078
-.6343	.4075	.7098
-.6271	.4542	.7013
-.6208	.4845	.6802
-.6163	.4976	.6457
-.6148	.4953	.5984
-.6168	.4810	.5405
-.6225	.4600	.4751
-.6313	.4382	.4060
-.6425	.4214	.3370
-.6546	.4144	.2713
-.6662	.4203	.2113
-.6757	.4396	.1579
-.6819	.4710	.1108
-.6840	.5107	.0681
-.6820	.5537	.0275
-.6762	.5942	-.0135
-.6674	.6270	-.0577
-.6571	.6481	-.1066
-.6464	.6556	-.1607
-.6365	.6494	-.2195
-.6282	.6317	-.2811
-.6217	.6065	-.3431
-.6163	.5785	-.4024
-.6111	.5527	-.4562
-.6044	.5333	-.5025
-.5946	.5231	-.5397
-.5797	.5231	-.5677
-.5582	.5325	-.5874
-.5289	.5490	-.6006
-.4913	.5689	-.6093
-.4454	.5888	-.6157
-.3919	.6052	-.6217
-.3319	.6160	-.6284
-.2669	.6201	-.6363
-.1985	.6182	-.6448
-.1282	.6120	-.6528
-.0573	.6042	-.6591
.0131	.5975	-.6624
.0821	.5943	-.6618
.1492	.5957	-.6571
.2138	.6020	-.6491
.2755	.6117	-.6389
.3337	.6224	-.6284
.3880	.6311	-.6193
.4375	.6346	-.6134
.4817	.6300	-.6117
.5201	.6157	-.6145
.5522	.5910	-.6214
.5781	.5567	-.6309
.5979	.5145	-.6413
.6124	.4668	-.6508
.6225	.4158	-.6577
.6292	.3637	-.6613
.6338	.3113	-.6612
.6372	.2590	-.6584
.6401	.2058	-.6544
.6431	.1502	-.6508
.6461	.0903	-.6499
.6488	.0252	-.6529
.6507	-.0456	-.6604
.6512	-.1212	-.6718
.6497	-.1992	-.6855
.6463	-.2759	-.6986
.6409	-.3469	-.7080
.6342	-.4077	-.7099
.6271	-.4544	-.7014
.6207	-.4846	-.6803
.6162	-.4977	-.6458
.6147	-.4954	-.5986
.6166	-.4811	-.5407
.6223	-.4601	-.4752
.6311	-.4383	-.4061
.6423	-.4216	-.3371
.6545	-.4145	-.2715
.6660	-.4204	-.2115
.6755	-.4398	-.1581
.6817	-.4712	-.1109
.6839	-.5108	-.0682
.6818	-.5538	-.0276
.6760	-.5943	.0134
.6673	-.6271	.0576
.6569	-.6483	.1064
.6463	-.6557	.1605
.6364	-.6495	.2193
.6281	-.6318	.2810
.6215	-.6066	.3430
.6162	-.5786	.4023
.6109	-.5528	.4562
.6043	-.5334	.5023

a] number of back-emf samples: 300
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] table out data arrays
z] return to main menu

------> z 

########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
z) store parameters in EEPROM for motor use

------> c 

a) PWM frequency: 20kHz
b) deadtime: 1499ns
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 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
z) store parameters in EEPROM for motor use

------> d 

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

------> z 

########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
z) store parameters in EEPROM for motor use

------> e 

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

------> z 

########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
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: NO
h) test throttle
z) return to main menu

------> h 
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                   +
2                   | F -                   X                   +
2                   | F -                   X                   +
2                   | F -                   X                   +
2                   | F -                   X                   +
2                   | F -                   X                   +
2                   | F -                   X                   +
21                  | F -                   X                   +
2   1               | F -                   X                   +
2     1             | F -                   X                   +
2       1           | F -                   X                   +
2         1         | F -                   X                   +
2         1         | F -                   X                   +
2           1       | F -                   X                   +
2            1      | F -                   X                   +
2             1     | F -                   X                   +
2               1   | F -                   X                   +
2                1  | F -                   X                   +
2                 1 | F -                   X                   +
2                  1| F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                1  | F -                   X                   +
2            1      | F -                   X                   +
2       1           | F -                   X                   +
2   1               | F -                   X                   +
2 1                 | F -                   X                   +
2 1                 | F -                   X                   +
2 1                 | F -                   X                   +
2  1                | F -                   X                   +
2  1                | F -                   X                   +
2   1               | F -                   X                   +
2    1              | F -                   X                   +
2     1             | F -                   X                   +
2     1             | F -                   X                   +
2      1            | F -                   X                   +
2      1            | F -                   X                   +
2      1            | F -                   X                   +
2       1           | F -                   X                   +
2       1           | F -                   X                   +
2       1           | F -                   X                   +
2        1          | F -                   X                   +
2        1          | F -                   X                   +
2         1         | F -                   X                   +
2         1         | F -                   X                   +
2          1        | F -                   X                   +
2          1        | F -                   X                   +
2          1        | F -                   X                   +
2          1        | F -                   X                   +
2           1       | F -                   X                   +
2          1        | F -                   X                   +
2         1         | F -                   X                   +
2       1           | F -                   X                   +
2     1             | F -                   X                   +
2   1               | F -                   X                   +
2  1                | F -                   X                   +
2  1                | F -                   X                   +
2  1                | F -                   X                   +
2  1                | F -                   X                   +
2  1                | F -                   X                   +
2  1                | F -                   X                   +
2   1               | F -                   X                   +
2    1              | F -                   X                   +
2    1              | F -                   X                   +
2     1             | F -                   X                   +
2     1             | F -                   X                   +
2      1            | F -                   X                   +
2      1            | F -                   X                   +
2      1            | F -                   X                   +
2      1            | F -                   X                   +
2       1           | F -                   X                   +
2       1           | F -                   X                   +
2        1          | F -                   X                   +
2         1         | F -                   X                   +
2         1         | F -                   X                   +
2           1       | F -                   X                   +
2            1      | F -                   X                   +
2             1     | F -                   X                   +
2              1    | F -                   X                   +
2               1   | F -                   X                   +
2               1   | F -                   X                   +
2                1  | F -                   X                   +
2                1  | F -                   X                   +
2                 1 | F -                   X                   +
2                 1 | F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                   1 F -                   X                   +
2                 1 | F -                   X                   +
2             1     | F -                   X                   +
2     1             | 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                   +
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                   +

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

------>  

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 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
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: 974 erpm
d} minimum current push start: 7.1 A
e} push start current, error allowed: 99 %
f] erpm sensored to sensorless transition: 3000
g] transition time sensored to sensorless: 198 milli-sec 
h) return to motor start below 2000 erpm
i) controlled slowdown for direction change: YES
j) phase current for controlled slowdown: 36.1 A 
k) motor maximum, forward: 99.97 k-erpm 
l) motor maximum, reverse: 99.97 k-erpm 
m) motor standstill voltage threshold: 0.38 V
n) enable low side pulsing in drive 0: YES
o) low side pulsing rate: 20 Hz
p) low side pulsing width: 20 usec
z) return to main menu

------> z 

########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
z) store parameters in EEPROM for motor use

------> h 

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

------> z 

########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
z) store parameters in EEPROM for motor use

------> i 

a) use Field Oriented Control: NO
z) return to main menu

------> z 

########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
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]

[youtube]CwceX07Q7qE[/youtube]
 
"I don't think I have any settings wrong" he says :mrgreen:

you got the settings wrong.

First, you didn't use the option to turn the back-emf into sine waves, what you measure looks really crappy so I'd just convert it to sines... Then you'll also get the moving midpoint.
Did you initialise the current sensor default calibration values ?

but the main thing: your throttle coefficients are all 0 so...
Code:
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

------> h
2                   | F -                   X                   +
2                   | F -                   X                   +
2                   | F -                   X                   +
2                   | F -                   X                   +
2                   | F -                   X                   +
2                   | F -                   X                   +
2                   | F -                   X                   +
2                   | F -                   X                   +

The coefficients in option C are all 0, that's why the actual throttle that's used (the 'X') doesn't move.
With 0 throttle the waves move in sync as you've observed...
 
Well I was hoping you would point out somethign like that because its not proble to feel stupid for a couple hours till I get it running again.
I did try FOC the first time.
I aslo tried the use only fundimental sine wave option at first but when it did not work I tried some other settings.

My sensorless samples have always been crapy... Maybe this will help sensorless transistions but what can I do to make them better?
 
Lebowski, has the manual been updated to reflect all of the changes you have made since you wrote it? I have designed my brain board and driver board, I just need to draw up my power stage board now. Then its off to oshpark.com. I am really close to finishing my PCB design. I shared what I had with Arlo1 last night. Board with ir2110 driver buffer is 204mm long by 76mm wide and can be separated into two boards if I hurt one.

I added lots of test points and a some options like a voltage divider on the amp sensor in pins for use with higher current sensors in the future. Options are controlled by jumpers. I am hoping once I get my setup built and working that I can share my boards or possibly offer tested and built units for anyone else who wants to join in on the fun. I've got at least 40 hrs into this design now and 10 of that was probably me learning kicad which is a great program. Auto routing traces is the bomb.
 
Lebowski said:
I had a question about how to implement a small and fixed amount of regen to implement engine braking, like an ICE has

First regen must be allowed by allowing a certain amount of regen battery current (menu d, 'maximum battery current, regen')

The throttle channels, after calibration, generate a signal between 0 and 1. Then with the throttle curve coefficients one of the
channels can be set to generate negative values (see manual page 21). With one of the channels generating a fixed negative
value there'll be a fixed amount of regen or braking 'torque'.

I think there are 2 methods to implement this.

- connect a small PCB type potentiometer to the channel you want to use for regen. One leg connects to the 5V supply, the other
to ground and the potentiometers slider connects to the controller IC throttle input. Calibrate this channel as you would with the throttle,
rotate the potentiometer to give 0V for throttle closed and rotate to 5V for full throttle. After calibration set the channels first coefficients to
a small negative number , the two others can be 0. If you for instance have 150A phase, setting the first coefficient to -0.1 allows you to dial
in (with the potentiometer) from 0 to -15A phase current. The main throttle channel can be set to give a maximum output of 1.1 (by for
instance setting the first coefficient to 1.1) to fully compensate the regen at full throttle and produce 150A phase current. If not set to 1.1
max throttle would be 150-15 = 135 A phase current... The 'test throttle' option is very usefull to see whats going on. Don't forget to
turn on the second throttle channel (set 'use throttle channel 2' to yes)!

- The second method just hardwires the throttle channel to 5V and you set the regen with the first throttle coefficient. Calibrate the throttle
channel you want to use for regen by connecting to ground for throttle closed and 5V for throttle open. Now keep the connection to 5V.
This sets the channel to always produce a '1'. Then by setting the first coefficient of this channel to a small negative number you can dial
in the fixed amount of regen. Again,using the previous example, setting to -0.1 will give -15A phase current. If you want to chance the
regen torque, instead of conveniently rotating the potentiometer from the first example, you'll have to go back to setup mode and change
the coefficient (to -0.08 for instance if you want slightly less braking torque). Again, don't forget to compensate by giving the throttle channel
an output higher than 1.

since the second method is a bit more cumbersome, I'd use the potentiometer method...
OK So I am going to set up a second pot for the regen brakes. I will also tie in a pot on the dash for adjustable engine braking. So when nothing is pressed it will try to slow the bike with an engine braking feel and at least for now I will have this as an adjustable pot on the dash. So My other question is what happens when the brakes and the throttle are twisted at the same time? Is there a way to make it apply regen brakes even if the throttle is twisted?
 
I am making huge progress in my controller. I am working with high hopes to develop a high power, reliable and fault tolerant driver section and am almost ready to get to circuit board layout. I already have lebowskis controller board lay out done and what I think is a good power stage.

I can't wait to finally build this and test it... almost there.
 
Ok so I have It working... DAMN variable regen is Fricken cool. It will not stop the wheel but gets you to a very low speed. I only played with it on the dyno for now. I kinda had to I baked the powder coating off the rear drum stopping the dyno from 120km/h repeatedly lol.

Ok Im not sure I set it up right. I calibrated both throttles (regen pot is #2) and then I set 1.9,0,0 for number 1 and -.9,0,0 for number 2 is this right?
What I want to do is have a small voltage given from regen pot at all times for engine braking and then hook it to the brake peddle for variable regen.
 
I would use the throttle test function (the 80-ies racing game where it scrolls).

I would set the regen pot to the level of regen that you like.
Then, when you start the racing game you'll see that throttle '2' is at a certain setting and that
the 'x' shows a negative throttle. Then as you apply throttle '1' the 'x' will start to move up to the
right. I would tune the coefficient of throttle '1' such that at full throttle the 'x' is just touching at
the full right (indicating max phase amps will be applied). If the 'x' is all the way at the right
before max throttle I would reduce the 1.9 coefficient.

Basically, with pot 2 you have the potential (due to the -0.9) to have negative 90% phase amps.
But lets say your setting of pot 2 is such that it is set at 20% negative phase amps. Then you
want your throttle to have a maximum of 120% phase amps. If you have it larger (like 190%)
it means the last part of your throttle doesn't do anything, anything more than 120% will be
clipped.

The 80-ies racing game shows you whether it clips before full throttle, so use that to set it up
for smoothest performance.
 
zombiess said:
I am making huge progress in my controller. I am working with high hopes to develop a high power, reliable and fault tolerant driver section and am almost ready to get to circuit board layout. I already have lebowskis controller board lay out done and what I think is a good power stage.

I can't wait to finally build this and test it... almost there.

did you receive the chips ?
 
Lebowski said:
zombiess said:
I am making huge progress in my controller. I am working with high hopes to develop a high power, reliable and fault tolerant driver section and am almost ready to get to circuit board layout. I already have lebowskis controller board lay out done and what I think is a good power stage.

I can't wait to finally build this and test it... almost there.

did you receive the chips ?

Yes, they arrived about 2 weeks ago. I've been hard at work trying to get a high power driver section going (so hard my wife is upset with me for staying up late every night working on this). My driver section is based on the TD350E and with major help from Highopes I have been working to fully understand everything it does. My driver section is completely opto isolated from the controller so I shouldn't blow up controller chips when I fry FETs. Each phase consists of 2 drivers, each with their own isolated power supplies with the only shared connection point being the high side source FET pin and low side drain FET pin.

Entire controller consists of 7 isolated power supplies.

The driver has shoot through protection to hopefully prevent popped FETs, UVLO. I am adding my own fault processor using a PIC I'm adding to the mother board side that is optically coupled to the drivers fault output so when something bad happens it will shut everything down and indicate to me which phase and if it was the high side or low side that caused the fault.

I've been putting a lot of work into this but I figure this could save me money from blown up FETs. It's also helped me learn soooo much more about driving FETs.

Each driver should have the capability to source/sink 15A peak so I can drive large FETs with fast switching times. The driver isn't super fast and has a propagation delay of around 500nS which isn't the greatest, but I'm not planning to go very high in switching frequency. It costs a bit more to do it this way, but it could save me a lot of time and money down the road. If it works well I'll offer up the design to anyone who wants to use it.

I'm getting really anxious now to try this out and it's been hard to not start building, but I think it's worth it.
 
Its the little things.... Well and the one big thing (nothing else on a budget ran colossus) although I did "blow the budget" on this, I gained a SHIT PILE of knowledge. As for the little things, sine control with the option to blend trap (clipping) torque throttle, ultra fast pwm and sampling rates available if needed.
all the newest features you wont even find on a sevcon yet. AND variable regen its so exciting to set all this up.

I originally wanted to use the isolated supplies but the cost was huge when driving big gate currents so I moved away from them. But now there is more available so I will have to go back and check them out.

Good luck zombies its a lot of fun. Its kind of like auto body work its a gazillion hours of prep for a few minutes of finish work to see it done!
 
Lebowski I set the battery current limit to 90 amps for regen in the current settings menu but it seems to have ignored this I was able to pull about 9000watts regen max with about 75-80v on the battery. So it would seem the throttle settings is all it uses? Once I build the rest of the pack It will be no big deal but guys with lame batteries will want to watch this. ;)
 
So I shorted a HI side fet during the inductance measurement again...

All I can think that would have caused it is
A. The fets in the stage that shorted were week from the last blow up or
B. The drain to gate snubber I added to all the hi sides is pulling the hi side on when the low side turns on.
I was getting set up and dead time was still at 2100ns.

Code:
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
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 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
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 erpm
d} minimum current push start: 9.9 A
e} push start current, error allowed: 10 %
f] erpm sensored to sensorless transition: 3501
g] transition time sensored to sensorless: 99 milli-sec 
h) return to motor start below 2000 erpm
i) controlled slowdown for direction change: YES
j) phase current for controlled slowdown: 49.9 A 
k) motor maximum, forward: 99.97 k-erpm 
l) motor maximum, reverse: 99.97 k-erpm 
m) motor standstill voltage threshold: 0.29 V
n) enable low side pulsing in drive 0: YES
o) low side pulsing rate: 20 Hz
p) low side pulsing width: 20 usec
z) return to main menu

------> z 

########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
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

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

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


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

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






























########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
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 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
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 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
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

------> z 

########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
z) store parameters in EEPROM for motor use

------> b 

a] number of back-emf samples: 1500
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] 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] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] 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] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] 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] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] 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] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] 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] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] table out data arrays
z] return to main menu

------> a 
new value -> 500 

a] number of back-emf samples: 500
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] 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: 500
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] 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: 500
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] 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: 500
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] 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: 500
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] 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: 500
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] table out data arrays
z] return to main menu

------> e 

data A, data B, data C
.9517	-.1502	.8648
.9335	-.1417	.8950
.9054	-.1445	.9136
.8745	-.1445	.9308
.8394	-.1530	.9452
.8015	-.1572	.9538
.7566	-.1572	.9595
.7047	-.1600	.9595
.6457	-.1600	.9653
.5881	-.1628	.9681
.5278	-.1698	.9710
.4702	-.1726	.9782
.4169	-.1726	.9810
.3593	-.1768	.9782
.3018	-.1796	.9710
.2428	-.1768	.9653
.1867	-.1782	.9638
.1361	-.1754	.9609
.0884	-.1740	.9609
.0435	-.1740	.9609
.0042	-.1712	.9566
-.0336	-.1670	.9523
-.0884	-.1488	.9323
-.1375	-.1221	.9151
-.1558	-.0884	.9237
-.1586	-.0463	.9380
-.1600	.0014	.9523
-.1656	.0449	.9523
-.1712	.1024	.9566
-.1712	.1642	.9624
-.1698	.2288	.9681
-.1740	.2905	.9710
-.1782	.3481	.9767
-.1824	.4071	.9767
-.1796	.4646	.9753
-.1838	.5222	.9696
-.1768	.5825	.9681
-.1838	.6345	.9653
-.1768	.6906	.9696
-.1754	.7426	.9739
-.1684	.7917	.9753
-.1614	.8254	.9667
-.1558	.8577	.9495
-.1530	.8858	.9308
-.1516	.9040	.9021
-.1600	.9237	.8692
-.1642	.9349	.8304
-.1684	.9433	.7888
-.1277	.7117	.5694
-.1656	.9588	.7200
-.1628	.9630	.6540
-.1628	.9700	.5923
-.1726	.9714	.4776
-.1796	.9756	.4159
-.1796	.9770	.3557
-.1867	.9728	.2940
-.1838	.9714	.2337
-.1923	.9658	.1692
-.1824	.9672	.1176
-.1824	.9644	.0659
-.1782	.9588	.0186
-.1796	.9447	-.0286
-.1291	.7061	-.0344
-.1670	.9279	-.0874
-.1544	.9152	-.1190
-.1389	.9054	-.1534
-.1151	.9026	-.1749
-.0786	.9124	-.1878
-.0280	.9307	-.1850
.0238	.9433	-.1835
.0828	.9489	-.1821
.1403	.9489	-.1850
.1965	.9503	-.1921
.2583	.9531	-.1993
.3116	.9531	-.2051
.3762	.9644	-.2022
.4337	.9658	-.1993
.4927	.9658	-.1979
.5516	.9644	-.1921
.6148	.9700	-.1835
.6724	.9700	-.1835
.7229	.9686	-.1864
.7636	.9658	-.1835
.8029	.9630	-.1792
.8296	.9573	-.1764
.8661	.9447	-.1721
.8942	.9251	-.1692
.9251	.9054	-.1635
.9545	.8829	-.1577
.9672	.8479	-.1635
.9784	.8057	-.1678
.9728	.7496	-.1778
.9686	.6864	-.1864
.9644	.6162	-.1907
.9700	.5516	-.1936
.9728	.4871	-.2036
.9784	.4211	-.2079
.9840	.3621	-.2094
.9882	.3046	-.2051
.9882	.2442	-.2036
.9812	.1810	-.2065
.9770	.1193	-.2079
.9714	.0631	-.2151
.9644	.0126	-.2151
.9644	-.0238	-.2036
.9531	-.0631	-.1965
.9419	-.0968	-.1807
.9377	-.1235	-.1620
.9377	-.1459	-.1319
.9391	-.1656	-.0989
.9489	-.1726	-.0559
.9545	-.1796	-.0057
.4744	-.0898	.0000
.9588	-.1796	.0717
.9686	-.1796	.1219
.9714	-.1782	.2194
.9812	-.1782	.2882
.9854	-.1824	.3514
.9896	-.1810	.4102
.9910	-.1782	.4690
.9910	-.1768	.5307
.9826	-.1796	.5837
.9742	-.1853	.6325
.9742	-.1810	.6870
.9742	-.1810	.7372
.9714	-.1698	.7802
.9602	-.1656	.8146
.7089	-.1291	.6296

a] number of back-emf samples: 500
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] table out data arrays
z] return to main menu

------> c 

 only fundamental sine waves remain

a] number of back-emf samples: 500
b] calibrate coil positions
c] use only fundamental sine waves
d] reconstruct waveforms based on extracted parameters
e] table out data arrays
z] return to main menu

------> z 

########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
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 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
z) store parameters in EEPROM for motor use

------> d 

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

------> i 
new value -> 7 

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

------> z 

########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
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 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
z) store parameters in EEPROM for motor use

------> c 

a) PWM frequency: 20kHz
b) deadtime: 2099ns
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 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
z) store parameters in EEPROM for motor use

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






























########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
z) store parameters in EEPROM for motor use

------> d 

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

------> c 
new value -> 200 

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

------> d 
new value -> 200 

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

------> z 

########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
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 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
z) store parameters in EEPROM for motor use

------> d 

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

------> z\ 

########################################
#   (c)opyright 2013, B.M. Putter      #
#   Adliswil, Switzerland              #
#   bmp72@hotmail.com                  #
#                                      #
#  version 1.11                        #
#  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
i) Field Oriented Control
z) store parameters in EEPROM for motor use

------> i 

a) use Field Oriented Control: NO
z) return to main menu

------> a 

a) use Field Oriented Control: YES

 Before automatic measurement of the motor parameters
 the controller must be supplied with the same voltage
 as in the vehicle. PWM frequency and deadtime must be
 initialised. ADC's must be properly set up and calibrated
 or calibration must have been restored to default.
 The following parameters must be set at their final value:

 loop sample frequency: 38.01 kHz
 current sensor transimpedance: 3.50 mV/A

b) amplitude measurement current: 19.9 A
c) impedance measurement frequency: 49.98 k-erpm
d) determine motor impedance

e) battery voltage (for impedance display only): 84 V
   measured inductance (star configuration): 47.3 uH
   total system 'resistance' (star configuration): 8191.8 mOhm

z) return to main menu

------> d 

 Measuring... 

[00][00]
 
i am not familiar with lebowski's controller .. so these are just some thoughts.

i'm guessing that the inductance measuring basically tells some combination of mosfets to turn ON, the current ramps up and is measured, then mosfets turn OFF. inductance can then be calculated L = V*di/dt. ?

have you ever tried to plot the measured current & votlage during an inductance measurement cycle?

so if you have a failure, then my immediate thoughts are:

1. the current was turned on too long and the peak current exceeded mosfet limit. but this should never happen because over current should be set to turn OFF very quickly in event of dangerous level. is this protection feature enabled and take priority during inductance measuring algorithm? is it fast enough to turn off the mosfet within a pulse? probably not fast enough.. so the de-sat circuit would have to work (see more on this below)

2. maybe the peak current was not a problem because the machine inductance is high. maybe the algorithm told the mosfet to turn ON for too long a period causing over heat? the inductance must be measured within a single pulse of the application switching frequency. so if you intend to switch at 20khz, then the inductance measuring algorithm should finish within 50us. it is not right to ask a mosfet to be ON longer than what it would ever be in normal application. i don't think that a thermistor will be fast enough to detect a problem.. probably only way to protect from this sort of fault in reasonable way is to know that your mosfet is rated for 100% ON during full period (followed by full OFF period of same duration) and repeat. there is an element of heatsink cooling invovled here too.

3. maybe peak current and duration are no problem.. maybe AFTER the mosfet turns OFF the stored energy in the machine inductance is causing a voltage spike (commutaed through mosfet body diode)? this should be easily determined with use of 1000V rated differential probes on an oscilliscope. i'm not sure what the solution would be here because the peak current is determined by the load and the duration (duration is equal to intended switching frequency) so this is all "normal" given the application specs. so any voltage spike is supposed to happen.. i suppose the problem here would be poor layout? that is the DC link capacitors can not absorb the energy fast enough?

as to your comments:
A: most definately. whenver the mosfet is stressed it takes away much life from the component .. but only one incident ? it is not likely to fail on the next one .. it doesn't take away that much life.

B: easy enough to determine with an oscilliscope with differential probes. the way to protect against this sort of fault is to use "desaturation detection" in your gate driver so it will shut off that mosfet within 10us hopefully preventing immediate failure.
 
Back
Top