Microcontroller code
Important pin numbers from the code listed below, defined in walt.ino
- PD_LASER_PIN 14 - Photodiode that looks at the laser
- G_PIN 15 // Same as A1 - Accelerometer for detecting when touch probe hits the screen
- PD_SCREEN_PIN 20 // Same as A6 - Photodiode that looks at the screen
- AUDIO_PIN 22 // Same as A8 - Detects audio signal from headphones output
- MIC_PIN 23 // Same as A9 - uses PWM to generate a tone for measuring microphone latency.
Schematic - older version
An older version can be found here on Upverter
More electronics notes
- If using Teensy 3.1 instead of LC, it won’t be able to directly read the screen photodiodes - a buffer opamp will be needed. The screen photodiodes are bundled as a couple to produce more current, a single photodiode with 1.5M resistor should provide the same result, but might be at the limit of what the teensy can measure (input impedance), and again, an opamp will be needed.
- BPW34 photodiode has a small protrusion on the cathode pin (cathode marker). Anode has a white dot near it.
- Note the different setup of the laser and screen photodiode. The laser one uses internal pullup resistor (about 20k), enabled by pinMode(PD_LASER_PIN, INPUT_PULLUP);
Mechanical
Enclosure must be made from a non conductive and non transparent material.
- The enclosure used for r0.7 production run is available in this repo as STL and STEP files. It also used four M3x6 screws (McMaster-Carr PN 92000A116) and M3 hex nuts (McMaster-Carr PN 91828A211)
- A slightly simpler enclosure suitable for printing on a desktop 3D printer is available as a public OnShape project and STL file
- A minimal enclosure suitable for 2D cutting from any 5 to 8 mm thick substrate is available as a public OnShape project