Subversion Repositories Projects

Rev

Rev 641 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 641 Rev 642
Line 16... Line 16...
16
This is an example of the signal measured by the Roll-ACC sensor:
16
This is an example of the signal measured by the Roll-ACC sensor:
17
[[Anchor(SampleSignalJpg)]]
17
[[Anchor(SampleSignalJpg)]]
18
attachment:test.jpg
18
attachment:test.jpg
Line 19... Line 19...
19
 
19
 
20
= Current Project status =
20
= Current Project status =
21
/!\ ~+'''The version available now (version 0.0) is an alpha version; it was only tested by a limited amount of people. More testers/evaluators are very welcome!'''+~
-
 
22
[[BR]][[BR]]
21
/!\ ~+'''The version available now (version 0.9) is an beta version; it was only tested by a limited amount of people. 
23
The current implementation does not provide a graphical user interface; it is a "command-line" tool. While this approach is a bit less user-friendly, it allows to experiments more freely, which is important at this stage of the project. Later a more fancy user-interface might be added.
22
[[BR]]More testers/evaluators are very welcome!'''+~
24
[[BR]][[BR]]
23
[[BR]][[BR]]
25
At the time of writing, the tool was tested in combination with:
24
At the time of writing, the tool was tested in combination with:
26
 * PC/Windows XP and Vista
25
 * PC/Windows XP and Vista
27
 * FC 1.2 and FC 1.3
26
 * FC 1.2 and FC 1.3
28
Theoretically the tool should also run on MAC and Linux.
27
Theoretically the tool should also run on MAC and Linux.
29
[[BR]][[BR]]
28
[[BR]][[BR]]
30
Features in the pipeline
-
 
31
 * Option to change the minimum battery voltage
-
 
32
 * Filtering of the signal
-
 
33
 * Graphical User Interface
29
Features in the pipeline
34
 * Automatic backup and restore of flight settings
30
 * Automatic backup and restore of flight settings
35
 * Automatic installing and restore of RC flight code
31
 * Automatic installing and restore of RC flight code
36
[[BR]][[BR]]
-
 
37
[http://www.rcgroups.com/forums/showpost.php?p=13250870&postcount=8170 Preview of the GUI version]
-
 
38
[[BR]][[BR]]
32
[[BR]][[BR]]
39
{i} [http://forum.mikrokopter.de/topic-11446.html MK Forum thread for discussions]
33
{i} [http://forum.mikrokopter.de/topic-11446.html MK Forum thread for discussions]
40
[[BR]]
34
[[BR]]
Line 41... Line 35...
41
{i} [[MailTo(frederic AT rc-flight DOT be)]]
35
{i} [[MailTo(frederic AT rc-flight DOT be)]]
42
 
36
 
Line 43... Line 37...
43
= How do I install the tool? =
37
= How do I install the tool? =
-
 
38
The tool is written in programming language called [http://en.wikipedia.org/wiki/Python_(programming_language) Python]. 
Line 44... Line 39...
44
The tool is written in programming language called [http://en.wikipedia.org/wiki/Python_(programming_language) Python]. 
39
 
Line 45... Line 40...
45
 
40
The most logic way to run the tool is to install support for Python on your PC (if you do not have it already) and the Python libraries the tool depends on. 
Line 53... Line 48...
53
== Option 1: Install Python ==
48
== Option 1: Install Python ==
54
For a Windows machine I propose you install:
49
For a Windows machine I propose you install:
Line 55... Line 50...
55
 
50
 
56
 * [http://www.activestate.com/activepython/ ActivePython for Windows] Press the big "ActivePython Download Now" button.
51
 * [http://www.activestate.com/activepython/ ActivePython for Windows] Press the big "ActivePython Download Now" button.
-
 
52
 * [http://sourceforge.net/projects/pyserial/files/ PySerial (support for serial port access)] Select "pyserial-2.5-rc1.win32.exe" on that page.
-
 
53
 * [http://www.wxpython.org/download.php wxPython wxWidgets for Python] Select the the win32-unicode version for Python 2.6
57
 * [http://sourceforge.net/projects/pyserial/files/ PySerial (support for serial port access)] Select "pyserial-2.5-rc1.win32.exe" on that page.
54
 * [http://sourceforge.net/projects/numpy/ NumPy, the fundamental package needed for scientific computing with Python]  
Line 58... Line 55...
58
Once you have Python support on your PC, unzip [http://www.rc-flight.be/VibrationTest/VibrationTest_0_0.zip VibrationTest_0_0.zip] to a directory on your PC.
55
Once you have Python support on your PC, unzip [http://www.rc-flight.be/VibrationTest/VibrationTest_0_9.zip VibrationTest_0_9.zip] to a directory on your PC.
59
 
56
 
Line 60... Line 57...
60
== Option 2: Get the compiled version ==
57
== Option 2: Get the compiled version ==
61
unzip [http://www.rc-flight.be/VibrationTest/VibrationTestExe_0_0.zip VibrationTestExe_0_0.zip] to a directory on your PC
58
unzip [http://www.rc-flight.be/VibrationTest/VibrationTestExe_0_9.zip VibrationTestExe_0_9.zip] to a directory on your PC
Line 78... Line 75...
78
 
75
 
Line 79... Line 76...
79
After insatlling the FC code for the VibrationTest, the LC-Display in the MKTool will look like this:
76
After insatlling the FC code for the VibrationTest, the LC-Display in the MKTool will look like this:
Line 80... Line 77...
80
 
77
 
81
attachment:LCDisplay.jpg
78
attachment:LCDisplay.jpg
82
 
-
 
83
== The command line ==
-
 
Line -... Line 79...
-
 
79
 
84
The current implementation of the tool does not have a graphical user interface. The simplest way to use the tool is from the command prompt.
80
== Starting the VibrationTest tool ==
-
 
81
In the directory where you unzipped the tool, dubbleclick VibrationTestGui.py (in case of the Python version) or VibrationTestGui.exe 
Line 85... Line -...
85
 
-
 
86
On Windows XP open a command shell by selecting Start>Run and typing "cmd".
-
 
87
 
-
 
88
On Windows Vista, click Start and type "cmd.exe" in the "Start Search" box.
-
 
89
 
-
 
90
Now, if you have for example unzipped the tool (the Pyhton version or the compiled version) in directory "D:\MK\VibrationToolExe" you should go to that directory by typing:
-
 
91
 
-
 
92
{{{
-
 
93
D:
-
 
94
cd \MK\VibrationToolExe
-
 
95
}}}
-
 
96
Now, the tool can be started by just typing "VibrationTest.py" if you have installed Python or "VibrationTest" if you use the compiled version. Without any parameters, it tool should display a description of the required parameters.
-
 
97
 
-
 
98
attachment:cmdLine.jpg
-
 
99
 
-
 
100
== The command line parameters ==
-
 
101
The tool expects to be started with a few parameters. When the tool is started without or invalid parameters, a brief description of the expected parameters is displayed:
-
 
102
 
-
 
103
{{{
-
 
104
VibrationTest.py COMPORT MOTORS SPEEDS CHANNELS [-m MINSPEED] [-s NBSAMPLES] [-n NAME] [-d FILENAME] [-v]
-
 
105
 COMPORT         Serial port to use. e.g. COM4
-
 
106
 MOTORS          Motors to activate during test. Multiple motors can be used at the same time. e.g. 1,2,3,4
-
 
107
 SPEEDS          Indicates at what speeds the motors need to be tested.
-
 
108
                   Format 1:  e.g. 50,110,140            Tests at speeds 50, 110 and 140
-
 
109
                   Format 2:  e.g. 100-200:50            Tests at speeds 100, 150 and 200
-
 
110
 CHANNELS        Channels to monitor. e.g. 5,6,7
-
 
111
                   Channel 0 = GyroYaw
-
 
112
                   Channel 1 = GyroRoll
-
 
113
                   Channel 2 = GyroNick
-
 
114
                   Channel 3 = Pressure
-
 
115
                   Channel 4 = Batt
-
 
116
                   Channel 5 = AccTop
-
 
117
                   Channel 6 = AccRoll
-
 
118
                   Channel 7 = AccNick
-
 
119
 -m MINSPEED     Minimum speed of the motor(s)
-
 
120
 -s NBSAMPLES    Number of samples
-
 
121
 -n NAME         Name of the test
-
 
122
 -d FILENAME     File to which the measured values will be logged in
-
 
123
 -v              Verbose
82
 
124
}}}
83
== Using the VibrationTest tool ==
125
4 parameters are mandatory: COMPORT MOTORS SPPEDS and CHANNELS
-
 
126
 
-
 
127
 * '''COMPORT''': The serial port that is connected to the MK e.g. "COM4"
-
 
128
 * '''MOTORS''': List of motors (comma-separated) that need to run during the test. Typically only one motor will be selected. It is also possible to activate all motors to evaluate the global vibrations before and after calibration for example. e.g. "1" or "1,2,3,4"
-
 
129
 * '''SPEEDS''': List of speeds at which will be tested. The "speed" is the I2C value that will be sent to controller and is a value between 0 and 255. Typically interesting values for vibration-testing vary between 100 and 200. [[BR]]There are 2 formats possible. First there is the simple list of speeds, e.g. "100,150,190,200". The second format specifies the minimum, maximum speed and step, e.g. "100-200:20" will test at 100,120,140 ... 200
-
 
130
 * '''CHANNELS''': List of "channels" that will be monitored. A channel is in fact one of the MK analog sensors. Measuring the pressure or battery does not make much sense in this context, but is it possible. It is my experience that channel 6 and 7 produce best vibration signals, but YMMV.
-
 
131
 
-
 
132
[[BR]] In addition, these optional parameters can be provided
-
 
133
 
-
 
134
 * '''-m MINSPEED''': The motor(s) will first be started at "idle" speed before being spooled up to the speed at which the measurement will take place. By default, this speed is 25 but it can be changed with this option. Your motors need to run smootly and start reliably at this speed. In combination with the TP converted ESC for example, the default value of 25 will be too low.
-
 
135
 * '''-s NBSAMPLES''': During a measurement, the FlightControl board will monitor a given channel and store 1000 samples in memory. Afterwards the VibrationTool will read these samples. These samples can be dumped in a file (see the "-d" option) and will be used to find the amplitude of the signal (the difference between the minimum and maximum measured value). [[BR]]It is important to read enough samples to cover a few periods. By default 400 samples are read but with this option, the number of samples can be modified (with a maximum of 1000).
-
 
136
 * '''-n NAME''': An indication of what you are testing. This string will be added to the dumps (see "-d" option) and should not contain spaces e.g. "-n AfterBalancing"
-
 
137
 * '''-d FILENAME''': With this option, all samples will be dumped in a text-file. This file can later be used for further analysis. It can for example be inported in MS Excel or OpenOffice Calc to make graphs of the vibration signal. When the file does not exist yet it will be created, otherwise the new data will be added. All measurements dumped in the same file should have the same number of samples (see the "-s" option) e.g. "-d motor1.txt"
-
 
138
 * '''-v''': With this option, the tool will be much more verbose; it will indicate what it is doing. Also when an error occurs, the tool will provide more technical details (the callstack)
-
 
139
 
-
 
140
== The output ==
-
 
141
=== The results on the screen ===
-
 
142
Without the "-v" option, only the results of the test is displayed:
-
 
143
{{{
-
 
144
C:\DATA\temp\VibrationTestExe>VibrationTest COM5 1 100,150 6 -n Demo
-
 
145
      Demo Speed=100 U=12.1V Channel=AccRoll    Min=497 Max=506 pp=  9 *
-
 
146
      Demo Speed=150 U=11.9V Channel=AccRoll    Min=498 Max=508 pp= 10 **
-
 
147
}}}
-
 
148
 * "'''Demo'''" This is the name of the test as we provided with the "-n" option.
-
 
149
 * "'''Speed=100'''" Indicates the motor speed for this measurement
-
 
150
 * "'''U=12.1V'''" The measured battery voltage when the measurement was done
-
 
151
 * "'''Channel=AccRoll'''" The measured channel
-
 
152
 * "'''Min=497'''" Lowest value of all samples
-
 
153
 * "'''Max=506'''" Highest vale of all samples
-
 
154
 * "'''pp=9'''" Difference between Min and Max, this is the actual result
-
 
155
 * "'''**'''" The number of stars gives a quick indication of the pp-value
-
 
156
 
-
 
157
 
-
 
158
With the "-v" option more details are provided:
-
 
159
{{{
-
 
160
C:\DATA\temp\VibrationTestExe>VibrationTest COM5 1 100,150 6 -n Demo -v
-
 
161
comPort  = COM5
-
 
162
motors   = ['1']
-
 
163
minSpeed = 25
-
 
164
speeds   = ['100', '150']
-
 
165
channels = ['6']
-
 
166
nbSamples= 400
-
 
167
fileName = None
-
 
168
testName = Demo
-
 
169
Opening comPort...
-
 
170
Version: 0.74
-
 
171
Voltage: 12.1V
-
 
172
Minimum Voltage: 10.5V
-
 
173
Starting motor(s) (speed=25)...  OK
-
 
174
Setting speed to 100 ...
-
 
175
Getting data...        Demo Speed=100 U=12.1V Channel=AccRoll    Min=496 Max=508 pp= 12 **
-
 
176
Setting speed to 150 ...
-
 
177
Getting data...        Demo Speed=150 U=11.9V Channel=AccRoll    Min=497 Max=508 pp= 11 **
-
 
178
}}}
-
 
179
 
-
 
180
=== The dumped signal ===
-
 
181
The "-d" option allows to dump the measured signal in a text-file. This is a "comma-separated" text file that can easily be imported in MS Excel or OpenOffice Calc.   
-
 
182
 
-
 
183
[[Anchor(DumpedSignalJpg)]]
-
 
184
attachment:calc.jpg
-
 
185
 
-
 
186
1000 samples are acoputed in about 90ms (0.09 s), the time between samples is about 0.9 ms (0.00009 s).
-
 
187
Suppose the prop is spinning at 5000 RPM, this means 83 rotations per second. In 0.09s we have captured 7.5 rotations. We we take 400 of the 1000 samples we should see 7.5/1000*400 = 3 rotations of the prop.
-
 
188
 
-
 
189
 
-
 
190
== Proposed procedure to balance prop/motor assembly ==
-
 
191
First we need to find what what sensor provides the "best" footage of the vibrations. The largest signal is probably the best. Candidates are Gyro and Acc signals. My experience is that AccNick (channel 7) and especially AccRoll (channel 6) provide the nicest signal, but YMMV. The vibration will typically peak at a certain motor speed. So, first we perform a sweep between speeds 100 to 200 and look at channels 6 and 7 and choose a channel and speed we will concentrate on.
-
 
192
 
-
 
193
Next I check if the prop can be balanced a bit better. I stick small strips of tape to the prop, close to the center. One strip to the side where the prop-dimension is mentioned I denote as "-1", one strip on the other side, I denote "+1". I test different configurations and check what gives the best results for my chosen channel and speed.
-
 
194
 
-
 
195
Now that the prop is better balanced, I start to rotate the prop in relation to the motor. As names for the test I use "XsA" where "X" is the number of strips and "A" is the angle; e.g. "+1s60" means 2 strips (opposite to the prop-marking) and rotated by 60 degrees (compared to the starting position). Again I try to find the best position.
-
 
196
 
-
 
197
Once we have found the best rotation, we can rebalance the prop in the same way as before.
-
 
198
 
-
 
199
After all this we should have found the best combination. We can perform the swipe again to compare with the starting point.
-
 
200
 
-
 
201
 
-
 
202
=== Example 1 ===
-
 
203
This is an example with standard Roxxy 2824-34 motor with EPP 1045 prop.
-
 
204
[[BR]] 
-
 
205
 
-
 
206
Finding what sensor provides best information at what speed:
-
 
207
 
-
 
208
{{{
-
 
209
VibrationTest.py COM5 3 100-200:20 6,7
-
 
210
      Speed=100 U=11.3V Channel=AccRoll    Min=492 Max=505 pp= 13 **
-
 
211
      Speed=100 U=11.3V Channel=AccNick    Min=498 Max=507 pp=  9 *
-
 
212
      Speed=120 U=11.3V Channel=AccRoll    Min=489 Max=503 pp= 14 **
-
 
213
      Speed=120 U=11.3V Channel=AccNick    Min=497 Max=507 pp= 10 **
-
 
214
      Speed=140 U=11.2V Channel=AccRoll    Min=469 Max=519 pp= 50 **********        <<=======
-
 
215
      Speed=140 U=11.2V Channel=AccNick    Min=495 Max=508 pp= 13 **
-
 
216
      Speed=160 U=11.1V Channel=AccRoll    Min=478 Max=517 pp= 39 *******
-
 
217
      Speed=160 U=11.1V Channel=AccNick    Min=493 Max=511 pp= 18 ***
-
 
218
      Speed=180 U=10.9V Channel=AccRoll    Min=479 Max=511 pp= 32 ******
-
 
219
      Speed=180 U=10.9V Channel=AccNick    Min=493 Max=514 pp= 21 ****
-
 
220
      Speed=200 U=10.7V Channel=AccRoll    Min=479 Max=515 pp= 36 *******
-
 
221
      Speed=200 U=10.7V Channel=AccNick    Min=493 Max=513 pp= 20 ****
-
 
222
 
-
 
223
VibrationTest.py COM5 3 130-160:10 6
-
 
224
      Speed=130 U=11.1V Channel=AccRoll    Min=484 Max=511 pp= 27 *****
-
 
225
      Speed=140 U=11.1V Channel=AccRoll    Min=469 Max=524 pp= 55 ***********
-
 
226
      Speed=150 U=11.1V Channel=AccRoll    Min=475 Max=520 pp= 45 *********
-
 
227
      Speed=160 U=11.1V Channel=AccRoll    Min=479 Max=518 pp= 39 *******
-
 
228
}}}
-
 
229
So, lets concentrate on channel 6 (AccRoll) at speed 140.
-
 
230
 
-
 
231
 
-
 
232
Now, the preliminary balancing of the prop:
-
 
233
 
-
 
234
{{{
-
 
235
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 0s0
-
 
236
  0s0 Speed=140 U=11.0V Channel=AccRoll    Min=470 Max=521 pp= 51 **********
-
 
237
 
-
 
238
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 1s0
-
 
239
  1s0 Speed=140 U=11.0V Channel=AccRoll    Min=482 Max=513 pp= 31 ******
-
 
240
 
-
 
241
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 2s0
-
 
242
  2s0 Speed=140 U=11.0V Channel=AccRoll    Min=475 Max=520 pp= 45 *********
-
 
243
}}}
-
 
244
For now, 1 strip seems best.
-
 
245
 
-
 
246
Now, lets rotate the prop:
-
 
247
 
-
 
248
{{{
-
 
249
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 1s0
-
 
250
  1s0 Speed=140 U=10.9V Channel=AccRoll    Min=481 Max=513 pp= 32 ******
-
 
251
 
-
 
252
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 1s60
-
 
253
 1s60 Speed=140 U=10.9V Channel=AccRoll    Min=480 Max=512 pp= 32 ******
-
 
254
 
-
 
255
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 1s120
-
 
256
1s120 Speed=140 U=10.9V Channel=AccRoll    Min=477 Max=514 pp= 37 *******
-
 
257
 
-
 
258
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 1s180
-
 
259
1s180 Speed=140 U=10.9V Channel=AccRoll    Min=482 Max=509 pp= 27 *****
-
 
260
 
-
 
261
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 1s240
-
 
262
1s240 Speed=140 U=10.9V Channel=AccRoll    Min=482 Max=510 pp= 28 *****
-
 
263
 
-
 
264
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 1s300
-
 
265
1s300 Speed=140 U=10.9V Channel=AccRoll    Min=482 Max=514 pp= 32 ******
-
 
266
 
-
 
267
VibrationTest.py COM5 3 140 6,6,6 -d motor3.txt -n 1s360
-
 
268
1s360 Speed=140 U=10.9V Channel=AccRoll    Min=482 Max=515 pp= 33 ******
-
 
269
}}}
-
 
270
Rotating the prop by 180 degrees produces best results, now lets try to balance the prop again:
-
 
271
 
-
 
272
{{{
-
 
273
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 1s180
-
 
274
1s180 Speed=140 U=10.9V Channel=AccRoll    Min=483 Max=509 pp= 26 *****
-
 
275
 
-
 
276
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 0s180
-
 
277
0s180 Speed=140 U=10.9V Channel=AccRoll    Min=472 Max=519 pp= 47 *********
-
 
278
 
-
 
279
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 1s180
-
 
280
1s180 Speed=140 U=10.9V Channel=AccRoll    Min=483 Max=510 pp= 27 *****
-
 
281
 
-
 
282
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 2s180
-
 
283
2s180 Speed=140 U=10.9V Channel=AccRoll    Min=489 Max=508 pp= 19 ***
-
 
284
 
-
 
285
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 3s180
-
 
286
3s180 Speed=140 U=10.9V Channel=AccRoll    Min=483 Max=512 pp= 29 *****
-
 
287
}}}
-
 
288
So, 2 stickers is best, let's verify again:
-
 
289
 
-
 
290
{{{
-
 
291
VibrationTest.py COM5 3 140 6 -d motor3.txt -n 2s180
-
 
292
2s180 Speed=140 U=10.9V Channel=AccRoll    Min=488 Max=508 pp= 20 ****
-
 
293
 
-
 
294
VibrationTest.py COM5 3 140 6 -d motor3.txt -n end
-
 
Line 295... Line -...
295
  end Speed=140 U=10.8V Channel=AccRoll    Min=487 Max=510 pp= 23 ****
-
 
296
}}}
-
 
297
 
-
 
298
[[BR]]
-
 
299
Now, we can perform a sweep in order to compare with the starting-point:
-
 
300
 
-
 
301
{{{
-
 
302
VibrationTest.py COM5 3 100-200:20 6,7
-
 
303
       Speed=100 U=11.1V Channel=AccRoll    Min=493 Max=501 pp=  8 *
-
 
304
       Speed=100 U=11.1V Channel=AccNick    Min=499 Max=507 pp=  8 *
-
 
305
       Speed=120 U=11.1V Channel=AccRoll    Min=489 Max=507 pp= 18 ***
-
 
306
       Speed=120 U=11.1V Channel=AccNick    Min=497 Max=508 pp= 11 **
-
 
307
       Speed=140 U=11.0V Channel=AccRoll    Min=489 Max=507 pp= 18 ***
-
 
308
       Speed=140 U=11.0V Channel=AccNick    Min=498 Max=509 pp= 11 **
-
 
309
       Speed=160 U=10.9V Channel=AccRoll    Min=482 Max=508 pp= 26 *****
-
 
310
       Speed=160 U=10.9V Channel=AccNick    Min=496 Max=510 pp= 14 **
84
/!\ '''This video needs updating as it does not use the latest version of the VibrationTool''' /!\
311
       Speed=180 U=10.7V Channel=AccRoll    Min=489 Max=505 pp= 16 ***
85
[[Vimeo(6948282)]]
312
       Speed=180 U=10.7V Channel=AccNick    Min=495 Max=508 pp= 13 **
86
 
313
       Speed=200 U=10.6V Channel=AccRoll    Min=482 Max=508 pp= 26 *****
87
== Balancing Examples ==
314
       Speed=200 U=10.6V Channel=AccNick    Min=491 Max=509 pp= 18 ***
88
[[Vimeo(7011506)]]