High speed audio sampling with the RCX
Ultimate Robolab has some really amazing functions. One of them concerns sensor sampling. In the "deep loch" function palette, there exist a few sub.vis that allow doing sensor sampling at the frequencies: 55kHz (single sensor), 36kHz (scan sensors 2 and 3) and 27kHz (scan sensors 1 to 3). These rates are high enough to do audio sampling. Remember the Shannon rule which states that the sampling rate must be at least twice the signal frequency. Audio signals extend over the range from 16 to 17000Hz.
What we need to do audio sampling is of course a microphone and an amplifier device that increases the signal power in order to be readable by the RCX sensor ports. To be really "ultimate", we actually are doing this twice: a couple of microphones and two amplifier channels. Our goal is to realize a binaural sensor that allows the RCX to detect the direction to a continuous sound source.
This could lead to a robot that is listening to "His master's voice".
Here the amplifier device.
Our device looks like:
The following programs allow the fast sensoring:
Here an example of a correlation process: as can be seen, the white signal precedes the red signal. The minimum of the "sums" diagram indicates the interaural time delay. (Note that the upload was done with the Ultimate upload data feature in the "Demos" folder.)