Browse Source

The mathplotlib output modified to show multiple subplots. A new capacitor added to the schematics.

klaute 2 years ago
parent
commit
29a93cfda8
5 changed files with 266 additions and 166 deletions
  1. 31
    3
      pcb/TenaTesta_ZL1CVD.kicad_pcb
  2. 108
    100
      pcb/TenaTesta_ZL1CVD.net
  3. 85
    38
      pcb/TenaTesta_ZL1CVD.sch
  4. 42
    13
      tools/meas.py
  5. 0
    12
      tools/test.py

+ 31
- 3
pcb/TenaTesta_ZL1CVD.kicad_pcb View File

@@ -1,14 +1,14 @@
1 1
 (kicad_pcb (version 4) (host pcbnew 4.0.2+dfsg1-2~bpo8+1-stable)
2 2
 
3 3
   (general
4
-    (links 55)
5
-    (no_connects 55)
4
+    (links 57)
5
+    (no_connects 57)
6 6
     (area 78.05188 66.6095 138.331334 151.666333)
7 7
     (thickness 1.6)
8 8
     (drawings 0)
9 9
     (tracks 7)
10 10
     (zones 0)
11
-    (modules 28)
11
+    (modules 29)
12 12
     (nets 42)
13 13
   )
14 14
 
@@ -1113,6 +1113,34 @@
1113 1113
     )
1114 1114
   )
1115 1115
 
1116
+  (module Capacitors_ThroughHole:C_Disc_D3_P2.5 (layer F.Cu) (tedit 0) (tstamp 57E8C5B7)
1117
+    (at 127.127 121.031)
1118
+    (descr "Capacitor 3mm Disc, Pitch 2.5mm")
1119
+    (tags Capacitor)
1120
+    (path /57E8D2EB)
1121
+    (fp_text reference C8 (at 1.25 -2.5) (layer F.SilkS)
1122
+      (effects (font (size 1 1) (thickness 0.15)))
1123
+    )
1124
+    (fp_text value 100n (at 1.25 2.5) (layer F.Fab)
1125
+      (effects (font (size 1 1) (thickness 0.15)))
1126
+    )
1127
+    (fp_line (start -0.9 -1.5) (end 3.4 -1.5) (layer F.CrtYd) (width 0.05))
1128
+    (fp_line (start 3.4 -1.5) (end 3.4 1.5) (layer F.CrtYd) (width 0.05))
1129
+    (fp_line (start 3.4 1.5) (end -0.9 1.5) (layer F.CrtYd) (width 0.05))
1130
+    (fp_line (start -0.9 1.5) (end -0.9 -1.5) (layer F.CrtYd) (width 0.05))
1131
+    (fp_line (start -0.25 -1.25) (end 2.75 -1.25) (layer F.SilkS) (width 0.15))
1132
+    (fp_line (start 2.75 1.25) (end -0.25 1.25) (layer F.SilkS) (width 0.15))
1133
+    (pad 1 thru_hole rect (at 0 0) (size 1.3 1.3) (drill 0.8) (layers *.Cu *.Mask F.SilkS)
1134
+      (net 1 GND))
1135
+    (pad 2 thru_hole circle (at 2.5 0) (size 1.3 1.3) (drill 0.8001) (layers *.Cu *.Mask F.SilkS)
1136
+      (net 9 +5V))
1137
+    (model Capacitors_ThroughHole.3dshapes/C_Disc_D3_P2.5.wrl
1138
+      (at (xyz 0.0492126 0 0))
1139
+      (scale (xyz 1 1 1))
1140
+      (rotate (xyz 0 0 0))
1141
+    )
1142
+  )
1143
+
1116 1144
   (segment (start 116.586 121.031) (end 116.586 120.5186) (width 0.25) (layer B.Cu) (net 1))
1117 1145
   (segment (start 129.159 77.978) (end 129.159 77.3835) (width 0.25) (layer B.Cu) (net 1))
1118 1146
   (segment (start 82.296 116.078) (end 82.677 116.459) (width 0.25) (layer B.Cu) (net 1))

+ 108
- 100
pcb/TenaTesta_ZL1CVD.net View File

@@ -1,7 +1,7 @@
1 1
 (export (version D)
2 2
   (design
3
-    (source /media/win/Users/klaute/dev/ham/TenaTesta/pcb/TenaTesta_ZL1CVD.sch)
4
-    (date "Sa 17 Sep 2016 19:54:43 CEST")
3
+    (source /media/win/Users/klaute/dev/ham/SWRMeter/pcb/TenaTesta_ZL1CVD.sch)
4
+    (date "Mo 26 Sep 2016 08:51:49 CEST")
5 5
     (tool "Eeschema 4.0.2+dfsg1-2~bpo8+1-stable")
6 6
     (sheet (number 1) (name /) (tstamps /)
7 7
       (title_block
@@ -182,7 +182,13 @@
182 182
       (footprint Buttons_Switches_ThroughHole:SW_PUSH_SMALL)
183 183
       (libsource (lib device) (part SW_PUSH))
184 184
       (sheetpath (names /) (tstamps /))
185
-      (tstamp 57D8B330)))
185
+      (tstamp 57D8B330))
186
+    (comp (ref C8)
187
+      (value 100n)
188
+      (footprint Capacitors_ThroughHole:C_Disc_D3_P2.5)
189
+      (libsource (lib device) (part C))
190
+      (sheetpath (names /) (tstamps /))
191
+      (tstamp 57E8D2EB)))
186 192
   (libparts
187 193
     (libpart (lib conn) (part BNC)
188 194
       (footprints
@@ -335,143 +341,145 @@
335 341
   (libraries
336 342
     (library (logical device)
337 343
       (uri /usr/share/kicad/library/device.lib))
338
-    (library (logical linear)
339
-      (uri /usr/share/kicad/library/linear.lib))
340 344
     (library (logical conn)
341
-      (uri /usr/share/kicad/library/conn.lib)))
345
+      (uri /usr/share/kicad/library/conn.lib))
346
+    (library (logical linear)
347
+      (uri /usr/share/kicad/library/linear.lib)))
342 348
   (nets
343
-    (net (code 1) (name /A0)
344
-      (node (ref U1) (pin 7))
345
-      (node (ref P5) (pin 12))
346
-      (node (ref R6) (pin 1))
347
-      (node (ref P2) (pin 1)))
348
-    (net (code 2) (name +5V)
349
-      (node (ref P4) (pin 7))
350
-      (node (ref C6) (pin 2))
351
-      (node (ref P5) (pin 4))
352
-      (node (ref U1) (pin 8)))
353
-    (net (code 3) (name GND)
354
-      (node (ref R5) (pin 2))
355
-      (node (ref P3) (pin 4))
356
-      (node (ref P5) (pin 2))
357
-      (node (ref R8) (pin 2))
358
-      (node (ref P6) (pin 1))
359
-      (node (ref P6) (pin 3))
360
-      (node (ref SW1) (pin 1))
349
+    (net (code 1) (name "Net-(P3-Pad5)")
350
+      (node (ref P3) (pin 5)))
351
+    (net (code 2) (name GND)
352
+      (node (ref U1) (pin 4))
361 353
       (node (ref C5) (pin 1))
362
-      (node (ref P1) (pin 2))
363
-      (node (ref C3) (pin 1))
364 354
       (node (ref C1) (pin 1))
365
-      (node (ref U1) (pin 4))
366
-      (node (ref R1) (pin 2))
355
+      (node (ref C3) (pin 1))
356
+      (node (ref P1) (pin 2))
367 357
       (node (ref C7) (pin 2))
368
-      (node (ref R10) (pin 1))
358
+      (node (ref C8) (pin 1))
359
+      (node (ref SW1) (pin 1))
360
+      (node (ref P4) (pin 6))
361
+      (node (ref P6) (pin 1))
362
+      (node (ref P6) (pin 3))
363
+      (node (ref R5) (pin 2))
364
+      (node (ref R1) (pin 2))
365
+      (node (ref R8) (pin 2))
369 366
       (node (ref R3) (pin 2))
370
-      (node (ref C6) (pin 1))
371
-      (node (ref P4) (pin 6)))
372
-    (net (code 4) (name "Net-(P3-Pad1)")
367
+      (node (ref R10) (pin 1))
368
+      (node (ref P5) (pin 2))
369
+      (node (ref P3) (pin 4))
370
+      (node (ref C6) (pin 1)))
371
+    (net (code 3) (name "Net-(P3-Pad1)")
373 372
       (node (ref P3) (pin 1)))
374
-    (net (code 5) (name "Net-(P3-Pad2)")
373
+    (net (code 4) (name "Net-(P3-Pad2)")
375 374
       (node (ref P3) (pin 2)))
376
-    (net (code 6) (name "Net-(P3-Pad3)")
375
+    (net (code 5) (name "Net-(P3-Pad3)")
377 376
       (node (ref P3) (pin 3)))
378
-    (net (code 7) (name "Net-(P3-Pad5)")
379
-      (node (ref P3) (pin 5)))
380
-    (net (code 8) (name "Net-(P3-Pad6)")
377
+    (net (code 6) (name "Net-(P3-Pad6)")
381 378
       (node (ref P3) (pin 6)))
382
-    (net (code 9) (name "Net-(P3-Pad7)")
379
+    (net (code 7) (name "Net-(P3-Pad7)")
383 380
       (node (ref P3) (pin 7)))
384
-    (net (code 10) (name "Net-(P3-Pad8)")
381
+    (net (code 8) (name "Net-(P3-Pad8)")
385 382
       (node (ref P3) (pin 8)))
386
-    (net (code 11) (name "Net-(P3-Pad9)")
383
+    (net (code 9) (name "Net-(P3-Pad9)")
387 384
       (node (ref P3) (pin 9)))
388
-    (net (code 12) (name "Net-(P3-Pad10)")
385
+    (net (code 10) (name "Net-(P3-Pad10)")
389 386
       (node (ref P3) (pin 10)))
390
-    (net (code 13) (name "Net-(P3-Pad11)")
387
+    (net (code 11) (name "Net-(P3-Pad11)")
391 388
       (node (ref P3) (pin 11)))
392
-    (net (code 14) (name "Net-(P3-Pad12)")
389
+    (net (code 12) (name "Net-(P3-Pad12)")
393 390
       (node (ref P3) (pin 12)))
394
-    (net (code 15) (name "Net-(P3-Pad13)")
391
+    (net (code 13) (name "Net-(P3-Pad13)")
395 392
       (node (ref P3) (pin 13)))
396
-    (net (code 16) (name "Net-(P3-Pad14)")
393
+    (net (code 14) (name "Net-(P3-Pad14)")
397 394
       (node (ref P3) (pin 14)))
398
-    (net (code 17) (name /SDA)
399
-      (node (ref P4) (pin 5))
400
-      (node (ref P5) (pin 8)))
401
-    (net (code 18) (name /CLK0)
402
-      (node (ref P4) (pin 1))
403
-      (node (ref P6) (pin 2))
404
-      (node (ref C4) (pin 1)))
395
+    (net (code 15) (name "Net-(P3-Pad15)")
396
+      (node (ref P3) (pin 15)))
397
+    (net (code 16) (name "Net-(P5-Pad1)")
398
+      (node (ref P5) (pin 1)))
399
+    (net (code 17) (name /RESET)
400
+      (node (ref P5) (pin 3))
401
+      (node (ref SW1) (pin 2)))
402
+    (net (code 18) (name "Net-(P5-Pad5)")
403
+      (node (ref P5) (pin 5)))
405 404
     (net (code 19) (name /CLK1)
406 405
       (node (ref P4) (pin 2)))
407 406
     (net (code 20) (name /CLK2)
408 407
       (node (ref P4) (pin 3)))
409 408
     (net (code 21) (name /SCL)
410
-      (node (ref P4) (pin 4))
411
-      (node (ref P5) (pin 7)))
412
-    (net (code 22) (name "Net-(P3-Pad15)")
413
-      (node (ref P3) (pin 15)))
414
-    (net (code 23) (name "Net-(R1-Pad1)")
415
-      (node (ref U1) (pin 2))
416
-      (node (ref R1) (pin 1))
417
-      (node (ref R2) (pin 2)))
418
-    (net (code 24) (name "Net-(R5-Pad1)")
419
-      (node (ref R6) (pin 2))
420
-      (node (ref R5) (pin 1))
421
-      (node (ref U1) (pin 6)))
422
-    (net (code 25) (name /A1)
423
-      (node (ref P5) (pin 11))
424
-      (node (ref P2) (pin 2))
425
-      (node (ref R2) (pin 1))
426
-      (node (ref U1) (pin 1)))
427
-    (net (code 26) (name /RESET)
428
-      (node (ref P5) (pin 3))
429
-      (node (ref SW1) (pin 2)))
430
-    (net (code 27) (name "Net-(P5-Pad15)")
431
-      (node (ref P5) (pin 15)))
432
-    (net (code 28) (name "Net-(P5-Pad1)")
433
-      (node (ref P5) (pin 1)))
434
-    (net (code 29) (name "Net-(P5-Pad5)")
435
-      (node (ref P5) (pin 5)))
436
-    (net (code 30) (name "Net-(P5-Pad6)")
409
+      (node (ref P5) (pin 7))
410
+      (node (ref P4) (pin 4)))
411
+    (net (code 22) (name /SDA)
412
+      (node (ref P4) (pin 5))
413
+      (node (ref P5) (pin 8)))
414
+    (net (code 23) (name +5V)
415
+      (node (ref P5) (pin 4))
416
+      (node (ref P4) (pin 7))
417
+      (node (ref C6) (pin 2))
418
+      (node (ref C8) (pin 2))
419
+      (node (ref U1) (pin 8)))
420
+    (net (code 24) (name "Net-(P5-Pad6)")
437 421
       (node (ref P5) (pin 6)))
438
-    (net (code 31) (name "Net-(P5-Pad9)")
422
+    (net (code 25) (name /CLK0)
423
+      (node (ref P6) (pin 2))
424
+      (node (ref C4) (pin 1))
425
+      (node (ref P4) (pin 1)))
426
+    (net (code 26) (name "Net-(C7-Pad1)")
427
+      (node (ref C7) (pin 1))
428
+      (node (ref P5) (pin 13)))
429
+    (net (code 27) (name "Net-(P5-Pad9)")
439 430
       (node (ref P5) (pin 9)))
440
-    (net (code 32) (name "Net-(P5-Pad10)")
431
+    (net (code 28) (name "Net-(P5-Pad10)")
441 432
       (node (ref P5) (pin 10)))
442
-    (net (code 33) (name "Net-(P5-Pad14)")
433
+    (net (code 29) (name "Net-(P5-Pad14)")
443 434
       (node (ref P5) (pin 14)))
444
-    (net (code 34) (name "Net-(C7-Pad1)")
445
-      (node (ref C7) (pin 1))
446
-      (node (ref P5) (pin 13)))
435
+    (net (code 30) (name "Net-(P5-Pad15)")
436
+      (node (ref P5) (pin 15)))
437
+    (net (code 31) (name /A1)
438
+      (node (ref P5) (pin 11))
439
+      (node (ref U1) (pin 1))
440
+      (node (ref R2) (pin 1))
441
+      (node (ref P2) (pin 2)))
442
+    (net (code 32) (name "Net-(R1-Pad1)")
443
+      (node (ref U1) (pin 2))
444
+      (node (ref R2) (pin 2))
445
+      (node (ref R1) (pin 1)))
446
+    (net (code 33) (name "Net-(R5-Pad1)")
447
+      (node (ref R6) (pin 2))
448
+      (node (ref R5) (pin 1))
449
+      (node (ref U1) (pin 6)))
450
+    (net (code 34) (name /A0)
451
+      (node (ref U1) (pin 7))
452
+      (node (ref P2) (pin 1))
453
+      (node (ref R6) (pin 1))
454
+      (node (ref P5) (pin 12)))
447 455
     (net (code 35) (name "Net-(C2-Pad2)")
448
-      (node (ref R7) (pin 2))
449 456
       (node (ref P1) (pin 1))
457
+      (node (ref R7) (pin 2))
450 458
       (node (ref C2) (pin 2)))
451 459
     (net (code 36) (name "Net-(C4-Pad2)")
452
-      (node (ref R9) (pin 2))
460
+      (node (ref R7) (pin 1))
453 461
       (node (ref C4) (pin 2))
454
-      (node (ref R7) (pin 1)))
462
+      (node (ref R9) (pin 2)))
455 463
     (net (code 37) (name "Net-(C5-Pad2)")
456
-      (node (ref C5) (pin 2))
464
+      (node (ref R11) (pin 2))
457 465
       (node (ref D2) (pin 1))
458
-      (node (ref R11) (pin 2)))
466
+      (node (ref C5) (pin 2)))
459 467
     (net (code 38) (name "Net-(C1-Pad2)")
460
-      (node (ref U1) (pin 3))
468
+      (node (ref R4) (pin 1))
461 469
       (node (ref R3) (pin 1))
462
-      (node (ref C1) (pin 2))
463
-      (node (ref R4) (pin 1)))
470
+      (node (ref U1) (pin 3))
471
+      (node (ref C1) (pin 2)))
464 472
     (net (code 39) (name "Net-(C3-Pad2)")
465
-      (node (ref R8) (pin 1))
466
-      (node (ref R11) (pin 1))
473
+      (node (ref U1) (pin 5))
467 474
       (node (ref C3) (pin 2))
468
-      (node (ref U1) (pin 5)))
475
+      (node (ref R8) (pin 1))
476
+      (node (ref R11) (pin 1)))
469 477
     (net (code 40) (name "Net-(C2-Pad1)")
470
-      (node (ref R4) (pin 2))
471 478
       (node (ref D1) (pin 1))
472
-      (node (ref C2) (pin 1)))
479
+      (node (ref C2) (pin 1))
480
+      (node (ref R4) (pin 2)))
473 481
     (net (code 41) (name "Net-(D1-Pad2)")
482
+      (node (ref R10) (pin 2))
474 483
       (node (ref D1) (pin 2))
475
-      (node (ref D2) (pin 2))
476 484
       (node (ref R9) (pin 1))
477
-      (node (ref R10) (pin 2)))))
485
+      (node (ref D2) (pin 2)))))

+ 85
- 38
pcb/TenaTesta_ZL1CVD.sch View File

@@ -266,10 +266,10 @@ $EndComp
266 266
 Wire Wire Line
267 267
 	5150 2250 4200 2250
268 268
 $Comp
269
-L GND #PWR01
269
+L GND #PWR8
270 270
 U 1 1 57D82504
271 271
 P 5300 2550
272
-F 0 "#PWR01" H 5300 2300 50  0001 C CNN
272
+F 0 "#PWR8" H 5300 2300 50  0001 C CNN
273 273
 F 1 "GND" H 5300 2400 50  0000 C CNN
274 274
 F 2 "" H 5300 2550 50  0000 C CNN
275 275
 F 3 "" H 5300 2550 50  0000 C CNN
@@ -335,10 +335,10 @@ Connection ~ 2550 3000
335 335
 Wire Wire Line
336 336
 	2550 3950 2550 3600
337 337
 $Comp
338
-L GND #PWR02
338
+L GND #PWR3
339 339
 U 1 1 57D83353
340 340
 P 3450 3700
341
-F 0 "#PWR02" H 3450 3450 50  0001 C CNN
341
+F 0 "#PWR3" H 3450 3450 50  0001 C CNN
342 342
 F 1 "GND" H 3450 3550 50  0000 C CNN
343 343
 F 2 "" H 3450 3700 50  0000 C CNN
344 344
 F 3 "" H 3450 3700 50  0000 C CNN
@@ -346,10 +346,10 @@ F 3 "" H 3450 3700 50  0000 C CNN
346 346
 	-1   0    0    -1  
347 347
 $EndComp
348 348
 $Comp
349
-L GND #PWR03
349
+L GND #PWR1
350 350
 U 1 1 57D833E2
351 351
 P 2000 3700
352
-F 0 "#PWR03" H 2000 3450 50  0001 C CNN
352
+F 0 "#PWR1" H 2000 3450 50  0001 C CNN
353 353
 F 1 "GND" H 2000 3550 50  0000 C CNN
354 354
 F 2 "" H 2000 3700 50  0000 C CNN
355 355
 F 3 "" H 2000 3700 50  0000 C CNN
@@ -371,10 +371,10 @@ Wire Wire Line
371 371
 	4150 4950 3650 4950
372 372
 Connection ~ 4150 4950
373 373
 $Comp
374
-L GND #PWR04
374
+L GND #PWR7
375 375
 U 1 1 57D83F2B
376 376
 P 5200 5350
377
-F 0 "#PWR04" H 5200 5100 50  0001 C CNN
377
+F 0 "#PWR7" H 5200 5100 50  0001 C CNN
378 378
 F 1 "GND" H 5200 5200 50  0000 C CNN
379 379
 F 2 "" H 5200 5350 50  0000 C CNN
380 380
 F 3 "" H 5200 5350 50  0000 C CNN
@@ -382,10 +382,10 @@ F 3 "" H 5200 5350 50  0000 C CNN
382 382
 	-1   0    0    -1  
383 383
 $EndComp
384 384
 $Comp
385
-L GND #PWR05
385
+L GND #PWR4
386 386
 U 1 1 57D84180
387 387
 P 3950 5350
388
-F 0 "#PWR05" H 3950 5100 50  0001 C CNN
388
+F 0 "#PWR4" H 3950 5100 50  0001 C CNN
389 389
 F 1 "GND" H 3950 5200 50  0000 C CNN
390 390
 F 2 "" H 3950 5350 50  0000 C CNN
391 391
 F 3 "" H 3950 5350 50  0000 C CNN
@@ -410,10 +410,10 @@ Wire Wire Line
410 410
 	4800 5650 4800 5750
411 411
 Connection ~ 4800 5750
412 412
 $Comp
413
-L +5V #PWR06
413
+L +5V #PWR2
414 414
 U 1 1 57D84814
415 415
 P 3150 5150
416
-F 0 "#PWR06" H 3150 5000 50  0001 C CNN
416
+F 0 "#PWR2" H 3150 5000 50  0001 C CNN
417 417
 F 1 "+5V" H 3150 5290 50  0000 C CNN
418 418
 F 2 "" H 3150 5150 50  0000 C CNN
419 419
 F 3 "" H 3150 5150 50  0000 C CNN
@@ -446,10 +446,10 @@ Wire Wire Line
446 446
 Wire Wire Line
447 447
 	9900 2050 10000 2050
448 448
 $Comp
449
-L GND #PWR07
449
+L GND #PWR18
450 450
 U 1 1 57D854FE
451 451
 P 9900 2150
452
-F 0 "#PWR07" H 9900 1900 50  0001 C CNN
452
+F 0 "#PWR18" H 9900 1900 50  0001 C CNN
453 453
 F 1 "GND" H 9900 2000 50  0000 C CNN
454 454
 F 2 "" H 9900 2150 50  0000 C CNN
455 455
 F 3 "" H 9900 2150 50  0000 C CNN
@@ -485,10 +485,10 @@ Wire Wire Line
485 485
 Wire Wire Line
486 486
 	7800 2300 8100 2300
487 487
 $Comp
488
-L +5V #PWR08
488
+L +5V #PWR12
489 489
 U 1 1 57D85B32
490 490
 P 7800 2300
491
-F 0 "#PWR08" H 7800 2150 50  0001 C CNN
491
+F 0 "#PWR12" H 7800 2150 50  0001 C CNN
492 492
 F 1 "+5V" H 7800 2440 50  0000 C CNN
493 493
 F 2 "" H 7800 2300 50  0000 C CNN
494 494
 F 3 "" H 7800 2300 50  0000 C CNN
@@ -496,10 +496,10 @@ F 3 "" H 7800 2300 50  0000 C CNN
496 496
 	0    -1   -1   0   
497 497
 $EndComp
498 498
 $Comp
499
-L GND #PWR09
499
+L GND #PWR14
500 500
 U 1 1 57D85C77
501 501
 P 8000 2400
502
-F 0 "#PWR09" H 8000 2150 50  0001 C CNN
502
+F 0 "#PWR14" H 8000 2150 50  0001 C CNN
503 503
 F 1 "GND" H 8000 2250 50  0000 C CNN
504 504
 F 2 "" H 8000 2400 50  0000 C CNN
505 505
 F 3 "" H 8000 2400 50  0000 C CNN
@@ -522,10 +522,10 @@ F 3 "" H 7350 2050 50  0000 C CNN
522 522
 	-1   0    0    1   
523 523
 $EndComp
524 524
 $Comp
525
-L +5V #PWR010
525
+L +5V #PWR10
526 526
 U 1 1 57D85E0F
527 527
 P 7350 1800
528
-F 0 "#PWR010" H 7350 1650 50  0001 C CNN
528
+F 0 "#PWR10" H 7350 1650 50  0001 C CNN
529 529
 F 1 "+5V" H 7350 1940 50  0000 C CNN
530 530
 F 2 "" H 7350 1800 50  0000 C CNN
531 531
 F 3 "" H 7350 1800 50  0000 C CNN
@@ -533,10 +533,10 @@ F 3 "" H 7350 1800 50  0000 C CNN
533 533
 	1    0    0    -1  
534 534
 $EndComp
535 535
 $Comp
536
-L GND #PWR011
536
+L GND #PWR11
537 537
 U 1 1 57D85E65
538 538
 P 7350 2300
539
-F 0 "#PWR011" H 7350 2050 50  0001 C CNN
539
+F 0 "#PWR11" H 7350 2050 50  0001 C CNN
540 540
 F 1 "GND" H 7350 2150 50  0000 C CNN
541 541
 F 2 "" H 7350 2300 50  0000 C CNN
542 542
 F 3 "" H 7350 2300 50  0000 C CNN
@@ -560,10 +560,10 @@ SDA
560 560
 Wire Wire Line
561 561
 	8000 4050 8200 4050
562 562
 $Comp
563
-L GND #PWR012
563
+L GND #PWR15
564 564
 U 1 1 57D86AF6
565 565
 P 8000 4050
566
-F 0 "#PWR012" H 8000 3800 50  0001 C CNN
566
+F 0 "#PWR15" H 8000 3800 50  0001 C CNN
567 567
 F 1 "GND" H 8000 3900 50  0000 C CNN
568 568
 F 2 "" H 8000 4050 50  0000 C CNN
569 569
 F 3 "" H 8000 4050 50  0000 C CNN
@@ -571,10 +571,10 @@ F 3 "" H 8000 4050 50  0000 C CNN
571 571
 	0    1    1    0   
572 572
 $EndComp
573 573
 $Comp
574
-L +5V #PWR013
574
+L +5V #PWR17
575 575
 U 1 1 57D86BE1
576 576
 P 9500 4050
577
-F 0 "#PWR013" H 9500 3900 50  0001 C CNN
577
+F 0 "#PWR17" H 9500 3900 50  0001 C CNN
578 578
 F 1 "+5V" H 9500 4190 50  0000 C CNN
579 579
 F 2 "" H 9500 4050 50  0000 C CNN
580 580
 F 3 "" H 9500 4050 50  0000 C CNN
@@ -584,10 +584,10 @@ $EndComp
584 584
 Wire Wire Line
585 585
 	9300 4050 9500 4050
586 586
 $Comp
587
-L GND #PWR014
587
+L GND #PWR16
588 588
 U 1 1 57D86CAF
589 589
 P 9500 3850
590
-F 0 "#PWR014" H 9500 3600 50  0001 C CNN
590
+F 0 "#PWR16" H 9500 3600 50  0001 C CNN
591 591
 F 1 "GND" H 9500 3700 50  0000 C CNN
592 592
 F 2 "" H 9500 3850 50  0000 C CNN
593 593
 F 3 "" H 9500 3850 50  0000 C CNN
@@ -658,10 +658,10 @@ $EndComp
658 658
 Wire Wire Line
659 659
 	9300 4950 9600 4950
660 660
 $Comp
661
-L GND #PWR015
661
+L GND #PWR19
662 662
 U 1 1 57D88248
663 663
 P 10000 4950
664
-F 0 "#PWR015" H 10000 4700 50  0001 C CNN
664
+F 0 "#PWR19" H 10000 4700 50  0001 C CNN
665 665
 F 1 "GND" H 10000 4800 50  0000 C CNN
666 666
 F 2 "" H 10000 4950 50  0000 C CNN
667 667
 F 3 "" H 10000 4950 50  0000 C CNN
@@ -671,10 +671,10 @@ $EndComp
671 671
 Wire Wire Line
672 672
 	9900 4950 10000 4950
673 673
 $Comp
674
-L +5V #PWR016
674
+L +5V #PWR6
675 675
 U 1 1 57D888AD
676 676
 P 4400 5150
677
-F 0 "#PWR016" H 4400 5000 50  0001 C CNN
677
+F 0 "#PWR6" H 4400 5000 50  0001 C CNN
678 678
 F 1 "+5V" H 4400 5290 50  0000 C CNN
679 679
 F 2 "" H 4400 5150 50  0000 C CNN
680 680
 F 3 "" H 4400 5150 50  0000 C CNN
@@ -728,10 +728,10 @@ Si5351 breakout board
728 728
 Text Notes 5400 2050 2    60   ~ 0
729 729
 ANT
730 730
 $Comp
731
-L GND #PWR017
731
+L GND #PWR5
732 732
 U 1 1 57D8AC18
733 733
 P 4250 4200
734
-F 0 "#PWR017" H 4250 3950 50  0001 C CNN
734
+F 0 "#PWR5" H 4250 3950 50  0001 C CNN
735 735
 F 1 "GND" H 4250 4050 50  0000 C CNN
736 736
 F 2 "" H 4250 4200 50  0000 C CNN
737 737
 F 3 "" H 4250 4200 50  0000 C CNN
@@ -739,10 +739,10 @@ F 3 "" H 4250 4200 50  0000 C CNN
739 739
 	0    -1   1    0   
740 740
 $EndComp
741 741
 $Comp
742
-L GND #PWR018
742
+L GND #PWR9
743 743
 U 1 1 57D8ACE7
744 744
 P 5500 4200
745
-F 0 "#PWR018" H 5500 3950 50  0001 C CNN
745
+F 0 "#PWR9" H 5500 3950 50  0001 C CNN
746 746
 F 1 "GND" H 5500 4050 50  0000 C CNN
747 747
 F 2 "" H 5500 4200 50  0000 C CNN
748 748
 F 3 "" H 5500 4200 50  0000 C CNN
@@ -769,10 +769,10 @@ Wire Wire Line
769 769
 Text Label 8850 6150 0    60   ~ 0
770 770
 RESET
771 771
 $Comp
772
-L GND #PWR019
772
+L GND #PWR13
773 773
 U 1 1 57D8B741
774 774
 P 7900 6150
775
-F 0 "#PWR019" H 7900 5900 50  0001 C CNN
775
+F 0 "#PWR13" H 7900 5900 50  0001 C CNN
776 776
 F 1 "GND" H 7900 6000 50  0000 C CNN
777 777
 F 2 "" H 7900 6150 50  0000 C CNN
778 778
 F 3 "" H 7900 6150 50  0000 C CNN
@@ -787,4 +787,51 @@ Text Notes 8000 5950 0    60   ~ 0
787 787
 Arduino reset
788 788
 Text Notes 4300 2050 2    60   ~ 0
789 789
 Wheatstone impedance bridge
790
+Wire Notes Line
791
+	8600 5200 8900 5200
792
+Wire Notes Line
793
+	8900 5200 8900 5500
794
+Wire Notes Line
795
+	8900 5500 8600 5500
796
+Wire Notes Line
797
+	8600 5500 8600 5200
798
+Text Notes 8600 5450 0    99   ~ 0
799
+USB
800
+$Comp
801
+L C C8
802
+U 1 1 57E8D2EB
803
+P 10650 4350
804
+F 0 "C8" H 10675 4450 50  0000 L CNN
805
+F 1 "100n" H 10675 4250 50  0000 L CNN
806
+F 2 "Capacitors_ThroughHole:C_Disc_D3_P2.5" H 10688 4200 50  0001 C CNN
807
+F 3 "" H 10650 4350 50  0000 C CNN
808
+	1    10650 4350
809
+	-1   0    0    1   
810
+$EndComp
811
+$Comp
812
+L +5V #PWR20
813
+U 1 1 57E8D54F
814
+P 10650 4100
815
+F 0 "#PWR20" H 10650 3950 50  0001 C CNN
816
+F 1 "+5V" H 10650 4240 50  0000 C CNN
817
+F 2 "" H 10650 4100 50  0000 C CNN
818
+F 3 "" H 10650 4100 50  0000 C CNN
819
+	1    10650 4100
820
+	1    0    0    -1  
821
+$EndComp
822
+$Comp
823
+L GND #PWR21
824
+U 1 1 57E8D5B4
825
+P 10650 4600
826
+F 0 "#PWR21" H 10650 4350 50  0001 C CNN
827
+F 1 "GND" H 10650 4450 50  0000 C CNN
828
+F 2 "" H 10650 4600 50  0000 C CNN
829
+F 3 "" H 10650 4600 50  0000 C CNN
830
+	1    10650 4600
831
+	1    0    0    -1  
832
+$EndComp
833
+Wire Wire Line
834
+	10650 4100 10650 4200
835
+Wire Wire Line
836
+	10650 4600 10650 4500
790 837
 $EndSCHEMATC

+ 42
- 13
tools/meas.py View File

@@ -9,6 +9,7 @@ import copy
9 9
 import binascii
10 10
 import matplotlib.pyplot as plt
11 11
 import math
12
+import operator
12 13
 
13 14
 ###############################################################################
14 15
 
@@ -499,7 +500,9 @@ if __name__ == "__main__":
499 500
           meas_freq = []
500 501
           meas_ratio = []
501 502
           meas_r = []
502
-          meas_p = []
503
+          meas_a0 = []
504
+          meas_a1 = []
505
+          meas_ratio_f = {}
503 506
 
504 507
           min_vswr = [ 10, 0 ] # the default VSWR is 10 and the default freq is 0]
505 508
 
@@ -511,6 +514,9 @@ if __name__ == "__main__":
511 514
               meas_freq.append(m[0])
512 515
               vswr = 0
513 516
 
517
+              meas_a0.append(m[1])
518
+              meas_a1.append(m[2])
519
+
514 520
               if m[1] > 0 and m[2] > 0:
515 521
                 if m[1] > m[2]:
516 522
                   vswr = (1.0 * m[1] / m[2])
@@ -525,6 +531,8 @@ if __name__ == "__main__":
525 531
                 vswr = 1
526 532
                 meas_ratio.append(1)
527 533
 
534
+              meas_ratio_f[m[0]] = vswr
535
+
528 536
               if vswr < min_vswr[0]:
529 537
                 min_vswr[0] = vswr
530 538
                 min_vswr[1] = m[0] # the frequency
@@ -533,12 +541,7 @@ if __name__ == "__main__":
533 541
               r = 50.0 * vswr
534 542
               meas_r.append(r)
535 543
 
536
-              # P = meas_data[0] * 5V ^ 2 / r
537
-              if r > 0:
538
-                meas_p.append(math.pow(i, 2) * r)
539
-              else:
540
-                meas_p.append(0)
541
-
544
+          #####
542 545
           if args.output_file != None:
543 546
             FILE = open(args.output_file, "w")
544 547
             FILE.write("freqency;ratio;impedance;watt;drive;a0;a1\n")
@@ -549,18 +552,44 @@ if __name__ == "__main__":
549 552
             FILE.close()
550 553
             print "Output file " + args.output_file + " written."
551 554
 
555
+          print "First minimum VSWR " + str(min_vswr[0]) + " found at freqency " + user_friendly_freq(min_vswr[1])
556
+
557
+          #####
552 558
           if args.show_graph == True:
553
-            lv, = plt.plot(meas_freq, meas_ratio, label='VSWR')
554
-            lr, = plt.plot(meas_freq, meas_r, label='Impedance')
555
-            lw, = plt.plot(meas_freq, meas_p, label='Watt')
556 559
 
557
-            plt.legend(handles=[lv, lr, lw])
560
+            f, axarr = plt.subplots(3, sharex=True)
561
+
562
+            f.canvas.set_window_title("SWR meter measurement results")
563
+
564
+            vswr_marker = []
565
+            i = 0
566
+            old = 1000
567
+            #for r in sorted(meas_ratio_f.items(), key=operator.itemgetter(1)):
568
+            for r in sorted(meas_ratio):
569
+              #vswr_marker.append(r[0])
570
+              vswr_marker.append(r)
571
+              if r > old:
572
+                i += 1
573
+              old = r
574
+              if i == 5:
575
+                break
576
+
577
+            lv, = axarr[0].plot(meas_freq, meas_ratio, label='VSWR', markevery=vswr_marker, markersize=5, marker="o", markerfacecolor="g")
578
+            lr, = axarr[1].plot(meas_freq, meas_r, label='impedance')
579
+            la0, = axarr[2].plot(meas_freq, meas_a0, label='a0')
580
+            la1, = axarr[2].plot(meas_freq, meas_a1, label='a1')
581
+
582
+            axarr[0].legend(handles=[lv])
583
+            axarr[0].scatter(meas_freq, meas_ratio, 1)
584
+            axarr[1].legend(handles=[lr])
585
+            axarr[1].scatter(meas_freq, meas_r, 1)
586
+            axarr[2].legend(handles=[la0, la1])
587
+            axarr[2].set_ylim([0, 1024])
558 588
 
559 589
             print "Please close the mathplot window to exit..."
590
+            plt.grid()
560 591
             plt.show()
561 592
 
562
-          print "First minimum VSWR " + str(min_vswr[0]) + " found at freqency " + user_friendly_freq(min_vswr[1])
563
-
564 593
         else:
565 594
           print "err: unknown type 0x%02x" % (e[1])
566 595
           break

+ 0
- 12
tools/test.py View File

@@ -1,12 +0,0 @@
1
-import serial, sys
2
-port = "/dev/ttyUSB0"
3
-baudrate = 115200
4
-ser = serial.Serial(port,baudrate,timeout=0.001)
5
-while True:
6
-    ser.write(bytearray([0x3c, 0x3e, 0x10, 0x0d, 0x0a]))
7
-
8
-    if ser.inWaiting() > 0:
9
-      data = list(ser.read(64))
10
-      print data
11
-
12
-    sys.stdout.flush()