ROBOEAR. In computer control mode, commands are not
echoed and the menu is not sent between commands.
The E, T, and R commands are useful in computer
control mode when the host computer will be processing the
raw audio data from the three channels. E and T will acquire
a data set; that is 127 samples at 20 kHz from all three
channels. R will send the unprocessed raw data to the host
in the numeric format specified by the H or D command.
Raw data is sent as 127 lines with each line containing three
comma-separated values: Channel1,Channel2,Channel3.
The H, D, A, and G commands are used to set the
numeric format to report raw data and computed bearing
angles. At power-up, all formats default to decimal.
Decimal data is always sent with leading zeros suppressed.
Hexadecimal data is sent as two characters for eight-bit data
and three characters for 10-bit data.
Internally, the ROBOEAR stores all raw data values
from the channels in binary, so it takes less time to convert
them to ASCII-hexadecimal than it does to ASCII-decimal
representations. Thus, transfer of raw data in ASCII-hex
format may be the best choice if time is critical.
The ROBOEAR stores bearing angles in eight-bit Binary
Angle Measure (BAM) format. In BAM, the MSB represents
180 degrees and each lesser bit half of the higher bit.
BAM values are sent in hexadecimal format. Reporting the
bearings in decimal format involves multiplying, dividing,
and converting binary to BDC. So, if speed is an issue, BAM
format will be quicker.
The M command is used to set the minimum dynamic
range (amplitude) required for each channel before the P
command will use the data to calculate a bearing. This is
the minimum used in step 4 of the flowchart that follows
for the P command. The default minimum is 31 out of the
maximum eight-bit amplitude of 255. The M command has
no effect on the E or T commands.
The P, S, and B commands are useful in human and
computer control modes. The P command acquires data
until all the channels meet the minimum amplitude set by
the M command. Then, it processes the data and calculates
bearings by the amplitude and cross-correlation methods;
refer to the flowchart. The S command reports the average
and amplitude of each channel and the B command reports
the bearing angles in the format specified by the A or G
P Command Flowchart:
1. Acquire packed raw data.
2. Unpack the data into the three channel buffers.
3. Compute the average and amplitude for each buffer.
4. If any channel’s amplitude is < the minimum goto 1
5. Compute the amplitude bearing tangent.
a. Look up the amplitude bearing angle.
6. Convert the channel buffers to signed binary values.
7. Compute the cross-correlation function for a range of
The speed of sound in air is important because it
determines the lag time between microphones.
Temperature is the primary factor affecting the speed of
sound in air; to a much lesser extent, it’s also affected
by pressure, humidity, and even frequency. The speed of
sound in air can be approximated by the formula:
Cs = 331.3 + (0.606)*T
Where: Cs = Speed of sound in air in meters per second
T = Air temperature in degrees centigrade
The ROBOEAR uses the approximate speed of sound for
sea level at 20°C or 68°F. The error in cross-correlation
bearing angles due to this approximation is less than two
degrees from 10-30°C (50-86°F).
Figure 4. The bearing
angle circle in relation
to the microphone
Photo 2. The prototype microphone array.
SERVO 09/10.2018 47