The whole array for under $70
Prices are what I paid on Oct 11, 2026, in USD before tax and shipping. The frame is printed, and the clock and data wiring fits on one perfboard.
| Qty | Part | Why | Source | Each | Line |
|---|
Why a Teensy and not an ESP32 or Arduino: its audio library reads two I2S data lines on one shared clock, so all four channels are sampled at exactly the same instants. Direction finding lives on those instants.
Two data lines, one shared clock
INMP441 mics share data lines in pairs: each mic is strapped left or right and only talks in its half of the frame. Four mics need two data lines, and all of them run from the same bit clock and word clock.
Wiring matrix
Pin by mic| Teensy 4.1 | M1 | M2 | M3 | M4 |
|---|---|---|---|---|
| 3.3 V | VDD | VDD | VDD | VDD |
| GND | GND | GND | GND | GND |
21 · BCLK1 | SCK | SCK | SCK | SCK |
20 · LRCLK1 | WS | WS | WS | WS |
8 · RX data 1 | SD | SD | — | — |
6 · RX data 2 | — | — | SD | SD |
| L/R strap | GND · left | 3.3 V · right | GND · left | 3.3 V · right |
| Audio channel | 1 | 2 | 3 | 4 |
Data-line pins 8 and 6 are the Teensy 4 audio library's quad-input pins as I understand them. Check them against PJRC's current pin map first, then confirm the channel order with the tap test (A01). Wire lengths don't need matching: 10 cm of wire delays the signal by under a nanosecond, against a 22.7 µs sample.
Connection schedule
7 runs| # | Run | Wire | Notes |
|---|
From a clap to a bearing
The firmware waits for an onset, grabs the same window from all four channels, finds the delay between every pair with GCC-PHAT, and solves for the direction that best explains all six delays at once.
Signal chain
Teensy firmwareThe math
Far-field, 2DArrival time at mic i, at position pi, for a plane wave travelling from direction u at sound speed c.
Six pairs give six equations in the two unknown components of u. Least squares, normalize, then bearing θ = atan2(ux, uy).
GCC-PHAT keeps only phase, which sharpens the correlation peak and resists room echoes better than plain cross-correlation.
Resolution and error sources
150 mm array| Quantity | Value | Basis |
|---|---|---|
| Speed of sound, 20 °C | 343.4 m/s | 331.3 + 0.606·T |
| One sample at 44.1 kHz | 22.7 µs | 7.8 mm of travel |
| Bearing per whole sample, broadside | 3.0° | c·Δt / d |
| With sub-sample peak fit | 0.3–0.6° | estimate |
| Near-field bias, source at 1 m | 0.08° | Exact geometry vs. plane wave |
| Near-field bias, source at 0.5 m | 0.32° | Same |
| Bias from a 10 °C error in c | about 1° at 45° | c sets the delay-to-angle scale |
| Processing per event | a few ms | estimate 10 FFTs of 4,096 points |
Elevation shrinks all six delays by the same factor, cos(elevation). The normalized bearing survives, and the shrink factor is a rough elevation estimate (without telling up from down).
Procedure
Three weeks- Channel map. Tap each mic with a pencil; confirm which channel spikes.
- Sync check. Tap the exact centre of the frame. All six delays should be zero.
- End-on delays. Clap in line with a side pair, then a diagonal pair, at 2 m.
- Bearing sweep. Quiet room, array on a table over a printed protractor ring, source at array height. 12 bearings at 2 m and 4 m, 10 claps each.
- Hallway. Repeat the sweep somewhere with strong echoes.
- Detection. 50 claps at 3 m, then 30 minutes of ordinary room noise with no claps.
Sound sources
Safe and repeatable| Source | Use | Note |
|---|---|---|
| Hand clap | Most tests | Varies clap to clap; fine for averages. |
| Wooden clapper | Bearing sweep | Two boards on a hinge; the most repeatable onset. |
| Balloon pop | Occasional | Keep at least 2 m away; close up it can exceed the mic's 120 dB SPL limit. |
| Pencil tap on a mic | Channel map | Hits one channel only. |
Each prediction, and how it gets tested
Predictions and pass bands are written before testing, so a result can't be explained away later. A miss gets reported here like any other result.
Planned build document — not measured test results. Every test entry is a prediction or proposed pass band; no measured results are reported here.
| ID | Quantity | Predicted | How it's measured | Pass band | When | Measured | Status |
|---|
One array, indoors, with claps. Results describe this geometry in these rooms. Outdoor wind, distant sources and echoes off buildings are a different problem, and the spread-out field version is where that gets tested.