Recorder Characterization
The datasheet can be found here. Some helpful specifications are:
- 16 bit ADC
- Sampling Frequency is 44100 Hz
- Max Battery Life 55 Hours recording MP3, 44 using LPCM
- 4GB space with Max Recording LPCM 6 hours and MP3 44 hours
Input Impedance Characterization
This test is performed using my laptop audio out port. Using python a sinewave is generated. The frequency spectrum of the control signal and the output signal is recorded on an oscilloscope in decibles; with these values and a series impedance of 4640
The Code and results are below.
import numpy as np
from scipy.io.wavfile import write
def writeaudio(frequency):
# Parameters
samplerate = 44100 # samples per second
#frequency = 440.0 # sound frequency (Hz)
duration = 10 # seconds
filename = "testfreq.wav"
# Generate the time values and the sine wave data
t = np.linspace(0., duration, samplerate * duration)
amplitude = np.iinfo(np.int16).max # Max value for 16-bit PCM
data = amplitude * np.sin(2. * np.pi * frequency * t)
# Write the data to a file (convert to 16-bit integer format)
write(filename, samplerate, data.astype(np.int16))
return filename
import winsound
from math import log10
minfreq=200
maxfreq=10000
N=20
freq=[0]*N
VdB=[0]*N
freqControl=[0]*N
VdbControl=[0]*N
for i in range(0,N):
testfreq = int(minfreq*10**(i*log10(maxfreq/minfreq)/(N-1)))
if testfreq < 250:
offset= testfreq%1
elif testfreq < 500:
offset=testfreq%2
elif testfreq < 2500:
offset=testfreq%10
elif testfreq < 5000:
offset=testfreq%20
elif testfreq < 10000:
offset=testfreq%50
testfreq = testfreq - (offset)# rounding is helpful for measurements on the oscope
filename = writeaudio(testfreq)
input(f"Test frequency is {testfreq} Hz; Enter When Ready")
winsound.PlaySound(filename,winsound.SND_FILENAME|winsound.SND_LOOP|winsound.SND_ASYNC)
freqControl[i] = float(input("Measured Control frequency in Hertz: "))
VdbControl[i] = float(input("Measured Control Volts in dB: ")) #measured as 10^{dB/20}
freq[i] = float(input("Measured Output frequency in Hertz: "))
VdB[i] = float(input("Measured Output Volts in dB: ")) #measured as 10^{dB/20}
import csv
data_to_save = [["Control frequency [Hz]","Control Voltage [dB]",\
"Output frequency [Hz]","Output Voltage [dB]"]] + \
[[freqControl[i],VdbControl[i],freq[i],VdB[i]] for i in range(len(freq))]
filename = "FreqVsdRecorder.csv"
with open(filename, mode='w', newline='') as file:
writer = csv.writer(file)
writer.writerows(data_to_save) # Write all rows at once