100 kHz Bandwidth Ultrasonic Recording System

We have developed a complete 100 kHz ultrasonic recording system. The primary components of the system are a SensComp Series 600 Instrument Grade Electrostatic Transducer, custom printed circuit board (PCB), wide-bandwidth instrumentation amplifier, linear-phase filter, fully differential 16-bit analog to digital converter (ADC) sampling at 840 kHz, 168 MHz STM32F4 32-bit microcontroller, and a direct 100 Mbps Ethernet connection. A host computer running a custom application written in C++ provides a unified computer interface that allows the user to control all aspects of the system and provides a real time spectrogram. The system is designed for general use but has been initially used to study the ultrasonic vocalizations of rodents. We demonstrate the system by recording a well-established call made by Long-Evans rats termed 50-kHz vocalizations. The system was also designed with possible physical measurements in mind, e.g., distance, temperature, humidity, and gas mixture ratios.


INTRODUCTION
Ultrasound is defined as sound with a frequency above the limit of human hearing, generally considered to be above 20 kHz. Ultrasound generation and detection are used in a wide variety of applications dealing with frequencies into the GHz. The device described here is specifically designed to record sound up to 100 kHz transmitted through air, or some other gas mixture, at atmospheric temperatures and pressures.
Wide-bandwidth precision recordings in the 20-100 kHz range are challenging because there are numerous high-intensity electromagnetic and ultrasonic radiating sources encountered in this range. Common fluorescent lighting systems radiate electromagnetic and acoustic noise in this range as do ubiquitous switching power supplies. Computer fans and ventilation fans are strong sources of ultrasonic noise. In our lab, we found the fluorescent lights generate narrow bandwidth noise around 60 kHz and some intense 30-32 kHz noise can be traced to the ventilation system. Any metal to metal contact generates ultrasonic noise, e.g., gently jiggling keys creates broadband ultrasonic noise of sufficient intensity that it can saturate our system. Shielding and modifying=selecting the environment where experiments will be conducted could minimize interference, but it can be challenging to determine the source of acoustic background noise. We used an inexpensive handheld bat detector (Magenta Bat 5) to help locate the sources of ultrasonic noise. The superhetrodyne bat detector produces an audible output for an adjustable narrow bandwidth and is highly directional.
We used a Series 600 Instrument Grade Transducer by SensComp. This is an electrostatic transducer, sometimes called a condenser microphone, which is biased at 150 V. The transducer is effectively a parallel plate capacitor with the diaphragm acting as one of the plates. As the diaphragm vibrates, a small voltage is developed. These transducers were used in an acoustic thermometry system [1] and to also to analyze gas mixtures. [2] In both cases, the transducer is used as a transmitter and receiver. Most ultrasonic range finders use similar transducers. A system using electrets to make ultrasonic atmospheric humidity measurements has been reported. [3]

SYSTEM DESIGN
The SensComp datasheet lists the transducer capacitance (C m ) as 400-500 pF when biased at 150 V, and the peak receiving sensitivity as À42 dB at 50 kHz (0 dB ¼ 1 V=Pa). The sensitivity remains within AE5 dB over the 20-100 kHz range. The transducer sensitivity has a cardioid-like angular dependency that is -6 dB at 15 off axis.
A schematic of the device is shown in Figure 1. The PCB is 3.8'' by 2.5'' and has 4 layers with the two inner layers being power and ground planes. The online supplemental material shows a photograph of the PCB and component layout. Since C 3 and C 4 >>C m , the AC signal effectively sees two series resistors, R 1 k R 3 and R 2 kR 4 . For the 500 pF transducer, the capacitive reactance (X C ) for signals 20 kHz to 100 kHz ranges from 16 kX to 3.2 kX, respectively. The transducer and sense (R 3 ,R 4 )=bias (R 1 ,R 2 ) resistor pairs form a high pass filter with a corner frequency of about 16 kHz. Although the sensitivity measurements provided by SensComp begin at 20 kHz, we have found the transducer is very sensitive to frequencies below 1 kHz. The low frequency components of recordings are easily removed during analysis, but the intensity of these low frequency sources can be higher than that of the sources of interest and can saturate the system, so it is beneficial to have some filtering in the input stage. The transducer is biased by an external 150 V battery. Ferrite beads and the pi-filter formed by C 1 , R 5 , and C 2 , minimize noise in the bias voltage. It is first connected through a 500 kX resistor (not shown) to prevent a large voltage from appearing at the input of the first amplification stage. Once charged, it is connected as shown in the schematic The first stage of amplification is done using an AD8421 instrumentation amplifier (U1). The gain is set to 100 by R 6 . Other researchers reported using an instrumentation amplifier with this transducer, although they chose one that has poor CMRR at the frequencies of interest and they were also dealing with much larger signals. [2] We initially tried an input amplifier design similar to a reported thermometry system, [1] but picked up significant EMI in our lab using an unshielded system. Using the instrumentation amplifier mitigated this problem.
At a gain of 100 the AD8421 has CMRR of over 80 dB at 100 kHz. The AD8421 has a voltage noise of 3 nV= p Hz and current noise of 200 fA= p Hz. The 20 kX sense resistors (R3, R4) are near the 15 kX R S,OP of the AD8421. The AD8421 outputs into an inverting amplifier (U2, LT1468) set to a gain of À16. The next stage is a LT1562-2 active RC quad universal filter (U3). The filter is configured as an 8-pole low pass filter with a constant group delay, and gains of À3 dB and À51 dB at 100 kHz and 400 kHz, respectively. The filter is represented as a block in the schematic to save space, but the twelve 1% resistors are those given by the FilterCad application provided by Linear Technology. The filter outputs into another inverting amplifier with a gain of À1 (U4, LT1468), this sets the gain of the system to 1600. This stage could be omitted for use in the demonstration application but was included to allow the PCB to be used in other applications where larger gains are required. The amplified signal is connected to a LT6350 (U6) single-ended to differential converter that conditions the signal from a bipolar single-ended to a unipolar fully differential signal. An LTC6655 (U5) voltage reference provides the common mode voltage of 1.25 V. The LT6350 outputs into a 482 kHz low pass filter comprised of R 13 , R 14 , and a buffer capacitor C 5 that ensures adequate settling for the ADC's 250 ns acquisition time. R 16 and R 17 minimize reflections into the buffer capacitor from sampling transients and also limit the current in case of over voltage. An LTC6655 (U7) provides the 2.5 V reference for the ADC.
U8 is an LTC2383 1 Msps 16-bit SAR ADC. The ADC is entirely controlled and read by the 168 MHz STM32F407 microcontroller's hardware timers and DMA transfers. While running, the following sequence occurs: (1) Timer Tim3 is configured in PWM mode and outputs a rising edge on the ADC's Convert input at 840 kHz; (2) The ADC's Busy signal goes high when the conversion is complete. This signal is connected to one of the microcontroller's external interrupt lines, EXTI_Line0, which generates a dummy DMA SPI write=clock at 42 Mbps that reads the conversion into SPI1. The SPI transfer is completed before the next acquisition begins; (3) The SPI completion interrupt triggers a double-buffered DMA transfer to one of two 512 byte buffers. When the DMA channel switches buffers, it generates a completion software interrupt and the full buffer is sent to the host as UDP packets over the 100 Mbps Ethernet connection using the lwIP (Lightweight IP) TCP=IP open source stack. The software for the microcontroller is written in C and is compiled with IAR Embedded Workbench for ARM6.60. The source code and project file are available upon request. We use an STM32F4 Discovery Board as our development platform and it is connected to the custom PCB with a jumper cable.
A custom Windows application written in Cþþ provides the user interface. As the data arrive they are passed through an FIR filter (1 dB equiripple with gains of 0 dB and À80 dB at 100 kHz and 105 kHz, respectively). The data are then downsampled to 210 ksps. An FFT of the downsampled data is taken and a real time spectrogram is displayed. The spectrogram scrolls up at a rate determined by user settings. The user can specify the FFT window function, FFT length, FFT overlap, as well as various spectrogram display options. If recording, the filtered data are written to disk as signed 16-bit integers.
The Windows program can also use whatever sound source is in the host computer. This was included to ease software development but it does provide some additional functionality. The common 16-bit mono sampling rates are supported and the software adjusts the spectrogram scale as needed. Figure 2A shows a 2-second recording in the time domain of a Long-Evans rat being ''tickled'' by a human familiar to the rat. This stimulus is known to generate what is termed 50-kHz vocalizations [4] , which range in frequency from 32-96 kHz with 'chirps' lasting 30 ms to 50 ms, and each chirp having a bandwidth from 1-7 kHz. Figure 2B shows a spectrogram of the time-domain data. The duration and frequency range shown in the spectrogram are in good agreement with those reported by others. [4] The Windows application shows real-time displays of both the time-and frequency-domains. The time-domain display is mostly useful for testing and setup. The real-time display allows the experimenter to immediately identify the presence of a vocalization, the frequency, and relative intensity levels. It also allows the experimenter to determine if there is a background noise source that overlaps with the frequencies of interest in a particular FIGURE 2 (A) (Top) 2 second time-domain plot recording of a Long-Evans rat being ''tickled'' by a human familiar to the rat. In addition to a 20 kHz high pass filter, the data were filtered with a 1.5 kHz wide band-reject filter centered at 32 kHz to remove intense background noise coming from the ventilation system in our lab. (B) (Bottom) Spectrogram of the same time-domain data shown in (A). The spectrogram was created using a Hanning window and 512-point non overlapping FFTs. The rat was located approximately 1 m from, and at approximately the same height, as the transducer. The recording system was located on a table and aimed horizontally. As the rat was ''tickled'' by the handler he was oriented on his back with his nose pointed toward the ceiling.
experiment. For example, we routinely see large amplitude narrow band noise near 32 kHz that comes from the ventilation system in our lab. The online supplemental material shows a screenshot of the Windows application while recording an ultrasonic vocalization where the 32 kHz noise is also visible.

DISCUSSION
The SensComp datasheet lists the transducer capacitance as 400-500 pF when biased with 150 V, and the peak receiving sensitivity as À42 dB at 50 kHz (0 dB ¼ 1 V=Pa). Using this specification along with our input stage and system gain of 1600, we calculate a 72 dB 50 kHz source would produce a full scale reading on our system. Using a signal generator to drive an identical transducer we have verified the system is sensitive over the 100 kHz bandwidth. Care was taken to ensure we were measuring acoustic energy from the transducer as opposed to electromagnetic interference at the same frequency from the signal generator, although the latter is often clearly present. A calibrated source is not available to us but the sensitivity across the spectrum is qualitatively in good agreement with the frequency dependent transmission and receiving sensitivity plots provided by SensComp. If a precision source were available our system could be calibrated.
In addition to sound intensity being inversely proportional to the square of the distance from the source, atmospheric absorption can become significant. Atmospheric absorption of sound is dependent on temperature and humidity but is approximately À0.5 dB=m and À3 dB=m for 20 kHz and 100 kHz, respectively. The useful range of the system would depend on the intensity and bandwidth of the source and the amount of background noise present.
A charge amplifier is often the preferred choice for preamplification of capacitive sensors as they can offer better SNR and a flatter frequency response. Given that our transducer's frequency response varies AE5 dB over the range of interest and the input signals are relatively large, our input stage provides adequate performance. Using the instrumentation amplifier mitigated electromagnetic interference from fluorescent lights, switching power supplies, etc., to a degree, but our unshielded system often picks up background EMI. Using a charge amplifier in preamplification might make our system less susceptible to EMI. Our testing was only done in an open lab without attempts to shield from EMI or external sources of ultrasonic acoustic noise. Nevertheless, the data we present in the demonstration application are of publishable quality as they are comparable to recordings published by others using commercial systems. [4] The total cost in parts, including the custom PCBs, is approximately $200, making this an attractive device. Basic commercial systems start at nearly ten times the cost when the software and additional data acquisition equipment are included. Commercial systems are also not well suited for customization for different applications. This does not imply that our device is equivalent to, or is a suitable replacement for, any particular commercial system.
The linear-phase filter does not benefit the demonstration application and could be replaced with a less expensive topology. This would also reduce the required sampling rate, which could further reduce cost. The single pole filters at the input stage and ADC input are the principle sources of nonlinear phase. In applications where phase is important, having the linear-phase filter makes the transfer function less complex and less sensitive when applying a deconvolution.
The STM32 has support for high speed USB 2.0, which would easily have the capacity to transfer the data to the host PC and would be less expensive. The maximum length of a USB cable is around 5 m and would limit the utility of the device. The Ethernet connection allows the user to be almost any distance from the experiment.
A CMOS switch could be added to the final amplification stage to allow variable gain that could be controlled from the host PC. A reported system [2] required a gain of only 20 when an identical transducer was excited by 50 kHz $100 V square wave a meter away. While sensing reflected pulses from a similar source, a reported thermometry system [1] required a gain of 20,000. These were both analog systems. Even in simple distance measurements, performing correlation between transmitted and received waveforms could, in principle, give more accurate results.
The files to reproduce the PCB will be provided upon request.