Ultasonich Opamp

Discussion in 'General Electronics Chat' started by mjr, Apr 6, 2014.

  1. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    HI,

    I'm trying to build an ultrasonic frequency counter with an electret microphone. I'll use a 4024 counter to divide the input frequency by 32 and feed it into a microcontroller.
    I am unsure as to how to design the mic amplification to get the required amplitude to feed into the 4042. I need to circuit to operate at 5v. I've seen designs with a lm386, but am unsure if this chip is a good choice. What opamp would be suitable for an application like that?
    Also I would like to add a high pass filter, to filter out frequencies below ~5kHz...

    Thanks four your time!
    Cheers
    Meinrad
     
  2. GRNDPNDR

    Member

    Mar 1, 2012
    435
    7
  3. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    No, I haven seen that one in particular. But after a short inspection this detector seems to be a heterodyne detector which is not suitable for my purpose (it requires tuning to detect a specific frequency, I need an circuit that works for a wide range of frequencies without tuning).

    But the scematic for the first Bat-Detector on the same page (http://www.qsl.net/g4usp/Bat detector 1/Bat detector No1 SCH.htm) seems closer to my requirements.

    If I omit the last part (amplification for the speaker) and could adapt it to work with a 5v supply...
     
  4. GRNDPNDR

    Member

    Mar 1, 2012
    435
    7
    I can't really help with that, but you make a point about frequencies which makes me think the heterodyne detector may not be what I need either.

    I also need a wide range input, from 20Khz to 96Khz.

    I'm not hijacking your thread, but I will be watching it.
     
  5. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,801
    1,105
    How about this?
    A 1mV input from the mic is enough to drive the amp to clipping level. Gain falls off below ~20kHz and is ~ 12dB down at 5kHz.

    Edit:
    If you need a gain control, replace R7 by a 10k pot and connect C3 to its wiper instead of to the emitter of Q2.
     
  6. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    WOW! Thanks a lot for the circuit.
    I simulated the supplied asc with LTSpice an it worked perfectly. I then tried simulate the same circuit with multisim (to add the 4024 and other components later) and there it does not quite work as expected (see attached images). The voltage at the output is at its lowest at 3V and only for a very short time.
    I have no idea where the problem lies....
    I am not sure if I simulated the microphone correctly (with an AC-Source).
     
  7. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,801
    1,105
    Have you tried different settings for the pot wiper? Your schematic shows "0%", which suggests zero signal and hence the amp output would sit at 3V, the DC bias point.
    That's what I did.
     
    mjr likes this.
  8. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    Yes, I tried the pot. In this schematic 0% means that the wiper is at the top position (which would mean that it should be the same as if there was just a 10k resistor and the Q3 connected as shown in your schematic). If I change the value to 100%, the output pin sits at 4.8V with no changes (for me that means that the gain pot works correctly, but there is an error somewhere else...).
     
  9. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,542
    1,251
    IF "A 1mV input from the mic is enough to drive the amp to clipping level."

    AND IF V2 = 5mVpk

    THEN...

    ak
     
  10. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,801
    1,105
    I've just noticed your R11 is 47k, not 4k7 as I used.
     
  11. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,291
    1,255
    Here is another option. Gain, 2nd order high pass and comparator. If it is a standard electret mic it won't have to much output at 30 KHz so I gained it up a bit.
     
    mjr likes this.
  12. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,542
    1,251
    ronv - can you share the electret mic LTS component?

    Thanks.

    ak
     
  13. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    I double and tripple checked my layout and still I was to stupid to see the error!!! thanks a lot for your help!
     
  14. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    Thanks a lot four your schematic it fits my requirements very nicely. But because the used opamp's are very expensive, I'll try the other scematic first. I have to order a few part and will be back in a few day with the results from the real circuit.
     
  15. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    Ok, I got the parts and built the circuit on a breadboard. Works like a charm! I will now try to connect it to a custom Arduino and build a batlogger. Thanks again for all the help!
     
  16. GRNDPNDR

    Member

    Mar 1, 2012
    435
    7
    question: At the bottom of that schematic is a little arrow that says "IN" right by ".include potiometer.sub"

    What is that input??

    Secondly, does this circuit maintain the analog data or does it reduce the ultrasonic sounds to clicks like a Geiger counter?
     
  17. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    I think the input is just there to show the input signal when using ltspice.

    The circuit itself does not reduce the signal to clicks. This happens only if you add the 4024 which removes all the amplitude information. If you would like
    to retain the original data you should use a heterodyne circuit (lots of examples on the net) or record the signal digitally an expand it with a DSP.
     
  18. GRNDPNDR

    Member

    Mar 1, 2012
    435
    7
    Isn't this a heterodyne circuit??

    Retaining the amplitude is what I meant to say.

    I'm looking into a similar device for rats, but rats have a vocal range of <20Khz to 96Khz, so I need a device capable of capturing and amplifying that signal so that a human can hear it.

    When they get excited and play they make all kinds of sounds we can't hear.
     
  19. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    No it is not (see http://en.wikipedia.org/wiki/Heterodyne). The problem with heterodyne circuits is, as I said before, that they require tuning, which makes them unsuited for my application.

    Well, I am certain that you could hear the rats making noise with the circuit from Alec, but the sound quality would not be good.
     
    Last edited: Apr 11, 2014
  20. mjr

    Thread Starter New Member

    Apr 6, 2014
    23
    0
    I successfully connected the ATMega to the circuit described by Alec_t. But as soon as I connect the required crystal (16Mhz) the circuit picks up noise (I assume from the crystal) and becomes unusable.
    How do I decouple the powersupply so that the noise from the crystal is not amplified by the circuit (I already tried a decoupling capacitor of 100nF between V+ and Ground).

    Thanks for any help.
     
Loading...