xref: /aosp_15_r20/external/walt/hardware/README.md (revision bf47c6829f95be9dd55f4c5bbc44a71c90aad403)
1*bf47c682SAndroid Build Coastguard Worker## Hardware assembly ##
2*bf47c682SAndroid Build Coastguard WorkerDepending on your specific needs, you may want to introduce some variations.
3*bf47c682SAndroid Build Coastguard WorkerIn most cases it's possible to assemble a device with partial functionality (e.g. only for audio latency) on a solderless breadboard.
4*bf47c682SAndroid Build Coastguard Worker
5*bf47c682SAndroid Build Coastguard Worker### List of suggested parts ###
6*bf47c682SAndroid Build Coastguard Worker
7*bf47c682SAndroid Build Coastguard Worker * USB OTG cable like
8*bf47c682SAndroid Build Coastguard Worker   [this](http://www.amazon.com/Generic-Micro-Cable-Cellphone-Tablet/dp/B00AYPEL56)
9*bf47c682SAndroid Build Coastguard Worker   (or a USB Type-C to A adapter)
10*bf47c682SAndroid Build Coastguard Worker   for connecting WALT to your phone or tablet
11*bf47c682SAndroid Build Coastguard Worker * Microcontroller board - [Teensy LC](https://www.pjrc.com/teensy/teensyLC.html)
12*bf47c682SAndroid Build Coastguard Worker * Photodiodes - [BPW34](http://www.digikey.com/product-detail/en/osram-opto-semiconductors-inc/BPW34/475-1070-ND/607274) (3 units)
13*bf47c682SAndroid Build Coastguard Worker * Laser - any laser pointer will do, ~1 mW is just fine (5 mW is ok, but avoid stronger ones)
14*bf47c682SAndroid Build Coastguard Worker * Accelerometer board [Adafruit ADXL335](https://www.adafruit.com/product/163) **with filter capacitors removed**.
15*bf47c682SAndroid Build Coastguard Worker   It's very important to remove the filter capacitors, otherwise they smooth out the abrupt shock we are looking for.
16*bf47c682SAndroid Build Coastguard Worker   Alternatively use the ADXL335 chip directly without the breakout board, but it's rather difficult to solder manually.
17*bf47c682SAndroid Build Coastguard Worker * Some resistors and capacitors - see schematics
18*bf47c682SAndroid Build Coastguard Worker * TRRS connector or wire for audio measurements
19*bf47c682SAndroid Build Coastguard Worker * Clipboard, like [this one](https://upload.wikimedia.org/wikipedia/commons/c/c0/Wood-clipboard.jpg)
20*bf47c682SAndroid Build Coastguard Worker
21*bf47c682SAndroid Build Coastguard Worker### Schematic ###
22*bf47c682SAndroid Build Coastguard WorkerThe current hardware version we use (r0.7) can be found as KiCAD project in this directory.
23*bf47c682SAndroid Build Coastguard Worker * [PDF](WALT_schematic.pdf)
24*bf47c682SAndroid Build Coastguard Worker * Blank PCBs can be ordered directly via [this shared project on OSH Park](https://oshpark.com/shared_projects/M5Z8fYCX)
25*bf47c682SAndroid Build Coastguard Worker * List of parts for version r0.7 - [BOM as a tsv file](WALT_bom_r07.tsv)
26*bf47c682SAndroid Build Coastguard Worker
27*bf47c682SAndroid Build Coastguard Worker ![WALT r0.7 photo](../docs/WALT_r07_photo.jpg)
28*bf47c682SAndroid Build Coastguard Worker
29*bf47c682SAndroid Build Coastguard Worker
30*bf47c682SAndroid Build Coastguard Worker### Microcontroller code ###
31*bf47c682SAndroid Build Coastguard Worker
32*bf47c682SAndroid Build Coastguard WorkerImportant pin numbers from the code listed below, defined in [walt.ino](../arduino/walt/walt.ino)
33*bf47c682SAndroid Build Coastguard Worker
34*bf47c682SAndroid Build Coastguard Worker * PD_LASER_PIN 14 - Photodiode that looks at the laser
35*bf47c682SAndroid Build Coastguard Worker * G_PIN 15 // Same as A1 - Accelerometer for detecting when touch probe hits the screen
36*bf47c682SAndroid Build Coastguard Worker * PD_SCREEN_PIN 20 // Same as A6 - Photodiode that looks at the screen
37*bf47c682SAndroid Build Coastguard Worker * AUDIO_PIN 22 // Same as A8 - Detects audio signal from headphones output
38*bf47c682SAndroid Build Coastguard Worker * MIC_PIN 23 // Same as A9 - uses PWM to generate a tone for measuring microphone latency.
39*bf47c682SAndroid Build Coastguard Worker
40*bf47c682SAndroid Build Coastguard Worker### Schematic - older version ###
41*bf47c682SAndroid Build Coastguard WorkerAn older version can be found
42*bf47c682SAndroid Build Coastguard Worker[here on Upverter](https://upverter.com/kamrik/8af1f3b04e47ab78/WALT_w_audio/)
43*bf47c682SAndroid Build Coastguard Worker
44*bf47c682SAndroid Build Coastguard Worker![Slightly simplified WALT Schematic](WALT_schematic_simplified.png)
45*bf47c682SAndroid Build Coastguard Worker
46*bf47c682SAndroid Build Coastguard Worker
47*bf47c682SAndroid Build Coastguard Worker### More electronics notes ###
48*bf47c682SAndroid Build Coastguard Worker
49*bf47c682SAndroid Build Coastguard Worker * If using Teensy 3.1 instead of LC, it won’t be able to directly read
50*bf47c682SAndroid Build Coastguard Worker   the screen photodiodes - a buffer opamp will be needed. The screen photodiodes
51*bf47c682SAndroid Build Coastguard Worker   are bundled as a couple to produce more current, a single photodiode with 1.5M
52*bf47c682SAndroid Build Coastguard Worker   resistor should provide the same result, but might be at the limit of what the
53*bf47c682SAndroid Build Coastguard Worker   teensy can measure (input impedance), and again, an opamp will be needed.
54*bf47c682SAndroid Build Coastguard Worker * BPW34 photodiode has a small protrusion on the cathode pin (cathode marker).
55*bf47c682SAndroid Build Coastguard Worker   Anode has a white dot near it.
56*bf47c682SAndroid Build Coastguard Worker * Note the different setup of the laser and screen photodiode. The laser one
57*bf47c682SAndroid Build Coastguard Worker   uses internal pullup resistor (about 20k), enabled by pinMode(PD_LASER_PIN,
58*bf47c682SAndroid Build Coastguard Worker   INPUT_PULLUP);
59*bf47c682SAndroid Build Coastguard Worker
60*bf47c682SAndroid Build Coastguard Worker## Mechanical ##
61*bf47c682SAndroid Build Coastguard Worker
62*bf47c682SAndroid Build Coastguard WorkerEnclosure must be made from a non conductive and non transparent material.
63*bf47c682SAndroid Build Coastguard Worker
64*bf47c682SAndroid Build Coastguard Worker* The enclosure used for r0.7 production run is available in this repo as [STL](enclosure/WALT_recessed_enclosure.stl) and [STEP](enclosure/WALT_recessed_enclosure.step) files. It also used four M3x6 screws (McMaster-Carr PN 92000A116) and M3 hex nuts (McMaster-Carr PN 91828A211)
65*bf47c682SAndroid Build Coastguard Worker* A slightly simpler enclosure suitable for printing on a desktop 3D printer is available as a [public OnShape project](https://cad.onshape.com/documents/6410a1ac7964cb29c4a5ba41/v/32bc78539f48ab7f514eeb31/e/fa513fcc84a825e97020c8b3) and [STL](enclosure/WALT_3DP_enclosure_v7.stl) file
66*bf47c682SAndroid Build Coastguard Worker* A minimal enclosure suitable for 2D cutting from any 5 to 8 mm thick substrate is available as a [public OnShape project](https://cad.onshape.com/documents/5d7f21c8877ea8961bc499ef/v/84a66f3baf5f4a8f41be3bd7/e/e2a23559efbeb63be3916123)
67