Bat detector design

Discussion in 'The Projects Forum' started by Louise, Jan 22, 2010.

  1. Louise

    Thread Starter New Member

    Jan 17, 2010
    Hi! I am currently attempting to design a simple bat detector for a project at college. It is the first time I have attempted anything like this. Sadly I am quite limited as far as how much time I can spend working out my design. So far I have spent some time trying to find a suitable microphone/transducer sensitive to the relevant frequency spectrum (approx 17kHz to 120kHz). The best I have found is sensitive to frequencies in the range 10kHz to 65kHz. I understand that I will need some 'signal conditioning' next, however, I am looking out for an ADC (following the guidelines suggested by Shannon and Nyquist). It's all a bit vague in my mind after that, though. I'm thinking about using a simple microcontroller to either store wav files or to send data to storage such as compact flash (i.e. I am planning to transfer the bat call to a PC for later analysis). I will need an LED or LCD (or both) for the user to detect whether a call has been collected and for ease of operation. See what I mean by vague? Any hints/tips /encouragement would be very gratefully received. I would really like to just talk some of my ideas through a bit, with someone who knows what they are talking about.
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    The researcher I observed some time ago was using a portable oscilloscope and an ultrasonic microphone. She got clear traces that allowed species identification.

    As a more modern suggestion, you could think of a portable digital storage o'scope. I do not mean to in any way promote the one at the link, but to use it as an example -

    The USB link is handy for transferring to a computer, plus the trace of the squeak is already digitized. The screen presentation lets you judge that the captured vocalization is a good exemplar. That should cut down on the sheer amount of data to retain.
    Last edited: Jan 22, 2010
    Louise likes this.
  3. Louise

    Thread Starter New Member

    Jan 17, 2010
    Many thanks for the reply to my previous post! Perhaps I should have been more exact when I mentioned time being short - I have weeks rather than months. Anyhow, the project progresses. I have decided to 'prove the concept' i.e. show that my design idea(s) are valid rather than attempting to 'redesign the wheel'. Since I accepted that I wasn't going to design the ultimate/definitive bat detector I've found it easier to move forwards. At present, the design relies quite heavily on my ability to write quite a lot of code (sadly I'm more at home with assembler than a HLL - could be time consuming). Essentially, the detector will be extremely simple. A 'slide' switch will select between different frequency ranges (sadly only 2 not 3 due to limited range of sensitivity of transducers. I would have loved to have used an array, but . . . . ). I'm using a PIC40x2 (aka 18F4520) microcontroller which is simpler/cheaper to interface with than 'commercial' units. This has a 10 bit ADC on-chip (I would have preferred a 16 bit ADC . . .). An LED will indicate that a call has been successfully 'sampled' (i.e. converted and stored). I'm planning to use a LCD to display messages (stored as a DB "message",0). The design feature that is important (to me)is to try and retain enough (accurate) data from the original call to make it possible to analyze the bat calls after the data has been transferred to a PC. Nobody is going to be mass producing the design, but I am hoping that the exercise will stand me in good stead when I have a 'proper' hardware project in my final year (degree). Having said that, I'm still feeling my way in the dark - any thoughts/ideas/feedback will be gratefully received. Please, let me know what you think!
    saharsahar likes this.
  4. retched

    AAC Fanatic!

    Dec 5, 2009
    Using an audio signal sampler circuit, and using properly matched transducers should be a easy way to start. What will be the standard sample length? or at least maximum?

    Many of the MP3 or WAV file samplers should be able to handle such a task. Flashing an led after the saveFile is done shouldn't be too much of a problem either. I suppose the sample rate is very important for accurate reproduction, If you can get some sample calls from another researcher to test the accuracy of the 10 bit ADC to see if it will give you enough resolution to accurately differentiate between the subtleties of each call.
  5. russ_hensel

    Distinguished Member

    Jan 11, 2009
    Stuff like this is posted on the net. The approach I saw was to use a mike to detect the sound, amplify it ( perhaps with a high pass filter to get rid of non bat noise ) then send it thru a divider circuit ( say by a factor of 10 ) you can then hear or detect the bat noise ( stripped of any amplitude modulation ).

    No high speed a to d converter needed.
  6. bertus


    Apr 5, 2008
  7. rogs

    Active Member

    Aug 28, 2009
    You're going to need some serious 'signal conditioning' to be able to store the ultrasonic 'audio' with any degree of accuracy, simply using a 100K sampling ADC.

    I have built a variety of simple bat detectors over the years - some of the frequency divider type, as described by russ_hensel, and some of the heterodyne type, which allows more analysis of frequency and pattern of the calls.

    Until the availability of the new Knowles ultrasonic detectors (I'm guessing that's what you are referring to) it was not easy to build suitable low noise preamplifiers for the rather inadequate electret sensors most of us used in the past.
    Hopefully that will be a bit simpler now -although I think you'll still need a fair amount of low noise gain before your digitisation, if you are intending to record anything detailed at any range more then a few metres.
    These little critters move fast, and you need a decent amount of signal gain to work with ranges over 30 or 40 metres.

    And then the speed limitation of your proposed ADC. In theory, with a sampling rate of 100Ks/sec, you should be able to able to capture 'audio' at up to 50KHz, according to Nyquist. Not really high enough for even second harmonics from common species like Pipistrelles - and to get anywhere near even that bandwidth assumes some pretty impressive input filtering on the ADC input. That'll be quite a challenge on it's own!!

    I'm not sure from your description if you are actually intending to build a working detector, or simply present a paper on how you would approach the problem ?

    If you are intending to actually build one, it might be a good idea to set your sights a little lower at this stage, and go for a heterodyne detector. That will allow you to get the potentially more difficult 'analogue' bits sorted out first, so that when you finally do go for the more ambitious digital version (with a better ADC then your current proposal! :)) then there's a reasonable chance of recording something really worthwhile.

    There are probably a number of frequency divider and heterodyne type schematics on the web, or I can try and dig one out, if that would help?
    Last edited: Feb 27, 2010
  8. Louise

    Thread Starter New Member

    Jan 17, 2010
    Gosh, what a fabulous response! Thank-you so much (Retched, Russ Hensel, Bertus and Rogs) for taking the time to give me the benefit of your knowledge and experience. In response to your comments: I do realize that I am completely out of my depth with this project. My aspirations far exceed my capabilities. However, in my heart I have already accepted the fact that my detector won't reach a state of completion (certainly not before the end of this academic year, anyhow). I attended the presentations given by last years' 2nd year students on the same course and the majority of them were unfinished projects. I believe the important thing is to have stated and understood the problem, defined it; and then worked out a possible hardware 'solution'. As far as the hardware 'prototype' bit is concerned, it is acceptable to have chosen the bare minimum specification required to prove that the design concept works, so long as the documentation explains why (i.e. time, money . .) and describes what the preferred component(s) would have been (+ details regarding their deployment). I'm studying for a degree in Communications not Electronic Engineering if that helps to put things in perspective.
    (To Bertus) Bertrik Sikken has been a great inspiration to me. I notice he also has a digital bat detector 'ideas' page
    (To Retched) The sample rate is a bit of a challenge, isn't it? It isn't too late for me to include an external ADC. I'll read some more around the subject. What worries me too, is that I suspect I should have thought more about signal to noise ratio having a negative effect on performance (i.e. stopping the device from providing any functionality at all).
    In practical terms, the detector will be 'tested' using a signal generator so the device will be close to the source. Ultimately, putting in the groundwork for a good design now will not be a waste of time as my 3rd year of study is mostly spent designing a hardware project with no restriction on continuing with this idea. (So long as I make it into the 3rd year . . .)
    Finally, I must admit that I have been influenced/inspired by this detector:
    Many thanks once again - I will doubtless be asking for your opinions again soon . . . please feel free to share any further thoughts on the subject. Any input is gratefully received. Louise
  9. bertus


    Apr 5, 2008
  10. Louise

    Thread Starter New Member

    Jan 17, 2010
    Hello Bertus!
    I have seen the Durham Bat Group site and have learnt a lot from it. There's certainly a great deal of information about bats and bat detectors available - some of it very informative. Including this;

    I'm very keen to learn more about digital signal processing (etc). I'm not sure whether I ought to mention that I'm a 2nd time around ('mature') student. My first (unfinished) degree was in music, hence the special interest in waves and sound etc. I'm enjoying going back to school. It has been a very steep learning curve, so far, though . . .
  11. saharsahar

    New Member

    Aug 16, 2010
    hi Louise,
    May I know please what microphone , microcontroller and ADC you have used for bat detection ( is it a board) and doest it support the USB or remotely controlled?
    thanks so much for your help.
  12. durhambats

    New Member

    Oct 13, 2010
    Hi Louise;from experience there are two main problems:
    1 getting a microphone and preamp to give a sufficiently large signal - and dealing with the wide variation in intensity. I believe ANABAT use zero crossings so the signal amplitude isnt a factor.

    microphone - MEMS microphones are ideal for this job but I understand the output isnt very large.

    2 preventing the whole thing from oscillating when you try to connect to a signal processor.

    FYI dodotronic have I believe abandoned their dodoultra detector, this might give you an idea of the challenge you are facing.

    If you pursue this project in your 3rd year I'd love to publish info about it on the dbg website?
  13. Audioguru


    Dec 20, 2007
    If your city eliminated most mosquitoes like my city did then the bats are gone like in my city. They put lavacide (safe for humans, animals and birds) in all the street drains a few times each year for a few years.

    Maybe my mosquitoes and my bats went to your place.