<div dir="ltr">What is the highest sampling rate I can get from the audio jack? What is the frequency range?<br><br>I&#39;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.<br>
<br>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<br>
<br>d = (delta t)(v_sound)<br><br>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.<br>
<br>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.<br>
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/--micA</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">|&nbsp;&nbsp;&nbsp; |</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">|&nbsp;&nbsp; GND</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">|</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">I--IR_detA</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">| &nbsp; &nbsp; |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">|&nbsp;&nbsp;&nbsp; GND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">\------------------(to left channel)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/------------------(to right channel)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">|--micB</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">|&nbsp;&nbsp;&nbsp; |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">|&nbsp;&nbsp; GND</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">|</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">\--IR_detB</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">
&nbsp;&nbsp;&nbsp; |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
&nbsp;&nbsp; GND</span><br>
<br>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.<br>
<br>Sample input<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">(left channel)<br>__|-|_|-|_|-|_|-|_|-|___________|-|_|-|_|-|______________</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; |&lt;--from IR_detA-&gt;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&lt;--micA-&gt;|<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&lt;---delta tA---&gt;|</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp; |&lt;--from IR_detB-&gt;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&lt;--micB-&gt;|<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&lt;--------delta tB----------&gt;|</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">(right channel)</span><br style="font-family: courier new,monospace;">__|-|_|-|_|-|_|-|_|-|_______________________|-|_|-|_|-|__</span><br style="font-family: courier new,monospace;">
<br><br><br style="font-family: courier new,monospace;">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.)<br>
<br>d_Ax = (v_sound)sqrt(t_A^2 - t_B^2)<br>d_Ay = h - (v_s^2)(t_B^2 - t_A^2)/(2h)<br><br>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&#39;ll hack around with that until I can make a reliable piece of hardware. I&#39;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?<br>
<br>Any input from the community?<br><br>-Charles Edward Pax<br><br>[1] <a href="http://www.mimio.com/products/interactive/index.php">http://www.mimio.com/products/interactive/index.php</a><br></div>