Re: Audio Jack Sampling Rate?

2008-09-21 Thread Neil Jerram
Hi Charles,

2008/9/21 Charles Pax [EMAIL PROTECTED]:
 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.

[...]

 Any input from the community?

Assuming I've understood this even half-way correctly...

It sounds like the accuracy of your triangulation will be limited by
the small size of the FR; and when you add in the hardware and
software path latency, I wonder if this will work accurately enough.
(I'm assuming the marker would be a few metres away from the FR, is
that right?)

I think that points in a similar direction to Al's comment, i.e.
moving some of the solution outside the FR, over USB.  That would
allow you to have more distance between the inputs, and so get more
accuracy.

Regards,
 Neil

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Audio Jack Sampling Rate?

2008-09-21 Thread Fox Mulder
Here's another approach:
Why not use two freerunner on different locations which do have one ir
input attached. They synced the clock with ntp and both of them save the
time difference between mic and ir data. You know the exact location of
both and you could sync the data over wlan/gprs and calculate the
resulting position.

Just an idea i have when reading this thread. :)

Ciao,
 Rainer

Neil Jerram wrote:
 Hi Charles,
 
 2008/9/21 Charles Pax [EMAIL PROTECTED]:
 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.
 
 [...]
 
 Any input from the community?
 
 Assuming I've understood this even half-way correctly...
 
 It sounds like the accuracy of your triangulation will be limited by
 the small size of the FR; and when you add in the hardware and
 software path latency, I wonder if this will work accurately enough.
 (I'm assuming the marker would be a few metres away from the FR, is
 that right?)
 
 I think that points in a similar direction to Al's comment, i.e.
 moving some of the solution outside the FR, over USB.  That would
 allow you to have more distance between the inputs, and so get more
 accuracy.
 
 Regards,
  Neil
 
 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community
 

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Audio Jack Sampling Rate?

2008-09-21 Thread Charles Pax
On Sat, Sep 20, 2008 at 8:42 PM, Al Johnson
[EMAIL PROTECTED]wrote:

 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.


I incorrectly assumed there is stereo input on the jack. I'll have to go
back and rethink this whole thing. What is the mic detection switch? Can I
record audio from the mic input and the built-in microphone at the same
time?


 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.


I'm hoping to find some novel way of doing this with the most simple
hardware setup possible. Maybe we can have each transducer connected to a
bandpass filter that activates an oscillator. If the two oscillators operate
at different frequencies on the same mic-in channel, we should be able to
process this in software on the Freerunner to calculate when each oscillator
was triggered. This would allow us to use only dumb and cheap hardware that
should work on any computer with a mic-in. The IR detector(s) can also be
connected to a oscillator operating at a third frequency.

What do you mean by external bits for the IR? Data bits or just little
pieces of hardware? I figure a photodiode can be connected between signal
and ground. When suficient IR light hit it the diode should make a spike on
the mic-in channel.

-Charles Pax
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Audio Jack Sampling Rate?

2008-09-21 Thread Neil Jerram
2008/9/21 Charles Pax [EMAIL PROTECTED]:

 All the Freerunner would be needed for is processing the input of the
 mic-in. The freerunner microphone isn't used. Imagine a stick with two
 microphones glued 400 cm apart and connected to a audio cable. There is more
 to it, but that's pretty much what it would look like.

OK, I see now, that makes sense.  I had thought you were talking about
two microphones in the FR itself.

Best wishes,
Neil

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Audio Jack Sampling Rate?

2008-09-21 Thread Nicolas Laurance
why not try this technique through the bluetooth ?

http://www.youtube.com/watch?v=QgKCrGvShZs

that is, using a wiimote

regards

NiL

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Audio Jack Sampling Rate?

2008-09-21 Thread Al Johnson
On Sunday 21 September 2008, Charles Pax wrote:
 On Sat, Sep 20, 2008 at 8:42 PM, Al Johnson

 [EMAIL PROTECTED]wrote:
  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.

 I incorrectly assumed there is stereo input on the jack. I'll have to go
 back and rethink this whole thing. What is the mic detection switch?

There's a switch on the headset that shorts the mic when pressed. I've not 
looked into how this appears on the freerunner.

 Can I 
 record audio from the mic input and the built-in microphone at the same
 time?

Yes. Route headset (mic1) to the left ADC and handset (mic2) to the right ADC, 
then set the record mode to stereo.

  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.

 I'm hoping to find some novel way of doing this with the most simple
 hardware setup possible. Maybe we can have each transducer connected to a
 bandpass filter that activates an oscillator. If the two oscillators
 operate at different frequencies on the same mic-in channel, we should be
 able to process this in software on the Freerunner to calculate when each
 oscillator was triggered. This would allow us to use only dumb and cheap
 hardware that should work on any computer with a mic-in. The IR detector(s)
 can also be connected to a oscillator operating at a third frequency.

Sounds more complicated than making a usb device to me :-)

 What do you mean by external bits for the IR? Data bits or just little
 pieces of hardware? I figure a photodiode can be connected between signal
 and ground. When suficient IR light hit it the diode should make a spike on
 the mic-in channel.

Bits as in components. I've not tried a photodiode on a mic input, but it 
sounds like the sort of thing someone might have done for lirc hardware.

 -Charles Pax



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Audio Jack Sampling Rate?

2008-09-21 Thread Charles Pax
On Sun, Sep 21, 2008 at 7:46 PM, Al Johnson
[EMAIL PROTECTED]wrote:

  Can I
  record audio from the mic input and the built-in microphone at the same
  time?

 Yes. Route headset (mic1) to the left ADC and handset (mic2) to the right
 ADC,
 then set the record mode to stereo.


This is good news.


   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.
 
  I'm hoping to find some novel way of doing this with the most simple
  hardware setup possible. Maybe we can have each transducer connected to a
  bandpass filter that activates an oscillator. If the two oscillators
  operate at different frequencies on the same mic-in channel, we should be
  able to process this in software on the Freerunner to calculate when each
  oscillator was triggered. This would allow us to use only dumb and cheap
  hardware that should work on any computer with a mic-in. The IR
 detector(s)
  can also be connected to a oscillator operating at a third frequency.

 Sounds more complicated than making a usb device to me :-)


It probably is, but would make for an inexpensive piece of hardware.
However, now that you've told me we can record from both the handset and
headset the only necessary external hardware should be some wire with a 2.4
mm plug, a transducer, and a photodiode. Now we're pretty much back to my
original idea, but with less necessary hardware. Thanks.


  What do you mean by external bits for the IR? Data bits or just little
  pieces of hardware? I figure a photodiode can be connected between signal
  and ground. When suficient IR light hit it the diode should make a spike
 on
  the mic-in channel.

 Bits as in components. I've not tried a photodiode on a mic input, but it
 sounds like the sort of thing someone might have done for lirc hardware.


One time I decoded the signal from an IR personal response system [1] by
pointing the transmitter at a photodiode connected to the mic-in port of my
laptop, so I know that would work.

-Charles Pax

[1] http://en.wikipedia.org/wiki/Audience_response
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Audio Jack Sampling Rate?

2008-09-21 Thread Charles Pax
On Sun, Sep 21, 2008 at 4:01 PM, Nicolas Laurance [EMAIL PROTECTED]wrote:

 why not try this technique through the bluetooth ?

 http://www.youtube.com/watch?v=QgKCrGvShZs

 that is, using a wiimote


I think I will investigate this option. I've thought about it before, but
couldn't find any Linux software. Now, however, I see there it can be done
in Linux and there's even a nice GUI [1]. On Johnny Lee's site [2] I've
found a really cool physics simulation application [3] that I'm really
excited to try with my students.

Thanks for the info.

-Charles Pax

[1] http://www.stepd.ca/gtkwhiteboard/
[2] http://www.cs.cmu.edu/~johnny/projects/wii/
[3] http://www.phunland.com/wiki/Home
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Audio Jack Sampling Rate?

2008-09-20 Thread Charles Pax
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] http://www.mimio.com/products/interactive/index.php
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Audio Jack Sampling Rate?

2008-09-20 Thread Charles Pax
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)


I just came up with this next idea as I was turning on the shower water. The
x and y position can then be translated into screen coordinates (after
calibration). This can then be passed through ReMoko to some other device.
Combine this with a projector and you have yourself a nice smart board.

-Charles Pax

P.S. I'm thinking about all this because the high school where I teach
physics gave me a $800 mimio device to aid a visually impaired student of
mine. The problem is that the mimio device only works with Windows and OS X
and I don't want to be limited in my operating system choices. i also think
it would be cool to beat the system and do the same thing with $40
off-the-self components.
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community