Ultrasonic Amp

Discussion in 'General Electronics Chat' started by mjr, Oct 18, 2014.

  1. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    Hi,

    I am trying to design an circuit to amplifying a mic signal (~15kHz-100kHz) to feed it into a microcontroller (which will use the input for Bat-Detection an Logging). With lots of help from google and this forum I finally came up with a circuit that seems to work (breadborad and simulator). But since I have no experience with this kind of circuits I was wondering if someone with more knowledge could look over my design (are there some 'obvious' beginners mistakes? could the design be improved? Any potential problems?) before I produce a PCB.

    My Idea was to amplify the signal from the mic and filter out low frequencies. After that I used a comparator to create a 'rectified' signal for the microcontroller. For the OpAmp's I used two OPA2344.

    USonicAmp.png

    Thanks for your help!
     
  2. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,503
    380
    hi mjr,
    As you are using a VG, C3,C9,C8, and R13 are not required.
    I would say the C4 and C5 are too high in value, 100nF or 1uF
    Which OPA type are you using.
    Also R9 100K is high, say ~4k7
    E
     
  3. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    Thanks for your help. I put C2,C9,C8 and R13 there because I was under the impression that they would help to reduce the gain on lower frequencies (as in high pass filter). Otherwise loud low frequency sound (below 15kHz) will prevent the comparator from detecting the higher frequencies (does that make sense to you? kind of hard to explain...).

    I was planning to use a OPA4233 or a TL074.
     
  4. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,503
    380
    Hi,
    Both OPA's look OK.
    The Caps would help reduce the lower frequency gain if you prefer that method.
    Are you planning to add some threshold adjust on the comparator?
    E
    EDIT:
    whats the bat freq band you want to detect?
     
  5. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    The bat frequency band I'm interested in is 15kHz to about 100kHz.
    At the moment I did not plan to make the threshold adjustable (maybe just replace R10 with different values if it is too sensitive).

    Would there be a better / easier method to reduce low freq gain?
     
  6. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,503
    380
    You could change the U3 OPA buffer into an active HP filter.
    E
     
  7. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    Could you point me to some scematic / explanation as how to implement a active high pass. I was googling for that but never quite found what I was looking for.

    EDIT:
    The only HP filters I found were just passive filter before the OpAmp (which I tried to implement with U1/U2) and the "Sallen-Key Butterworth High Pass Filter" which I tried to implement with U5.
     
  8. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,503
    380
  9. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,503
    380
    Hi,
    This image shows the difference in the two filters more clearly.
    I have added back your 2n2's and chopped off the comp for clarity.
    E
     
  10. rogs

    Active Member

    Aug 28, 2009
    279
    37
    What kind of microphone are you intending to use to detect these frequencies?. Although most modern cheap mic capsules will cover the lower part of that range easily, you may have problems detecting anything useful near the top end of that range, without using a specialised transducer.

    It's not clear from your description exactly which kind of bat detector you are trying to build. You mention 'rectifying' the output of your amplifier....what do you intend to do with that 'rectified' signal?

    There are 3 types of bat detector in common use (there's quite a good description of all 3 types here: http://www.bats.org.uk/pages/bat_detectors.html )

    Your circuit at present doesn't seem to fall into any of those categories?........
     
  11. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    @rogs: Some more details:
    I will use a electret microphone. Most of theses microphones have no specification for the required frequencies, but I have already tested some. They seem to work well for frequencies up to about 50kHz. Above that I don't know (I have no testing equipment for such frequencies...). Ultrasonic transducers usually have a very narrow frequency band (usually around 40kHz) so they are not ideal as well.
    I am not trying to build one of the common bat detector types. The frequency divider is probably the closest one. I will feed the 'rectified' signal directly into an atmega328 (counter pin / T1). The processor will then detect bat calls and log the duration, frequency and time onto a SD-Card. I don't need an audible feedback (which is what the Bat-Detectors you mentioned are for).
     
  12. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    @ericgibbs: Thanks for your circuits. So basically your modification has a steeper edge even if I omit the 2n2 caps. I'll try that on my breadboard. Not sure about R10 in your circuit, 10k seems too high...
     
  13. rogs

    Active Member

    Aug 28, 2009
    279
    37
    As you say the nearset 'type' you are going for is the frequency divider. This is the simplest type of detector, but in reality does little more than let you know of the presence of a bat. As it has no frequency discrimination circuitry, it can do little to identify the type of bat being detected.

    If you have listened to any results from heterodyne or time expenasion detectors, then you will know that most (if not all?) bat echolocation calls contain a frequency modulated component - which is why the heterodyne detectors tend to output 'chirps', as the detected ultrasound 'passes through' the mixer oscillator selected frequency range. Most bats have at least some echolocation content around 40KHz.
    It is therefore pretty academic how effective your transducer is at the upper reaches of your described range. Covering up to 50-60KHz should be fine for a frequency divider device.

    I made a simple frequency divider bat detector some 20 years ago, using a 40 KHz ultrasound detector. I've attached a copy of the original circuit, if you'd like to take a look? It used a TLO64 opamp (this was 20 years ago remember!) and used little power - which was good for a battery operated device -but was a bit noisy for a 'real' mic pre-amp. The whole device drew about 1mA from a 9 volt battery. The steep band pass filter tuned around 40KHz optimised the transducer output, and the adjustable sensitivity control allowed you to maximise the gain without 'detecting' just the preamp noise.

    As you see it was very simple, but it was quite effective. No need for any more sophistication for this type of detector. It worked pretty well, and would detect our local (UK) Pipistrelles, Noctule and Daubenton bats up to about 50 yards away.

    But it couldn't really help tell which was which species.... so I quickly moved on to making a heterodyne detector.

    For that, a simple 'fixed' frequency transducer was no real use of course, so I used both Panasonic WM61A and Knowles 3032 electrets for that unit. I think these days some of the newer MEMS transducers might be even better.....

    Of course, the 'real thing' would be to build a time expansion detector. But that's much more difficult..and expensive!.....

    fdbat.jpg
     
  14. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,364
    Sounds very interesting. With today's technology it would be relatively simple to go completely digital. Digitize the broadband signal and perform the FFT.
     
  15. rogs

    Active Member

    Aug 28, 2009
    279
    37
    That's what tends to be done in scientific circles, where these things are studied in detail. But because professional analysis of bat echolocation calls is a pretty specialised area, the equipment tends to be expensive. The only effective way is to 'capture' the bat calls in real time, and then analyse the recordings using specialised software in the lab afterwards.
    This kind of detector (which incorporates all 3 main detector types in one unit) is the kind of kit used by the 'pros': http://www.nhbs.com/title/158814/pettersson-d-1000x-bat-detector . As you can see, this kit can be very expensive!

    The cheapest option I've found that would come anywhere near to that is to use something like the Korg MR2 (http://i.korg.com/mr2 ) which, using the 1bit mode, can record the 'audio' band up to 100KHz.
    You've still got the problem of transducers though. Quality ultrasonic transducers are again expensive... and those with the required bandwidth tend to be very directional. So you need frequency division and heterodyne detectors to find the bats, and your ultrasonic digital recorder to capture the actual bat calls, rather than an audio signal derived from the ultrasound.

    So most of us amateurs tend to stick to building either frequency divider types, which tend to be very much 'yes/no there is a bat about?' devices.
    You can't deduce much else from the crude random'click' patterns those units put out. Useful for finding the bats in the first place though....

    Or move up a gear to a heterodyne detector, which, being tuneable, can give you a lot more information. And these are easy to record directly onto cheap solid state recorders........a bit more complex to build, but much more useful.

    Edit: I've posted a short (250KB) sample of 'soprano pipistelles' I recorded with my home made heterodyne detector here:
    http://www.jp137.com/las/bats muscliffe.mp3

    (I can't seem to attach an mp3 to the post itself?)

    The calling 'chirps' are detected around 55 KHz, and the 'zip' type sounds (at 18 seconds in for example) are feeding buzzes the bats make as they close in on their kill.

    It's a fascinating hobby. These little critters are amazing (IMHO, of course)
     
    Last edited: Oct 19, 2014
  16. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,364
    Thanks for the info and for stimulating the interest.

    I have the hardware and the software to do the recording and FFT analysis in real time. I can record as high as 50Msps which is high enough to digitize to 5MHz easily.

    I get the occasional bat in the house so I will see what I can rig up.
     
  17. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    The idea of the project I am working on is to build 25 or more bat detectors that are able to log bat calls on a sd card. These detectors would then be laid out in a grid (5x5 detectors) over night. The collected data could then be analysed to find a movement pattern (i.e. where are the bats coming from, when do they come back etc.).
    I am aware that, to identify the actual species (or listen even to their calls) my circuit won't be good enough (by the way: it is not only the frequency that is specific for a species but also the duration and number of the calls (those are easier to measure) can be used to identify the species. not very precise though...). That is why we will also have one or two more expensive (digital recording) Bat-Detectors placed within the grid. But those are way too expensive to buy 25 pieces for the whole grid.
    The problem with the heterodyne detectors is that they have to be tuned. For my application I need the detectors to work without tuning for a whole night (and different species).

    As for the microphone: I already ordered a few MEMS microphones to experiment with (SPU0410LR5H-QB). They are just so very small and none too easy to solder... :)
    See [http://www.knowles.com/kor/content/download/5755/91802/version/3/file/SPU0410LR5H-QB+revH.PDF]
    I'll report back if I get any useful results with those...
     
  18. rogs

    Active Member

    Aug 28, 2009
    279
    37
    Looks to be a fascinating project. Can I ask... how big is the 'grid' going to be. Presumably over a considerable area, to get the required directional separation?.

    Those MEMS mics seem to have an excellent ultrasonic spec.... if only I could have found some of those 20 years ago!!

    It'll be interesting to see how much information -- other than 'bat yes/no'---- you are able to determine from your basic frequency divider devices. Do let us know how you get on.

    Although the actual calls, as you say, are quite complex in structure -- both pattern and frequency wise -- I was never able to deduce much detail from my simple frequency divider unit... which is why I went heterodyne.
    With that, I was able to confirm to our local bat group that we did indeed have soprano pipistrelles, and not just standard 'pips' locally. I couldn't have done that with my frequency divider device!
    But it is just a hobby for me. One day I'm going to build a decent low noise pre-amp for one of those MEM mics, and then beg steal or borrow a Korg MR2.........Hopefully, time expansion recording without needing a mortgage!
     
  19. Sensacell

    Well-Known Member

    Jun 19, 2012
    1,132
    267
    Verify that your virtual ground opamp is happy and stable driving the large capacitive load, some opamps become unstable under these conditions.
    Also, analyze the current that the VG may need to source or sink- be sure the opamp can supply these currents.

    Virtual Grounds have given me pain in the past.
     
  20. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    @Sensacell: Thanks for the hint. I'll check the specs.

    The circuit works quite well on my breadboard. Today I soldered the circuit onto a strip board, but it is a lot noisier (with exactly the same components). Is this normal? I was expecting the circuit to be less noisy since the components are soldered and the wires are shorter...

    Any ideas?
     
Loading...