Audio Jack Sampling Rate?

Al Johnson openmoko at
Sun Sep 21 02:42:52 CEST 2008

You probably want to look at these two. The main limitation is that you've 
only got one input channel via the jack, but you might be able to get round 
that using the mic switch detection.

Since you need external bits for the IR anyway you may be better off making a 
USB device instead. The arduino and other similar devices make the USB part 
relatively easy. Put a narrow bandpass filter on your audio transducer and 
you make the audio signal a simple on/off - use multiple frequencies if you 
need to track different markers or indicate different states. 

On Sunday 21 September 2008, Charles Pax wrote:
> What is the highest sampling rate I can get from the audio jack? What is
> the frequency range?
> I'm considering the plausibility of a little hardware project that would
> turn a Freerunner or any computer with an adequate sound card into a mimio
> [1] device.
> The principle is an expansion on the way you calculate the distance (d) of
> a lightning strike from you.You see the light instantly, but hear the sound
> with a delay (delta t) because sound travels at a much slower speed (v_s)
> of approximately 340 m/s. You can use the following equation to find the
> distance from you to the lightning strike
> d = (delta t)(v_sound)
> With this information you can draw a circle of radius d with you at the
> center. Observing the same lightning from two known points would allow us
> to draw two circles whose intersection would indicate where the the
> lightning hit the ground. This gives two points, but knowing the general
> direction of the strike would give us a single point. This is basically
> what I want to do with the stereo input of the Freerunner. However, instead
> of observing lightning and audible sound, I want to observe infrared light
> and sound at a higher frequency than humans can hear. The mimio device
> works in this way. A dry erase marker is placed into a case what emits IR
> light and sound when the marker is pressed down.
> I basically want to connect both an appropriate microphone and an IR
> detector on each of the two input channels of the Freerunner. There would
> be one mic-IR pair at each of points A and B. Points A and B would be
> seperated by some distance h along the vertical axis. Below is a simple
> hardware schematic diagram.
> /--micA
> |   GND
> I--IR_detA
> |    GND
> \------------------(to left channel)
> /------------------(to right channel)
> |--micB
> |
> |   GND
> \--IR_detB
>    GND
> Software would then monitor the two channels and compare the input. The
> software would know that a set of square waves from both the right and left
> channel occuring at the same time indicate a flash of IR light. It would
> then begin measuring on each channel the time interval to the middle of the
> next set of waves.
> Sample input
> (left channel)
> __|-|_|-|_|-|_|-|_|-|___________|-|_|-|_|-|______________
>   |<--from IR_detA->|           |<--micA->|
>   |
>                     |<---delta tA--->|
>   |
>   |<--from IR_detB->|                       |<--micB->|
>   |
>                     |<--------delta tB---------->|
> (right channel)
> __|-|_|-|_|-|_|-|_|-|_______________________|-|_|-|_|-|__
> The following two equations would give the position of the dry erase marker
> relative to point A. (I may have mixed up my positive and negative
> directions somewhere, but you get the picture.)
> d_Ax = (v_sound)sqrt(t_A^2 - t_B^2)
> d_Ay = h - (v_s^2)(t_B^2 - t_A^2)/(2h)
> My first step in testing my idea is to connect ir detectors and mics to a
> headphone cable, plug it into my computer, and see if Audacity displays
> something similar to the sample input above. Then I'll hack around with
> that until I can make a reliable piece of hardware. I'm more of a hardware
> guy than a programmer, so writing this software would be very challanging
> to me. Is there anyone out there willing to hack some code if I were to
> supply you with the appropriate hardware?
> Any input from the community?
> -Charles Edward Pax
> [1]

More information about the community mailing list