270 likes | 457 Views
Digital Bat Ears. Paul Logsdon and Ian Bonthron. ECE 445 Final Project TA: Kevin Chen. Project Overview. Our project is an affordable, but high performance bat detector Bats emit sounds in the ultrasonic range (above 20 kHz)
E N D
Digital Bat Ears Paul Logsdon and Ian Bonthron ECE 445 Final Project TA: Kevin Chen
Project Overview Our project is an affordable, but high performance bat detector Bats emit sounds in the ultrasonic range (above 20 kHz) Bat detectors are devices which record bat calls and downshift the sounds into the human hearing range Cheap bat detectors seriously distort calls or do not capture a large enough spectrum High-end bat detectors can run for thousands of dollars We want the best of both worlds
Block Diagram MEMS Microphone Band pass filter Amplifier Microcontroller ADC Downshifting Algorithm UART To PC
MEMS Microphone MEMS – micro-electromechanical systems Small microphones available at a low cost which (usually) have good sensitivities in the ultrasonic range The main cost-saving part of our design Specific device we chose is the ST MP33AB01H
Filter Central Frequency desired to be the “center” of known ranges (20 kHz to 100 kHz) which was 60 kHz. =1/(𝐿∗𝐶) The characteristic Ω from microphone = 400, Q= 1/fractional Bandwidth=60kHz/80kHz=|X series|/R series=R parallel/|X parallel| Shunted the higher impedance Cs=70.7355nF=(X series *60kHz*2*π) Lp=X parallel/(60kHz*2π)
Amplifier • C2 is the capacitor from the filter • Set G=1+R5 /R4 ~1000 • Used R5=1MΩand R4= 1K Ω
Microphone, Amplifier and Filter Amplifier and Filter
Microcontroller Tiva C Series Launchpad Main Features • Cortex M4 ARM core with max speed of 80 MHz • 1 MSPS ADC • Support for ARM CMSIS DSP Library • Very fast, and extremely cheap ($12.99 for Launchpad)
Downshifting Algorithm Generally, three ways bat detectors downshift bat calls: 1. Heterodyning • Incoming bat call is mixed with a cosine signal • Pros: Can be implemented very cheaply. • Cons: Need to tune device to pick up call.
Downshifting Algorithm Generally, three ways bat detectors downshift bat calls: 2. Frequency Division • Square wave is synthesized based on incoming bat call and then divided by a counter to produce another square wave in the human hearing range • Pros: Do not need to tune and can be implemented cheaply • Cons: Square waves contain undesirable harmonics.
Downshifting Algorithm Generally, three ways bat detectors downshift bat calls: 3. Time expansion (method we chose) • Bat calls are digitized, read into a microcontroller’s/DSP’s memory, undergo some processing, and then are played back at a slower rate • Pros: The most sound algorithm from a signal processing standpoint, does not distort or need to be tuned. • Cons: Most devices which use this method are very expensive. Is not as easy to implement as the other two. Requires samples to be buffered, so not a true real-time algorithm.
Time expansion algorithm Similar to upsampling, except the sampling rate does not change L-1 zeroes are added between samples As a result, all input frequencies are divided by L, but higher harmonics are also generated Need to low pass filter with break frequency of to eliminate higher frequencies
Time expansion algorithm For our project, L=16 was chosen Our range of 20 kHz to 100 kHz is thus compressed into a range of 1.25 kHz to 6.25 kHz Additionally, we used an 128th order FIR low pass filter with a break frequency of Coefficients generated from MATLAB fir1 command
UART Universal Asynchronous Receiver/Transmitter Used to send data serially to PC via USB connection Output data can be stored in a text file to be analyzed in MATLAB or another program
Microcontroller test procedures Function generator connected to ADC with a square wave at frequencies between 20kHz-100kHz, 3 V peak to peak with an offset of 1.5 V Sampling time ~0.1 ms UART output sent into PuTTY, and data saved in a text file Parsed through MATLAB script and graphs generated for original and time-expanded signal
Microcontroller test results 40 kHz square wave
Microcontroller test results From theory, 40 kHz signal will be shifted to 2.5 kHz Verification: 1/(0.001055-0.0006665) = 2.574 kHzv
Original Block Diagram MEMS Microphone Band pass filter Amplifier LCD Push Buttons Microcontroller SD Card DAC Output Divider Audio Jack
Failed Verifications Originally, we wanted to save the incoming bat data to an SD card instead of through the UART The user would be able to browse saved data and had the option to play it back We would have also provided an LCD to show the user relevant information, as well as a DAC to send downshifted calls to an audio jack The main reason for these failures was that the SSI peripheral did not output data, although clock and sync signals were present
Somewhat Successful Verifications Push buttons and output divider work However, without SD card, LCD, and DAC, not useful on their own
Summary Analog side generally successful • Filters and amplifies bat calls correctly Software side needs some more work • UART used as a workaround • Device would be better suited for field testing if SD card, LCD, and DAC were integrated
Future Work SD card/LCD/DAC • May consider code to another platform because of difficulties using Tiva Launchpad Field Testing PCB
Special Thanks Jeff Putney James Henriksen Kevin Chen Prof. Carney