├── tools
├── .gitignore
├── log_analysis
│ ├── .gitignore
│ ├── samples
│ │ ├── 0001_1.CKD
│ │ ├── 0001_2.CKD
│ │ └── 0001_golden.csv
│ ├── dummy.py
│ └── analyze.py
├── client.py
├── data.py
├── LICENSE
├── grapher.py
├── dump_udp.py
├── replay
│ └── replay-server.py
├── logger.py
└── network.py
├── apps
├── iOS
│ ├── .gitignore
│ ├── README.md
│ ├── iOS
│ │ ├── Chickadee.xcodeproj
│ │ │ ├── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ ├── xcuserdata
│ │ │ │ │ └── tannewt.xcuserdatad
│ │ │ │ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ │ │ │ └── WorkspaceSettings.xcsettings
│ │ │ │ └── xcshareddata
│ │ │ │ │ ├── Chickadee.xccheckout
│ │ │ │ │ └── Chickadee.xcscmblueprint
│ │ │ ├── xcuserdata
│ │ │ │ └── tannewt.xcuserdatad
│ │ │ │ │ └── xcschemes
│ │ │ │ │ └── xcschememanagement.plist
│ │ │ └── xcshareddata
│ │ │ │ └── xcschemes
│ │ │ │ └── Chickadee.xcscheme
│ │ ├── Chickadee
│ │ │ ├── AppDelegate.h
│ │ │ ├── main.m
│ │ │ ├── Images.xcassets
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ ├── AppDelegate.m
│ │ │ └── Base.lproj
│ │ │ │ └── LaunchScreen.xib
│ │ └── ChickadeeTests
│ │ │ ├── Info.plist
│ │ │ └── ChickadeeTests.m
│ ├── package.json
│ ├── replay.js
│ ├── kernel-filter.js
│ ├── replay-network.ios.js
│ ├── logger.js
│ ├── network.ios.js
│ ├── peak-finder.js
│ ├── log-reader.js
│ ├── debug-chart.js
│ └── index.ios.js
└── LICENSE
├── firmware
├── README.md
├── LICENSE
└── arduino
│ └── chickadee
│ └── chickadee.ino
├── pcb
├── LICENSE
├── fp-lib-table
├── Chickadee
├── gerber
│ ├── Chickadee-Edge.Cuts.gm1
│ ├── Chickadee.drl
│ └── Chickadee-B.Mask.gbs
├── Chickadee.pro
├── ESP-Reset.sch
├── Regulator.sch
├── Chickadee.xml
├── Chickadee.sch
└── Chickadee.net
└── README.md
/tools/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 |
--------------------------------------------------------------------------------
/apps/iOS/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/apps/iOS/README.md:
--------------------------------------------------------------------------------
1 | # chickadee-iOS
2 |
--------------------------------------------------------------------------------
/tools/log_analysis/.gitignore:
--------------------------------------------------------------------------------
1 | venv
2 |
--------------------------------------------------------------------------------
/firmware/README.md:
--------------------------------------------------------------------------------
1 | # chickadee-firmware
2 | Firmware for chickadee devices.
3 |
--------------------------------------------------------------------------------
/tools/log_analysis/samples/0001_1.CKD:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chickadee-tech/laptimer58/HEAD/tools/log_analysis/samples/0001_1.CKD
--------------------------------------------------------------------------------
/tools/log_analysis/samples/0001_2.CKD:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chickadee-tech/laptimer58/HEAD/tools/log_analysis/samples/0001_2.CKD
--------------------------------------------------------------------------------
/tools/log_analysis/samples/0001_golden.csv:
--------------------------------------------------------------------------------
1 | 1:54.331
2 | 2:06.109
3 | 2:17.020
4 | 2:31.084
5 | 2:43.814
6 | 3:00.263
7 | 3:10.115
8 | 3:26.623
9 |
--------------------------------------------------------------------------------
/pcb/LICENSE:
--------------------------------------------------------------------------------
1 | This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Full text available at http://creativecommons.org/licenses/by-sa/4.0/.
2 |
--------------------------------------------------------------------------------
/pcb/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (lib (name slf7032)(type KiCad)(uri "$(KIPRJMOD)/../../shared/kicad/libraries/public/footprints/slf7032.pretty")(options "")(descr ""))
3 | )
4 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/Chickadee.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/Chickadee.xcodeproj/project.xcworkspace/xcuserdata/tannewt.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chickadee-tech/laptimer58/HEAD/apps/iOS/iOS/Chickadee.xcodeproj/project.xcworkspace/xcuserdata/tannewt.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/pcb/Chickadee:
--------------------------------------------------------------------------------
1 | Reference, Value, Footprint, Datasheet
2 | U1,ESP-12E,ESP8266:ESP-12E,
3 | CON1,BARREL_JACK,Connect:BARREL_JACK,
4 | RF1,RX5808,,
5 | REG1,BD93291EFJ,,
6 | C_VC1,10uF,,
7 | C_CO3,10uF,,
8 | C_CO1,22uF,,
9 | C_UP1,680pF,,
10 | C_CO2,22uF,,
11 | C_BST1,0.1uF,,
12 | L1,22uH,,
13 | L2,2.2uH,,
14 | R_UP1,16kOhm,,
15 | R_DW1,5.1kOhm,,
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # chickadee-laptimer-pcb
2 | PCB design files for Chickadee Lap Timer.
3 |
4 | See subfolders for licenses. Code is typically MIT Licensed and PCB designs are typically Creative Commons BY-SA.
5 |
6 | Kicad files use components available in https://github.com/chickadee-tech/kicad-libs. It is assumed that this directory is ../shared/kicad/libraries/public/ relative to the root of this repository. You may find absolute paths that still need to be fixed. Please provide a pull request to fix those.
7 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/Chickadee/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/tools/client.py:
--------------------------------------------------------------------------------
1 |
2 | import multiprocessing
3 |
4 | from logger import Logger
5 | #from grapher import Grapher
6 | from network import Network
7 |
8 | grapher_queue = multiprocessing.Queue()
9 | queues = [grapher_queue]
10 | analyzers = [Logger]
11 | for i, analyzer in enumerate(analyzers):
12 | q = multiprocessing.Queue()
13 | queues.append(q)
14 | analyzer = analyzer(q) # Constructs the object.
15 | analyzer.start()
16 | analyzers[i] = analyzer
17 |
18 | network = Network(queues)
19 | network.start()
20 |
21 | #grapher = Grapher(grapher_queue)
22 | #grapher.run()
23 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/Chickadee/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "AppDelegate.h"
13 |
14 | int main(int argc, char * argv[]) {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/tools/data.py:
--------------------------------------------------------------------------------
1 | class FrameGroup:
2 | def __init__(self, chip_id):
3 | self.chip_id = chip_id
4 | self.frames = []
5 |
6 | def add_frame(self, frame):
7 | self.frames.append(frame)
8 |
9 | class Frame:
10 | def __init__(self, iteration, timestamp, frequency, strength):
11 | self.iteration = iteration
12 | self.timestamp = timestamp
13 | self.frequency = frequency
14 | self.strength = strength
15 |
16 | def to_dict(self):
17 | d = {}
18 | d["iteration"] = self.iteration
19 | d["timestamp"] = self.timestamp
20 | d["frequency"] = self.frequency
21 | d["strength"] = self.strength
22 | return d
23 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/Chickadee.xcodeproj/project.xcworkspace/xcuserdata/tannewt.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildLocationStyle
6 | UseAppPreferences
7 | CustomBuildLocationType
8 | RelativeToDerivedData
9 | DerivedDataLocationStyle
10 | Default
11 | IssueFilterStyle
12 | ShowActiveSchemeOnly
13 | LiveSourceIssuesEnabled
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/apps/iOS/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Chickadee",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node_modules/react-native/packager/packager.sh"
7 | },
8 | "dependencies": {
9 | "RCTTCPSocket": "github:PatrickSCLin/RCTTCPSocket",
10 | "buffer": "^3.4.3",
11 | "jsonfile": "^2.2.3",
12 | "kernel-smooth": "^0.2.1",
13 | "react-native": "^0.16.0",
14 | "react-native-fs": "^1.1.0",
15 | "react-native-speech": "github:tannewt/react-native-speech",
16 | "react-native-udp": "^1.0.3"
17 | },
18 | "devDependencies": {
19 | "canvas": "^1.3.5",
20 | "eslint": "^1.6.0",
21 | "gnuplot": "^0.2.0",
22 | "nchart": "^1.0.1",
23 | "react-native-cli": "^0.1.7"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/Chickadee.xcodeproj/xcuserdata/tannewt.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Chickadee.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 00E356ED1AD99517003FC87E
16 |
17 | primary
18 |
19 |
20 | 13B07F861A680F5B00A75B9A
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/Chickadee/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/apps/iOS/iOS/ChickadeeTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/apps/iOS/replay.js:
--------------------------------------------------------------------------------
1 | // node replay.js ../../tools/logs/2015/12/4/1216_50331675.json
2 |
3 | var DebugChart = require('./debug-chart');
4 | var LogReader = require('./log-reader');
5 | var KernelFilter = require('./kernel-filter');
6 | var PeakFinder = require('./peak-finder');
7 |
8 | var reader = new LogReader(process.argv.slice(2));
9 | var kernel_filter = new KernelFilter();
10 | var debug_chart = new DebugChart();
11 | reader.addListener("newData", kernel_filter.processData);
12 | reader.addListener("newData", debug_chart.processData);
13 | var peak_finder = new PeakFinder();
14 | kernel_filter.addListener("newData", peak_finder.processData);
15 | kernel_filter.addListener("newData", debug_chart.processSmoothedData);
16 | //peak_finder.addListener("newPeak", console.log);
17 | peak_finder.addListener("newPeak", debug_chart.processPeak);
18 | reader.start();
19 | debug_chart.done();
20 |
--------------------------------------------------------------------------------
/pcb/gerber/Chickadee-Edge.Cuts.gm1:
--------------------------------------------------------------------------------
1 | G04 #@! TF.FileFunction,Profile,NP*
2 | %FSLAX46Y46*%
3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
4 | G04 Created by KiCad (PCBNEW (2015-11-03 BZR 6296)-product) date Tuesday, November 17, 2015 'PMt' 04:43:17 PM*
5 | %MOMM*%
6 | G01*
7 | G04 APERTURE LIST*
8 | %ADD10C,0.100000*%
9 | G04 APERTURE END LIST*
10 | D10*
11 | X181000000Y-62250000D02*
12 | G75*
13 | G03X180000000Y-63250000I0J-1000000D01*
14 | G01*
15 | X211250000Y-123250000D02*
16 | G75*
17 | G03X208250000Y-126250000I0J-3000000D01*
18 | G01*
19 | X214500000Y-123250000D02*
20 | X211250000Y-123250000D01*
21 | X208250000Y-129500000D02*
22 | X208250000Y-126250000D01*
23 | X180000000Y-128500000D02*
24 | G75*
25 | G03X181000000Y-129500000I1000000J0D01*
26 | G01*
27 | X214500000Y-63250000D02*
28 | G75*
29 | G03X213500000Y-62250000I-1000000J0D01*
30 | G01*
31 | X214500000Y-63250000D02*
32 | X214500000Y-123250000D01*
33 | X180000000Y-63250000D02*
34 | X180000000Y-128500000D01*
35 | X181000000Y-129500000D02*
36 | X208250000Y-129500000D01*
37 | X181000000Y-62250000D02*
38 | X213500000Y-62250000D01*
39 | M02*
40 |
--------------------------------------------------------------------------------
/apps/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Scott Shawcroft
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/tools/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Scott Shawcroft
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/firmware/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Scott Shawcroft
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/tools/grapher.py:
--------------------------------------------------------------------------------
1 | import matplotlib.pyplot as plt
2 |
3 | class Grapher:
4 | def __init__(self, queue):
5 | self.data_by_frequency = {}
6 | self.queue = queue
7 | #plt.ion()
8 | plt.draw()
9 |
10 | def run(self):
11 | while True:
12 | try:
13 | frame_group = self.queue.get(True)
14 | except:
15 | break
16 | self.update(frame_group)
17 |
18 | def update(self, frame_group):
19 | for frame in frame_group.frames:
20 | if frame.frequency not in self.data_by_frequency:
21 | self.data_by_frequency[frame.frequency] = {}
22 | frequency_data = self.data_by_frequency[frame.frequency]
23 | if frame_group.chip_id not in frequency_data:
24 | self.data_by_frequency[frame.frequency][frame_group.chip_id] = [[], []]
25 | data_stream = self.data_by_frequency[frame.frequency][frame_group.chip_id]
26 | data_stream[0].append(frame.timestamp)
27 | data_stream[1].append(frame.strength)
28 |
29 | for frequency in self.data_by_frequency:
30 | for device in self.data_by_frequency[frequency]:
31 | data = self.data_by_frequency[frequency][device]
32 | plt.plot(data[0], data[1])
33 | #print("plot", frequency, device, len(data[0]))
34 |
35 | plt.draw()
36 |
--------------------------------------------------------------------------------
/apps/iOS/kernel-filter.js:
--------------------------------------------------------------------------------
1 | // This filter smooths the signal. This is OK because we are looking for the
2 | // overall peak trend rather than the exact signal peak.
3 |
4 | 'use strict';
5 | const EventEmitter = require('events');
6 | var kernel = require('kernel-smooth');
7 |
8 | class KernelFilter extends EventEmitter {
9 | constructor() {
10 | super();
11 | this.processData = this.processData.bind(this);
12 | }
13 |
14 | processData(deviceId, data) {
15 | // emit newData
16 | //console.log(data);
17 | let smoothedData = {};
18 | for (let frequency of Object.keys(data)) {
19 | if (!(frequency in smoothedData)) {
20 | smoothedData[frequency] = {"timestamps": data[frequency].timestamps, "strengths": []};
21 | }
22 | //let bandwidth = kernel.silverman(data[frequency].timestamps);
23 | let bandwidth = 1000;
24 | var f_hat = kernel.regression(data[frequency].timestamps, data[frequency].strengths, kernel.fun.epanechnikov, bandwidth);
25 | for (let i = 0; i < data[frequency].timestamps.length; i++) {
26 | smoothedData[frequency].strengths.push(f_hat(data[frequency].timestamps[i]));
27 | }
28 | }
29 | this.emit("newData", deviceId, smoothedData);
30 | }
31 | }
32 |
33 | module.exports = KernelFilter;
34 |
--------------------------------------------------------------------------------
/pcb/gerber/Chickadee.drl:
--------------------------------------------------------------------------------
1 | M48
2 | INCH,TZ
3 | T1C0.016
4 | T2C0.040
5 | T3C0.061
6 | T4C0.065
7 | T5C0.098
8 | %
9 | G90
10 | G05
11 | T1
12 | X71866Y-50551
13 | X71890Y-37667
14 | X72589Y-46132
15 | X72795Y-42244
16 | X73150Y-46220
17 | X73228Y-41969
18 | X73346Y-48957
19 | X73661Y-29370
20 | X73839Y-50020
21 | X73947Y-46220
22 | X74114Y-47795
23 | X75118Y-40384
24 | X75148Y-50177
25 | X75236Y-38110
26 | X75256Y-47717
27 | X75886Y-48967
28 | X76250Y-47636
29 | X76378Y-31299
30 | X76496Y-41358
31 | X76673Y-46220
32 | X76673Y-46663
33 | X76693Y-39724
34 | X77071Y-47579
35 | X77087Y-45640
36 | X77402Y-38819
37 | X77402Y-45295
38 | X77461Y-47854
39 | X77667Y-46220
40 | X77726Y-44990
41 | X77874Y-41378
42 | X78169Y-44331
43 | X78504Y-43346
44 | X78514Y-45079
45 | X78671Y-42864
46 | X79301Y-42864
47 | X79646Y-43602
48 | X79675Y-44508
49 | X79823Y-42805
50 | X80541Y-42776
51 | X80571Y-44774
52 | X80571Y-46526
53 | X80630Y-27047
54 | X80709Y-41457
55 | X81004Y-46545
56 | X81437Y-38465
57 | X82323Y-39547
58 | X83278Y-39055
59 | T2
60 | X76181Y-50098
61 | X77181Y-50098
62 | X78181Y-50098
63 | X79181Y-50098
64 | X80181Y-50098
65 | X81181Y-50098
66 | X82307Y-25276
67 | X83307Y-25276
68 | T3
69 | X82382Y-31594
70 | T4
71 | X81382Y-30594
72 | X81382Y-32594
73 | X83382Y-30594
74 | X83382Y-32594
75 | T5
76 | X72047Y-44193
77 | X83268Y-28445
78 | T0
79 | M30
80 |
--------------------------------------------------------------------------------
/tools/dump_udp.py:
--------------------------------------------------------------------------------
1 | import socket
2 | import struct
3 |
4 | PORT = 59734
5 | MULTICAST_ADDRESS = "239.249.134.147"
6 | BUFFER_SIZE = 2**8
7 |
8 | # Create the socket
9 | s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
10 |
11 | # Set some options to make it multicast-friendly
12 | #s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
13 | #try:
14 | # s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
15 | #except AttributeError:
16 | # pass # Some systems don't support SO_REUSEPORT
17 | #s.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_TTL, 20)
18 | #s.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_LOOP, 1)
19 |
20 | # Bind to the port
21 | s.bind(('', PORT))
22 |
23 | # Set some more multicast options
24 | intf = socket.gethostbyname(socket.gethostname())
25 | #s.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_IF, socket.inet_aton(intf))
26 | s.setsockopt(socket.SOL_IP, socket.IP_ADD_MEMBERSHIP, socket.inet_aton(MULTICAST_ADDRESS) + socket.inet_aton(intf))
27 |
28 | # Receive the data, then unregister multicast receive membership, then close the port
29 | while True:
30 | try:
31 | data, sender_addr = s.recvfrom(BUFFER_SIZE)
32 | except:
33 | break
34 | print(struct.unpack(">BIHH", data), sender_addr)
35 |
36 | # disconnect from the group
37 | s.setsockopt(socket.SOL_IP, socket.IP_DROP_MEMBERSHIP, socket.inet_aton(MULTICAST_ADDRESS) + socket.inet_aton('0.0.0.0'))
38 | s.close()
39 |
--------------------------------------------------------------------------------
/tools/replay/replay-server.py:
--------------------------------------------------------------------------------
1 | import json
2 | import socket
3 | import struct
4 | import sys
5 | import time
6 |
7 | print("loading replay data")
8 | packets = []
9 | with open(sys.argv[1], "r") as f:
10 | all_logs = json.load(f)
11 | for log in all_logs:
12 | deviceId = log["chip_id"]
13 | for frame_group in log["frame_groups"]:
14 | timestamp = frame_group["received"]
15 | packet = []
16 |
17 | packet.append(struct.pack(">I", deviceId))
18 | for frame in frame_group["frames"]:
19 | packet.append(struct.pack(">BIHH", frame["iteration"],
20 | frame["timestamp"],
21 | int(frame["frequency"]),
22 | frame["strength"]))
23 | packets.append((timestamp, "".join(packet)))
24 |
25 | print("loaded " + str(len(packets)) + " packets")
26 |
27 | tcp_server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
28 |
29 | tcp_server.bind(("127.0.0.1", 7000))
30 | tcp_server.listen(1)
31 | print("waiting for connection")
32 | connection, address = tcp_server.accept()
33 | print("connected")
34 | time.sleep(5)
35 | print("replaying")
36 | last_timestamp = None
37 | for timestamp, packet in packets:
38 | if last_timestamp:
39 | time.sleep((timestamp - last_timestamp))
40 | last_timestamp = timestamp
41 | connection.sendall(packet)
42 | print("sent " + str(timestamp) + " packet")
43 |
44 | connection.close()
45 |
--------------------------------------------------------------------------------
/tools/logger.py:
--------------------------------------------------------------------------------
1 | # Logs received data to files. It produces one file for each device.
2 | import multiprocessing
3 |
4 | import datetime
5 | import os
6 | import os.path
7 |
8 | import time
9 |
10 | import json
11 |
12 | class Logger(multiprocessing.Process):
13 | def __init__(self, queue):
14 | multiprocessing.Process.__init__(self)
15 | self.data_by_device = {}
16 | self.queue = queue
17 | now = datetime.datetime.now()
18 |
19 | self.start_time = str(now.hour) + str(now.minute)
20 |
21 | self.directory = os.path.join("logs", str(now.year), str(now.month), str(now.day))
22 | if not os.path.isdir(self.directory):
23 | os.makedirs(self.directory)
24 |
25 | def run(self):
26 | while True:
27 | try:
28 | frame_group = self.queue.get(True)
29 | except:
30 | break
31 | self.update(frame_group)
32 |
33 | fn = os.path.join(self.directory, self.start_time + ".json")
34 | all_data = []
35 | with open(fn, "w") as f:
36 | json.dump(self.data_by_device.values(), f, indent=2, separators=(',', ': '))
37 | print("wrote log to " + fn)
38 |
39 | def update(self, frame_group):
40 | if frame_group.chip_id not in self.data_by_device:
41 | self.data_by_device[frame_group.chip_id] = {"chip_id": frame_group.chip_id,
42 | "frame_groups": []}
43 | frames = []
44 | group = {"received": time.time(), "frames": frames}
45 | for frame in frame_group.frames:
46 | frames.append(frame.to_dict())
47 |
48 | self.data_by_device[frame_group.chip_id]["frame_groups"].append(group)
49 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/Chickadee/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | UIFileSharingEnabled
20 |
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSAllowsArbitraryLoads
30 |
31 |
32 | NSLocationWhenInUseUsageDescription
33 |
34 | UILaunchStoryboardName
35 | LaunchScreen
36 | UIRequiredDeviceCapabilities
37 |
38 | armv7
39 |
40 | UISupportedInterfaceOrientations
41 |
42 | UIInterfaceOrientationPortrait
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 | UIViewControllerBasedStatusBarAppearance
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/Chickadee.xcodeproj/project.xcworkspace/xcshareddata/Chickadee.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 876CC5C2-042A-4178-8488-EF48AB363B9D
9 | IDESourceControlProjectName
10 | Chickadee
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | C5DFA226EC50DB9941E4CE54FD13FA14E8D19380
14 | https://github.com/tannewt/chickadee-iOS.git
15 |
16 | IDESourceControlProjectPath
17 | iOS/Chickadee.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | C5DFA226EC50DB9941E4CE54FD13FA14E8D19380
21 | ../../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/tannewt/chickadee-iOS.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | C5DFA226EC50DB9941E4CE54FD13FA14E8D19380
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | C5DFA226EC50DB9941E4CE54FD13FA14E8D19380
36 | IDESourceControlWCCName
37 | chickadee-iOS
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/Chickadee.xcodeproj/project.xcworkspace/xcshareddata/Chickadee.xcscmblueprint:
--------------------------------------------------------------------------------
1 | {
2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "B9DF8B4BDEC2832BDCF4539E6D84DE7212A9109B",
3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
4 |
5 | },
6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
7 | "A70B3D63BC846B46E86654D1BB3344B688999532" : 0,
8 | "B9DF8B4BDEC2832BDCF4539E6D84DE7212A9109B" : 0
9 | },
10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "876CC5C2-042A-4178-8488-EF48AB363B9D",
11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
12 | "A70B3D63BC846B46E86654D1BB3344B688999532" : "RCTTCPSocket\/",
13 | "B9DF8B4BDEC2832BDCF4539E6D84DE7212A9109B" : "chickadee-projects\/"
14 | },
15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "Chickadee",
16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204,
17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "laptimer\/apps\/iOS\/iOS\/Chickadee.xcodeproj",
18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
19 | {
20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/chickadee-tech\/RCTTCPSocket.git",
21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "A70B3D63BC846B46E86654D1BB3344B688999532"
23 | },
24 | {
25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/tannewt\/chickadee-projects.git",
26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "B9DF8B4BDEC2832BDCF4539E6D84DE7212A9109B"
28 | }
29 | ]
30 | }
--------------------------------------------------------------------------------
/apps/iOS/replay-network.ios.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // This is a debug network source that connects to a local Python server rather
4 | // than real devices.
5 | const EventEmitter = require('events');
6 |
7 | var TCPSocket = require('RCTTCPSocket/TCPSocket.ios');
8 | global.Buffer = global.Buffer || require('buffer').Buffer;
9 |
10 | class ReplayNetwork extends EventEmitter {
11 | start() {
12 | this.tcp = new TCPSocket("localhost", 7000);
13 | this.tcp.onopen = this.tcpOpened.bind(this);
14 | this.tcp.ondata = this.tcpReceivedData.bind(this);
15 | this.tcp.onerror = this.tcpError.bind(this);
16 | this.tcp.onclose = this.tcpClosed.bind(this);
17 | }
18 |
19 | stop() {
20 | this.tcp.close();
21 | this.tcp = null;
22 | }
23 |
24 | tcpOpened() {
25 | console.log("TCP successfully opened.");
26 | }
27 |
28 | tcpReceivedData(packet) {
29 | let data = packet.data;
30 | let deviceId = data.readUInt32BE(0);
31 | let offset = 4;
32 | let output = {};
33 | while (offset < data.length) {
34 | let iteration = data.readUInt8(offset);
35 | let timestamp = data.readUInt32BE(offset + 1);
36 | let frequency = data.readUInt16BE(offset + 5);
37 | let strength = data.readUInt16BE(offset + 7);
38 | offset += 9;
39 | //console.log(iteration, timestamp, frequency, strength);
40 |
41 | if (!(frequency in output)) {
42 | output[frequency] = {"strengths": [], "timestamps": []}
43 | }
44 | output[frequency].strengths.push(strength);
45 | output[frequency].timestamps.push(timestamp);
46 | }
47 | this.emit("newData", deviceId, output);
48 | }
49 |
50 | tcpError(error) {
51 | console.log("TCP Error", error);
52 | this.emit("connectionLost");
53 | }
54 |
55 | tcpClosed() {
56 | this.emit("connectionLost");
57 | console.log("TCP connection closed.");
58 | }
59 | }
60 |
61 | module.exports = ReplayNetwork;
62 |
--------------------------------------------------------------------------------
/apps/iOS/logger.js:
--------------------------------------------------------------------------------
1 | // This logs received data for later replay.
2 | 'use strict';
3 | const EventEmitter = require('events');
4 |
5 | var RNFS = require('react-native-fs');
6 |
7 | class Logger extends EventEmitter {
8 | constructor() {
9 | super();
10 | this.processData = this.processData.bind(this);
11 | this.writeFile = this.writeFile.bind(this);
12 |
13 | // create a path you want to write to
14 | var now = new Date();
15 | this.path = RNFS.DocumentDirectoryPath + '/ckd-lt58-' + now.getFullYear() + (now.getMonth() + 1) + now.getDate() + "_" + now.getHours() + now.getMinutes() + ".json";
16 |
17 | this.data = [];
18 | this.deviceMapping = {};
19 | }
20 |
21 | compareByTimestamp(a, b) {
22 | return a.timestamp - b.timestamp;
23 | }
24 |
25 | processData(deviceId, data) {
26 | var now = new Date();
27 | if (!(deviceId in this.deviceMapping)) {
28 | this.deviceMapping[deviceId] = this.data.length;
29 | this.data.push({"chip_id": deviceId, "frame_groups": []});
30 | }
31 | var frames = [];
32 | var frame_group = {"received": now.getTime() / 1000, "frames": frames};
33 | this.data[this.deviceMapping[deviceId]].frame_groups.push(frame_group);
34 | for (let frequency of Object.keys(data)) {
35 | for (var i = 0; i < data[frequency].timestamps.length; i++) {
36 | frames.push({"iteration": 0,
37 | "timestamp": data[frequency].timestamps[i],
38 | "frequency": frequency,
39 | "strength": data[frequency].strengths[i]});
40 | }
41 | }
42 | // TODO(tannewt): Remove this sort by changing the loop above because its a
43 | // predictable pattern.
44 | frames.sort(this.compareByTimestamp);
45 | }
46 |
47 | writeFile() {
48 | console.log("attempting file write");
49 | RNFS.writeFile(this.path, JSON.stringify(this.data), 'utf8')
50 | .then((success) => {
51 | console.log("success");
52 | this.emit("logWritten");
53 | })
54 | .catch((err) => {
55 | console.log("failure");
56 | this.emit("logWriteFailed");
57 | });
58 | }
59 | }
60 |
61 | module.exports = Logger;
62 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/ChickadeeTests/ChickadeeTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | #import "RCTAssert.h"
14 | #import "RCTRedBox.h"
15 | #import "RCTRootView.h"
16 |
17 | #define TIMEOUT_SECONDS 240
18 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
19 |
20 | @interface ChickadeeTests : XCTestCase
21 |
22 | @end
23 |
24 | @implementation ChickadeeTests
25 |
26 |
27 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
28 | {
29 | if (test(view)) {
30 | return YES;
31 | }
32 | for (UIView *subview in [view subviews]) {
33 | if ([self findSubviewInView:subview matching:test]) {
34 | return YES;
35 | }
36 | }
37 | return NO;
38 | }
39 |
40 | - (void)testRendersWelcomeScreen {
41 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
42 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
43 | BOOL foundElement = NO;
44 | NSString *redboxError = nil;
45 |
46 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
47 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
49 |
50 | //redboxError = [[RCTRedBox sharedInstance] currentErrorMessage];
51 |
52 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
53 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
54 | return YES;
55 | }
56 | return NO;
57 | }];
58 | }
59 |
60 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
61 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
62 | }
63 |
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/tools/log_analysis/dummy.py:
--------------------------------------------------------------------------------
1 | import multiprocessing
2 | import argparse
3 | import time
4 | import socket
5 | import struct
6 |
7 | class DummyChickadee(multiprocessing.Process):
8 | def __init__(self, filename, shift):
9 | multiprocessing.Process.__init__(self)
10 | self.file = open(filename, "r")
11 | header = self.file.readline().strip()
12 | name, version = header.split()
13 | extra_headers = 0
14 | if version == "0.0.2":
15 | extra_headers = 1
16 | elif version == "0.0.3":
17 | extra_headers = 3
18 | for x in xrange(extra_headers):
19 | print(self.file.readline().strip())
20 |
21 | self.shift = shift
22 |
23 | def run(self):
24 | # First we wait to coordinate ourselves with the other dummies.
25 | time.sleep(self.shift / 1000)
26 |
27 | # Now run what would normally be in the Arduino setup code.
28 | # We don't need to worry about mimicking the Wifi.
29 |
30 | # Join the UDP multicast group.
31 | sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
32 | sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
33 | sock.bind(('', 59734))
34 | mreq = struct.pack("=4sl", socket.inet_aton("239.249.134.147"), socket.INADDR_ANY)
35 | sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
36 | sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2)
37 | sock.sendto("robot", ("239.249.134.147", 59734))
38 |
39 | # Next, fake the Arduino loop using the times in the log.
40 | last_timestamp = None
41 | last_clock = None
42 | packet = self.file.read(9)
43 | while len(packet) == 9:
44 | i, timestamp, frequency, strength = struct.unpack(">BIHH", packet)
45 | #print(i, timestamp, frequency, strength)
46 |
47 | if last_timestamp and last_clock:
48 | sleep_ms = (timestamp - last_timestamp) - (time.clock() * 1000 - last_clock)
49 | time.sleep(sleep_ms / 1000)
50 | last_timestamp = timestamp
51 | last_clock = time.clock() * 1000
52 | packet = self.file.read(9)
53 |
54 | parser = argparse.ArgumentParser()
55 | parser.add_argument("ckd_one")
56 | parser.add_argument("ckd_two")
57 | args = parser.parse_args()
58 |
59 | for fn in [args.ckd_one, args.ckd_two]:
60 | if ":" in fn:
61 | fn, shift = fn.split(":")
62 | shift = int(shift)
63 | else:
64 | shift = 0
65 | d = DummyChickadee(fn, shift)
66 | d.start()
67 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/Chickadee/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "AppDelegate.h"
11 |
12 | #import "RCTRootView.h"
13 |
14 | @implementation AppDelegate
15 |
16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
17 | {
18 | NSURL *jsCodeLocation;
19 |
20 | /**
21 | * Loading JavaScript code - uncomment the one you want.
22 | *
23 | * OPTION 1
24 | * Load from development server. Start the server from the repository root:
25 | *
26 | * $ npm start
27 | *
28 | * To run on device, change `localhost` to the IP address of your computer
29 | * (you can get this by typing `ifconfig` into the terminal and selecting the
30 | * `inet` value under `en0:`) and make sure your computer and iOS device are
31 | * on the same Wi-Fi network.
32 | */
33 |
34 | //jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios"];
35 |
36 | /**
37 | * OPTION 2
38 | * Load from pre-bundled file on disk. To re-generate the static bundle
39 | * from the root of your project directory, run
40 | *
41 | * $ react-native bundle --entry-file index.ios.js --platform=ios --minify --bundle-output=iOS/Chickadee/main.jsbundle
42 | *
43 | * see http://facebook.github.io/react-native/docs/runningondevice.html
44 | */
45 |
46 | jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
47 |
48 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
49 | moduleName:@"Chickadee"
50 | initialProperties:nil
51 | launchOptions:launchOptions];
52 |
53 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
54 | UIViewController *rootViewController = [[UIViewController alloc] init];
55 | rootViewController.view = rootView;
56 | self.window.rootViewController = rootViewController;
57 | [self.window makeKeyAndVisible];
58 | return YES;
59 | }
60 |
61 | @end
62 |
--------------------------------------------------------------------------------
/apps/iOS/network.ios.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | const EventEmitter = require('events');
3 |
4 | var dgram = require('react-native-udp');
5 | var TCPSocket = require('RCTTCPSocket/TCPSocket.ios');
6 | global.Buffer = global.Buffer || require('buffer').Buffer;
7 |
8 | var PACKET_TYPE_I_AM_AP = 3;
9 |
10 | class Network extends EventEmitter {
11 | start() {
12 | this.udp = dgram.createSocket("udp4");
13 | this.udp.bind(59734);
14 | this.udp.once("listening", function() {
15 | this.udp.addMembership("239.249.134.147");
16 |
17 | var buf = new Uint8Array(1);
18 | buf[0] = 1;
19 | this.udp.send(buf, 0, buf.length, 59734, "239.249.134.147", function(err) {
20 | if (err) throw err;
21 | });
22 | }.bind(this));
23 | this.udp.on("message", function(message, rinfo) {
24 | //console.log("message", message.readUInt8(0), message.readUInt32BE(1), message.readUInt16BE(5), message.readUInt16BE(7));
25 | var packet_type = message.readUInt8(0);
26 | if (packet_type === PACKET_TYPE_I_AM_AP) {
27 | var tcp_port = message.readUInt16LE(2);
28 | this.tcp = new TCPSocket(rinfo.address, tcp_port);
29 | this.tcp.onopen = this.tcpOpened.bind(this);
30 | this.tcp.ondata = this.tcpReceivedData.bind(this);
31 | this.tcp.onerror = this.tcpError.bind(this);
32 | this.tcp.onclose = this.tcpClosed.bind(this);
33 | }
34 | }.bind(this));
35 | this.udp.on("error", console.log);
36 | }
37 |
38 | stop() {
39 | this.udp.close();
40 | this.udp = null;
41 | if (this.tcp) {
42 | this.tcp.close();
43 | this.tcp = null;
44 | }
45 | }
46 |
47 | tcpOpened() {
48 | console.log("TCP successfully opened.");
49 | }
50 |
51 | tcpReceivedData(packet) {
52 | let data = packet.data;
53 | let deviceId = data.readUInt32BE(0);
54 | let offset = 4;
55 | let output = {};
56 | while (offset < data.length) {
57 | let iteration = data.readUInt8(offset);
58 | let timestamp = data.readUInt32BE(offset + 1);
59 | let frequency = data.readUInt16BE(offset + 5);
60 | let strength = data.readUInt16BE(offset + 7);
61 | offset += 9;
62 | //console.log(iteration, timestamp, frequency, strength);
63 |
64 | if (!(frequency in output)) {
65 | output[frequency] = {"strengths": [], "timestamps": []}
66 | }
67 | output[frequency].strengths.push(strength);
68 | output[frequency].timestamps.push(timestamp);
69 | }
70 | this.emit("newData", deviceId, output);
71 | }
72 |
73 | tcpError(error) {
74 | this.emit("connectionLost");
75 | console.log("TCP Error", error)
76 | }
77 |
78 | tcpClosed() {
79 | this.emit("connectionLost");
80 | console.log("TCP connection closed.");
81 | }
82 | }
83 |
84 | module.exports = Network;
85 |
--------------------------------------------------------------------------------
/apps/iOS/peak-finder.js:
--------------------------------------------------------------------------------
1 | // This ingests data and determines any new peaks in the data.
2 |
3 | // This is based on the method outlined here: http://billauer.co.il/peakdet.html
4 | // Eli Billauer, 3.4.05 (Explicitly not copyrighted).
5 | // This function is released to the public domain; Any use is allowed.
6 |
7 | 'use strict';
8 | const EventEmitter = require('events');
9 |
10 | class PeakFinder extends EventEmitter {
11 | constructor() {
12 | super();
13 | this.processData = this.processData.bind(this);
14 | this.state = {};
15 | this.delta = 70;
16 | }
17 |
18 | packState(deviceId, frequency, peakY, peakX, valleyY, valleyX, lookingFor) {
19 | if (!(deviceId in this.state)) {
20 | this.state[deviceId] = {};
21 | }
22 | if (!(frequency in this.state[deviceId])) {
23 | this.state[deviceId][frequency] = {};
24 | }
25 | this.state[deviceId][frequency] = {"peakY": peakY,
26 | "peakX": peakX,
27 | "valleyY": valleyY,
28 | "valleyX": valleyX,
29 | "lookingFor": lookingFor};
30 | }
31 |
32 | unpackState(deviceId, frequency) {
33 | if (!(deviceId in this.state) || !(frequency in this.state[deviceId])) {
34 | return {"peakY": -Infinity,
35 | "peakX": 0,
36 | "valleyY": Infinity,
37 | "valleyX": 0,
38 | "lookingFor": "peak"};
39 | }
40 | return this.state[deviceId][frequency];
41 | }
42 |
43 | processData(deviceId, data) {
44 | for (let frequency of Object.keys(data)) {
45 | var { peakY, peakX, valleyY, valleyX, lookingFor } = this.unpackState(deviceId, frequency);
46 | for (var i = 0; i < data[frequency].timestamps.length; i++) {
47 | let y = data[frequency].strengths[i];
48 | let x = data[frequency].timestamps[i];
49 |
50 | if (y > peakY) {
51 | peakY = y;
52 | peakX = x;
53 | }
54 | if (y < valleyY) {
55 | valleyY = y;
56 | valleyX = x;
57 | }
58 |
59 | if (lookingFor === "peak") {
60 | if (y < peakY - this.delta) {
61 | this.emit("newPeak", frequency, peakX, peakY);
62 | valleyY = y;
63 | valleyX = x;
64 | lookingFor = "valley";
65 | }
66 | } else {
67 | if (y > valleyY + this.delta) {
68 | this.emit("newValley", frequency, valleyX, valleyY);
69 | peakY = y;
70 | peakX = x;
71 | lookingFor = "peak";
72 | }
73 | }
74 | }
75 |
76 | this.packState(deviceId, frequency, peakY, peakX, valleyY, valleyX, lookingFor);
77 | }
78 | //this.emit("newPeak", frequency, spike.x, spike.y);
79 | }
80 | }
81 |
82 | module.exports = PeakFinder;
83 |
--------------------------------------------------------------------------------
/apps/iOS/log-reader.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | const EventEmitter = require('events');
3 | var jsonfile = require('jsonfile');
4 |
5 | class LogReader extends EventEmitter {
6 | constructor(log_filenames) {
7 | super();
8 | this.logs = [];
9 | for (let filename of log_filenames) {
10 | var log = jsonfile.readFileSync(filename);
11 | if (Array.isArray(log)) {
12 | for (let single_log of log) {
13 | this.logs.push(single_log);
14 | }
15 | } else {
16 | this.logs.push(log);
17 | }
18 |
19 | }
20 | }
21 |
22 | _indexValid(currentValue, index, array) {
23 | return currentValue < this.logs[index].frame_groups.length;
24 | }
25 |
26 | start() {
27 | let indices = [];
28 | for (var i = 0; i < this.logs.length; i++) {
29 | indices.push(0);
30 | }
31 |
32 | while (indices.some(this._indexValid, this)) {
33 | let next_log = 0;
34 | for (var i = 0; i < this.logs.length; i++) {
35 | if (this._indexValid(indices[i], i, indices)) {
36 | next_log = i;
37 | break;
38 | }
39 | }
40 | let next_time = this.logs[next_log].frame_groups[indices[next_log]].received;
41 | for (var i = 1; i < this.logs.length; i++) {
42 | if (!this._indexValid(indices[i], i, indices)) {
43 | continue;
44 | }
45 | let next_frame_group_time = this.logs[i].frame_groups[indices[i]].received;
46 | if (next_frame_group_time < next_time) {
47 | next_time = next_frame_group_time;
48 | next_log = i;
49 | }
50 | }
51 | let output = {};
52 | let frames = this.logs[next_log].frame_groups[indices[next_log]].frames;
53 | for (let frame of frames) {
54 | let frequency = frame.frequency;
55 | if (!(frequency in output)) {
56 | output[frequency] = {"strengths": [], "timestamps": []}
57 | }
58 | output[frequency].strengths.push(frame.strength);
59 | output[frequency].timestamps.push(frame.timestamp);
60 | }
61 | let deviceId = this.logs[next_log].chip_id;
62 | this.emit("newData", deviceId, output);
63 | indices[next_log]++;
64 | }
65 | }
66 |
67 | stop() {
68 | }
69 |
70 | tcpReceivedData(packet) {
71 | let data = packet.data;
72 | let deviceId = data.readUInt32BE(0);
73 | let offset = 4;
74 | let output = {};
75 | while (offset < data.length) {
76 | let iteration = data.readUInt8(offset);
77 | let timestamp = data.readUInt32BE(offset + 1);
78 | let frequency = data.readUInt16BE(offset + 5);
79 | let strength = data.readUInt16BE(offset + 7);
80 | offset += 9;
81 | //console.log(iteration, timestamp, frequency, strength);
82 |
83 | if (!(frequency in output)) {
84 | output[frequency] = {"strengths": [], "timestamps": []}
85 | }
86 | output[frequency].strengths.push(strength);
87 | output[frequency].timestamps.push(timestamp);
88 | }
89 | this.emit("newData", deviceId, output);
90 | }
91 | }
92 |
93 | module.exports = LogReader;
94 |
--------------------------------------------------------------------------------
/pcb/Chickadee.pro:
--------------------------------------------------------------------------------
1 | update=Monday, December 07, 2015 'PMt' 03:43:51 PM
2 | version=1
3 | last_client=kicad
4 | [pcbnew]
5 | version=1
6 | LastNetListRead=
7 | UseCmpFile=1
8 | PadDrill=0.600000000000
9 | PadDrillOvalY=0.600000000000
10 | PadSizeH=1.500000000000
11 | PadSizeV=1.500000000000
12 | PcbTextSizeV=1.500000000000
13 | PcbTextSizeH=1.500000000000
14 | PcbTextThickness=0.300000000000
15 | ModuleTextSizeV=1.000000000000
16 | ModuleTextSizeH=1.000000000000
17 | ModuleTextSizeThickness=0.150000000000
18 | SolderMaskClearance=0.000000000000
19 | SolderMaskMinWidth=0.000000000000
20 | DrawSegmentWidth=0.200000000000
21 | BoardOutlineThickness=0.100000000000
22 | ModuleOutlineThickness=0.150000000000
23 | [cvpcb]
24 | version=1
25 | NetIExt=net
26 | [eeschema]
27 | version=1
28 | LibDir=/Users/tannewt/kicad/libraries;../../shared/kicad/libraries/public/components
29 | [eeschema/libraries]
30 | LibName1=power
31 | LibName2=device
32 | LibName3=transistors
33 | LibName4=conn
34 | LibName5=linear
35 | LibName6=regul
36 | LibName7=74xx
37 | LibName8=cmos4000
38 | LibName9=adc-dac
39 | LibName10=memory
40 | LibName11=xilinx
41 | LibName12=microcontrollers
42 | LibName13=dsp
43 | LibName14=microchip
44 | LibName15=analog_switches
45 | LibName16=motorola
46 | LibName17=texas
47 | LibName18=intel
48 | LibName19=audio
49 | LibName20=interface
50 | LibName21=digital-audio
51 | LibName22=philips
52 | LibName23=display
53 | LibName24=cypress
54 | LibName25=siliconi
55 | LibName26=opto
56 | LibName27=atmel
57 | LibName28=contrib
58 | LibName29=valves
59 | LibName30=kicad-ESP8266/ESP8266
60 | LibName31=kicad-pololu/pololu
61 | LibName32=kicad-rx5808/rx5808
62 | LibName33=dc-dc
63 | LibName34=ac-dc
64 | LibName35=actel
65 | LibName36=Altera
66 | LibName37=analog_devices
67 | LibName38=brooktre
68 | LibName39=cmos_ieee
69 | LibName40=diode
70 | LibName41=elec-unifil
71 | LibName42=ESD_Protection
72 | LibName43=ftdi
73 | LibName44=gennum
74 | LibName45=graphic
75 | LibName46=hc11
76 | LibName47=ir
77 | LibName48=Lattice
78 | LibName49=logo
79 | LibName50=maxim
80 | LibName51=microchip_dspic33dsc
81 | LibName52=microchip_pic10mcu
82 | LibName53=microchip_pic12mcu
83 | LibName54=microchip_pic16mcu
84 | LibName55=microchip_pic18mcu
85 | LibName56=microchip_pic32mcu
86 | LibName57=motor_drivers
87 | LibName58=msp430
88 | LibName59=nordicsemi
89 | LibName60=nxp_armmcu
90 | LibName61=onsemi
91 | LibName62=Oscillators
92 | LibName63=Power_Management
93 | LibName64=powerint
94 | LibName65=pspice
95 | LibName66=references
96 | LibName67=relays
97 | LibName68=rfcom
98 | LibName69=sensors
99 | LibName70=silabs
100 | LibName71=stm8
101 | LibName72=stm32
102 | LibName73=supertex
103 | LibName74=switches
104 | LibName75=transf
105 | LibName76=ttl_ieee
106 | LibName77=video
107 | LibName78=Xicor
108 | LibName79=Zilog
109 | LibName80=sma_connectors/library/sma
110 | LibName81=ap7333
111 | LibName82=cmt-1603-smt-tr
112 | LibName83=74lvc1g3157
113 | LibName84=bd93291efj
114 | [general]
115 | version=1
116 | [schematic_editor]
117 | version=1
118 | PageLayoutDescrFile=
119 | PlotDirectoryName=
120 | SubpartIdSeparator=0
121 | SubpartFirstId=65
122 | NetFmtName=
123 | SpiceForceRefPrefix=0
124 | SpiceUseNetNumbers=0
125 | LabSize=118
126 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/Chickadee/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/apps/iOS/debug-chart.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var gnuplot = require('gnuplot');
4 |
5 | class DebugChart {
6 | constructor() {
7 | this.processData = this.processData.bind(this);
8 | this.processPeak = this.processPeak.bind(this);
9 | this.processSmoothedData = this.processSmoothedData.bind(this);
10 | this.plot = gnuplot().set('term png size 3000, 1500')
11 | .set('output "data.png"')
12 | .set('title "Some Math Functions"')
13 | .set('zeroaxis');
14 | this.data = {};
15 | this.smoothedData = {};
16 | this.peaks = {};
17 | }
18 |
19 | processData(deviceId, data) {
20 | if (!(deviceId in this.data)) {
21 | this.data[deviceId] = {};
22 | }
23 | for (let frequency of Object.keys(data)) {
24 | if (!(frequency in this.data[deviceId])) {
25 | this.data[deviceId][frequency] = [];
26 | }
27 | for (let i = 0; i < data[frequency].timestamps.length; i++) {
28 | this.data[deviceId][frequency].push(data[frequency].timestamps[i] + " " + data[frequency].strengths[i]);
29 | }
30 | }
31 | }
32 |
33 | processPeak(frequency, timestamp, strength) {
34 | if (!(frequency in this.peaks)) {
35 | this.peaks[frequency] = [];
36 | }
37 | this.peaks[frequency].push(timestamp + " " + strength);
38 | }
39 |
40 | processSmoothedData(deviceId, data) {
41 | if (!(deviceId in this.smoothedData)) {
42 | this.smoothedData[deviceId] = {};
43 | }
44 | for (let frequency of Object.keys(data)) {
45 | if (!(frequency in this.smoothedData[deviceId])) {
46 | this.smoothedData[deviceId][frequency] = [];
47 | }
48 | for (let i = 0; i < data[frequency].timestamps.length; i++) {
49 | this.smoothedData[deviceId][frequency].push(data[frequency].timestamps[i] + " " + data[frequency].strengths[i]);
50 | }
51 | }
52 | }
53 |
54 | done() {
55 | // Print the plot commands first.
56 | let graphs = [];
57 | for (let device of Object.keys(this.data)) {
58 | for (let frequency of Object.keys(this.data[device])) {
59 | graphs.push(device + " - " + frequency);
60 | }
61 | }
62 | // Plot commands for raw data.
63 | for (var i = 0; i < graphs.length; i++) {
64 | let start = ", ";
65 | if (i === 0) {
66 | start = "plot";
67 | }
68 | this.plot.print(start + " '-' using 1:2 title \"" + graphs[i] + "\" with points pt 1");
69 | }
70 | // Plot commands for smoothed data.
71 | for (var i = 0; i < graphs.length; i++) {
72 | this.plot.print(", '-' using 1:2 title \"" + graphs[i] + "\" with lines");
73 | }
74 | // Plot commands for peaks.
75 | let frequencies = Object.keys(this.peaks);
76 | for (var i = 0; i < frequencies.length; i++) {
77 | this.plot.print(", '-' using 1:2 title \"" + frequencies[i] + "\" with points pt 7 ps 8");
78 | }
79 | this.plot.println("");
80 | // Print the data.
81 | for (let device of Object.keys(this.data)) {
82 | for (let frequency of Object.keys(this.data[device])) {
83 | this.data[device][frequency].push("e");
84 | this.plot.println(this.data[device][frequency].join("\n "));
85 | }
86 | }
87 | for (let device of Object.keys(this.smoothedData)) {
88 | for (let frequency of Object.keys(this.smoothedData[device])) {
89 | this.smoothedData[device][frequency].push("e");
90 | this.plot.println(this.smoothedData[device][frequency].join("\n "));
91 | }
92 | }
93 | for (let frequency of frequencies) {
94 | this.peaks[frequency].push("e");
95 | this.plot.println(this.peaks[frequency].join("\n "));
96 | }
97 | this.plot.end();
98 | }
99 | }
100 |
101 | module.exports = DebugChart;
102 |
--------------------------------------------------------------------------------
/tools/network.py:
--------------------------------------------------------------------------------
1 | import multiprocessing
2 | import select
3 | import socket
4 | import struct
5 | import time
6 |
7 | from data import *
8 |
9 | MULTICAST_PORT = 59734
10 | TCP_PORT = 59735
11 | MULTICAST_ADDRESS = "239.249.134.147"
12 | BUFFER_SIZE = 2**12
13 |
14 | NEW_CLIENT_PERIOD = 60
15 |
16 | PACKET_TYPE_I_AM_AP = 3
17 |
18 | class Network(multiprocessing.Process):
19 | def __init__(self, output_queues):
20 | multiprocessing.Process.__init__(self)
21 | self.output_queues = output_queues
22 |
23 | def run(self):
24 | # Create the socket
25 | udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
26 |
27 | # Set some options to make it multicast-friendly
28 | #s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
29 | #try:
30 | # s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
31 | #except AttributeError:
32 | # pass # Some systems don't support SO_REUSEPORT
33 | #s.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_TTL, 20)
34 | #s.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_LOOP, 1)
35 |
36 | # Bind to the port
37 | udp_socket.bind(('', MULTICAST_PORT))
38 |
39 | # Set some more multicast options
40 | intf = socket.gethostbyname(socket.gethostname())
41 | #s.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_IF, socket.inet_aton(intf))
42 | udp_socket.setsockopt(socket.SOL_IP,
43 | socket.IP_ADD_MEMBERSHIP,
44 | socket.inet_aton(MULTICAST_ADDRESS) + socket.inet_aton(intf))
45 | udp_socket.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 20)
46 |
47 |
48 | print("Listening for connections")
49 |
50 | bad_gaps = {}
51 | last_new_client = None
52 | last_timestamp = {}
53 | first_timestamp = {}
54 | quit = False
55 | chickadees = []
56 | while not quit:
57 | if not last_new_client or time.clock() - last_new_client > NEW_CLIENT_PERIOD:
58 | udp_socket.sendto(struct.pack("b", 1), (MULTICAST_ADDRESS, MULTICAST_PORT))
59 | last_new_client = time.clock()
60 | try:
61 | readable, writable, errored = select.select([udp_socket] + chickadees, [], [], NEW_CLIENT_PERIOD)
62 | except KeyboardInterrupt:
63 | quit = True
64 | continue
65 | for chickadee in readable:
66 | if chickadee is udp_socket:
67 | try:
68 | data, addr = chickadee.recvfrom(BUFFER_SIZE)
69 | except:
70 | quit = True
71 | break
72 | print(len(data), addr)
73 | packet_type = struct.unpack(">b", data[0])[0]
74 | print(packet_type)
75 |
76 | # If its an I_AM_AP then tcp to it.
77 | if packet_type == PACKET_TYPE_I_AM_AP:
78 | tcp_port = struct.unpack("bbH", data)[2]
79 | ap = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
80 | print((addr[0], tcp_port))
81 | ap.connect((addr[0], tcp_port))
82 | print("init connection")
83 | chickadees.append(ap)
84 | continue
85 | try:
86 | data = chickadee.recv(BUFFER_SIZE)
87 | except:
88 | quit = True
89 | break
90 | chip_id = struct.unpack(">I", data[:4])[0]
91 | if chip_id not in bad_gaps:
92 | bad_gaps[chip_id] = []
93 | last_timestamp[chip_id] = None
94 | first_timestamp[chip_id] = None
95 | print(chip_id, (len(data) - 4) / 9)
96 | frame_group = FrameGroup(chip_id)
97 | for i in range((len(data) - 4) / 9):
98 | iteration, timestamp, frequency, strength = struct.unpack(">BIHH", data[i * 9 + 4 : (i+1) * 9 + 4])
99 | frame_group.add_frame(Frame(iteration, timestamp, frequency, strength))
100 | if i == 0:
101 | print(iteration, timestamp, frequency, strength)
102 | if last_timestamp[chip_id]:
103 | if timestamp - last_timestamp[chip_id] > 30 + 4:
104 | bad_gaps[chip_id].append(timestamp - last_timestamp[chip_id])
105 | last_timestamp[chip_id] = timestamp
106 | if not first_timestamp[chip_id]:
107 | first_timestamp[chip_id] = timestamp
108 |
109 | for q in self.output_queues:
110 | q.put(frame_group)
111 |
112 | print(sum(bad_gaps[chip_id]) * 100. / (timestamp - first_timestamp[chip_id]))
113 |
114 | for chickadee in chickadees:
115 | chickadee.close()
116 |
117 | # disconnect from the group
118 | udp_socket.setsockopt(socket.SOL_IP, socket.IP_DROP_MEMBERSHIP, socket.inet_aton(MULTICAST_ADDRESS) + socket.inet_aton('0.0.0.0'))
119 | udp_socket.close()
120 |
121 | tcp_socket.close()
122 |
--------------------------------------------------------------------------------
/apps/iOS/index.ios.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | */
5 | 'use strict';
6 |
7 | var React = require('react-native');
8 | var {
9 | AppRegistry,
10 | StyleSheet,
11 | Text,
12 | View,
13 | } = React;
14 | var Speech = require('react-native-speech');
15 | var Logger = require('./logger');
16 | var Network = require('./network');
17 | var KernelFilter = require('./kernel-filter');
18 | var PeakFinder = require('./peak-finder');
19 | var ReplayNetwork = require('./replay-network');
20 |
21 | // ImmersionRC frequencies (not RaceBand): 5740, 5760, 5780, 5800, 5820, 5840, 5860
22 | // RaceBand 5685, 5695, 5732, 5769, 5806, 5843, 5880, 5917 MHz
23 | // Boscam
24 | // FR1 5865, 5845, 5825, 5805, 5785, 5765, 5745, 5725
25 | // A Band: 5865, 5845, 5825, 5805, 5785, 5765, 5745, 5725
26 | // FR2 5733, 5752, 5771, 5790, 5809, 5828, 5847, 5866
27 | // B Band: 5733, 5752, 5771, 5790, 5809, 5828, 5847, 5866
28 | // FR3 5707, 5685, 5665, 5645, 5885, 5905, 5925, 5945
29 | // E Band: 5705, 5685, 5665, 5645, 5885, 5905, 5925, 5945
30 | // FR4 5740,5760,5780,5800,5820,5840,5860,5880
31 | var Chickadee = React.createClass({
32 | getInitialState: function() {
33 | return { frequency: "-", strength: 0 };
34 | },
35 | componentDidMount: function() {
36 | this.network = new Network();
37 | //this.network = new ReplayNetwork();
38 | this.network.addListener("newData", function(deviceId, data) {
39 | console.log(deviceId, data);
40 | let frequency = this.state.frequency;
41 | if (frequency === "-") {
42 | frequency = Object.keys(data)[0];
43 | }
44 | this.setState({"frequency": frequency, "strength": data[frequency].strengths[data[frequency].strengths.length - 1]});
45 | }.bind(this));
46 | var kernel_filter = new KernelFilter();
47 | this.network.addListener("newData", kernel_filter.processData);
48 | // this.network.addListener("connectionLost", function() {
49 | // Speech.speak({
50 | // text: "Connection lost",
51 | // voice: 'en-US',
52 | // rate: 0.5,
53 | // });
54 | // });
55 | this.logger = new Logger();
56 | this.network.addListener("newData", this.logger.processData);
57 | this.network.addListener("connectionLost", this.logger.writeFile);
58 | this.logger.addListener("logWritten", function() {
59 | console.log("logWritten");
60 | Speech.speak({
61 | text: "Connection lost. Log written",
62 | voice: 'en-US',
63 | rate: 0.5,
64 | });
65 | });
66 | this.logger.addListener("logWriteFailed", function() {
67 | Speech.speak({
68 | text: "Connection lost. Log write failed",
69 | voice: 'en-US',
70 | rate: 0.5,
71 | });
72 | });
73 | var peak_finder = new PeakFinder();
74 | kernel_filter.addListener("newData", peak_finder.processData);
75 | this.lastPeakTimestamp = {};
76 | this.lap = -1;
77 | peak_finder.addListener("newPeak", function(frequency, timestamp, strength) {
78 | if (!(frequency in this.lastPeakTimestamp)) {
79 | Speech.speak({
80 | text: "Timer ready on frequency " + frequency,
81 | voice: 'en-US',
82 | rate: 0.5,
83 | });
84 | } else {
85 | let lapTime = (timestamp - this.lastPeakTimestamp[frequency]) / 1000;
86 | this.lap++;
87 | if (this.lap === 0) {
88 | Speech.speak({
89 | text: "Timer running",
90 | voice: 'en-US',
91 | rate: 0.5,
92 | });
93 | } else if (this.lap > 0) {
94 | Speech.speak({
95 | text: "Lap " + this.lap + ". " + lapTime + " seconds",
96 | voice: 'en-US',
97 | rate: 0.5,
98 | });
99 | }
100 | }
101 | this.lastPeakTimestamp[frequency] = timestamp;
102 | }.bind(this));
103 | this.network.start();
104 | },
105 | componentWillUnmount: function() {
106 | this.network.stop();
107 | },
108 | render: function() {
109 | return (
110 |
111 |
112 | {this.state.frequency}
113 |
114 |
115 | {this.state.strength}
116 |
117 |
118 | );
119 | }
120 | });
121 |
122 | var styles = StyleSheet.create({
123 | container: {
124 | flex: 1,
125 | justifyContent: 'center',
126 | alignItems: 'center',
127 | backgroundColor: '#F5FCFF',
128 | },
129 | welcome: {
130 | fontSize: 20,
131 | textAlign: 'center',
132 | margin: 10,
133 | },
134 | instructions: {
135 | textAlign: 'center',
136 | color: '#333333',
137 | marginBottom: 5,
138 | },
139 | });
140 |
141 | AppRegistry.registerComponent('Chickadee', () => Chickadee);
142 |
--------------------------------------------------------------------------------
/apps/iOS/iOS/Chickadee.xcodeproj/xcshareddata/xcschemes/Chickadee.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
67 |
68 |
78 |
80 |
86 |
87 |
88 |
89 |
90 |
91 |
97 |
99 |
105 |
106 |
107 |
108 |
110 |
111 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/pcb/ESP-Reset.sch:
--------------------------------------------------------------------------------
1 | EESchema Schematic File Version 2
2 | LIBS:power
3 | LIBS:device
4 | LIBS:transistors
5 | LIBS:conn
6 | LIBS:linear
7 | LIBS:regul
8 | LIBS:74xx
9 | LIBS:cmos4000
10 | LIBS:adc-dac
11 | LIBS:memory
12 | LIBS:xilinx
13 | LIBS:microcontrollers
14 | LIBS:dsp
15 | LIBS:microchip
16 | LIBS:analog_switches
17 | LIBS:motorola
18 | LIBS:texas
19 | LIBS:intel
20 | LIBS:audio
21 | LIBS:interface
22 | LIBS:digital-audio
23 | LIBS:philips
24 | LIBS:display
25 | LIBS:cypress
26 | LIBS:siliconi
27 | LIBS:opto
28 | LIBS:atmel
29 | LIBS:contrib
30 | LIBS:valves
31 | LIBS:ESP8266
32 | LIBS:pololu
33 | LIBS:rx5808
34 | LIBS:dc-dc
35 | LIBS:ac-dc
36 | LIBS:actel
37 | LIBS:Altera
38 | LIBS:analog_devices
39 | LIBS:brooktre
40 | LIBS:cmos_ieee
41 | LIBS:diode
42 | LIBS:elec-unifil
43 | LIBS:ESD_Protection
44 | LIBS:ftdi
45 | LIBS:gennum
46 | LIBS:graphic
47 | LIBS:hc11
48 | LIBS:ir
49 | LIBS:Lattice
50 | LIBS:logo
51 | LIBS:maxim
52 | LIBS:microchip_dspic33dsc
53 | LIBS:microchip_pic10mcu
54 | LIBS:microchip_pic12mcu
55 | LIBS:microchip_pic16mcu
56 | LIBS:microchip_pic18mcu
57 | LIBS:microchip_pic32mcu
58 | LIBS:motor_drivers
59 | LIBS:msp430
60 | LIBS:nordicsemi
61 | LIBS:nxp_armmcu
62 | LIBS:onsemi
63 | LIBS:Oscillators
64 | LIBS:Power_Management
65 | LIBS:powerint
66 | LIBS:pspice
67 | LIBS:references
68 | LIBS:relays
69 | LIBS:rfcom
70 | LIBS:sensors
71 | LIBS:silabs
72 | LIBS:stm8
73 | LIBS:stm32
74 | LIBS:supertex
75 | LIBS:switches
76 | LIBS:transf
77 | LIBS:ttl_ieee
78 | LIBS:video
79 | LIBS:Xicor
80 | LIBS:Zilog
81 | LIBS:sma
82 | LIBS:ap7333
83 | LIBS:cmt-1603-smt-tr
84 | LIBS:74lvc1g3157
85 | LIBS:bd93291efj
86 | EELAYER 25 0
87 | EELAYER END
88 | $Descr A4 11693 8268
89 | encoding utf-8
90 | Sheet 3 3
91 | Title ""
92 | Date ""
93 | Rev ""
94 | Comp ""
95 | Comment1 ""
96 | Comment2 ""
97 | Comment3 ""
98 | Comment4 ""
99 | $EndDescr
100 | $Comp
101 | L SW_PUSH SW1
102 | U 1 1 5615B5FF
103 | P 5100 3900
104 | F 0 "SW1" H 5250 4010 50 0000 C CNN
105 | F 1 "SW_PUSH" H 5100 3820 50 0000 C CNN
106 | F 2 "Buttons_Switches_SMD:SW_SPST_PTS645" H 5100 3900 60 0001 C CNN
107 | F 3 "" H 5100 3900 60 0000 C CNN
108 | 1 5100 3900
109 | 1 0 0 -1
110 | $EndComp
111 | $Comp
112 | L C C1
113 | U 1 1 5615B641
114 | P 5100 4200
115 | F 0 "C1" H 5125 4300 50 0000 L CNN
116 | F 1 "0.1uF" H 5125 4100 50 0000 L CNN
117 | F 2 "Capacitors_SMD:C_0603_HandSoldering" H 5138 4050 30 0001 C CNN
118 | F 3 "" H 5100 4200 60 0000 C CNN
119 | 1 5100 4200
120 | 0 1 1 0
121 | $EndComp
122 | $Comp
123 | L GNDPWR #PWR041
124 | U 1 1 5615B692
125 | P 4800 4550
126 | F 0 "#PWR041" H 4800 4350 50 0001 C CNN
127 | F 1 "GNDPWR" H 4800 4420 50 0000 C CNN
128 | F 2 "" H 4800 4500 60 0000 C CNN
129 | F 3 "" H 4800 4500 60 0000 C CNN
130 | 1 4800 4550
131 | 1 0 0 -1
132 | $EndComp
133 | Text HLabel 5400 4550 3 60 Input ~ 0
134 | RESET
135 | $Comp
136 | L C C2
137 | U 1 1 56161A55
138 | P 6950 3800
139 | F 0 "C2" H 6975 3900 50 0000 L CNN
140 | F 1 "2.2uF" H 6975 3700 50 0000 L CNN
141 | F 2 "Capacitors_SMD:C_0603_HandSoldering" H 6988 3650 30 0001 C CNN
142 | F 3 "" H 6950 3800 60 0000 C CNN
143 | 1 6950 3800
144 | 1 0 0 -1
145 | $EndComp
146 | $Comp
147 | L R R1
148 | U 1 1 56161A89
149 | P 6000 3250
150 | F 0 "R1" V 6080 3250 50 0000 C CNN
151 | F 1 "470k" V 6000 3250 50 0000 C CNN
152 | F 2 "Resistors_SMD:R_0603_HandSoldering" V 5930 3250 30 0001 C CNN
153 | F 3 "" H 6000 3250 30 0000 C CNN
154 | 1 6000 3250
155 | 1 0 0 -1
156 | $EndComp
157 | $Comp
158 | L R R2
159 | U 1 1 56161B4F
160 | P 6450 3550
161 | F 0 "R2" V 6530 3550 50 0000 C CNN
162 | F 1 "100k" V 6450 3550 50 0000 C CNN
163 | F 2 "Resistors_SMD:R_0603_HandSoldering" V 6380 3550 30 0001 C CNN
164 | F 3 "" H 6450 3550 30 0000 C CNN
165 | 1 6450 3550
166 | 0 1 1 0
167 | $EndComp
168 | Text HLabel 7900 3200 2 60 Input ~ 0
169 | GPIO0
170 | $Comp
171 | L GNDPWR #PWR042
172 | U 1 1 56161C1C
173 | P 7600 4400
174 | F 0 "#PWR042" H 7600 4200 50 0001 C CNN
175 | F 1 "GNDPWR" H 7600 4270 50 0000 C CNN
176 | F 2 "" H 7600 4350 60 0000 C CNN
177 | F 3 "" H 7600 4350 60 0000 C CNN
178 | 1 7600 4400
179 | 1 0 0 -1
180 | $EndComp
181 | $Comp
182 | L GNDPWR #PWR043
183 | U 1 1 56161C45
184 | P 6950 4400
185 | F 0 "#PWR043" H 6950 4200 50 0001 C CNN
186 | F 1 "GNDPWR" H 6950 4270 50 0000 C CNN
187 | F 2 "" H 6950 4350 60 0000 C CNN
188 | F 3 "" H 6950 4350 60 0000 C CNN
189 | 1 6950 4400
190 | 1 0 0 -1
191 | $EndComp
192 | $Comp
193 | L GNDPWR #PWR044
194 | U 1 1 56161C6E
195 | P 6000 4400
196 | F 0 "#PWR044" H 6000 4200 50 0001 C CNN
197 | F 1 "GNDPWR" H 6000 4270 50 0000 C CNN
198 | F 2 "" H 6000 4350 60 0000 C CNN
199 | F 3 "" H 6000 4350 60 0000 C CNN
200 | 1 6000 4400
201 | 1 0 0 -1
202 | $EndComp
203 | $Comp
204 | L +3.3V #PWR045
205 | U 1 1 56161CF8
206 | P 6000 3100
207 | F 0 "#PWR045" H 6000 2950 50 0001 C CNN
208 | F 1 "+3.3V" H 6000 3240 50 0000 C CNN
209 | F 2 "" H 6000 3100 60 0000 C CNN
210 | F 3 "" H 6000 3100 60 0000 C CNN
211 | 1 6000 3100
212 | 1 0 0 -1
213 | $EndComp
214 | Wire Wire Line
215 | 4800 3900 4800 4550
216 | Wire Wire Line
217 | 4950 4200 4800 4200
218 | Connection ~ 4800 4200
219 | Wire Wire Line
220 | 5400 3900 5400 4550
221 | Wire Wire Line
222 | 5250 4200 5400 4200
223 | Connection ~ 5400 4200
224 | Wire Wire Line
225 | 6600 3550 7300 3550
226 | Wire Wire Line
227 | 6950 3650 6950 3550
228 | Connection ~ 6950 3550
229 | Wire Wire Line
230 | 6000 3400 6000 3700
231 | Wire Wire Line
232 | 6300 3550 6000 3550
233 | Connection ~ 6000 3550
234 | Wire Wire Line
235 | 5400 3900 5700 3900
236 | Wire Wire Line
237 | 7600 3350 7600 3200
238 | Wire Wire Line
239 | 7600 3200 7900 3200
240 | Wire Wire Line
241 | 7600 3750 7600 4400
242 | Wire Wire Line
243 | 6950 3950 6950 4400
244 | Wire Wire Line
245 | 6000 4100 6000 4400
246 | $Comp
247 | L Q_NMOS_GSD Q1
248 | U 1 1 563A7E46
249 | P 5900 3900
250 | F 0 "Q1" H 6200 3950 50 0000 R CNN
251 | F 1 "Q_NMOS_GSD" H 6550 3850 50 0000 R CNN
252 | F 2 "Housings_SOT-23_SOT-143_TSOT-6:SOT-23_Handsoldering" H 6100 4000 29 0001 C CNN
253 | F 3 "" H 5900 3900 60 0000 C CNN
254 | 1 5900 3900
255 | 1 0 0 -1
256 | $EndComp
257 | $Comp
258 | L Q_NMOS_GSD Q2
259 | U 1 1 563A7EF9
260 | P 7500 3550
261 | F 0 "Q2" H 7800 3600 50 0000 R CNN
262 | F 1 "Q_NMOS_GSD" H 8150 3500 50 0000 R CNN
263 | F 2 "Housings_SOT-23_SOT-143_TSOT-6:SOT-23_Handsoldering" H 7700 3650 29 0001 C CNN
264 | F 3 "" H 7500 3550 60 0000 C CNN
265 | 1 7500 3550
266 | 1 0 0 -1
267 | $EndComp
268 | Text Notes 7750 7050 0 60 ~ 0
269 | Creative Commons CC-0 from https://github.com/baoshi/ESP-Breakout
270 | Text Notes 9950 6900 0 60 ~ 0
271 | (c) 2015 Scott Shawcroft
272 | Text Notes 9700 6750 0 118 ~ 0
273 | Laptimer 5.8 v4
274 | Text Notes 4550 2750 0 118 ~ 0
275 | This circuit uses one button to both reset\nthe ESP-12 after a short press and reset it\nto the bootloader after a long press. The\norange LED will light up bright if the reset\nwill lead to the bootloader. Once it the\nbootloader, the led will be dimly lit.
276 | Text Notes 8250 7350 0 118 ~ 0
277 | https://chickadee.tech/lt58/v4
278 | $EndSCHEMATC
279 |
--------------------------------------------------------------------------------
/tools/log_analysis/analyze.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | from __future__ import print_function
3 |
4 | import argparse
5 |
6 | import json
7 | import math
8 | import struct
9 | import sys
10 | import datetime
11 |
12 | import matplotlib.pyplot as plt
13 |
14 | import numpy
15 | import scipy.signal
16 |
17 | # From https://gist.github.com/endolith/250860
18 | def peakdet(v, delta, x = None):
19 | """
20 | Converted from MATLAB script at http://billauer.co.il/peakdet.html
21 |
22 | Returns two arrays
23 |
24 | function [maxtab, mintab]=peakdet(v, delta, x)
25 | %PEAKDET Detect peaks in a vector
26 | % [MAXTAB, MINTAB] = PEAKDET(V, DELTA) finds the local
27 | % maxima and minima ("peaks") in the vector V.
28 | % MAXTAB and MINTAB consists of two columns. Column 1
29 | % contains indices in V, and column 2 the found values.
30 | %
31 | % With [MAXTAB, MINTAB] = PEAKDET(V, DELTA, X) the indices
32 | % in MAXTAB and MINTAB are replaced with the corresponding
33 | % X-values.
34 | %
35 | % A point is considered a maximum peak if it has the maximal
36 | % value, and was preceded (to the left) by a value lower by
37 | % DELTA.
38 |
39 | % Eli Billauer, 3.4.05 (Explicitly not copyrighted).
40 | % This function is released to the public domain; Any use is allowed.
41 |
42 | """
43 | maxtab = []
44 | mintab = []
45 |
46 | if x is None:
47 | x = numpy.arange(len(v))
48 |
49 | v = numpy.asarray(v)
50 |
51 | if len(v) != len(x):
52 | sys.exit('Input vectors v and x must have same length')
53 |
54 | if not numpy.isscalar(delta):
55 | sys.exit('Input argument delta must be a scalar')
56 |
57 | if delta <= 0:
58 | sys.exit('Input argument delta must be positive')
59 |
60 | mn, mx = numpy.Inf, -numpy.Inf
61 | mnpos, mxpos = numpy.NaN, numpy.NaN
62 |
63 | lookformax = True
64 |
65 | for i in numpy.arange(len(v)):
66 | this = v[i]
67 | if this > mx:
68 | mx = this
69 | mxpos = x[i]
70 | if this < mn:
71 | mn = this
72 | mnpos = x[i]
73 |
74 | if lookformax:
75 | if this < mx-delta:
76 | maxtab.append((mxpos, mx))
77 | mn = this
78 | mnpos = x[i]
79 | lookformax = False
80 | else:
81 | if this > mn+delta:
82 | mintab.append((mnpos, mn))
83 | mx = this
84 | mxpos = x[i]
85 | lookformax = True
86 |
87 | return numpy.array(maxtab), numpy.array(mintab)
88 |
89 |
90 | parser = argparse.ArgumentParser()
91 | parser.add_argument("--times")
92 | parser.add_argument("ckd_one")
93 | parser.add_argument("ckd_two")
94 | args = parser.parse_args()
95 |
96 | total_samples = 0
97 | start_time = None
98 | end_time = None
99 | split_data = []
100 | for fn in [args.ckd_one, args.ckd_two]:
101 | if ":" in fn:
102 | fn, shift = fn.split(":")
103 | shift = int(shift)
104 | else:
105 | shift = 0
106 | if "x" in fn:
107 | fn, scale = fn.split("x")
108 | scale = float(scale)
109 | else:
110 | scale = 1.0
111 | this_data = {}
112 | split_data.append(this_data)
113 | with open(fn, "r") as f:
114 | if fn.endswith("CKD"):
115 | header = f.readline().strip()
116 | name, version = header.split()
117 | extra_headers = 0
118 | if version == "0.0.2":
119 | extra_headers = 1
120 | elif version == "0.0.3":
121 | extra_headers = 3
122 | for x in xrange(extra_headers):
123 | print(f.readline().strip())
124 | packet = f.read(9)
125 | while len(packet) == 9:
126 | i, timestamp, frequency, strength = struct.unpack(">BIHH", packet)
127 | if frequency != 5800:
128 | packet = f.read(9)
129 | continue
130 |
131 | if frequency not in this_data:
132 | this_data[frequency] = [[], []]
133 | this_data[frequency][0].append(shift + timestamp)
134 | this_data[frequency][1].append(strength * scale)
135 | if not start_time:
136 | start_time = timestamp
137 | end_time = timestamp
138 | total_samples += 1
139 | packet = f.read(9)
140 | elif fn.endswith("json"):
141 | o = json.load(f)
142 | for group in o["frame_groups"]:
143 | for frame in group["frames"]:
144 | i = frame["iteration"]
145 | timestamp = frame["timestamp"]
146 | frequency = frame["frequency"]
147 | strength = frame["strength"]
148 | if frequency != 5800:
149 | continue
150 |
151 | if frequency not in this_data:
152 | this_data[frequency] = [[], []]
153 | this_data[frequency][0].append(shift + timestamp)
154 | this_data[frequency][1].append(strength * scale)
155 |
156 | smoothed = []
157 | for frequency_data in split_data:
158 | for frequency in frequency_data:
159 | frequency_data[frequency][0] = numpy.array(frequency_data[frequency][0], dtype=numpy.uint32)
160 | strengths = numpy.array(frequency_data[frequency][1], dtype=numpy.uint16)
161 | #smoothed = scipy.signal.savgol_filter(strengths, 21, 3)
162 | smoothed = scipy.signal.savgol_filter(strengths, 21, 2)
163 | frequency_data[frequency][1] = smoothed
164 | plt.plot(frequency_data[frequency][0], strengths, ".")
165 | plt.plot(frequency_data[frequency][0], smoothed)
166 | #smoothed = strengths
167 |
168 | # for frequency_data in split_data:
169 | # for frequency in frequency_data:
170 | # old_data = frequency_data[frequency][1]
171 | # sqrt = numpy.array(old_data, dtype=numpy.float32)
172 | # frequency_data[frequency][1] = sqrt
173 | # for i in xrange(len(frequency_data[frequency][1])):
174 | # sqrt[i] = math.sqrt(old_data[i])
175 |
176 | summed_data = {}
177 | for frequency in split_data[0]:
178 | t1, s1 = split_data[0][frequency]
179 | t2, s2 = split_data[1][frequency]
180 | i1 = 0
181 | i2 = 0
182 | times = []
183 | strengths = []
184 | summed_data[frequency] = (times, strengths)
185 | while i1 < len(t1) and i2 < len(t2):
186 | if t1[i1] < t2[i2]:
187 | if i2 > 0:
188 | times.append(t1[i1])
189 | strengths.append(s1[i1] + s2[i2 - 1])
190 | i1 += 1
191 | elif t1[i1] > t2[i2]:
192 | if i1 > 0:
193 | times.append(t2[i2])
194 | strengths.append(s1[i1 - 1] + s2[i2])
195 | i2 += 1
196 | else:
197 | times.append(t2[i2])
198 | strengths.append(s1[i1] + s2[i2])
199 | i1 += 1
200 | i2 += 1
201 |
202 | for frequency in summed_data:
203 | times, strengths = summed_data[frequency]
204 | peaks, valleys = peakdet(strengths, 80, times)
205 | plt.plot(times, strengths)
206 | if len(peaks) > 0:
207 | plt.scatter(peaks[:,0], peaks[:,1], color='blue')
208 | plt.scatter(valleys[:,0], valleys[:,1], color='red')
209 |
210 | golden_times = []
211 | if args.times:
212 | with open(args.times, "r") as f:
213 | for line in f.readlines():
214 | minutes, seconds = line.strip().split(":")
215 | golden_times.append(datetime.timedelta(minutes=int(minutes),
216 | seconds=float(seconds)))
217 |
218 | first = None
219 | previous = None
220 | print()
221 | print("lap time")
222 | print("computed real delta")
223 | for peak, golden in zip(peaks[1:], golden_times):
224 | peak = datetime.timedelta(milliseconds=int(peak[0]))
225 | if not first:
226 | first = (peak, golden)
227 | #print(peak, golden)
228 | else:
229 | peak_diff = peak - previous[0]
230 | golden_diff = golden - previous[1]
231 | diff_diff = golden_diff - peak_diff
232 | dd = str(abs(diff_diff))
233 | if diff_diff.days < 0:
234 | dd = "-" + dd
235 | print(peak_diff, golden_diff, dd)
236 | previous = (peak, golden)
237 | plt.show()
238 |
--------------------------------------------------------------------------------
/pcb/Regulator.sch:
--------------------------------------------------------------------------------
1 | EESchema Schematic File Version 2
2 | LIBS:power
3 | LIBS:device
4 | LIBS:transistors
5 | LIBS:conn
6 | LIBS:linear
7 | LIBS:regul
8 | LIBS:74xx
9 | LIBS:cmos4000
10 | LIBS:adc-dac
11 | LIBS:memory
12 | LIBS:xilinx
13 | LIBS:microcontrollers
14 | LIBS:dsp
15 | LIBS:microchip
16 | LIBS:analog_switches
17 | LIBS:motorola
18 | LIBS:texas
19 | LIBS:intel
20 | LIBS:audio
21 | LIBS:interface
22 | LIBS:digital-audio
23 | LIBS:philips
24 | LIBS:display
25 | LIBS:cypress
26 | LIBS:siliconi
27 | LIBS:opto
28 | LIBS:atmel
29 | LIBS:contrib
30 | LIBS:valves
31 | LIBS:ESP8266
32 | LIBS:pololu
33 | LIBS:rx5808
34 | LIBS:dc-dc
35 | LIBS:ac-dc
36 | LIBS:actel
37 | LIBS:Altera
38 | LIBS:analog_devices
39 | LIBS:brooktre
40 | LIBS:cmos_ieee
41 | LIBS:diode
42 | LIBS:elec-unifil
43 | LIBS:ESD_Protection
44 | LIBS:ftdi
45 | LIBS:gennum
46 | LIBS:graphic
47 | LIBS:hc11
48 | LIBS:ir
49 | LIBS:Lattice
50 | LIBS:logo
51 | LIBS:maxim
52 | LIBS:microchip_dspic33dsc
53 | LIBS:microchip_pic10mcu
54 | LIBS:microchip_pic12mcu
55 | LIBS:microchip_pic16mcu
56 | LIBS:microchip_pic18mcu
57 | LIBS:microchip_pic32mcu
58 | LIBS:motor_drivers
59 | LIBS:msp430
60 | LIBS:nordicsemi
61 | LIBS:nxp_armmcu
62 | LIBS:onsemi
63 | LIBS:Oscillators
64 | LIBS:Power_Management
65 | LIBS:powerint
66 | LIBS:pspice
67 | LIBS:references
68 | LIBS:relays
69 | LIBS:rfcom
70 | LIBS:sensors
71 | LIBS:silabs
72 | LIBS:stm8
73 | LIBS:stm32
74 | LIBS:supertex
75 | LIBS:switches
76 | LIBS:transf
77 | LIBS:ttl_ieee
78 | LIBS:video
79 | LIBS:Xicor
80 | LIBS:Zilog
81 | LIBS:sma
82 | LIBS:ap7333
83 | LIBS:cmt-1603-smt-tr
84 | LIBS:74lvc1g3157
85 | LIBS:bd93291efj
86 | EELAYER 25 0
87 | EELAYER END
88 | $Descr A4 11693 8268
89 | encoding utf-8
90 | Sheet 2 3
91 | Title ""
92 | Date ""
93 | Rev ""
94 | Comp ""
95 | Comment1 ""
96 | Comment2 ""
97 | Comment3 ""
98 | Comment4 ""
99 | $EndDescr
100 | $Comp
101 | L LM2674M-3.3 U3
102 | U 1 1 5616FB1E
103 | P 4800 3100
104 | F 0 "U3" H 4400 3550 50 0000 L CNN
105 | F 1 "LM2674M-3.3" H 4400 3450 50 0000 L CNN
106 | F 2 "Housings_SOIC:SOIC-8_3.9x4.9mm_Pitch1.27mm" H 5100 2750 50 0000 C CIN
107 | F 3 "" H 4800 3100 50 0000 C CNN
108 | 1 4800 3100
109 | 1 0 0 -1
110 | $EndComp
111 | $Comp
112 | L INDUCTOR L1
113 | U 1 1 5616FC17
114 | P 6300 3600
115 | F 0 "L1" V 6250 3600 50 0000 C CNN
116 | F 1 "68uH" V 6400 3600 50 0000 C CNN
117 | F 2 "slf7032:SLF7032" H 6300 3600 60 0001 C CNN
118 | F 3 "" H 6300 3600 60 0000 C CNN
119 | 1 6300 3600
120 | 0 1 1 0
121 | $EndComp
122 | $Comp
123 | L C CB1
124 | U 1 1 5616FC4F
125 | P 5700 3250
126 | F 0 "CB1" H 5725 3350 50 0000 L CNN
127 | F 1 "0.01uF" H 5725 3150 50 0000 L CNN
128 | F 2 "Capacitors_SMD:C_0603_HandSoldering" H 5738 3100 30 0001 C CNN
129 | F 3 "" H 5700 3250 60 0000 C CNN
130 | 1 5700 3250
131 | 1 0 0 -1
132 | $EndComp
133 | NoConn ~ 4300 3100
134 | Wire Wire Line
135 | 6600 2900 6600 3800
136 | Wire Wire Line
137 | 6600 2900 5300 2900
138 | Connection ~ 6600 3600
139 | Wire Wire Line
140 | 5300 3300 5500 3300
141 | Wire Wire Line
142 | 5500 3300 5500 3400
143 | Wire Wire Line
144 | 5500 3400 5700 3400
145 | Wire Wire Line
146 | 5700 3400 5700 3600
147 | Wire Wire Line
148 | 5700 3600 6000 3600
149 | Wire Wire Line
150 | 5700 3100 5300 3100
151 | Wire Wire Line
152 | 5300 3800 5300 3300
153 | Wire Wire Line
154 | 4800 4100 4800 3500
155 | Wire Wire Line
156 | 3500 2900 4300 2900
157 | Wire Wire Line
158 | 4000 2900 4000 3000
159 | Wire Wire Line
160 | 4000 3300 4000 4100
161 | Connection ~ 4000 2900
162 | Wire Wire Line
163 | 6600 3600 7000 3600
164 | $Comp
165 | L +BATT #PWR029
166 | U 1 1 5616FE72
167 | P 3500 2900
168 | F 0 "#PWR029" H 3500 2750 50 0001 C CNN
169 | F 1 "+BATT" H 3500 3040 50 0000 C CNN
170 | F 2 "" H 3500 2900 60 0000 C CNN
171 | F 3 "" H 3500 2900 60 0000 C CNN
172 | 1 3500 2900
173 | 0 -1 -1 0
174 | $EndComp
175 | $Comp
176 | L GNDPWR #PWR030
177 | U 1 1 5616FE98
178 | P 4000 4100
179 | F 0 "#PWR030" H 4000 3900 50 0001 C CNN
180 | F 1 "GNDPWR" H 4000 3970 50 0000 C CNN
181 | F 2 "" H 4000 4050 60 0000 C CNN
182 | F 3 "" H 4000 4050 60 0000 C CNN
183 | 1 4000 4100
184 | 1 0 0 -1
185 | $EndComp
186 | $Comp
187 | L GNDPWR #PWR031
188 | U 1 1 5616FEBE
189 | P 4800 4100
190 | F 0 "#PWR031" H 4800 3900 50 0001 C CNN
191 | F 1 "GNDPWR" H 4800 3970 50 0000 C CNN
192 | F 2 "" H 4800 4050 60 0000 C CNN
193 | F 3 "" H 4800 4050 60 0000 C CNN
194 | 1 4800 4100
195 | 1 0 0 -1
196 | $EndComp
197 | $Comp
198 | L GNDPWR #PWR032
199 | U 1 1 5616FEE4
200 | P 5300 4100
201 | F 0 "#PWR032" H 5300 3900 50 0001 C CNN
202 | F 1 "GNDPWR" H 5300 3970 50 0000 C CNN
203 | F 2 "" H 5300 4050 60 0000 C CNN
204 | F 3 "" H 5300 4050 60 0000 C CNN
205 | 1 5300 4100
206 | 1 0 0 -1
207 | $EndComp
208 | $Comp
209 | L GNDPWR #PWR033
210 | U 1 1 5616FF0A
211 | P 6600 4100
212 | F 0 "#PWR033" H 6600 3900 50 0001 C CNN
213 | F 1 "GNDPWR" H 6600 3970 50 0000 C CNN
214 | F 2 "" H 6600 4050 60 0000 C CNN
215 | F 3 "" H 6600 4050 60 0000 C CNN
216 | 1 6600 4100
217 | 1 0 0 -1
218 | $EndComp
219 | $Comp
220 | L D_Schottky D1
221 | U 1 1 5616FF59
222 | P 5300 3950
223 | F 0 "D1" V 5300 4050 50 0000 C CNN
224 | F 1 "SD103BWS-TP" H 5300 3850 50 0000 C CNN
225 | F 2 "Diodes_SMD:SOD-323" H 5300 3950 60 0001 C CNN
226 | F 3 "" H 5300 3950 60 0000 C CNN
227 | 1 5300 3950
228 | 0 1 1 0
229 | $EndComp
230 | $Comp
231 | L +5V #PWR034
232 | U 1 1 56170087
233 | P 7000 3600
234 | F 0 "#PWR034" H 7000 3450 50 0001 C CNN
235 | F 1 "+5V" H 7000 3740 50 0000 C CNN
236 | F 2 "" H 7000 3600 60 0000 C CNN
237 | F 3 "" H 7000 3600 60 0000 C CNN
238 | 1 7000 3600
239 | 0 1 1 0
240 | $EndComp
241 | $Comp
242 | L C C3
243 | U 1 1 561707C5
244 | P 4450 4950
245 | F 0 "C3" H 4475 5050 50 0000 L CNN
246 | F 1 "2.2uF" H 4200 4850 50 0000 L CNN
247 | F 2 "Capacitors_SMD:C_0603_HandSoldering" H 4488 4800 30 0001 C CNN
248 | F 3 "" H 4450 4950 60 0000 C CNN
249 | 1 4450 4950
250 | 1 0 0 -1
251 | $EndComp
252 | $Comp
253 | L C C4
254 | U 1 1 561707FF
255 | P 5250 4950
256 | F 0 "C4" H 5275 5050 50 0000 L CNN
257 | F 1 "2.2uF" H 5275 4850 50 0000 L CNN
258 | F 2 "Capacitors_SMD:C_0603_HandSoldering" H 5288 4800 30 0001 C CNN
259 | F 3 "" H 5250 4950 60 0000 C CNN
260 | 1 5250 4950
261 | 1 0 0 -1
262 | $EndComp
263 | $Comp
264 | L AP7333 U4
265 | U 1 1 5617091E
266 | P 4850 4900
267 | F 0 "U4" H 4850 5100 60 0000 C CNN
268 | F 1 "AP7333" H 4850 4900 60 0000 C CNN
269 | F 2 "Housings_SOT-23_SOT-143_TSOT-6:SOT-23_Handsoldering" H 4850 4900 60 0001 C CNN
270 | F 3 "" H 4850 4900 60 0000 C CNN
271 | 1 4850 4900
272 | 1 0 0 -1
273 | $EndComp
274 | $Comp
275 | L GNDPWR #PWR035
276 | U 1 1 5617099E
277 | P 4450 5100
278 | F 0 "#PWR035" H 4450 4900 50 0001 C CNN
279 | F 1 "GNDPWR" H 4450 4970 50 0000 C CNN
280 | F 2 "" H 4450 5050 60 0000 C CNN
281 | F 3 "" H 4450 5050 60 0000 C CNN
282 | 1 4450 5100
283 | 1 0 0 -1
284 | $EndComp
285 | $Comp
286 | L GNDPWR #PWR036
287 | U 1 1 561709D4
288 | P 4850 5350
289 | F 0 "#PWR036" H 4850 5150 50 0001 C CNN
290 | F 1 "GNDPWR" H 4850 5220 50 0000 C CNN
291 | F 2 "" H 4850 5300 60 0000 C CNN
292 | F 3 "" H 4850 5300 60 0000 C CNN
293 | 1 4850 5350
294 | 1 0 0 -1
295 | $EndComp
296 | $Comp
297 | L GNDPWR #PWR037
298 | U 1 1 561709FA
299 | P 5250 5100
300 | F 0 "#PWR037" H 5250 4900 50 0001 C CNN
301 | F 1 "GNDPWR" H 5250 4970 50 0000 C CNN
302 | F 2 "" H 5250 5050 60 0000 C CNN
303 | F 3 "" H 5250 5050 60 0000 C CNN
304 | 1 5250 5100
305 | 1 0 0 -1
306 | $EndComp
307 | Wire Wire Line
308 | 5250 4800 5550 4800
309 | Wire Wire Line
310 | 4450 4800 4200 4800
311 | $Comp
312 | L +5V #PWR038
313 | U 1 1 56170A5B
314 | P 4200 4800
315 | F 0 "#PWR038" H 4200 4650 50 0001 C CNN
316 | F 1 "+5V" H 4200 4940 50 0000 C CNN
317 | F 2 "" H 4200 4800 60 0000 C CNN
318 | F 3 "" H 4200 4800 60 0000 C CNN
319 | 1 4200 4800
320 | 0 -1 -1 0
321 | $EndComp
322 | $Comp
323 | L +3.3V #PWR039
324 | U 1 1 56170A8A
325 | P 5550 4800
326 | F 0 "#PWR039" H 5550 4650 50 0001 C CNN
327 | F 1 "+3.3V" H 5550 4940 50 0000 C CNN
328 | F 2 "" H 5550 4800 60 0000 C CNN
329 | F 3 "" H 5550 4800 60 0000 C CNN
330 | 1 5550 4800
331 | 0 1 1 0
332 | $EndComp
333 | $Comp
334 | L PWR_FLAG #FLG040
335 | U 1 1 561839C2
336 | P 6600 2900
337 | F 0 "#FLG040" H 6600 2995 50 0001 C CNN
338 | F 1 "PWR_FLAG" H 6600 3080 50 0000 C CNN
339 | F 2 "" H 6600 2900 60 0000 C CNN
340 | F 3 "" H 6600 2900 60 0000 C CNN
341 | 1 6600 2900
342 | 1 0 0 -1
343 | $EndComp
344 | Text Label 5700 3600 0 60 ~ 0
345 | 5uf
346 | $Comp
347 | L CP Cout1
348 | U 1 1 56317446
349 | P 6600 3950
350 | F 0 "Cout1" H 6625 4050 50 0000 L CNN
351 | F 1 "100uF" H 6625 3850 50 0000 L CNN
352 | F 2 "Capacitors_Tantalum_SMD:TantalC_SizeD_EIA-7343_HandSoldering" H 6638 3800 30 0001 C CNN
353 | F 3 "" H 6600 3950 60 0000 C CNN
354 | 1 6600 3950
355 | 1 0 0 -1
356 | $EndComp
357 | $Comp
358 | L CP Cin1
359 | U 1 1 56317521
360 | P 4000 3150
361 | F 0 "Cin1" H 4025 3250 50 0000 L CNN
362 | F 1 "68uF" H 4025 3050 50 0000 L CNN
363 | F 2 "Capacitors_SMD:c_elec_6.3x7.7" H 4038 3000 30 0001 C CNN
364 | F 3 "" H 4000 3150 60 0000 C CNN
365 | 1 4000 3150
366 | 1 0 0 -1
367 | $EndComp
368 | Text Notes 8100 7050 0 60 ~ 0
369 | Creative Commons Attribution-ShareAlike 4.0 International License
370 | Text Notes 10000 6900 0 60 ~ 0
371 | (c) 2015 Scott Shawcroft
372 | Text Notes 9750 6750 0 118 ~ 0
373 | Laptimer 5.8 v4
374 | Text Notes 8300 7350 0 118 ~ 0
375 | https://chickadee.tech/lt58/v4
376 | $EndSCHEMATC
377 |
--------------------------------------------------------------------------------
/pcb/Chickadee.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | /Users/tannewt/chickadee-laptimer-pcb/Chickadee.sch
5 | Wednesday, October 07, 2015 'PMt' 03:18:58 PM
6 | Eeschema (2015-10-06 BZR 6248)-product
7 |
8 |
9 |
10 |
11 |
12 |
13 | Chickadee.sch
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | Regulator.sch
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | ESP-12E
37 | ESP8266:ESP-12E
38 |
39 |
40 | 56144F8D
41 |
42 |
43 | BARREL_JACK
44 | Connect:BARREL_JACK
45 |
46 |
47 | 56145993
48 |
49 |
50 | RX5808
51 |
52 |
53 | 561470C4
54 |
55 |
56 | BD93291EFJ
57 |
58 |
59 | 56158FFE
60 |
61 |
62 | 10uF
63 |
64 |
65 | 5615903E
66 |
67 |
68 | 10uF
69 |
70 |
71 | 56159080
72 |
73 |
74 | 22uF
75 |
76 |
77 | 561590AD
78 |
79 |
80 | 680pF
81 |
82 |
83 | 561590D6
84 |
85 |
86 | 22uF
87 |
88 |
89 | 5615913A
90 |
91 |
92 | 0.1uF
93 |
94 |
95 | 561591FF
96 |
97 |
98 | 22uH
99 |
100 |
101 | 56159A98
102 |
103 |
104 | 2.2uH
105 |
106 |
107 | 56159EA9
108 |
109 |
110 | 16kOhm
111 |
112 |
113 | 5615A00A
114 |
115 |
116 | 5.1kOhm
117 |
118 |
119 | 5615A058
120 |
121 |
122 |
123 |
124 |
125 | REG
126 | BD93291EFJ
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 | ESP8622 ESP-12E module, 22 pins, 2mm, PCB antenna
141 | http://l0l.org.uk/2014/12/esp8266-modules-hardware-guide-gotta-catch-em-all/
142 |
143 | ESP-12E
144 |
145 |
146 | U
147 | ESP-12E
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 | RF
177 | RX5808
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 | L
197 | INDUCTOR
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 | DC Barrel Jack
206 |
207 | CON
208 | BARREL_JACK
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 | Unpolarized capacitor
218 |
219 | C?
220 | C_????_*
221 | C_????
222 | SMD*_c
223 | Capacitor*
224 |
225 |
226 | C
227 | C
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 | Resistor
236 |
237 | Resistor_*
238 | R_*
239 |
240 |
241 | R
242 | R_Small
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 | /Users/tannewt/kicad/libraries/kicad-ESP8266/ESP8266.lib
253 |
254 |
255 | /Users/tannewt/kicad/libraries/kicad-rx5808/rx5808.lib
256 |
257 |
258 | ../../shared/kicad/libraries/public/components/bd93291efj.lib
259 |
260 |
261 | /Library/Application Support/kicad/library/conn.lib
262 |
263 |
264 | /Library/Application Support/kicad/library/device.lib
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
--------------------------------------------------------------------------------
/firmware/arduino/chickadee/chickadee.ino:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | // Wifi related globals.
6 | const char* SSID = "chickadee";
7 | const char* PASSWORD = "iflyfast";
8 |
9 | const IPAddress MULTICAST_ADDRESS(239, 249, 134, 147);
10 | const uint16_t PORT = 59734;
11 |
12 | // Radio related globals.
13 | const unsigned int TUNE_TIME_MS = 30; // 30
14 |
15 | // Cross-power up globals.
16 | const uint32_t EEPROM_VERSION = 1;
17 |
18 | const uint16_t MAX_JOIN_DELAY = 15000;
19 |
20 | #define RSSI_READS 3 // used to be 10 but took 4ms
21 |
22 | const int BOARD_LED = 0;
23 | const int ESP_LED = 2;
24 | const int SPEAKER = 14;
25 | const int ADC_SELECT = 12;
26 |
27 | const int RCV_CHIP_SELECT = 4;
28 | const int RCV_CLK = 5;
29 | const int RCV_DATA = 13;
30 |
31 | const uint8_t PACKET_TYPE_NEW_CLIENT = 1;
32 | const uint8_t PACKET_TYPE_NEW_PEER = 2;
33 | const uint8_t PACKET_TYPE_I_AM_AP = 3;
34 |
35 | const uint8_t PEER_LED_ON_CYCLE_COUNT = 2;
36 | const uint8_t PEER_LED_BREAK_CYCLE_COUNT = 20;
37 |
38 | const uint8_t ERROR_NO_WIFI = 1;
39 | const uint8_t ERROR_MAX_CLIENTS = 2;
40 | const uint8_t ERROR_MAX_PEERS = 3;
41 |
42 | int errorCode = -1;
43 |
44 | unsigned long lastReadTime;
45 | unsigned long lastTuneTime;
46 |
47 | IPAddress ourIp;
48 |
49 | WiFiUDP udp;
50 |
51 | // If we are the AP we must also forward packets from peers to clients.
52 | bool isAP = false;
53 |
54 | #define TCP_SERVER_PORT 59736
55 | WiFiServer server(TCP_SERVER_PORT);
56 |
57 | uint8_t controlPacket[] = {0, 0, 0, 0};
58 |
59 | void setup() {
60 | Serial.begin(115200);
61 | delay(10);
62 |
63 | uint32_t chipId = ESP.getChipId();
64 | Serial.println(chipId);
65 |
66 | // Get our file counter.
67 | EEPROM.begin(12);
68 | uint32_t storedChipId;
69 | EEPROM.get(0, storedChipId);
70 | //Serial.println(storedChipId);
71 | // Initialize the eeprom completely.
72 | if (storedChipId != chipId) {
73 | EEPROM.put(0, chipId);
74 | EEPROM.put(4, EEPROM_VERSION);
75 | }
76 | EEPROM.end();
77 |
78 | pinMode(0, OUTPUT);
79 |
80 | // ADC_SELECT switches between measuring RSSI and battery voltage. v3 boards
81 | // don't have the battery voltage divider hooked up so we just set it to the
82 | // RSSI for good. LOW is the battery voltage.
83 | pinMode(ADC_SELECT, OUTPUT);
84 | digitalWrite(ADC_SELECT, HIGH);
85 |
86 | pinMode(BOARD_LED, OUTPUT);
87 |
88 | pinMode(ESP_LED, OUTPUT);
89 | digitalWrite(ESP_LED, HIGH);
90 |
91 | pinMode(RCV_DATA, OUTPUT);
92 | pinMode(RCV_CLK, OUTPUT);
93 | pinMode(RCV_CHIP_SELECT, OUTPUT);
94 |
95 | // Scan for an existing network.
96 | WiFi.mode(WIFI_STA);
97 | WiFi.disconnect();
98 | delay(100);
99 |
100 | int network_count = WiFi.scanNetworks();
101 |
102 | bool found_network = false;
103 | for (int i = 0; i < network_count; i++) {
104 | found_network = String(WiFi.SSID(i)).equals(String(SSID));
105 | if (found_network) {
106 | break;
107 | }
108 | }
109 |
110 | if (!found_network) {
111 | WiFi.mode(WIFI_AP_STA);
112 | WiFi.softAP(SSID, PASSWORD);
113 | ourIp = WiFi.softAPIP();
114 |
115 | Serial.println("Created network");
116 | isAP = true;
117 | } else {
118 | WiFi.begin(SSID, PASSWORD);
119 | uint16 total_delay = 0;
120 | while (WiFi.status() != WL_CONNECTED && total_delay < MAX_JOIN_DELAY) {
121 | delay(100);
122 | total_delay += 100;
123 | }
124 | if (WiFi.status() != WL_CONNECTED) {
125 | //Serial.println("WiFi join failed.");
126 | WiFi.printDiag(Serial);
127 | errorCode = ERROR_NO_WIFI;
128 | return;
129 | }
130 |
131 | Serial.println("Joined existing network.");
132 | ourIp = WiFi.localIP();
133 | }
134 | server.begin();
135 | //Serial.println(ourIp);
136 | udp.beginMulticast(ourIp, MULTICAST_ADDRESS, PORT);
137 | udp.beginPacketMulticast(MULTICAST_ADDRESS, PORT, ourIp);
138 | controlPacket[0] = PACKET_TYPE_NEW_PEER;
139 | controlPacket[1] = 0;
140 | controlPacket[2] = TCP_SERVER_PORT & 0xff;
141 | controlPacket[3] = TCP_SERVER_PORT >> 8;
142 | udp.write(controlPacket, sizeof(controlPacket));
143 | udp.endPacket();
144 | }
145 |
146 | // One iteration byte to detect missed packets.
147 | // Four bytes for the time.
148 | // Two bytes for the frequency.
149 | // Two bytes for the strength.
150 | uint8_t packet_size = 9;
151 |
152 | uint8_t packetNo = 0;
153 | uint16_t frequencies[] = {5800, 5740, 0, 0, 0, 0, 0};
154 | uint16_t f_register[] = {0x2984, 0x2906, 0, 0, 0, 0, 0};
155 | uint16_t lastValue = 0;
156 | bool increasing = true;
157 | uint16_t tuningFrequency = 0;
158 | uint16_t tunedFrequency = 0;
159 |
160 | // Clients are devices that want to get the data streamed back to them.
161 | const int MAX_CLIENTS = 4;
162 | WiFiClient clients[MAX_CLIENTS];
163 | uint8_t numClients = 0;
164 |
165 | // Only the AP node has peers. They are other devices that wish to send their data to the clients of the AP.
166 | const int MAX_PEERS = 4;
167 | WiFiClient peer[MAX_PEERS];
168 | uint8_t numPeers = 0;
169 |
170 | #define WIFI_MTU 1400 // buffer writes to the tcp connection to minimize tcp overhead
171 |
172 | uint8_t tcp_client_buffer[WIFI_MTU * MAX_CLIENTS];
173 | uint16_t tcp_client_buffer_size[MAX_CLIENTS];
174 |
175 | uint8_t tcp_forward_buffer[WIFI_MTU];
176 |
177 | uint8_t peerLedCycle = 0;
178 |
179 | void loop() {
180 | // Handle errors by flashing/beeping an error code.
181 | if (errorCode > 0) {
182 | digitalWrite(BOARD_LED, LOW);
183 | delay(100);
184 | digitalWrite(BOARD_LED, HIGH);
185 | delay(75);
186 | digitalWrite(BOARD_LED, LOW);
187 | delay(100);
188 | digitalWrite(BOARD_LED, HIGH);
189 | delay(150);
190 | for (int i = 0; i < errorCode; i++) {
191 | digitalWrite(BOARD_LED, LOW);
192 | delay(350);
193 | digitalWrite(BOARD_LED, HIGH);
194 | delay(150);
195 | }
196 | delay(1000);
197 | return;
198 | }
199 |
200 | if (server.status() == LISTEN) {
201 | // Accept any new clients.
202 | WiFiClient newClient = server.available();
203 | while (newClient && numClients < MAX_CLIENTS) {
204 | Serial.println("Accepted new client tcp socket.");
205 | clients[numClients] = newClient;
206 |
207 | // We prefix our packets with the chip id so it can be differentiated from our peers.
208 | uint32_t chip_id = ESP.getChipId();
209 | uint16_t base_offset = WIFI_MTU * numClients;
210 | tcp_client_buffer[base_offset] = (char) (chip_id >> 24);
211 | tcp_client_buffer[base_offset + 1] = (char) (chip_id >> 16);
212 | tcp_client_buffer[base_offset + 2] = (char) (chip_id >> 8);
213 | tcp_client_buffer[base_offset + 3] = (char) chip_id;
214 | tcp_client_buffer_size[numClients] = 4;
215 |
216 | numClients++;
217 | newClient = server.available();
218 | }
219 | if (!isAP) {
220 | if (numClients > 0) {
221 | digitalWrite(ESP_LED, LOW);
222 | } else {
223 | digitalWrite(ESP_LED, HIGH);
224 | }
225 | }
226 | } else {
227 | // Forward any tcp packets we've received to all of our clients.
228 | for (int i = 0; i < numPeers; i++) {
229 | if (peer[i].available()) {
230 | uint16_t read_size = peer[i].read(tcp_forward_buffer, WIFI_MTU);
231 | Serial.println(read_size);
232 | for (int j = 0; j < numClients; j++) {
233 | clients[j].write((const uint8_t *) tcp_forward_buffer, read_size);
234 | }
235 | }
236 | }
237 | }
238 |
239 | // Read any UDP hello packets we've received.
240 | while (udp.parsePacket() > 0) {
241 | Serial.print("Got udp packet of length ");
242 | Serial.println(udp.available());
243 |
244 | int packet_type = udp.read();
245 | // Clients such as phones announce themselves and receive a UDP packet back from the AP.
246 | // They then need to initiate the TCP connection. (This decision was made because react-native
247 | // has no TCP server bindings only TCP client.)
248 | if (packet_type == PACKET_TYPE_NEW_CLIENT) {
249 | // We only reply to the address that announced itself. Receiving a multicast isn't working on iOS.
250 | udp.beginPacket(udp.remoteIP(), PORT);
251 | controlPacket[0] = PACKET_TYPE_I_AM_AP;
252 | controlPacket[1] = 0;
253 | controlPacket[2] = TCP_SERVER_PORT & 0xff;
254 | controlPacket[3] = TCP_SERVER_PORT >> 8;
255 | udp.write(controlPacket, sizeof(controlPacket));
256 | udp.endPacket();
257 | Serial.println("sent I_AM_AP back");
258 | Serial.println(sizeof(controlPacket));
259 | } else if (packet_type == PACKET_TYPE_NEW_PEER) {
260 | // New peer is announced once when a device is turned on. If we are the AP then we connect to the peer's TCP server.
261 | udp.read();
262 | uint16_t tcp_port = ((uint16_t) udp.read());
263 | tcp_port = tcp_port | ((uint16_t) udp.read()) << 8;
264 |
265 | IPAddress new_peer_ip = udp.remoteIP();
266 | if (isAP) {
267 | int peer_index = -1;
268 | for (int j = 0; j < numPeers; j++) {
269 | if (peer[j].remoteIP() == new_peer_ip) {
270 | peer_index = j;
271 | break;
272 | }
273 | }
274 |
275 | if (numPeers == MAX_PEERS && peer_index == -1) {
276 | errorCode = ERROR_MAX_PEERS;
277 | return;
278 | }
279 |
280 | if (peer_index == -1) {
281 | peer_index = numPeers;
282 | }
283 |
284 | if (peer[peer_index].connect(new_peer_ip, tcp_port)) {
285 | numPeers++;
286 | }
287 | }
288 | } else {
289 | Serial.print("Unknown packet type");
290 | Serial.println(packet_type);
291 | }
292 | udp.flush();
293 | }
294 |
295 | // TODO(tannewt): Garbage collect stale WiFi clients so we can reuse them.
296 |
297 | // Turn on the LED to show we're working but only for the first frequency read.
298 | digitalWrite(BOARD_LED, LOW);
299 | int i = 0;
300 | while (frequencies[i] != 0) {
301 | if (tunedFrequency != 0) {
302 | packetNo++;
303 | for (int j = 0; j < numClients; j++) {
304 | uint16_t base_offset = WIFI_MTU * j + tcp_client_buffer_size[j];
305 | tcp_client_buffer[base_offset] = packetNo;
306 | tcp_client_buffer[base_offset + 1] = (char) (lastReadTime >> 24);
307 | tcp_client_buffer[base_offset + 2] = (char) (lastReadTime >> 16);
308 | tcp_client_buffer[base_offset + 3] = (char) (lastReadTime >> 8);
309 | tcp_client_buffer[base_offset + 4] = (char) lastReadTime;
310 | tcp_client_buffer[base_offset + 5] = (char) (tunedFrequency >> 8);
311 | tcp_client_buffer[base_offset + 6] = (char) tunedFrequency;
312 | tcp_client_buffer[base_offset + 7] = (char) (lastValue >> 8);
313 | tcp_client_buffer[base_offset + 8] = lastValue;
314 | tcp_client_buffer_size[j] += packet_size;
315 | if (WIFI_MTU - tcp_client_buffer_size[j] < packet_size) {
316 | // TODO(tannewt): Use something else. This blocks on receiving a TCP ack!
317 | clients[j].write(((const uint8_t *)tcp_client_buffer) + WIFI_MTU * j, tcp_client_buffer_size[j]);
318 | Serial.print("Wrote buffer to client ");
319 | Serial.println(j);
320 | // Reset back to 4 buffer size because the first four bytes are chip id.
321 | tcp_client_buffer_size[j] = 4;
322 | }
323 | }
324 |
325 | // Serial.print(lastReadTime);
326 | // Serial.print(" ");
327 | // Serial.print(tunedFrequency);
328 | // Serial.print(" ");
329 | // Serial.println(lastValue);
330 | }
331 | if (tuningFrequency != 0) {
332 | if (tuningFrequency != tunedFrequency) {
333 | // Wait the remainder of the tune time if we actually had to tune.
334 | int delay_time = TUNE_TIME_MS - (millis() - lastTuneTime);
335 | //Serial.println(delay_time);
336 | if (delay_time > 0) {
337 | delay(delay_time);
338 | }
339 | }
340 | tunedFrequency = tuningFrequency;
341 |
342 | // Read value.
343 | lastValue = 0;
344 | for (uint8_t i = 0; i < RSSI_READS; i++) {
345 | lastValue += analogRead(A0);
346 | }
347 | lastValue = lastValue / RSSI_READS;
348 | //Serial.println(lastValue);
349 | //Serial.print(tunedFrequency);
350 | //Serial.print(" ");
351 | //Serial.println(lastValue);
352 | lastReadTime = millis();
353 | }
354 | // Tune radio.
355 | tuningFrequency = frequencies[i];
356 | if (tuningFrequency != tunedFrequency) {
357 | RCV_FREQ(f_register[i]);
358 | }
359 |
360 | lastTuneTime = millis();
361 | i++;
362 | digitalWrite(BOARD_LED, HIGH);
363 |
364 | // If we are the AP, then blink the ESP LED to indicate the number of connected peers.
365 | if (isAP) {
366 | if (numPeers > 0 && peerLedCycle <= PEER_LED_ON_CYCLE_COUNT * 2 * numPeers && peerLedCycle % PEER_LED_ON_CYCLE_COUNT == 0) {
367 | uint8_t i = peerLedCycle / PEER_LED_ON_CYCLE_COUNT;
368 | if (i % 2 == 0) {
369 | digitalWrite(ESP_LED, HIGH);
370 | } else {
371 | digitalWrite(ESP_LED, LOW);
372 | }
373 | }
374 | if (peerLedCycle == PEER_LED_ON_CYCLE_COUNT * 2 * numPeers + PEER_LED_BREAK_CYCLE_COUNT) {
375 | peerLedCycle = 0;
376 | } else {
377 | peerLedCycle++;
378 | }
379 | }
380 | }
381 | }
382 |
383 | /*
384 | * SPI driver based on fs_skyrf_58g-main.c Written by Simon Chambers
385 | * TVOUT by Myles Metzel
386 | * Scanner by Johan Hermen
387 | * Inital 2 Button version by Peter (pete1990)
388 | * Refactored and GUI reworked by Marko Hoepken
389 | * Universal version my Marko Hoepken
390 | * Diversity Receiver Mode and GUI improvements by Shea Ivey
391 | * OLED Version by Shea Ivey
392 | * Seperating display concerns by Shea Ivey
393 | *
394 | The MIT License (MIT)
395 | Copyright (c) 2015 Marko Hoepken
396 | Permission is hereby granted, free of charge, to any person obtaining a copy
397 | of this software and associated documentation files (the "Software"), to deal
398 | in the Software without restriction, including without limitation the rights
399 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
400 | copies of the Software, and to permit persons to whom the Software is
401 | furnished to do so, subject to the following conditions:
402 | The above copyright notice and this permission notice shall be included in all
403 | copies or substantial portions of the Software.
404 |
405 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
406 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
407 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
408 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
409 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
410 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
411 | SOFTWARE.
412 | */
413 | void RCV_FREQ(uint16_t channelData) {
414 | uint8_t j;
415 | // Second is the channel data from the lookup table
416 | // 20 bytes of register data are sent, but the MSB 4 bits are zeros
417 | // register address = 0x1, write, data0-15=channelData data15-19=0x0
418 | SERIAL_ENABLE_HIGH();
419 | SERIAL_ENABLE_LOW();
420 |
421 | // Register 0x1
422 | SERIAL_SENDBIT1();
423 | SERIAL_SENDBIT0();
424 | SERIAL_SENDBIT0();
425 | SERIAL_SENDBIT0();
426 |
427 | // Write to register
428 | SERIAL_SENDBIT1();
429 |
430 | // D0-D15
431 | // note: loop runs backwards as more efficent on AVR
432 | for (j = 16; j > 0; j--)
433 | {
434 | // Is bit high or low?
435 | if (channelData & 0x1)
436 | {
437 | SERIAL_SENDBIT1();
438 | }
439 | else
440 | {
441 | SERIAL_SENDBIT0();
442 | }
443 |
444 | // Shift bits along to check the next one
445 | channelData >>= 1;
446 | }
447 |
448 | // Remaining D16-D19
449 | for (j = 4; j > 0; j--)
450 | SERIAL_SENDBIT0();
451 |
452 | // Finished clocking data in
453 | SERIAL_ENABLE_HIGH();
454 | delayMicroseconds(1);
455 | //delay(2);
456 |
457 | digitalWrite(RCV_CHIP_SELECT, LOW);
458 | digitalWrite(RCV_CLK, LOW);
459 | digitalWrite(RCV_DATA, LOW);
460 | }
461 |
462 | void SERIAL_SENDBIT1()
463 | {
464 | digitalWrite(RCV_CLK, LOW);
465 | delayMicroseconds(1);
466 |
467 | digitalWrite(RCV_DATA, HIGH);
468 | delayMicroseconds(1);
469 | digitalWrite(RCV_CLK, HIGH);
470 | delayMicroseconds(1);
471 |
472 | digitalWrite(RCV_CLK, LOW);
473 | delayMicroseconds(1);
474 | }
475 |
476 | void SERIAL_SENDBIT0()
477 | {
478 | digitalWrite(RCV_CLK, LOW);
479 | delayMicroseconds(1);
480 |
481 | digitalWrite(RCV_DATA, LOW);
482 | delayMicroseconds(1);
483 | digitalWrite(RCV_CLK, HIGH);
484 | delayMicroseconds(1);
485 |
486 | digitalWrite(RCV_CLK, LOW);
487 | delayMicroseconds(1);
488 | }
489 |
490 | void SERIAL_ENABLE_LOW()
491 | {
492 | delayMicroseconds(1);
493 | digitalWrite(RCV_CHIP_SELECT, LOW);
494 | delayMicroseconds(1);
495 | }
496 |
497 | void SERIAL_ENABLE_HIGH()
498 | {
499 | delayMicroseconds(1);
500 | digitalWrite(RCV_CHIP_SELECT, HIGH);
501 | delayMicroseconds(1);
502 | }
503 |
504 |
--------------------------------------------------------------------------------
/pcb/Chickadee.sch:
--------------------------------------------------------------------------------
1 | EESchema Schematic File Version 2
2 | LIBS:power
3 | LIBS:device
4 | LIBS:transistors
5 | LIBS:conn
6 | LIBS:linear
7 | LIBS:regul
8 | LIBS:74xx
9 | LIBS:cmos4000
10 | LIBS:adc-dac
11 | LIBS:memory
12 | LIBS:xilinx
13 | LIBS:microcontrollers
14 | LIBS:dsp
15 | LIBS:microchip
16 | LIBS:analog_switches
17 | LIBS:motorola
18 | LIBS:texas
19 | LIBS:intel
20 | LIBS:audio
21 | LIBS:interface
22 | LIBS:digital-audio
23 | LIBS:philips
24 | LIBS:display
25 | LIBS:cypress
26 | LIBS:siliconi
27 | LIBS:opto
28 | LIBS:atmel
29 | LIBS:contrib
30 | LIBS:valves
31 | LIBS:ESP8266
32 | LIBS:pololu
33 | LIBS:rx5808
34 | LIBS:dc-dc
35 | LIBS:ac-dc
36 | LIBS:actel
37 | LIBS:Altera
38 | LIBS:analog_devices
39 | LIBS:brooktre
40 | LIBS:cmos_ieee
41 | LIBS:diode
42 | LIBS:elec-unifil
43 | LIBS:ESD_Protection
44 | LIBS:ftdi
45 | LIBS:gennum
46 | LIBS:graphic
47 | LIBS:hc11
48 | LIBS:ir
49 | LIBS:Lattice
50 | LIBS:logo
51 | LIBS:maxim
52 | LIBS:microchip_dspic33dsc
53 | LIBS:microchip_pic10mcu
54 | LIBS:microchip_pic12mcu
55 | LIBS:microchip_pic16mcu
56 | LIBS:microchip_pic18mcu
57 | LIBS:microchip_pic32mcu
58 | LIBS:motor_drivers
59 | LIBS:msp430
60 | LIBS:nordicsemi
61 | LIBS:nxp_armmcu
62 | LIBS:onsemi
63 | LIBS:Oscillators
64 | LIBS:Power_Management
65 | LIBS:powerint
66 | LIBS:pspice
67 | LIBS:references
68 | LIBS:relays
69 | LIBS:rfcom
70 | LIBS:sensors
71 | LIBS:silabs
72 | LIBS:stm8
73 | LIBS:stm32
74 | LIBS:supertex
75 | LIBS:switches
76 | LIBS:transf
77 | LIBS:ttl_ieee
78 | LIBS:video
79 | LIBS:Xicor
80 | LIBS:Zilog
81 | LIBS:sma
82 | LIBS:ap7333
83 | LIBS:cmt-1603-smt-tr
84 | LIBS:74lvc1g3157
85 | LIBS:bd93291efj
86 | EELAYER 25 0
87 | EELAYER END
88 | $Descr A4 11693 8268
89 | encoding utf-8
90 | Sheet 1 3
91 | Title ""
92 | Date ""
93 | Rev ""
94 | Comp ""
95 | Comment1 ""
96 | Comment2 ""
97 | Comment3 ""
98 | Comment4 ""
99 | $EndDescr
100 | $Comp
101 | L ESP-12E U1
102 | U 1 1 56144F8D
103 | P 5600 2900
104 | F 0 "U1" H 5600 2800 50 0000 C CNN
105 | F 1 "ESP-12E" H 5600 3000 50 0000 C CNN
106 | F 2 "ESP8266:ESP-12E" H 5600 2900 50 0001 C CNN
107 | F 3 "" H 5600 2900 50 0001 C CNN
108 | 1 5600 2900
109 | 1 0 0 -1
110 | $EndComp
111 | $Comp
112 | L RX5808 RF1
113 | U 1 1 561470C4
114 | P 8250 2050
115 | F 0 "RF1" H 8250 2150 60 0000 C CNN
116 | F 1 "RX5808" H 8250 1950 60 0000 C CNN
117 | F 2 "rx5808:rx5808" H 8000 2400 60 0001 C CNN
118 | F 3 "" H 8000 2400 60 0000 C CNN
119 | 1 8250 2050
120 | 1 0 0 -1
121 | $EndComp
122 | NoConn ~ 9000 1750
123 | NoConn ~ 9000 1850
124 | Text Label 9150 1950 0 60 ~ 0
125 | RSSI
126 | Text Label 4550 2700 2 60 ~ 0
127 | SHARED_ADC
128 | $Sheet
129 | S 3000 1000 1550 950
130 | U 56158CC6
131 | F0 "5V/3V3 Regulator" 60
132 | F1 "Regulator.sch" 60
133 | $EndSheet
134 | $Comp
135 | L +3.3V #PWR01
136 | U 1 1 5615AE4C
137 | P 4700 3300
138 | F 0 "#PWR01" H 4700 3150 50 0001 C CNN
139 | F 1 "+3.3V" V 4700 3550 50 0000 C CNN
140 | F 2 "" H 4700 3300 60 0000 C CNN
141 | F 3 "" H 4700 3300 60 0000 C CNN
142 | 1 4700 3300
143 | 0 -1 -1 0
144 | $EndComp
145 | $Comp
146 | L GNDPWR #PWR02
147 | U 1 1 5615AEA2
148 | P 6500 3300
149 | F 0 "#PWR02" H 6500 3100 50 0001 C CNN
150 | F 1 "GNDPWR" H 6500 3170 50 0000 C CNN
151 | F 2 "" H 6500 3250 60 0000 C CNN
152 | F 3 "" H 6500 3250 60 0000 C CNN
153 | 1 6500 3300
154 | 1 0 0 -1
155 | $EndComp
156 | $Comp
157 | L GNDPWR #PWR03
158 | U 1 1 5615AF25
159 | P 9000 2150
160 | F 0 "#PWR03" H 9000 1950 50 0001 C CNN
161 | F 1 "GNDPWR" V 9000 1900 50 0000 C CNN
162 | F 2 "" H 9000 2100 60 0000 C CNN
163 | F 3 "" H 9000 2100 60 0000 C CNN
164 | 1 9000 2150
165 | 0 -1 -1 0
166 | $EndComp
167 | $Comp
168 | L +5V #PWR04
169 | U 1 1 5615AF42
170 | P 9000 2050
171 | F 0 "#PWR04" H 9000 1900 50 0001 C CNN
172 | F 1 "+5V" V 9000 2250 50 0000 C CNN
173 | F 2 "" H 9000 2050 60 0000 C CNN
174 | F 3 "" H 9000 2050 60 0000 C CNN
175 | 1 9000 2050
176 | 0 1 1 0
177 | $EndComp
178 | $Comp
179 | L GNDPWR #PWR05
180 | U 1 1 5615AFA1
181 | P 9000 1650
182 | F 0 "#PWR05" H 9000 1450 50 0001 C CNN
183 | F 1 "GNDPWR" V 9000 1400 50 0000 C CNN
184 | F 2 "" H 9000 1600 60 0000 C CNN
185 | F 3 "" H 9000 1600 60 0000 C CNN
186 | 1 9000 1650
187 | 0 -1 -1 0
188 | $EndComp
189 | $Sheet
190 | S 3550 4150 800 400
191 | U 5615B5ED
192 | F0 "ESP-Reset" 60
193 | F1 "ESP-Reset.sch" 60
194 | F2 "RESET" I R 4350 4250 60
195 | F3 "GPIO0" I R 4350 4450 60
196 | $EndSheet
197 | $Comp
198 | L CMT-1603 LS1
199 | U 1 1 56161010
200 | P 3700 3100
201 | F 0 "LS1" H 3700 3100 60 0000 C CNN
202 | F 1 "CMT-1603" H 3700 3250 60 0000 C CNN
203 | F 2 "cmt-1603-smt:CMT-1603-SMT" H 3700 3100 60 0001 C CNN
204 | F 3 "" H 3700 3100 60 0000 C CNN
205 | 1 3700 3100
206 | 1 0 0 -1
207 | $EndComp
208 | $Comp
209 | L GNDPWR #PWR06
210 | U 1 1 56161036
211 | P 3250 3000
212 | F 0 "#PWR06" H 3250 2800 50 0001 C CNN
213 | F 1 "GNDPWR" H 3250 2870 50 0000 C CNN
214 | F 2 "" H 3250 2950 60 0000 C CNN
215 | F 3 "" H 3250 2950 60 0000 C CNN
216 | 1 3250 3000
217 | 0 1 1 0
218 | $EndComp
219 | Text Label 6700 3000 0 60 ~ 0
220 | GPIO0
221 | Text Label 4550 4450 0 60 ~ 0
222 | GPIO0
223 | Text Label 4550 4250 0 60 ~ 0
224 | RESET
225 | Text Label 4550 2600 2 60 ~ 0
226 | RESET
227 | $Comp
228 | L CONN_01X06 P1
229 | U 1 1 5616A176
230 | P 5800 4700
231 | F 0 "P1" H 5800 5050 50 0000 C CNN
232 | F 1 "FTDI" V 5900 4700 50 0000 C CNN
233 | F 2 "Pin_Headers:Pin_Header_Straight_1x06" H 5800 4700 60 0001 C CNN
234 | F 3 "" H 5800 4700 60 0000 C CNN
235 | 1 5800 4700
236 | 0 1 1 0
237 | $EndComp
238 | Text Label 6050 4300 3 60 ~ 0
239 | GND
240 | Text Label 5950 4300 3 60 ~ 0
241 | CTS
242 | Text Label 5850 4300 3 60 ~ 0
243 | V+
244 | Text Label 5750 4300 3 60 ~ 0
245 | TXO
246 | Text Label 5650 4300 3 60 ~ 0
247 | RXI
248 | Text Label 5550 4300 3 60 ~ 0
249 | DTR
250 | NoConn ~ 5850 4300
251 | NoConn ~ 5550 4300
252 | $Comp
253 | L GNDPWR #PWR07
254 | U 1 1 5616A720
255 | P 6050 4300
256 | F 0 "#PWR07" H 6050 4100 50 0001 C CNN
257 | F 1 "GNDPWR" H 6050 4170 50 0000 C CNN
258 | F 2 "" H 6050 4250 60 0000 C CNN
259 | F 3 "" H 6050 4250 60 0000 C CNN
260 | 1 6050 4300
261 | 0 -1 -1 0
262 | $EndComp
263 | Text Label 6700 2700 0 60 ~ 0
264 | TXO
265 | Text Label 6700 2600 0 60 ~ 0
266 | RXI
267 | $Comp
268 | L 74LVC1G3157 U2
269 | U 1 1 5616BFA9
270 | P 8650 4100
271 | F 0 "U2" H 8650 3550 60 0000 C CNN
272 | F 1 "74LVC1G3157" H 8650 3950 60 0000 C CNN
273 | F 2 "Housings_SOT-23_SOT-143_TSOT-6:SOT-23-6" H 8650 4100 60 0001 C CNN
274 | F 3 "" H 8650 4100 60 0000 C CNN
275 | 1 8650 4100
276 | 1 0 0 -1
277 | $EndComp
278 | $Comp
279 | L +3.3V #PWR08
280 | U 1 1 5616C00E
281 | P 9150 4100
282 | F 0 "#PWR08" H 9150 3950 50 0001 C CNN
283 | F 1 "+3.3V" H 9150 4240 50 0000 C CNN
284 | F 2 "" H 9150 4100 60 0000 C CNN
285 | F 3 "" H 9150 4100 60 0000 C CNN
286 | 1 9150 4100
287 | 0 1 1 0
288 | $EndComp
289 | Text Label 9300 4400 0 60 ~ 0
290 | SHARED_ADC
291 | Text Label 8000 3100 2 60 ~ 0
292 | RSSI
293 | $Comp
294 | L GNDPWR #PWR09
295 | U 1 1 5616C3A8
296 | P 8150 4100
297 | F 0 "#PWR09" H 8150 3900 50 0001 C CNN
298 | F 1 "GNDPWR" H 8150 3970 50 0000 C CNN
299 | F 2 "" H 8150 4050 60 0000 C CNN
300 | F 3 "" H 8150 4050 60 0000 C CNN
301 | 1 8150 4100
302 | 0 1 1 0
303 | $EndComp
304 | $Comp
305 | L R R7
306 | U 1 1 5616C40F
307 | P 7650 4250
308 | F 0 "R7" V 7730 4250 50 0000 C CNN
309 | F 1 "470K" V 7650 4250 50 0000 C CNN
310 | F 2 "Resistors_SMD:R_0603_HandSoldering" V 7580 4250 30 0001 C CNN
311 | F 3 "" H 7650 4250 30 0000 C CNN
312 | 1 7650 4250
313 | 1 0 0 -1
314 | $EndComp
315 | $Comp
316 | L R R8
317 | U 1 1 5616C462
318 | P 7650 4550
319 | F 0 "R8" V 7730 4550 50 0000 C CNN
320 | F 1 "10k" V 7650 4550 50 0000 C CNN
321 | F 2 "Resistors_SMD:R_0603_HandSoldering" V 7580 4550 30 0001 C CNN
322 | F 3 "" H 7650 4550 30 0000 C CNN
323 | 1 7650 4550
324 | 1 0 0 -1
325 | $EndComp
326 | $Comp
327 | L GNDPWR #PWR010
328 | U 1 1 5616C4B2
329 | P 7650 5150
330 | F 0 "#PWR010" H 7650 4950 50 0001 C CNN
331 | F 1 "GNDPWR" H 7650 5000 50 0000 C CNN
332 | F 2 "" H 7650 5100 60 0000 C CNN
333 | F 3 "" H 7650 5100 60 0000 C CNN
334 | 1 7650 5150
335 | 1 0 0 -1
336 | $EndComp
337 | $Comp
338 | L +BATT #PWR011
339 | U 1 1 5616C5A6
340 | P 7650 4100
341 | F 0 "#PWR011" H 7650 3950 50 0001 C CNN
342 | F 1 "+BATT" H 7650 4240 50 0000 C CNN
343 | F 2 "" H 7650 4100 60 0000 C CNN
344 | F 3 "" H 7650 4100 60 0000 C CNN
345 | 1 7650 4100
346 | 1 0 0 -1
347 | $EndComp
348 | Text Label 6700 2800 0 60 ~ 0
349 | CLK
350 | Text Label 6700 2900 0 60 ~ 0
351 | LE
352 | Text Label 4500 3200 2 60 ~ 0
353 | DATA
354 | $Comp
355 | L R R6
356 | U 1 1 5616C961
357 | P 6650 3200
358 | F 0 "R6" V 6730 3200 50 0000 C CNN
359 | F 1 "10k" V 6650 3200 50 0000 C CNN
360 | F 2 "Resistors_SMD:R_0603_HandSoldering" V 6580 3200 30 0001 C CNN
361 | F 3 "" H 6650 3200 30 0000 C CNN
362 | 1 6650 3200
363 | 0 1 1 0
364 | $EndComp
365 | $Comp
366 | L GNDPWR #PWR012
367 | U 1 1 5616C9B4
368 | P 6800 3200
369 | F 0 "#PWR012" H 6800 3000 50 0001 C CNN
370 | F 1 "GNDPWR" H 6800 3070 50 0000 C CNN
371 | F 2 "" H 6800 3150 60 0000 C CNN
372 | F 3 "" H 6800 3150 60 0000 C CNN
373 | 1 6800 3200
374 | 0 -1 -1 0
375 | $EndComp
376 | $Comp
377 | L R R3
378 | U 1 1 5616CA28
379 | P 4550 2800
380 | F 0 "R3" V 4630 2800 50 0000 C CNN
381 | F 1 "47k" V 4550 2800 50 0000 C CNN
382 | F 2 "Resistors_SMD:R_0603_HandSoldering" V 4480 2800 30 0001 C CNN
383 | F 3 "" H 4550 2800 30 0000 C CNN
384 | 1 4550 2800
385 | 0 1 1 0
386 | $EndComp
387 | $Comp
388 | L R R5
389 | U 1 1 5616CBEE
390 | P 6650 3100
391 | F 0 "R5" V 6730 3100 50 0000 C CNN
392 | F 1 "47k" V 6650 3100 50 0000 C CNN
393 | F 2 "Resistors_SMD:R_0603_HandSoldering" V 6580 3100 30 0001 C CNN
394 | F 3 "" H 6650 3100 30 0000 C CNN
395 | 1 6650 3100
396 | 0 1 1 0
397 | $EndComp
398 | $Comp
399 | L +3.3V #PWR013
400 | U 1 1 5616CC89
401 | P 6800 3100
402 | F 0 "#PWR013" H 6800 2950 50 0001 C CNN
403 | F 1 "+3.3V" H 6800 3240 50 0000 C CNN
404 | F 2 "" H 6800 3100 60 0000 C CNN
405 | F 3 "" H 6800 3100 60 0000 C CNN
406 | 1 6800 3100
407 | 0 1 1 0
408 | $EndComp
409 | $Comp
410 | L LED D2
411 | U 1 1 5616CE7A
412 | P 5200 1200
413 | F 0 "D2" H 5200 1300 50 0000 C CNN
414 | F 1 "LED" H 5200 1100 50 0000 C CNN
415 | F 2 "LEDs:LED-0603" H 5200 1200 60 0001 C CNN
416 | F 3 "" H 5200 1200 60 0000 C CNN
417 | 1 5200 1200
418 | 0 -1 -1 0
419 | $EndComp
420 | $Comp
421 | L +3.3V #PWR014
422 | U 1 1 5616CEEB
423 | P 5200 1000
424 | F 0 "#PWR014" H 5200 850 50 0001 C CNN
425 | F 1 "+3.3V" H 5200 1140 50 0000 C CNN
426 | F 2 "" H 5200 1000 60 0000 C CNN
427 | F 3 "" H 5200 1000 60 0000 C CNN
428 | 1 5200 1000
429 | 1 0 0 -1
430 | $EndComp
431 | $Comp
432 | L R R4
433 | U 1 1 5616CF35
434 | P 5200 1550
435 | F 0 "R4" V 5280 1550 50 0000 C CNN
436 | F 1 "1K" V 5200 1550 50 0000 C CNN
437 | F 2 "Resistors_SMD:R_0603_HandSoldering" V 5130 1550 30 0001 C CNN
438 | F 3 "" H 5200 1550 30 0000 C CNN
439 | 1 5200 1550
440 | 1 0 0 -1
441 | $EndComp
442 | Text Label 5200 2000 1 60 ~ 0
443 | GPIO0
444 | $Comp
445 | L SMA J1
446 | U 1 1 56176123
447 | P 6750 4200
448 | F 0 "J1" H 6875 4515 60 0000 C CNN
449 | F 1 "SMA" H 6940 4440 60 0000 C CNN
450 | F 2 "sma-jack:SMA-Jack-Straight" H 6925 4370 50 0000 C CNN
451 | F 3 "" H 6750 4200 60 0000 C CNN
452 | 1 6750 4200
453 | 1 0 0 -1
454 | $EndComp
455 | Wire Wire Line
456 | 9150 1950 9000 1950
457 | Wire Wire Line
458 | 4550 2700 4700 2700
459 | Wire Wire Line
460 | 4700 3000 4150 3000
461 | Wire Wire Line
462 | 6500 3000 6700 3000
463 | Wire Wire Line
464 | 4350 4450 4550 4450
465 | Wire Wire Line
466 | 4350 4250 4550 4250
467 | Wire Wire Line
468 | 4700 2600 4550 2600
469 | Wire Wire Line
470 | 6050 4500 6050 4300
471 | Wire Wire Line
472 | 5950 4500 5950 4300
473 | Wire Wire Line
474 | 5850 4500 5850 4300
475 | Wire Wire Line
476 | 5750 4500 5750 4300
477 | Wire Wire Line
478 | 5650 4500 5650 4300
479 | Wire Wire Line
480 | 5550 4500 5550 4300
481 | Wire Wire Line
482 | 6500 2600 6700 2600
483 | Wire Wire Line
484 | 6500 2700 6700 2700
485 | Wire Wire Line
486 | 9150 4400 9300 4400
487 | Wire Wire Line
488 | 8000 3800 8150 3800
489 | Wire Wire Line
490 | 8150 4400 7650 4400
491 | Wire Wire Line
492 | 6700 2800 6500 2800
493 | Wire Wire Line
494 | 6500 2900 6700 2900
495 | Wire Wire Line
496 | 4700 3200 4500 3200
497 | Wire Wire Line
498 | 5200 1700 5200 2000
499 | Wire Wire Line
500 | 6650 4100 6800 4100
501 | Connection ~ 6700 4100
502 | Connection ~ 6750 4100
503 | Wire Wire Line
504 | 6800 4100 6800 4400
505 | $Comp
506 | L GNDPWR #PWR015
507 | U 1 1 5617627C
508 | P 6800 4400
509 | F 0 "#PWR015" H 6800 4200 50 0001 C CNN
510 | F 1 "GNDPWR" H 6800 4270 50 0000 C CNN
511 | F 2 "" H 6800 4350 60 0000 C CNN
512 | F 3 "" H 6800 4350 60 0000 C CNN
513 | 1 6800 4400
514 | 1 0 0 -1
515 | $EndComp
516 | $Comp
517 | L GNDPWR #PWR016
518 | U 1 1 561762C4
519 | P 7500 2400
520 | F 0 "#PWR016" H 7500 2200 50 0001 C CNN
521 | F 1 "GNDPWR" H 7500 2270 50 0000 C CNN
522 | F 2 "" H 7500 2350 60 0000 C CNN
523 | F 3 "" H 7500 2350 60 0000 C CNN
524 | 1 7500 2400
525 | 1 0 0 -1
526 | $EndComp
527 | $Comp
528 | L GNDPWR #PWR017
529 | U 1 1 56176313
530 | P 7500 2200
531 | F 0 "#PWR017" H 7500 2000 50 0001 C CNN
532 | F 1 "GNDPWR" H 7500 2070 50 0000 C CNN
533 | F 2 "" H 7500 2150 60 0000 C CNN
534 | F 3 "" H 7500 2150 60 0000 C CNN
535 | 1 7500 2200
536 | -1 0 0 1
537 | $EndComp
538 | Wire Wire Line
539 | 7500 2300 7300 2300
540 | Wire Wire Line
541 | 6600 3900 6600 3700
542 | Text Label 7300 2300 2 60 ~ 0
543 | RFIN
544 | Text Label 6600 3700 0 60 ~ 0
545 | RFIN
546 | Wire Wire Line
547 | 9000 2250 9500 2250
548 | Wire Wire Line
549 | 9000 2350 9400 2350
550 | Wire Wire Line
551 | 9400 2350 9400 2450
552 | Wire Wire Line
553 | 9400 2450 9500 2450
554 | Wire Wire Line
555 | 9000 2450 9250 2450
556 | Wire Wire Line
557 | 9250 2450 9250 2650
558 | Wire Wire Line
559 | 9250 2650 9500 2650
560 | Text Label 9500 2650 0 60 ~ 0
561 | DATA
562 | Text Label 9500 2450 0 60 ~ 0
563 | LE
564 | Text Label 9500 2250 0 60 ~ 0
565 | CLK
566 | Text Label 9150 3800 0 60 ~ 0
567 | ADC_SELECT
568 | Text Label 4700 3100 2 60 ~ 0
569 | ADC_SELECT
570 | NoConn ~ 4700 2900
571 | NoConn ~ 5350 3800
572 | NoConn ~ 5450 3800
573 | NoConn ~ 5550 3800
574 | NoConn ~ 5650 3800
575 | NoConn ~ 5750 3800
576 | NoConn ~ 5850 3800
577 | $Comp
578 | L R R9
579 | U 1 1 56177CF4
580 | P 7650 5000
581 | F 0 "R9" V 7730 5000 50 0000 C CNN
582 | F 1 "10k" V 7650 5000 50 0000 C CNN
583 | F 2 "Resistors_SMD:R_0603_HandSoldering" V 7580 5000 30 0001 C CNN
584 | F 3 "" H 7650 5000 30 0000 C CNN
585 | 1 7650 5000
586 | 1 0 0 -1
587 | $EndComp
588 | Wire Wire Line
589 | 7650 4700 7650 4850
590 | $Comp
591 | L PWR_FLAG #FLG018
592 | U 1 1 561836FA
593 | P 5750 1000
594 | F 0 "#FLG018" H 5750 1095 50 0001 C CNN
595 | F 1 "PWR_FLAG" H 5750 1180 50 0000 C CNN
596 | F 2 "" H 5750 1000 60 0000 C CNN
597 | F 3 "" H 5750 1000 60 0000 C CNN
598 | 1 5750 1000
599 | 1 0 0 -1
600 | $EndComp
601 | $Comp
602 | L PWR_FLAG #FLG019
603 | U 1 1 561837B6
604 | P 6100 1000
605 | F 0 "#FLG019" H 6100 1095 50 0001 C CNN
606 | F 1 "PWR_FLAG" H 6100 1180 50 0000 C CNN
607 | F 2 "" H 6100 1000 60 0000 C CNN
608 | F 3 "" H 6100 1000 60 0000 C CNN
609 | 1 6100 1000
610 | 1 0 0 -1
611 | $EndComp
612 | $Comp
613 | L +BATT #PWR020
614 | U 1 1 56183809
615 | P 5750 1000
616 | F 0 "#PWR020" H 5750 850 50 0001 C CNN
617 | F 1 "+BATT" H 5750 1140 50 0000 C CNN
618 | F 2 "" H 5750 1000 60 0000 C CNN
619 | F 3 "" H 5750 1000 60 0000 C CNN
620 | 1 5750 1000
621 | -1 0 0 1
622 | $EndComp
623 | $Comp
624 | L GNDPWR #PWR021
625 | U 1 1 5618385C
626 | P 6100 1000
627 | F 0 "#PWR021" H 6100 800 50 0001 C CNN
628 | F 1 "GNDPWR" H 6100 870 50 0000 C CNN
629 | F 2 "" H 6100 950 60 0000 C CNN
630 | F 3 "" H 6100 950 60 0000 C CNN
631 | 1 6100 1000
632 | 1 0 0 -1
633 | $EndComp
634 | Wire Wire Line
635 | 5950 4300 6050 4300
636 | $Comp
637 | L +3.3V #PWR022
638 | U 1 1 563AE49A
639 | P 4400 2800
640 | F 0 "#PWR022" H 4400 2650 50 0001 C CNN
641 | F 1 "+3.3V" H 4400 2940 50 0000 C CNN
642 | F 2 "" H 4400 2800 60 0000 C CNN
643 | F 3 "" H 4400 2800 60 0000 C CNN
644 | 1 4400 2800
645 | 0 -1 -1 0
646 | $EndComp
647 | $Comp
648 | L R oR1
649 | U 1 1 563AE663
650 | P 4650 2350
651 | F 0 "oR1" V 4730 2350 50 0000 C CNN
652 | F 1 "10k" V 4650 2350 50 0000 C CNN
653 | F 2 "Resistors_SMD:R_0603_HandSoldering" V 4580 2350 30 0001 C CNN
654 | F 3 "" H 4650 2350 30 0000 C CNN
655 | 1 4650 2350
656 | 1 0 0 -1
657 | $EndComp
658 | $Comp
659 | L +3.3V #PWR023
660 | U 1 1 563AE73E
661 | P 4650 2200
662 | F 0 "#PWR023" H 4650 2050 50 0001 C CNN
663 | F 1 "+3.3V" H 4650 2340 50 0000 C CNN
664 | F 2 "" H 4650 2200 60 0000 C CNN
665 | F 3 "" H 4650 2200 60 0000 C CNN
666 | 1 4650 2200
667 | 1 0 0 -1
668 | $EndComp
669 | Wire Wire Line
670 | 4650 2500 4650 2600
671 | Connection ~ 4650 2600
672 | $Comp
673 | L GNDPWR #PWR024
674 | U 1 1 563AEEA1
675 | P 7300 1300
676 | F 0 "#PWR024" H 7300 1100 50 0001 C CNN
677 | F 1 "GNDPWR" H 7300 1170 50 0000 C CNN
678 | F 2 "" H 7300 1250 60 0000 C CNN
679 | F 3 "" H 7300 1250 60 0000 C CNN
680 | 1 7300 1300
681 | 1 0 0 -1
682 | $EndComp
683 | $Comp
684 | L +BATT #PWR026
685 | U 1 1 563AEFF1
686 | P 7300 950
687 | F 0 "#PWR026" H 7300 800 50 0001 C CNN
688 | F 1 "+BATT" H 7300 1090 50 0000 C CNN
689 | F 2 "" H 7300 950 60 0000 C CNN
690 | F 3 "" H 7300 950 60 0000 C CNN
691 | 1 7300 950
692 | 1 0 0 -1
693 | $EndComp
694 | Wire Wire Line
695 | 7300 950 7300 1200
696 | $Comp
697 | L PWR_FLAG #FLG027
698 | U 1 1 563AF4CA
699 | P 6450 3800
700 | F 0 "#FLG027" H 6450 3895 50 0001 C CNN
701 | F 1 "PWR_FLAG" H 6450 3980 50 0000 C CNN
702 | F 2 "" H 6450 3800 60 0000 C CNN
703 | F 3 "" H 6450 3800 60 0000 C CNN
704 | 1 6450 3800
705 | 1 0 0 -1
706 | $EndComp
707 | Wire Wire Line
708 | 6450 3800 6600 3800
709 | Connection ~ 6600 3800
710 | $Comp
711 | L CONN_01X02 P2
712 | U 1 1 563AF67E
713 | P 7100 1250
714 | F 0 "P2" H 7100 1400 50 0000 C CNN
715 | F 1 "CONN_01X02" V 7200 1250 50 0000 C CNN
716 | F 2 "Pin_Headers:Pin_Header_Straight_1x02" H 7100 1250 60 0001 C CNN
717 | F 3 "" H 7100 1250 60 0000 C CNN
718 | 1 7100 1250
719 | -1 0 0 1
720 | $EndComp
721 | $Comp
722 | L R_Small R10
723 | U 1 1 564BBC33
724 | P 8000 3300
725 | F 0 "R10" H 8030 3320 50 0000 L CNN
726 | F 1 "1k" H 8030 3260 50 0000 L CNN
727 | F 2 "Resistors_SMD:R_0603_HandSoldering" H 8000 3300 60 0001 C CNN
728 | F 3 "" H 8000 3300 60 0000 C CNN
729 | 1 8000 3300
730 | 1 0 0 -1
731 | $EndComp
732 | $Comp
733 | L R_Small R11
734 | U 1 1 564BBC90
735 | P 7700 3600
736 | F 0 "R11" H 7730 3620 50 0000 L CNN
737 | F 1 "10k" H 7730 3560 50 0000 L CNN
738 | F 2 "Resistors_SMD:R_0603_HandSoldering" H 7700 3600 60 0001 C CNN
739 | F 3 "" H 7700 3600 60 0000 C CNN
740 | 1 7700 3600
741 | 1 0 0 -1
742 | $EndComp
743 | $Comp
744 | L GNDPWR #PWR028
745 | U 1 1 564BBCF6
746 | P 7700 3750
747 | F 0 "#PWR028" H 7700 3550 50 0001 C CNN
748 | F 1 "GNDPWR" H 7700 3620 50 0000 C CNN
749 | F 2 "" H 7700 3700 60 0000 C CNN
750 | F 3 "" H 7700 3700 60 0000 C CNN
751 | 1 7700 3750
752 | 1 0 0 -1
753 | $EndComp
754 | Wire Wire Line
755 | 8000 3100 8000 3200
756 | Wire Wire Line
757 | 8000 3400 8000 3800
758 | Wire Wire Line
759 | 8000 3500 7700 3500
760 | Wire Wire Line
761 | 7700 3700 7700 3750
762 | Connection ~ 8000 3500
763 | Text Notes 8050 7100 0 60 ~ 0
764 | Creative Commons Attribution-ShareAlike 4.0 International License
765 | Text Notes 9950 6950 0 60 ~ 0
766 | (c) 2015 Scott Shawcroft
767 | Text Notes 9700 6800 0 118 ~ 0
768 | Laptimer 5.8 v4
769 | Text Notes 8250 7350 0 118 ~ 0
770 | https://chickadee.tech/lt58/v4
771 | $EndSCHEMATC
772 |
--------------------------------------------------------------------------------
/pcb/Chickadee.net:
--------------------------------------------------------------------------------
1 | (export (version D)
2 | (design
3 | (source /Users/tannewt/chickadee-projects/laptimer/pcb/Chickadee.sch)
4 | (date "Tuesday, November 17, 2015 'PMt' 04:18:58 PM")
5 | (tool "Eeschema (2015-11-03 BZR 6296)-product")
6 | (sheet (number 1) (name /) (tstamps /)
7 | (title_block
8 | (title)
9 | (company)
10 | (rev)
11 | (date)
12 | (source Chickadee.sch)
13 | (comment (number 1) (value ""))
14 | (comment (number 2) (value ""))
15 | (comment (number 3) (value ""))
16 | (comment (number 4) (value ""))))
17 | (sheet (number 2) (name "/5V/3V3 Regulator/") (tstamps /56158CC6/)
18 | (title_block
19 | (title)
20 | (company)
21 | (rev)
22 | (date)
23 | (source Regulator.sch)
24 | (comment (number 1) (value ""))
25 | (comment (number 2) (value ""))
26 | (comment (number 3) (value ""))
27 | (comment (number 4) (value ""))))
28 | (sheet (number 3) (name /ESP-Reset/) (tstamps /5615B5ED/)
29 | (title_block
30 | (title)
31 | (company)
32 | (rev)
33 | (date)
34 | (source ESP-Reset.sch)
35 | (comment (number 1) (value ""))
36 | (comment (number 2) (value ""))
37 | (comment (number 3) (value ""))
38 | (comment (number 4) (value "")))))
39 | (components
40 | (comp (ref U1)
41 | (value ESP-12E)
42 | (footprint ESP8266:ESP-12E)
43 | (libsource (lib ESP8266) (part ESP-12E))
44 | (sheetpath (names /) (tstamps /))
45 | (tstamp 56144F8D))
46 | (comp (ref RF1)
47 | (value RX5808)
48 | (footprint rx5808:rx5808)
49 | (libsource (lib rx5808) (part RX5808))
50 | (sheetpath (names /) (tstamps /))
51 | (tstamp 561470C4))
52 | (comp (ref LS1)
53 | (value CMT-1603)
54 | (footprint cmt-1603-smt:CMT-1603-SMT)
55 | (libsource (lib cmt-1603-smt-tr) (part CMT-1603))
56 | (sheetpath (names /) (tstamps /))
57 | (tstamp 56161010))
58 | (comp (ref P1)
59 | (value FTDI)
60 | (footprint Pin_Headers:Pin_Header_Straight_1x06)
61 | (libsource (lib conn) (part CONN_01X06))
62 | (sheetpath (names /) (tstamps /))
63 | (tstamp 5616A176))
64 | (comp (ref U2)
65 | (value 74LVC1G3157)
66 | (footprint Housings_SOT-23_SOT-143_TSOT-6:SOT-23-6)
67 | (libsource (lib 74lvc1g3157) (part 74LVC1G3157))
68 | (sheetpath (names /) (tstamps /))
69 | (tstamp 5616BFA9))
70 | (comp (ref R7)
71 | (value 470K)
72 | (footprint Resistors_SMD:R_0603_HandSoldering)
73 | (libsource (lib device) (part R))
74 | (sheetpath (names /) (tstamps /))
75 | (tstamp 5616C40F))
76 | (comp (ref R8)
77 | (value 10k)
78 | (footprint Resistors_SMD:R_0603_HandSoldering)
79 | (libsource (lib device) (part R))
80 | (sheetpath (names /) (tstamps /))
81 | (tstamp 5616C462))
82 | (comp (ref R6)
83 | (value 10k)
84 | (footprint Resistors_SMD:R_0603_HandSoldering)
85 | (libsource (lib device) (part R))
86 | (sheetpath (names /) (tstamps /))
87 | (tstamp 5616C961))
88 | (comp (ref R3)
89 | (value 47k)
90 | (footprint Resistors_SMD:R_0603_HandSoldering)
91 | (libsource (lib device) (part R))
92 | (sheetpath (names /) (tstamps /))
93 | (tstamp 5616CA28))
94 | (comp (ref R5)
95 | (value 47k)
96 | (footprint Resistors_SMD:R_0603_HandSoldering)
97 | (libsource (lib device) (part R))
98 | (sheetpath (names /) (tstamps /))
99 | (tstamp 5616CBEE))
100 | (comp (ref D2)
101 | (value LED)
102 | (footprint LEDs:LED-0603)
103 | (libsource (lib device) (part LED))
104 | (sheetpath (names /) (tstamps /))
105 | (tstamp 5616CE7A))
106 | (comp (ref R4)
107 | (value 1K)
108 | (footprint Resistors_SMD:R_0603_HandSoldering)
109 | (libsource (lib device) (part R))
110 | (sheetpath (names /) (tstamps /))
111 | (tstamp 5616CF35))
112 | (comp (ref J1)
113 | (value SMA)
114 | (footprint sma-jack:SMA-Jack-Straight)
115 | (libsource (lib sma) (part SMA))
116 | (sheetpath (names /) (tstamps /))
117 | (tstamp 56176123))
118 | (comp (ref R9)
119 | (value 10k)
120 | (footprint Resistors_SMD:R_0603_HandSoldering)
121 | (libsource (lib device) (part R))
122 | (sheetpath (names /) (tstamps /))
123 | (tstamp 56177CF4))
124 | (comp (ref oR1)
125 | (value 10k)
126 | (footprint Resistors_SMD:R_0603_HandSoldering)
127 | (libsource (lib device) (part R))
128 | (sheetpath (names /) (tstamps /))
129 | (tstamp 563AE663))
130 | (comp (ref P2)
131 | (value CONN_01X02)
132 | (footprint Pin_Headers:Pin_Header_Straight_1x02)
133 | (libsource (lib conn) (part CONN_01X02))
134 | (sheetpath (names /) (tstamps /))
135 | (tstamp 563AF67E))
136 | (comp (ref R10)
137 | (value 1k)
138 | (footprint Resistors_SMD:R_0603_HandSoldering)
139 | (libsource (lib device) (part R_Small))
140 | (sheetpath (names /) (tstamps /))
141 | (tstamp 564BBC33))
142 | (comp (ref R11)
143 | (value 10k)
144 | (footprint Resistors_SMD:R_0603_HandSoldering)
145 | (libsource (lib device) (part R_Small))
146 | (sheetpath (names /) (tstamps /))
147 | (tstamp 564BBC90))
148 | (comp (ref U3)
149 | (value LM2674M-3.3)
150 | (footprint Housings_SOIC:SOIC-8_3.9x4.9mm_Pitch1.27mm)
151 | (libsource (lib dc-dc) (part LM2674M-3.3))
152 | (sheetpath (names "/5V/3V3 Regulator/") (tstamps /56158CC6/))
153 | (tstamp 5616FB1E))
154 | (comp (ref L1)
155 | (value 68uH)
156 | (footprint slf7032:SLF7032)
157 | (libsource (lib device) (part INDUCTOR))
158 | (sheetpath (names "/5V/3V3 Regulator/") (tstamps /56158CC6/))
159 | (tstamp 5616FC17))
160 | (comp (ref CB1)
161 | (value 0.01uF)
162 | (footprint Capacitors_SMD:C_0603_HandSoldering)
163 | (libsource (lib device) (part C))
164 | (sheetpath (names "/5V/3V3 Regulator/") (tstamps /56158CC6/))
165 | (tstamp 5616FC4F))
166 | (comp (ref D1)
167 | (value SD103BWS-TP)
168 | (footprint Diodes_SMD:SOD-323)
169 | (libsource (lib device) (part D_Schottky))
170 | (sheetpath (names "/5V/3V3 Regulator/") (tstamps /56158CC6/))
171 | (tstamp 5616FF59))
172 | (comp (ref C3)
173 | (value 2.2uF)
174 | (footprint Capacitors_SMD:C_0603_HandSoldering)
175 | (libsource (lib device) (part C))
176 | (sheetpath (names "/5V/3V3 Regulator/") (tstamps /56158CC6/))
177 | (tstamp 561707C5))
178 | (comp (ref C4)
179 | (value 2.2uF)
180 | (footprint Capacitors_SMD:C_0603_HandSoldering)
181 | (libsource (lib device) (part C))
182 | (sheetpath (names "/5V/3V3 Regulator/") (tstamps /56158CC6/))
183 | (tstamp 561707FF))
184 | (comp (ref U4)
185 | (value AP7333)
186 | (footprint Housings_SOT-23_SOT-143_TSOT-6:SOT-23_Handsoldering)
187 | (libsource (lib ap7333) (part AP7333))
188 | (sheetpath (names "/5V/3V3 Regulator/") (tstamps /56158CC6/))
189 | (tstamp 5617091E))
190 | (comp (ref Cout1)
191 | (value 100uF)
192 | (footprint Capacitors_Tantalum_SMD:TantalC_SizeD_EIA-7343_HandSoldering)
193 | (libsource (lib device) (part CP))
194 | (sheetpath (names "/5V/3V3 Regulator/") (tstamps /56158CC6/))
195 | (tstamp 56317446))
196 | (comp (ref Cin1)
197 | (value 68uF)
198 | (footprint Capacitors_SMD:c_elec_6.3x7.7)
199 | (libsource (lib device) (part CP))
200 | (sheetpath (names "/5V/3V3 Regulator/") (tstamps /56158CC6/))
201 | (tstamp 56317521))
202 | (comp (ref SW1)
203 | (value SW_PUSH)
204 | (footprint Buttons_Switches_SMD:SW_SPST_PTS645)
205 | (libsource (lib device) (part SW_PUSH))
206 | (sheetpath (names /ESP-Reset/) (tstamps /5615B5ED/))
207 | (tstamp 5615B5FF))
208 | (comp (ref C1)
209 | (value 0.1uF)
210 | (footprint Capacitors_SMD:C_0603_HandSoldering)
211 | (libsource (lib device) (part C))
212 | (sheetpath (names /ESP-Reset/) (tstamps /5615B5ED/))
213 | (tstamp 5615B641))
214 | (comp (ref C2)
215 | (value 2.2uF)
216 | (footprint Capacitors_SMD:C_0603_HandSoldering)
217 | (libsource (lib device) (part C))
218 | (sheetpath (names /ESP-Reset/) (tstamps /5615B5ED/))
219 | (tstamp 56161A55))
220 | (comp (ref R1)
221 | (value 470k)
222 | (footprint Resistors_SMD:R_0603_HandSoldering)
223 | (libsource (lib device) (part R))
224 | (sheetpath (names /ESP-Reset/) (tstamps /5615B5ED/))
225 | (tstamp 56161A89))
226 | (comp (ref R2)
227 | (value 100k)
228 | (footprint Resistors_SMD:R_0603_HandSoldering)
229 | (libsource (lib device) (part R))
230 | (sheetpath (names /ESP-Reset/) (tstamps /5615B5ED/))
231 | (tstamp 56161B4F))
232 | (comp (ref Q1)
233 | (value Q_NMOS_GSD)
234 | (footprint Housings_SOT-23_SOT-143_TSOT-6:SOT-23_Handsoldering)
235 | (libsource (lib device) (part Q_NMOS_GSD))
236 | (sheetpath (names /ESP-Reset/) (tstamps /5615B5ED/))
237 | (tstamp 563A7E46))
238 | (comp (ref Q2)
239 | (value Q_NMOS_GSD)
240 | (footprint Housings_SOT-23_SOT-143_TSOT-6:SOT-23_Handsoldering)
241 | (libsource (lib device) (part Q_NMOS_GSD))
242 | (sheetpath (names /ESP-Reset/) (tstamps /5615B5ED/))
243 | (tstamp 563A7EF9)))
244 | (libparts
245 | (libpart (lib conn) (part CONN_01X02)
246 | (footprints
247 | (fp Pin_Header_Straight_1X02)
248 | (fp Pin_Header_Angled_1X02)
249 | (fp Socket_Strip_Straight_1X02)
250 | (fp Socket_Strip_Angled_1X02))
251 | (fields
252 | (field (name Reference) P)
253 | (field (name Value) CONN_01X02))
254 | (pins
255 | (pin (num 1) (name P1) (type passive))
256 | (pin (num 2) (name P2) (type passive))))
257 | (libpart (lib device) (part C)
258 | (description "Unpolarized capacitor")
259 | (footprints
260 | (fp C?)
261 | (fp C_????_*)
262 | (fp C_????)
263 | (fp SMD*_c)
264 | (fp Capacitor*))
265 | (fields
266 | (field (name Reference) C)
267 | (field (name Value) C))
268 | (pins
269 | (pin (num 1) (name ~) (type passive))
270 | (pin (num 2) (name ~) (type passive))))
271 | (libpart (lib device) (part CP)
272 | (description "Polarised capacitor")
273 | (footprints
274 | (fp CP*)
275 | (fp Elko*)
276 | (fp TantalC*)
277 | (fp C*elec)
278 | (fp c_elec*)
279 | (fp SMD*_Pol))
280 | (fields
281 | (field (name Reference) C)
282 | (field (name Value) CP))
283 | (pins
284 | (pin (num 1) (name ~) (type passive))
285 | (pin (num 2) (name ~) (type passive))))
286 | (libpart (lib device) (part D_Schottky)
287 | (description "Diode schottky")
288 | (footprints
289 | (fp D-Pak_TO252AA)
290 | (fp Diode_*)
291 | (fp *SingleDiode)
292 | (fp *SingleDiode*)
293 | (fp *_Diode_*))
294 | (fields
295 | (field (name Reference) D)
296 | (field (name Value) D_Schottky))
297 | (pins
298 | (pin (num 1) (name K) (type passive))
299 | (pin (num 2) (name A) (type passive))))
300 | (libpart (lib device) (part INDUCTOR)
301 | (fields
302 | (field (name Reference) L)
303 | (field (name Value) INDUCTOR))
304 | (pins
305 | (pin (num 1) (name 1) (type passive))
306 | (pin (num 2) (name 2) (type passive))))
307 | (libpart (lib device) (part LED)
308 | (footprints
309 | (fp LED-3MM)
310 | (fp LED-5MM)
311 | (fp LED-10MM)
312 | (fp LED-0603)
313 | (fp LED-0805)
314 | (fp LED-1206)
315 | (fp LEDV))
316 | (fields
317 | (field (name Reference) D)
318 | (field (name Value) LED))
319 | (pins
320 | (pin (num 1) (name K) (type passive))
321 | (pin (num 2) (name A) (type passive))))
322 | (libpart (lib device) (part Q_NMOS_GSD)
323 | (description "Transistor N-MOSFET (general)")
324 | (fields
325 | (field (name Reference) Q)
326 | (field (name Value) Q_NMOS_GSD))
327 | (pins
328 | (pin (num 1) (name G) (type input))
329 | (pin (num 2) (name S) (type passive))
330 | (pin (num 3) (name D) (type passive))))
331 | (libpart (lib device) (part R)
332 | (description Resistor)
333 | (footprints
334 | (fp R_*)
335 | (fp Resistor_*))
336 | (fields
337 | (field (name Reference) R)
338 | (field (name Value) R))
339 | (pins
340 | (pin (num 1) (name ~) (type passive))
341 | (pin (num 2) (name ~) (type passive))))
342 | (libpart (lib device) (part R_Small)
343 | (description Resistor)
344 | (footprints
345 | (fp Resistor_*)
346 | (fp R_*))
347 | (fields
348 | (field (name Reference) R)
349 | (field (name Value) R_Small))
350 | (pins
351 | (pin (num 1) (name ~) (type passive))
352 | (pin (num 2) (name ~) (type passive))))
353 | (libpart (lib device) (part SW_PUSH)
354 | (description Button)
355 | (fields
356 | (field (name Reference) SW)
357 | (field (name Value) SW_PUSH))
358 | (pins
359 | (pin (num 1) (name 1) (type passive))
360 | (pin (num 2) (name 2) (type passive))))
361 | (libpart (lib conn) (part CONN_01X06)
362 | (footprints
363 | (fp Pin_Header_Straight_1X06)
364 | (fp Pin_Header_Angled_1X06)
365 | (fp Socket_Strip_Straight_1X06)
366 | (fp Socket_Strip_Angled_1X06))
367 | (fields
368 | (field (name Reference) P)
369 | (field (name Value) CONN_01X06))
370 | (pins
371 | (pin (num 1) (name P1) (type passive))
372 | (pin (num 2) (name P2) (type passive))
373 | (pin (num 3) (name P3) (type passive))
374 | (pin (num 4) (name P4) (type passive))
375 | (pin (num 5) (name P5) (type passive))
376 | (pin (num 6) (name P6) (type passive))))
377 | (libpart (lib dc-dc) (part LM2674M-12)
378 | (aliases
379 | (alias LM2674M-3.3)
380 | (alias LM2674M-5.0)
381 | (alias LM2674M-ADJ))
382 | (description "12V, 500 mA Step-Down VR")
383 | (docs www.national.com/ds/LM/LM2674.pdf)
384 | (footprints
385 | (fp SO*))
386 | (fields
387 | (field (name Reference) U)
388 | (field (name Value) LM2674M-12)
389 | (field (name Footprint) SOIC-8))
390 | (pins
391 | (pin (num 1) (name CB) (type input))
392 | (pin (num 4) (name FB) (type input))
393 | (pin (num 5) (name ON/~OFF) (type input))
394 | (pin (num 6) (name GND) (type power_in))
395 | (pin (num 7) (name VIN) (type power_in))
396 | (pin (num 8) (name VSW) (type output))))
397 | (libpart (lib ESP8266) (part ESP-12E)
398 | (description "ESP8622 ESP-12E module, 22 pins, 2mm, PCB antenna")
399 | (docs http://l0l.org.uk/2014/12/esp8266-modules-hardware-guide-gotta-catch-em-all/)
400 | (footprints
401 | (fp ESP-12E))
402 | (fields
403 | (field (name Reference) U)
404 | (field (name Value) ESP-12E))
405 | (pins
406 | (pin (num 1) (name REST) (type input))
407 | (pin (num 2) (name ADC) (type passive))
408 | (pin (num 3) (name CH_PD) (type input))
409 | (pin (num 4) (name GPIO16) (type BiDi))
410 | (pin (num 5) (name GPIO14) (type BiDi))
411 | (pin (num 6) (name GPIO12) (type BiDi))
412 | (pin (num 7) (name GPIO13) (type BiDi))
413 | (pin (num 8) (name VCC) (type power_in))
414 | (pin (num 9) (name CS0) (type BiDi))
415 | (pin (num 10) (name MISO) (type BiDi))
416 | (pin (num 11) (name GPIO9) (type BiDi))
417 | (pin (num 12) (name GPIO10) (type BiDi))
418 | (pin (num 13) (name MOSI) (type BiDi))
419 | (pin (num 14) (name SCLK) (type BiDi))
420 | (pin (num 15) (name GND) (type power_in))
421 | (pin (num 16) (name GPIO15) (type BiDi))
422 | (pin (num 17) (name GPIO2) (type BiDi))
423 | (pin (num 18) (name GPIO0) (type BiDi))
424 | (pin (num 19) (name GPIO4) (type BiDi))
425 | (pin (num 20) (name GPIO5) (type BiDi))
426 | (pin (num 21) (name RXD) (type input))
427 | (pin (num 22) (name TXD) (type output))))
428 | (libpart (lib rx5808) (part RX5808)
429 | (fields
430 | (field (name Reference) RF)
431 | (field (name Value) RX5808))
432 | (pins
433 | (pin (num 1) (name GND) (type input))
434 | (pin (num 2) (name RFIN) (type input))
435 | (pin (num 3) (name GND) (type input))
436 | (pin (num 4) (name CH1/DATA) (type input))
437 | (pin (num 5) (name CH2/LE) (type input))
438 | (pin (num 6) (name CH3/CLK) (type input))
439 | (pin (num 7) (name GND) (type input))
440 | (pin (num 8) (name VCC) (type input))
441 | (pin (num 9) (name RSSI) (type output))
442 | (pin (num 10) (name AUDIO) (type output))
443 | (pin (num 11) (name VIDEO) (type output))
444 | (pin (num 12) (name GND) (type input))))
445 | (libpart (lib ap7333) (part AP7333)
446 | (fields
447 | (field (name Reference) U)
448 | (field (name Value) AP7333))
449 | (pins
450 | (pin (num 1) (name IN) (type power_in))
451 | (pin (num 2) (name OUT) (type power_out))
452 | (pin (num 3) (name GND) (type input))))
453 | (libpart (lib cmt-1603-smt-tr) (part CMT-1603)
454 | (fields
455 | (field (name Reference) LS)
456 | (field (name Value) CMT-1603))
457 | (pins
458 | (pin (num 1) (name ~) (type input))
459 | (pin (num 2) (name ~) (type input))))
460 | (libpart (lib sma) (part SMA)
461 | (fields
462 | (field (name Reference) J)
463 | (field (name Value) SMA)
464 | (field (name Footprint) SMA))
465 | (pins
466 | (pin (num 1) (name RF) (type power_in))
467 | (pin (num 2) (name GND1) (type power_in))
468 | (pin (num 3) (name GND2) (type power_in))
469 | (pin (num 4) (name GND3) (type power_in))
470 | (pin (num 5) (name GND4) (type power_in))))
471 | (libpart (lib 74lvc1g3157) (part 74LVC1G3157)
472 | (fields
473 | (field (name Reference) U)
474 | (field (name Value) 74LVC1G3157))
475 | (pins
476 | (pin (num 1) (name Y1) (type input))
477 | (pin (num 2) (name GND) (type input))
478 | (pin (num 3) (name Y0) (type input))
479 | (pin (num 4) (name Z) (type input))
480 | (pin (num 5) (name Vcc) (type input))
481 | (pin (num 6) (name S) (type input)))))
482 | (libraries
483 | (library (logical device)
484 | (uri "/Library/Application Support/kicad/library/device.lib"))
485 | (library (logical conn)
486 | (uri "/Library/Application Support/kicad/library/conn.lib"))
487 | (library (logical ESP8266)
488 | (uri /Users/tannewt/kicad/libraries/kicad-ESP8266/ESP8266.lib))
489 | (library (logical dc-dc)
490 | (uri "/Library/Application Support/kicad/library/dc-dc.lib"))
491 | (library (logical rx5808)
492 | (uri /Users/tannewt/kicad/libraries/kicad-rx5808/rx5808.lib))
493 | (library (logical ap7333)
494 | (uri /Users/tannewt/chickadee-projects/shared/kicad/libraries/public/components/ap7333.lib))
495 | (library (logical cmt-1603-smt-tr)
496 | (uri /Users/tannewt/chickadee-projects/shared/kicad/libraries/public/components/cmt-1603-smt-tr.lib))
497 | (library (logical sma)
498 | (uri /Users/tannewt/kicad/libraries/sma_connectors/library/sma.lib))
499 | (library (logical 74lvc1g3157)
500 | (uri /Users/tannewt/chickadee-projects/shared/kicad/libraries/public/components/74lvc1g3157.lib)))
501 | (nets
502 | (net (code 1) (name /TXO)
503 | (node (ref P1) (pin 4))
504 | (node (ref U1) (pin 21)))
505 | (net (code 2) (name "Net-(R7-Pad2)")
506 | (node (ref R7) (pin 2))
507 | (node (ref R8) (pin 1))
508 | (node (ref U2) (pin 3)))
509 | (net (code 3) (name /ESP-Reset/GPIO0)
510 | (node (ref U1) (pin 18))
511 | (node (ref R4) (pin 2))
512 | (node (ref Q2) (pin 3)))
513 | (net (code 4) (name /RFIN)
514 | (node (ref RF1) (pin 2))
515 | (node (ref J1) (pin 1)))
516 | (net (code 5) (name /CLK)
517 | (node (ref RF1) (pin 6))
518 | (node (ref U1) (pin 20)))
519 | (net (code 6) (name /LE)
520 | (node (ref U1) (pin 19))
521 | (node (ref RF1) (pin 5)))
522 | (net (code 7) (name +3V3)
523 | (node (ref U2) (pin 5))
524 | (node (ref C4) (pin 1))
525 | (node (ref U4) (pin 2))
526 | (node (ref U1) (pin 8))
527 | (node (ref R5) (pin 1))
528 | (node (ref R3) (pin 2))
529 | (node (ref R1) (pin 1))
530 | (node (ref D2) (pin 2))
531 | (node (ref oR1) (pin 1)))
532 | (net (code 8) (name "Net-(D2-Pad1)")
533 | (node (ref D2) (pin 1))
534 | (node (ref R4) (pin 1)))
535 | (net (code 9) (name GNDPWR)
536 | (node (ref U1) (pin 15))
537 | (node (ref Cout1) (pin 2))
538 | (node (ref Cin1) (pin 2))
539 | (node (ref RF1) (pin 1))
540 | (node (ref RF1) (pin 3))
541 | (node (ref U3) (pin 6))
542 | (node (ref LS1) (pin 2))
543 | (node (ref U2) (pin 2))
544 | (node (ref P1) (pin 2))
545 | (node (ref P1) (pin 1))
546 | (node (ref J1) (pin 2))
547 | (node (ref U4) (pin 3))
548 | (node (ref J1) (pin 3))
549 | (node (ref J1) (pin 4))
550 | (node (ref C4) (pin 2))
551 | (node (ref R6) (pin 1))
552 | (node (ref J1) (pin 5))
553 | (node (ref C3) (pin 2))
554 | (node (ref D1) (pin 2))
555 | (node (ref C2) (pin 2))
556 | (node (ref R9) (pin 2))
557 | (node (ref Q1) (pin 2))
558 | (node (ref Q2) (pin 2))
559 | (node (ref SW1) (pin 1))
560 | (node (ref C1) (pin 2))
561 | (node (ref P2) (pin 1))
562 | (node (ref R11) (pin 2))
563 | (node (ref RF1) (pin 12))
564 | (node (ref RF1) (pin 7)))
565 | (net (code 10) (name /RSSI)
566 | (node (ref R10) (pin 1))
567 | (node (ref RF1) (pin 9)))
568 | (net (code 11) (name /SHARED_ADC)
569 | (node (ref U2) (pin 4))
570 | (node (ref U1) (pin 2)))
571 | (net (code 12) (name "Net-(LS1-Pad1)")
572 | (node (ref LS1) (pin 1))
573 | (node (ref U1) (pin 5)))
574 | (net (code 13) (name /ESP-Reset/RESET)
575 | (node (ref oR1) (pin 2))
576 | (node (ref U1) (pin 1))
577 | (node (ref C1) (pin 1))
578 | (node (ref SW1) (pin 2))
579 | (node (ref Q1) (pin 1)))
580 | (net (code 14) (name /V+)
581 | (node (ref P1) (pin 3)))
582 | (net (code 15) (name /DTR)
583 | (node (ref P1) (pin 6)))
584 | (net (code 16) (name /RXI)
585 | (node (ref U1) (pin 22))
586 | (node (ref P1) (pin 5)))
587 | (net (code 17) (name +BATT)
588 | (node (ref P2) (pin 2))
589 | (node (ref U3) (pin 7))
590 | (node (ref Cin1) (pin 1))
591 | (node (ref R7) (pin 1)))
592 | (net (code 18) (name "Net-(R10-Pad2)")
593 | (node (ref U2) (pin 1))
594 | (node (ref R10) (pin 2))
595 | (node (ref R11) (pin 1)))
596 | (net (code 19) (name /DATA)
597 | (node (ref U1) (pin 7))
598 | (node (ref RF1) (pin 4)))
599 | (net (code 20) (name "Net-(U1-Pad4)")
600 | (node (ref U1) (pin 4)))
601 | (net (code 21) (name "Net-(U1-Pad9)")
602 | (node (ref U1) (pin 9)))
603 | (net (code 22) (name "Net-(U1-Pad10)")
604 | (node (ref U1) (pin 10)))
605 | (net (code 23) (name "Net-(U1-Pad11)")
606 | (node (ref U1) (pin 11)))
607 | (net (code 24) (name "Net-(U1-Pad12)")
608 | (node (ref U1) (pin 12)))
609 | (net (code 25) (name "Net-(U1-Pad13)")
610 | (node (ref U1) (pin 13)))
611 | (net (code 26) (name "Net-(U1-Pad14)")
612 | (node (ref U1) (pin 14)))
613 | (net (code 27) (name "Net-(R8-Pad2)")
614 | (node (ref R8) (pin 2))
615 | (node (ref R9) (pin 1)))
616 | (net (code 28) (name +5V)
617 | (node (ref RF1) (pin 8))
618 | (node (ref Cout1) (pin 1))
619 | (node (ref U4) (pin 1))
620 | (node (ref U3) (pin 4))
621 | (node (ref L1) (pin 1))
622 | (node (ref C3) (pin 1)))
623 | (net (code 29) (name "Net-(RF1-Pad10)")
624 | (node (ref RF1) (pin 10)))
625 | (net (code 30) (name "Net-(RF1-Pad11)")
626 | (node (ref RF1) (pin 11)))
627 | (net (code 31) (name "Net-(R3-Pad1)")
628 | (node (ref R3) (pin 1))
629 | (node (ref U1) (pin 3)))
630 | (net (code 32) (name "Net-(R6-Pad2)")
631 | (node (ref R6) (pin 2))
632 | (node (ref U1) (pin 16)))
633 | (net (code 33) (name "Net-(R5-Pad2)")
634 | (node (ref R5) (pin 2))
635 | (node (ref U1) (pin 17)))
636 | (net (code 34) (name /ADC_SELECT)
637 | (node (ref U2) (pin 6))
638 | (node (ref U1) (pin 6)))
639 | (net (code 35) (name "Net-(U3-Pad5)")
640 | (node (ref U3) (pin 5)))
641 | (net (code 36) (name "/5V/3V3 Regulator/5uf")
642 | (node (ref L1) (pin 2))
643 | (node (ref CB1) (pin 2))
644 | (node (ref U3) (pin 8))
645 | (node (ref D1) (pin 1)))
646 | (net (code 37) (name "Net-(CB1-Pad1)")
647 | (node (ref CB1) (pin 1))
648 | (node (ref U3) (pin 1)))
649 | (net (code 38) (name "Net-(Q1-Pad3)")
650 | (node (ref Q1) (pin 3))
651 | (node (ref R2) (pin 2))
652 | (node (ref R1) (pin 2)))
653 | (net (code 39) (name "Net-(C2-Pad1)")
654 | (node (ref R2) (pin 1))
655 | (node (ref Q2) (pin 1))
656 | (node (ref C2) (pin 1)))))
--------------------------------------------------------------------------------
/pcb/gerber/Chickadee-B.Mask.gbs:
--------------------------------------------------------------------------------
1 | G04 #@! TF.FileFunction,Soldermask,Bot*
2 | %FSLAX46Y46*%
3 | G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
4 | G04 Created by KiCad (PCBNEW (2015-11-03 BZR 6296)-product) date Tuesday, November 17, 2015 'PMt' 04:43:17 PM*
5 | %MOMM*%
6 | G01*
7 | G04 APERTURE LIST*
8 | %ADD10C,0.100000*%
9 | %ADD11C,0.010000*%
10 | %ADD12R,1.800860X0.800100*%
11 | %ADD13R,0.750000X1.200000*%
12 | %ADD14R,1.200000X0.750000*%
13 | %ADD15C,2.800000*%
14 | %ADD16C,2.700000*%
15 | %ADD17R,4.300000X5.700000*%
16 | %ADD18R,0.900000X1.200000*%
17 | %ADD19R,1.200000X0.900000*%
18 | %ADD20R,1.060000X0.650000*%
19 | %ADD21R,1.727200X2.032000*%
20 | %ADD22O,1.727200X2.032000*%
21 | %ADD23R,2.032000X2.032000*%
22 | %ADD24O,2.032000X2.032000*%
23 | G04 APERTURE END LIST*
24 | D10*
25 | D11*
26 | G36*
27 | X183976897Y-103708969D02*
28 | X183975122Y-103671134D01*
29 | X183972050Y-103635237D01*
30 | X183967549Y-103599588D01*
31 | X183961488Y-103562501D01*
32 | X183956774Y-103537463D01*
33 | X183949127Y-103500495D01*
34 | X183940944Y-103465230D01*
35 | X183931892Y-103430622D01*
36 | X183921636Y-103395624D01*
37 | X183909844Y-103359191D01*
38 | X183896182Y-103320278D01*
39 | X183880316Y-103277839D01*
40 | X183861912Y-103230827D01*
41 | X183847594Y-103195263D01*
42 | X183828195Y-103148042D01*
43 | X183808057Y-103100102D01*
44 | X183786989Y-103051041D01*
45 | X183764801Y-103000453D01*
46 | X183741305Y-102947934D01*
47 | X183716311Y-102893079D01*
48 | X183689628Y-102835486D01*
49 | X183661068Y-102774749D01*
50 | X183630441Y-102710464D01*
51 | X183597558Y-102642227D01*
52 | X183562228Y-102569635D01*
53 | X183524263Y-102492281D01*
54 | X183483472Y-102409764D01*
55 | X183439667Y-102321677D01*
56 | X183410823Y-102263915D01*
57 | X183370036Y-102182201D01*
58 | X183332302Y-102106268D01*
59 | X183297404Y-102035642D01*
60 | X183265125Y-101969851D01*
61 | X183235248Y-101908423D01*
62 | X183207556Y-101850885D01*
63 | X183181833Y-101796765D01*
64 | X183157862Y-101745591D01*
65 | X183135425Y-101696889D01*
66 | X183114305Y-101650189D01*
67 | X183094286Y-101605018D01*
68 | X183075152Y-101560903D01*
69 | X183056684Y-101517371D01*
70 | X183038666Y-101473951D01*
71 | X183020881Y-101430171D01*
72 | X183003112Y-101385557D01*
73 | X182985143Y-101339637D01*
74 | X182978491Y-101322458D01*
75 | X182969207Y-101298476D01*
76 | X182960545Y-101276212D01*
77 | X182952891Y-101256652D01*
78 | X182946634Y-101240781D01*
79 | X182942160Y-101229586D01*
80 | X182939930Y-101224216D01*
81 | X182935427Y-101214168D01*
82 | X182916151Y-101229302D01*
83 | X182902098Y-101241111D01*
84 | X182884518Y-101257080D01*
85 | X182864551Y-101276079D01*
86 | X182843337Y-101296977D01*
87 | X182822014Y-101318643D01*
88 | X182801723Y-101339945D01*
89 | X182783603Y-101359754D01*
90 | X182776080Y-101368319D01*
91 | X182714961Y-101443898D01*
92 | X182656762Y-101525648D01*
93 | X182601625Y-101613253D01*
94 | X182549694Y-101706399D01*
95 | X182501114Y-101804769D01*
96 | X182456027Y-101908048D01*
97 | X182414578Y-102015921D01*
98 | X182376909Y-102128072D01*
99 | X182343165Y-102244186D01*
100 | X182313490Y-102363946D01*
101 | X182304719Y-102403722D01*
102 | X182292433Y-102462747D01*
103 | X182281987Y-102516586D01*
104 | X182273123Y-102566795D01*
105 | X182265587Y-102614926D01*
106 | X182259123Y-102662531D01*
107 | X182253474Y-102711165D01*
108 | X182252412Y-102721222D01*
109 | X182250815Y-102741268D01*
110 | X182249562Y-102766488D01*
111 | X182248652Y-102795561D01*
112 | X182248087Y-102827167D01*
113 | X182247866Y-102859986D01*
114 | X182247989Y-102892697D01*
115 | X182248457Y-102923980D01*
116 | X182249270Y-102952515D01*
117 | X182250428Y-102976981D01*
118 | X182251931Y-102996059D01*
119 | X182252371Y-102999917D01*
120 | X182263641Y-103070413D01*
121 | X182279223Y-103135332D01*
122 | X182299125Y-103194686D01*
123 | X182323358Y-103248489D01*
124 | X182351929Y-103296754D01*
125 | X182384848Y-103339494D01*
126 | X182422125Y-103376725D01*
127 | X182463767Y-103408458D01*
128 | X182509784Y-103434708D01*
129 | X182556444Y-103454186D01*
130 | X182584664Y-103463436D01*
131 | X182610210Y-103470050D01*
132 | X182635330Y-103474389D01*
133 | X182662274Y-103476811D01*
134 | X182693290Y-103477677D01*
135 | X182703310Y-103477689D01*
136 | X182760217Y-103477494D01*
137 | X182762570Y-103500459D01*
138 | X182764922Y-103523423D01*
139 | X182730990Y-103573181D01*
140 | X182681641Y-103572739D01*
141 | X182623410Y-103568754D01*
142 | X182566659Y-103557973D01*
143 | X182511805Y-103540573D01*
144 | X182459268Y-103516733D01*
145 | X182409464Y-103486631D01*
146 | X182362812Y-103450446D01*
147 | X182335845Y-103425226D01*
148 | X182299000Y-103384590D01*
149 | X182266629Y-103340860D01*
150 | X182238509Y-103293528D01*
151 | X182214416Y-103242089D01*
152 | X182194127Y-103186034D01*
153 | X182177416Y-103124857D01*
154 | X182164062Y-103058052D01*
155 | X182158887Y-103024611D01*
156 | X182156611Y-103003545D01*
157 | X182154815Y-102976697D01*
158 | X182153500Y-102945325D01*
159 | X182152666Y-102910685D01*
160 | X182152312Y-102874034D01*
161 | X182152438Y-102836631D01*
162 | X182153044Y-102799731D01*
163 | X182154130Y-102764593D01*
164 | X182155697Y-102732474D01*
165 | X182157743Y-102704630D01*
166 | X182158912Y-102693000D01*
167 | X182174085Y-102578753D01*
168 | X182193945Y-102463621D01*
169 | X182218230Y-102348476D01*
170 | X182246679Y-102234191D01*
171 | X182279031Y-102121641D01*
172 | X182315025Y-102011697D01*
173 | X182354400Y-101905234D01*
174 | X182396894Y-101803124D01*
175 | X182442246Y-101706240D01*
176 | X182470502Y-101651392D01*
177 | X182517249Y-101568282D01*
178 | X182566369Y-101489342D01*
179 | X182617513Y-101415019D01*
180 | X182670332Y-101345759D01*
181 | X182724478Y-101282007D01*
182 | X182779603Y-101224209D01*
183 | X182835357Y-101172812D01*
184 | X182861520Y-101151120D01*
185 | X182879428Y-101136411D01*
186 | X182891741Y-101125353D01*
187 | X182898733Y-101117679D01*
188 | X182900678Y-101113122D01*
189 | X182900627Y-101112894D01*
190 | X182896988Y-101098318D01*
191 | X182892861Y-101077871D01*
192 | X182888412Y-101052704D01*
193 | X182883807Y-101023971D01*
194 | X182879213Y-100992826D01*
195 | X182874796Y-100960421D01*
196 | X182870724Y-100927909D01*
197 | X182867163Y-100896444D01*
198 | X182864280Y-100867179D01*
199 | X182863107Y-100853264D01*
200 | X182861370Y-100823004D01*
201 | X182860689Y-100789491D01*
202 | X182861091Y-100752279D01*
203 | X182862602Y-100710925D01*
204 | X182865250Y-100664983D01*
205 | X182869062Y-100614009D01*
206 | X182874063Y-100557559D01*
207 | X182880281Y-100495188D01*
208 | X182887744Y-100426452D01*
209 | X182890147Y-100405236D01*
210 | X182901961Y-100307304D01*
211 | X182915747Y-100202890D01*
212 | X182931456Y-100092274D01*
213 | X182949038Y-99975733D01*
214 | X182968441Y-99853546D01*
215 | X182989614Y-99725989D01*
216 | X183012508Y-99593343D01*
217 | X183037072Y-99455883D01*
218 | X183063254Y-99313890D01*
219 | X183091005Y-99167640D01*
220 | X183120273Y-99017412D01*
221 | X183151009Y-98863483D01*
222 | X183183160Y-98706133D01*
223 | X183216678Y-98545639D01*
224 | X183251511Y-98382279D01*
225 | X183287608Y-98216331D01*
226 | X183293834Y-98188028D01*
227 | X183300732Y-98156495D01*
228 | X183307213Y-98126427D01*
229 | X183313101Y-98098674D01*
230 | X183318220Y-98074087D01*
231 | X183322393Y-98053516D01*
232 | X183325444Y-98037814D01*
233 | X183327196Y-98027830D01*
234 | X183327480Y-98025750D01*
235 | X183327397Y-97998371D01*
236 | X183321802Y-97969403D01*
237 | X183311360Y-97940663D01*
238 | X183296737Y-97913968D01*
239 | X183278600Y-97891137D01*
240 | X183277903Y-97890423D01*
241 | X183265542Y-97879666D01*
242 | X183247416Y-97866441D01*
243 | X183224218Y-97851127D01*
244 | X183196638Y-97834102D01*
245 | X183165367Y-97815747D01*
246 | X183131098Y-97796438D01*
247 | X183094521Y-97776556D01*
248 | X183056329Y-97756479D01*
249 | X183017211Y-97736585D01*
250 | X182977861Y-97717253D01*
251 | X182938969Y-97698863D01*
252 | X182901226Y-97681792D01*
253 | X182881112Y-97673062D01*
254 | X182812172Y-97645582D01*
255 | X182747247Y-97623705D01*
256 | X182686369Y-97607436D01*
257 | X182629572Y-97596780D01*
258 | X182576888Y-97591742D01*
259 | X182528350Y-97592326D01*
260 | X182483992Y-97598538D01*
261 | X182445645Y-97609697D01*
262 | X182425383Y-97619279D01*
263 | X182403470Y-97632842D01*
264 | X182382372Y-97648641D01*
265 | X182364559Y-97664928D01*
266 | X182359140Y-97670911D01*
267 | X182347229Y-97686300D01*
268 | X182336713Y-97702919D01*
269 | X182327482Y-97721311D01*
270 | X182319426Y-97742022D01*
271 | X182312435Y-97765594D01*
272 | X182306398Y-97792573D01*
273 | X182301206Y-97823502D01*
274 | X182296748Y-97858926D01*
275 | X182292914Y-97899388D01*
276 | X182289595Y-97945433D01*
277 | X182286679Y-97997604D01*
278 | X182284818Y-98038097D01*
279 | X182284039Y-98057868D01*
280 | X182283124Y-98083696D01*
281 | X182282103Y-98114584D01*
282 | X182281006Y-98149536D01*
283 | X182279863Y-98187554D01*
284 | X182278706Y-98227643D01*
285 | X182277563Y-98268805D01*
286 | X182276466Y-98310044D01*
287 | X182275930Y-98330903D01*
288 | X182273135Y-98436868D01*
289 | X182270272Y-98536377D01*
290 | X182267312Y-98630029D01*
291 | X182264226Y-98718424D01*
292 | X182260984Y-98802160D01*
293 | X182257556Y-98881838D01*
294 | X182253914Y-98958056D01*
295 | X182250028Y-99031413D01*
296 | X182245868Y-99102509D01*
297 | X182241405Y-99171944D01*
298 | X182236610Y-99240317D01*
299 | X182231452Y-99308226D01*
300 | X182225904Y-99376271D01*
301 | X182222832Y-99412167D01*
302 | X182208516Y-99564575D01*
303 | X182192499Y-99711084D01*
304 | X182174574Y-99852686D01*
305 | X182154538Y-99990371D01*
306 | X182132187Y-100125131D01*
307 | X182107314Y-100257958D01*
308 | X182079717Y-100389844D01*
309 | X182049189Y-100521779D01*
310 | X182015527Y-100654756D01*
311 | X181978526Y-100789766D01*
312 | X181937982Y-100927801D01*
313 | X181893689Y-101069851D01*
314 | X181858484Y-101177819D01*
315 | X181839585Y-101234471D01*
316 | X181821819Y-101286899D01*
317 | X181804921Y-101335676D01*
318 | X181788623Y-101381373D01*
319 | X181772660Y-101424563D01*
320 | X181756765Y-101465816D01*
321 | X181740673Y-101505705D01*
322 | X181724116Y-101544801D01*
323 | X181706830Y-101583675D01*
324 | X181688548Y-101622901D01*
325 | X181669003Y-101663048D01*
326 | X181647929Y-101704690D01*
327 | X181625061Y-101748398D01*
328 | X181600131Y-101794743D01*
329 | X181572875Y-101844297D01*
330 | X181543025Y-101897632D01*
331 | X181510316Y-101955320D01*
332 | X181474481Y-102017932D01*
333 | X181437185Y-102082694D01*
334 | X181408257Y-102132887D01*
335 | X181382550Y-102177657D01*
336 | X181359702Y-102217661D01*
337 | X181339352Y-102253555D01*
338 | X181321137Y-102285994D01*
339 | X181304697Y-102315635D01*
340 | X181289670Y-102343134D01*
341 | X181275693Y-102369147D01*
342 | X181262406Y-102394330D01*
343 | X181249446Y-102419338D01*
344 | X181236451Y-102444828D01*
345 | X181225180Y-102467222D01*
346 | X181193259Y-102532539D01*
347 | X181165298Y-102593326D01*
348 | X181140936Y-102650631D01*
349 | X181119812Y-102705499D01*
350 | X181101564Y-102758978D01*
351 | X181085831Y-102812115D01*
352 | X181072252Y-102865957D01*
353 | X181060463Y-102921551D01*
354 | X181051906Y-102969025D01*
355 | X181042525Y-103028301D01*
356 | X181035151Y-103082886D01*
357 | X181029623Y-103134804D01*
358 | X181025777Y-103186074D01*
359 | X181023450Y-103238721D01*
360 | X181022478Y-103294766D01*
361 | X181022491Y-103333292D01*
362 | X181022691Y-103359880D01*
363 | X181022949Y-103384924D01*
364 | X181023249Y-103407330D01*
365 | X181023574Y-103426003D01*
366 | X181023908Y-103439851D01*
367 | X181024233Y-103447777D01*
368 | X181024245Y-103447944D01*
369 | X181033260Y-103538991D01*
370 | X181046904Y-103628800D01*
371 | X181064958Y-103716515D01*
372 | X181087202Y-103801282D01*
373 | X181113417Y-103882244D01*
374 | X181143381Y-103958545D01*
375 | X181170183Y-104016209D01*
376 | X181217081Y-104102043D01*
377 | X181270623Y-104185670D01*
378 | X181330727Y-104267012D01*
379 | X181397310Y-104345994D01*
380 | X181470292Y-104422539D01*
381 | X181549589Y-104496571D01*
382 | X181635121Y-104568015D01*
383 | X181726804Y-104636793D01*
384 | X181824558Y-104702829D01*
385 | X181928299Y-104766048D01*
386 | X182037947Y-104826373D01*
387 | X182046254Y-104830700D01*
388 | X182121266Y-104867707D01*
389 | X182199011Y-104902221D01*
390 | X182280420Y-104934600D01*
391 | X182366426Y-104965202D01*
392 | X182457961Y-104994388D01*
393 | X182514242Y-105010890D01*
394 | X182540831Y-105018457D01*
395 | X182639956Y-105264194D01*
396 | X182655931Y-105303671D01*
397 | X182671209Y-105341187D01*
398 | X182685578Y-105376234D01*
399 | X182698827Y-105408306D01*
400 | X182710743Y-105436898D01*
401 | X182721113Y-105461502D01*
402 | X182729726Y-105481612D01*
403 | X182736370Y-105496722D01*
404 | X182740832Y-105506326D01*
405 | X182742899Y-105509917D01*
406 | X182742945Y-105509931D01*
407 | X182745822Y-105507356D01*
408 | X182753035Y-105499885D01*
409 | X182764238Y-105487902D01*
410 | X182779083Y-105471787D01*
411 | X182797224Y-105451922D01*
412 | X182818314Y-105428690D01*
413 | X182842006Y-105402471D01*
414 | X182867952Y-105373649D01*
415 | X182895807Y-105342605D01*
416 | X182925222Y-105309720D01*
417 | X182948034Y-105284153D01*
418 | X183149259Y-105058375D01*
419 | X183188978Y-105043997D01*
420 | X183259052Y-105015662D01*
421 | X183325955Y-104982414D01*
422 | X183390293Y-104943848D01*
423 | X183452676Y-104899555D01*
424 | X183513713Y-104849130D01*
425 | X183574010Y-104792165D01*
426 | X183590083Y-104775776D01*
427 | X183650261Y-104708462D01*
428 | X183705941Y-104635870D01*
429 | X183756990Y-104558266D01*
430 | X183803278Y-104475914D01*
431 | X183844670Y-104389079D01*
432 | X183881036Y-104298026D01*
433 | X183912242Y-104203021D01*
434 | X183938158Y-104104329D01*
435 | X183948166Y-104058250D01*
436 | X183956803Y-104013853D01*
437 | X183963573Y-103974131D01*
438 | X183968705Y-103937021D01*
439 | X183972428Y-103900460D01*
440 | X183974971Y-103862386D01*
441 | X183976561Y-103820735D01*
442 | X183977084Y-103797194D01*
443 | X183977507Y-103750426D01*
444 | X183976897Y-103708969D01*
445 | X183976897Y-103708969D01*
446 | G37*
447 | X183976897Y-103708969D02*
448 | X183975122Y-103671134D01*
449 | X183972050Y-103635237D01*
450 | X183967549Y-103599588D01*
451 | X183961488Y-103562501D01*
452 | X183956774Y-103537463D01*
453 | X183949127Y-103500495D01*
454 | X183940944Y-103465230D01*
455 | X183931892Y-103430622D01*
456 | X183921636Y-103395624D01*
457 | X183909844Y-103359191D01*
458 | X183896182Y-103320278D01*
459 | X183880316Y-103277839D01*
460 | X183861912Y-103230827D01*
461 | X183847594Y-103195263D01*
462 | X183828195Y-103148042D01*
463 | X183808057Y-103100102D01*
464 | X183786989Y-103051041D01*
465 | X183764801Y-103000453D01*
466 | X183741305Y-102947934D01*
467 | X183716311Y-102893079D01*
468 | X183689628Y-102835486D01*
469 | X183661068Y-102774749D01*
470 | X183630441Y-102710464D01*
471 | X183597558Y-102642227D01*
472 | X183562228Y-102569635D01*
473 | X183524263Y-102492281D01*
474 | X183483472Y-102409764D01*
475 | X183439667Y-102321677D01*
476 | X183410823Y-102263915D01*
477 | X183370036Y-102182201D01*
478 | X183332302Y-102106268D01*
479 | X183297404Y-102035642D01*
480 | X183265125Y-101969851D01*
481 | X183235248Y-101908423D01*
482 | X183207556Y-101850885D01*
483 | X183181833Y-101796765D01*
484 | X183157862Y-101745591D01*
485 | X183135425Y-101696889D01*
486 | X183114305Y-101650189D01*
487 | X183094286Y-101605018D01*
488 | X183075152Y-101560903D01*
489 | X183056684Y-101517371D01*
490 | X183038666Y-101473951D01*
491 | X183020881Y-101430171D01*
492 | X183003112Y-101385557D01*
493 | X182985143Y-101339637D01*
494 | X182978491Y-101322458D01*
495 | X182969207Y-101298476D01*
496 | X182960545Y-101276212D01*
497 | X182952891Y-101256652D01*
498 | X182946634Y-101240781D01*
499 | X182942160Y-101229586D01*
500 | X182939930Y-101224216D01*
501 | X182935427Y-101214168D01*
502 | X182916151Y-101229302D01*
503 | X182902098Y-101241111D01*
504 | X182884518Y-101257080D01*
505 | X182864551Y-101276079D01*
506 | X182843337Y-101296977D01*
507 | X182822014Y-101318643D01*
508 | X182801723Y-101339945D01*
509 | X182783603Y-101359754D01*
510 | X182776080Y-101368319D01*
511 | X182714961Y-101443898D01*
512 | X182656762Y-101525648D01*
513 | X182601625Y-101613253D01*
514 | X182549694Y-101706399D01*
515 | X182501114Y-101804769D01*
516 | X182456027Y-101908048D01*
517 | X182414578Y-102015921D01*
518 | X182376909Y-102128072D01*
519 | X182343165Y-102244186D01*
520 | X182313490Y-102363946D01*
521 | X182304719Y-102403722D01*
522 | X182292433Y-102462747D01*
523 | X182281987Y-102516586D01*
524 | X182273123Y-102566795D01*
525 | X182265587Y-102614926D01*
526 | X182259123Y-102662531D01*
527 | X182253474Y-102711165D01*
528 | X182252412Y-102721222D01*
529 | X182250815Y-102741268D01*
530 | X182249562Y-102766488D01*
531 | X182248652Y-102795561D01*
532 | X182248087Y-102827167D01*
533 | X182247866Y-102859986D01*
534 | X182247989Y-102892697D01*
535 | X182248457Y-102923980D01*
536 | X182249270Y-102952515D01*
537 | X182250428Y-102976981D01*
538 | X182251931Y-102996059D01*
539 | X182252371Y-102999917D01*
540 | X182263641Y-103070413D01*
541 | X182279223Y-103135332D01*
542 | X182299125Y-103194686D01*
543 | X182323358Y-103248489D01*
544 | X182351929Y-103296754D01*
545 | X182384848Y-103339494D01*
546 | X182422125Y-103376725D01*
547 | X182463767Y-103408458D01*
548 | X182509784Y-103434708D01*
549 | X182556444Y-103454186D01*
550 | X182584664Y-103463436D01*
551 | X182610210Y-103470050D01*
552 | X182635330Y-103474389D01*
553 | X182662274Y-103476811D01*
554 | X182693290Y-103477677D01*
555 | X182703310Y-103477689D01*
556 | X182760217Y-103477494D01*
557 | X182762570Y-103500459D01*
558 | X182764922Y-103523423D01*
559 | X182730990Y-103573181D01*
560 | X182681641Y-103572739D01*
561 | X182623410Y-103568754D01*
562 | X182566659Y-103557973D01*
563 | X182511805Y-103540573D01*
564 | X182459268Y-103516733D01*
565 | X182409464Y-103486631D01*
566 | X182362812Y-103450446D01*
567 | X182335845Y-103425226D01*
568 | X182299000Y-103384590D01*
569 | X182266629Y-103340860D01*
570 | X182238509Y-103293528D01*
571 | X182214416Y-103242089D01*
572 | X182194127Y-103186034D01*
573 | X182177416Y-103124857D01*
574 | X182164062Y-103058052D01*
575 | X182158887Y-103024611D01*
576 | X182156611Y-103003545D01*
577 | X182154815Y-102976697D01*
578 | X182153500Y-102945325D01*
579 | X182152666Y-102910685D01*
580 | X182152312Y-102874034D01*
581 | X182152438Y-102836631D01*
582 | X182153044Y-102799731D01*
583 | X182154130Y-102764593D01*
584 | X182155697Y-102732474D01*
585 | X182157743Y-102704630D01*
586 | X182158912Y-102693000D01*
587 | X182174085Y-102578753D01*
588 | X182193945Y-102463621D01*
589 | X182218230Y-102348476D01*
590 | X182246679Y-102234191D01*
591 | X182279031Y-102121641D01*
592 | X182315025Y-102011697D01*
593 | X182354400Y-101905234D01*
594 | X182396894Y-101803124D01*
595 | X182442246Y-101706240D01*
596 | X182470502Y-101651392D01*
597 | X182517249Y-101568282D01*
598 | X182566369Y-101489342D01*
599 | X182617513Y-101415019D01*
600 | X182670332Y-101345759D01*
601 | X182724478Y-101282007D01*
602 | X182779603Y-101224209D01*
603 | X182835357Y-101172812D01*
604 | X182861520Y-101151120D01*
605 | X182879428Y-101136411D01*
606 | X182891741Y-101125353D01*
607 | X182898733Y-101117679D01*
608 | X182900678Y-101113122D01*
609 | X182900627Y-101112894D01*
610 | X182896988Y-101098318D01*
611 | X182892861Y-101077871D01*
612 | X182888412Y-101052704D01*
613 | X182883807Y-101023971D01*
614 | X182879213Y-100992826D01*
615 | X182874796Y-100960421D01*
616 | X182870724Y-100927909D01*
617 | X182867163Y-100896444D01*
618 | X182864280Y-100867179D01*
619 | X182863107Y-100853264D01*
620 | X182861370Y-100823004D01*
621 | X182860689Y-100789491D01*
622 | X182861091Y-100752279D01*
623 | X182862602Y-100710925D01*
624 | X182865250Y-100664983D01*
625 | X182869062Y-100614009D01*
626 | X182874063Y-100557559D01*
627 | X182880281Y-100495188D01*
628 | X182887744Y-100426452D01*
629 | X182890147Y-100405236D01*
630 | X182901961Y-100307304D01*
631 | X182915747Y-100202890D01*
632 | X182931456Y-100092274D01*
633 | X182949038Y-99975733D01*
634 | X182968441Y-99853546D01*
635 | X182989614Y-99725989D01*
636 | X183012508Y-99593343D01*
637 | X183037072Y-99455883D01*
638 | X183063254Y-99313890D01*
639 | X183091005Y-99167640D01*
640 | X183120273Y-99017412D01*
641 | X183151009Y-98863483D01*
642 | X183183160Y-98706133D01*
643 | X183216678Y-98545639D01*
644 | X183251511Y-98382279D01*
645 | X183287608Y-98216331D01*
646 | X183293834Y-98188028D01*
647 | X183300732Y-98156495D01*
648 | X183307213Y-98126427D01*
649 | X183313101Y-98098674D01*
650 | X183318220Y-98074087D01*
651 | X183322393Y-98053516D01*
652 | X183325444Y-98037814D01*
653 | X183327196Y-98027830D01*
654 | X183327480Y-98025750D01*
655 | X183327397Y-97998371D01*
656 | X183321802Y-97969403D01*
657 | X183311360Y-97940663D01*
658 | X183296737Y-97913968D01*
659 | X183278600Y-97891137D01*
660 | X183277903Y-97890423D01*
661 | X183265542Y-97879666D01*
662 | X183247416Y-97866441D01*
663 | X183224218Y-97851127D01*
664 | X183196638Y-97834102D01*
665 | X183165367Y-97815747D01*
666 | X183131098Y-97796438D01*
667 | X183094521Y-97776556D01*
668 | X183056329Y-97756479D01*
669 | X183017211Y-97736585D01*
670 | X182977861Y-97717253D01*
671 | X182938969Y-97698863D01*
672 | X182901226Y-97681792D01*
673 | X182881112Y-97673062D01*
674 | X182812172Y-97645582D01*
675 | X182747247Y-97623705D01*
676 | X182686369Y-97607436D01*
677 | X182629572Y-97596780D01*
678 | X182576888Y-97591742D01*
679 | X182528350Y-97592326D01*
680 | X182483992Y-97598538D01*
681 | X182445645Y-97609697D01*
682 | X182425383Y-97619279D01*
683 | X182403470Y-97632842D01*
684 | X182382372Y-97648641D01*
685 | X182364559Y-97664928D01*
686 | X182359140Y-97670911D01*
687 | X182347229Y-97686300D01*
688 | X182336713Y-97702919D01*
689 | X182327482Y-97721311D01*
690 | X182319426Y-97742022D01*
691 | X182312435Y-97765594D01*
692 | X182306398Y-97792573D01*
693 | X182301206Y-97823502D01*
694 | X182296748Y-97858926D01*
695 | X182292914Y-97899388D01*
696 | X182289595Y-97945433D01*
697 | X182286679Y-97997604D01*
698 | X182284818Y-98038097D01*
699 | X182284039Y-98057868D01*
700 | X182283124Y-98083696D01*
701 | X182282103Y-98114584D01*
702 | X182281006Y-98149536D01*
703 | X182279863Y-98187554D01*
704 | X182278706Y-98227643D01*
705 | X182277563Y-98268805D01*
706 | X182276466Y-98310044D01*
707 | X182275930Y-98330903D01*
708 | X182273135Y-98436868D01*
709 | X182270272Y-98536377D01*
710 | X182267312Y-98630029D01*
711 | X182264226Y-98718424D01*
712 | X182260984Y-98802160D01*
713 | X182257556Y-98881838D01*
714 | X182253914Y-98958056D01*
715 | X182250028Y-99031413D01*
716 | X182245868Y-99102509D01*
717 | X182241405Y-99171944D01*
718 | X182236610Y-99240317D01*
719 | X182231452Y-99308226D01*
720 | X182225904Y-99376271D01*
721 | X182222832Y-99412167D01*
722 | X182208516Y-99564575D01*
723 | X182192499Y-99711084D01*
724 | X182174574Y-99852686D01*
725 | X182154538Y-99990371D01*
726 | X182132187Y-100125131D01*
727 | X182107314Y-100257958D01*
728 | X182079717Y-100389844D01*
729 | X182049189Y-100521779D01*
730 | X182015527Y-100654756D01*
731 | X181978526Y-100789766D01*
732 | X181937982Y-100927801D01*
733 | X181893689Y-101069851D01*
734 | X181858484Y-101177819D01*
735 | X181839585Y-101234471D01*
736 | X181821819Y-101286899D01*
737 | X181804921Y-101335676D01*
738 | X181788623Y-101381373D01*
739 | X181772660Y-101424563D01*
740 | X181756765Y-101465816D01*
741 | X181740673Y-101505705D01*
742 | X181724116Y-101544801D01*
743 | X181706830Y-101583675D01*
744 | X181688548Y-101622901D01*
745 | X181669003Y-101663048D01*
746 | X181647929Y-101704690D01*
747 | X181625061Y-101748398D01*
748 | X181600131Y-101794743D01*
749 | X181572875Y-101844297D01*
750 | X181543025Y-101897632D01*
751 | X181510316Y-101955320D01*
752 | X181474481Y-102017932D01*
753 | X181437185Y-102082694D01*
754 | X181408257Y-102132887D01*
755 | X181382550Y-102177657D01*
756 | X181359702Y-102217661D01*
757 | X181339352Y-102253555D01*
758 | X181321137Y-102285994D01*
759 | X181304697Y-102315635D01*
760 | X181289670Y-102343134D01*
761 | X181275693Y-102369147D01*
762 | X181262406Y-102394330D01*
763 | X181249446Y-102419338D01*
764 | X181236451Y-102444828D01*
765 | X181225180Y-102467222D01*
766 | X181193259Y-102532539D01*
767 | X181165298Y-102593326D01*
768 | X181140936Y-102650631D01*
769 | X181119812Y-102705499D01*
770 | X181101564Y-102758978D01*
771 | X181085831Y-102812115D01*
772 | X181072252Y-102865957D01*
773 | X181060463Y-102921551D01*
774 | X181051906Y-102969025D01*
775 | X181042525Y-103028301D01*
776 | X181035151Y-103082886D01*
777 | X181029623Y-103134804D01*
778 | X181025777Y-103186074D01*
779 | X181023450Y-103238721D01*
780 | X181022478Y-103294766D01*
781 | X181022491Y-103333292D01*
782 | X181022691Y-103359880D01*
783 | X181022949Y-103384924D01*
784 | X181023249Y-103407330D01*
785 | X181023574Y-103426003D01*
786 | X181023908Y-103439851D01*
787 | X181024233Y-103447777D01*
788 | X181024245Y-103447944D01*
789 | X181033260Y-103538991D01*
790 | X181046904Y-103628800D01*
791 | X181064958Y-103716515D01*
792 | X181087202Y-103801282D01*
793 | X181113417Y-103882244D01*
794 | X181143381Y-103958545D01*
795 | X181170183Y-104016209D01*
796 | X181217081Y-104102043D01*
797 | X181270623Y-104185670D01*
798 | X181330727Y-104267012D01*
799 | X181397310Y-104345994D01*
800 | X181470292Y-104422539D01*
801 | X181549589Y-104496571D01*
802 | X181635121Y-104568015D01*
803 | X181726804Y-104636793D01*
804 | X181824558Y-104702829D01*
805 | X181928299Y-104766048D01*
806 | X182037947Y-104826373D01*
807 | X182046254Y-104830700D01*
808 | X182121266Y-104867707D01*
809 | X182199011Y-104902221D01*
810 | X182280420Y-104934600D01*
811 | X182366426Y-104965202D01*
812 | X182457961Y-104994388D01*
813 | X182514242Y-105010890D01*
814 | X182540831Y-105018457D01*
815 | X182639956Y-105264194D01*
816 | X182655931Y-105303671D01*
817 | X182671209Y-105341187D01*
818 | X182685578Y-105376234D01*
819 | X182698827Y-105408306D01*
820 | X182710743Y-105436898D01*
821 | X182721113Y-105461502D01*
822 | X182729726Y-105481612D01*
823 | X182736370Y-105496722D01*
824 | X182740832Y-105506326D01*
825 | X182742899Y-105509917D01*
826 | X182742945Y-105509931D01*
827 | X182745822Y-105507356D01*
828 | X182753035Y-105499885D01*
829 | X182764238Y-105487902D01*
830 | X182779083Y-105471787D01*
831 | X182797224Y-105451922D01*
832 | X182818314Y-105428690D01*
833 | X182842006Y-105402471D01*
834 | X182867952Y-105373649D01*
835 | X182895807Y-105342605D01*
836 | X182925222Y-105309720D01*
837 | X182948034Y-105284153D01*
838 | X183149259Y-105058375D01*
839 | X183188978Y-105043997D01*
840 | X183259052Y-105015662D01*
841 | X183325955Y-104982414D01*
842 | X183390293Y-104943848D01*
843 | X183452676Y-104899555D01*
844 | X183513713Y-104849130D01*
845 | X183574010Y-104792165D01*
846 | X183590083Y-104775776D01*
847 | X183650261Y-104708462D01*
848 | X183705941Y-104635870D01*
849 | X183756990Y-104558266D01*
850 | X183803278Y-104475914D01*
851 | X183844670Y-104389079D01*
852 | X183881036Y-104298026D01*
853 | X183912242Y-104203021D01*
854 | X183938158Y-104104329D01*
855 | X183948166Y-104058250D01*
856 | X183956803Y-104013853D01*
857 | X183963573Y-103974131D01*
858 | X183968705Y-103937021D01*
859 | X183972428Y-103900460D01*
860 | X183974971Y-103862386D01*
861 | X183976561Y-103820735D01*
862 | X183977084Y-103797194D01*
863 | X183977507Y-103750426D01*
864 | X183976897Y-103708969D01*
865 | D12*
866 | X182323860Y-122650000D03*
867 | X182323860Y-120750000D03*
868 | X185326140Y-121700000D03*
869 | X185326140Y-125975000D03*
870 | X185326140Y-127875000D03*
871 | X182323860Y-126925000D03*
872 | D13*
873 | X189600000Y-127450000D03*
874 | X189600000Y-125550000D03*
875 | X187750000Y-123650000D03*
876 | X187750000Y-125550000D03*
877 | D14*
878 | X202700000Y-114500000D03*
879 | X200800000Y-114500000D03*
880 | X202700000Y-120000000D03*
881 | X200800000Y-120000000D03*
882 | D13*
883 | X208000000Y-97800000D03*
884 | X208000000Y-99700000D03*
885 | D15*
886 | X206710000Y-77710000D03*
887 | X206710000Y-82790000D03*
888 | X211790000Y-82790000D03*
889 | X211790000Y-77710000D03*
890 | D16*
891 | X209250000Y-80250000D03*
892 | D17*
893 | X188750000Y-68550000D03*
894 | X188750000Y-83950000D03*
895 | D18*
896 | X189625000Y-123600000D03*
897 | X189625000Y-121400000D03*
898 | D19*
899 | X184775000Y-124350000D03*
900 | X182575000Y-124350000D03*
901 | D18*
902 | X201000000Y-110400000D03*
903 | X201000000Y-112600000D03*
904 | X195750000Y-117400000D03*
905 | X195750000Y-119600000D03*
906 | X193750000Y-117400000D03*
907 | X193750000Y-119600000D03*
908 | X193000000Y-104150000D03*
909 | X193000000Y-106350000D03*
910 | X190700000Y-106350000D03*
911 | X190700000Y-104150000D03*
912 | X188000000Y-104150000D03*
913 | X188000000Y-106350000D03*
914 | D20*
915 | X203400000Y-111700000D03*
916 | X203400000Y-110750000D03*
917 | X203400000Y-109800000D03*
918 | X205600000Y-109800000D03*
919 | X205600000Y-111700000D03*
920 | X205600000Y-110750000D03*
921 | D12*
922 | X203001140Y-116300000D03*
923 | X203001140Y-118200000D03*
924 | X199998860Y-117250000D03*
925 | D21*
926 | X193500000Y-127250000D03*
927 | D22*
928 | X196040000Y-127250000D03*
929 | X198580000Y-127250000D03*
930 | X201120000Y-127250000D03*
931 | X203660000Y-127250000D03*
932 | X206200000Y-127250000D03*
933 | D19*
934 | X206100000Y-103900000D03*
935 | X203900000Y-103900000D03*
936 | D23*
937 | X211600000Y-64200000D03*
938 | D24*
939 | X209060000Y-64200000D03*
940 | M02*
941 |
--------------------------------------------------------------------------------