Well, I rejoiced too soon. A much larger sampling (a 10min take) revealed the pulse location is much less robust than I thought... back to the drawing board.
Restating project goals
For those who just jumped in, here's a recap: I want to design and implement an audio time code (and accompanying hardware) for automated video synchronization, cheaper than existing solutions, working on camera without sound input and using off the shelf components.

Acoustic coupling challenges
I want to localize pulses at the highest possible precision in the recorded audio. Typical cameras use a sampling frequency of 48 kHz so I’m aiming at a maximum variation of more or less 4-5 sampling periods, ie ±100 μs. For now I’m still exploring which pulse shaping is better at avoiding transients in the recordings.
Fighting against the camera automatic gain control
I generate this symmetrical shape from the SAMD21 DAC output and feed it to a small headphone speaker:

And here’s the resulting sound recording, note the asymmetry now present:

I guess I should slow down the attack to avoid triggering the AGC too heavily, and I should generate an already odd signal (odd vs pair).
Something like a tri-level sync pulse (surprise!) and aim at the zero-crossing point as the timing anchor.
Time of day (UTC) is done and is part of the 23 bit BFSK word following the aforementioned sync pulse whose location I'm still optimizing:

Nota: I don't modulate the amplitude, it's an artifact of some non-flatness in response curves (mic, speaker, air gap?) The two used frequencies are 1000 and 1800 Hz.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.