Nearly all multimedia devices offer stereo sound to enable the listener to determine the direction of the source of sounds. You might think that the ear which is nearer to the source of sound receives a higher volume which leads you to determine the direction. But this project was created to demonstrate that a simple delay of the sound wave that reaches one of the ears is sufficient to give the impression the sound does not come from the centre even if the volume is exactly the same.
Credits:The first ones to perform dichotic explorations were Klemm, Hornbostel and Wertheimer in 1920, using tubes of variable length and mechanically generated pulses. Also, well known in experimental psychology is the Pohl's tube test. But nowadays it's easier to find an Arduino than a tube.
This project was inspired by the following articles:
* Nawrath, Martin. Kunsthochschule fuer Medien, Koeln: DDS Sine Generator with ATmega168. KHM-2009, see:
http://interface.khm.de/index.php/lab/interfaces-advanced/arduino-dds-sinewave-generator/index.html
* Smith, Michael: 8-bit, 8000 Hz audio playback on a PC speaker. 2008, see:
https://playground.arduino.cc/Code/PCMAudio/
The detailsUnfortunately, the trick does not work with audio signals that are created artificially like sine waves or square waves. So you have to record some natural sound and store it in the memory of the Arduino and send it to one of the channels directly and to the other one with a delay of variable length.
This project offers two options: either the delay varies continuously between two limits or it changes at random. Connect pin-8 and pin-9 to get the continuous change.
And included is a couple of sound samples to demonstrate the effect.
If you still think it is a matter of different volumes just use only one of the auricles to confirm that the volume does not change at all.
Warning:Some earphones do not take high voltages as 5 volts. Also you should protect your ears. That is why I decided to add the resistors. Before I did this I burned two of my earphones. So do not use your super-duper ones, you better use the cheap earphones as I am not responsible for any damage.
There is not much to say about the circuit. Pin d7 serves as GND.
Some details about the softwareTo send audio signals you actually need two of the timers of the Arduino: one to produce kind of analogue signal via PWM, and another one to advance to the next sample. For some reason, Timer-0 was selected for generating the PWM output to the adjacent pins 5 and 6. So the functions millis and delay do no longer work as expected.
Obviously, the ATmega cannot modify the registers OC0B (pin 5) and OC0A (pin 6) on one go, meaning exactly simultaneously. The compiled object code looks like this:
6356: 90 93 26 01 sts 0x0126, r25
635a: 80 93 25 01 sts 0x0125, r24
So, there will a delay of 0.125 µs between these operations. Nobody would be able to perceive this.
How to produce a short audio file yourselfIf you are eager to check with your own sound samples keep in mind there are only 28 kBytes of FLASH memory available to store the audio. The corresponding time depends on the sample rate you are going to use. These are the limits:
Sample rate 11025: time: 2.54 seconds
Sample rate 22050: time: 1, 27 seconds
Sample rate 44100: time: 0.637 seconds
There are a lot of different ways to convert audio files to data that the Arduino IDE can handle. First you have to convert your audio file to single channel (monaural) with 8 bit depth. Also convert it to the sample rate you want. Nearly all audio software products offer these functions. Next, you have to store it as numbers that can be read by a C program, no matter if it looks like 0x7f or 127.
If your audio software produces a file like this:
124
125
123
129
125
you still have to add the commas. If you are using Microsoft Word you can use this command:
Edit --> Replace and select
replace ^p by a comma.
(^p stands for the carriage return)
If you really have 28000 values you would not like to do that manually.
Some backgroundWhat do we know about the speed of transmission of signals in the human body? Well, if you ever applied for a driver’s licence you should know that the standard reaction time is between 200 and 300 milliseconds (until you successfully pressed the brake pedal it needs even more time). But the time differences that can be resolved by the auditory system are much less than one millisecond, eventually only ten microseconds.
Definitely, there must be a reason that in course of evolution the performance of the auditory system developed to such a high level. Possibly, individuals that performed better in detecting approaching predators had a better chance to survive and multiply.
Comments
Please log in or sign up to comment.