Detecting a small, high frequency signal

Discussion in 'The Projects Forum' started by Scone, Apr 3, 2010.

  1. Scone

    Thread Starter New Member

    Apr 3, 2010
    5
    0
    Hey all,

    I'm trying to make a circuit that can detect the distance between itself and another object, using two 40kHz transducers and a PIC. A short pulse is sent out, and the time taken to receive the echo is used to find the distance.

    I would like to trigger an input pin on the PIC when the echo is received. Unfortunately, the echo is only about 10mV, and the PIC requires about 4V for a pin to be high. I've tried using a set of three op-amps to amplify the signal, each with a gain of 10x, but the amount of interference is high and the circuit seems unreliable in general.

    Would you say that op-amps are the best way to detect the signal? I am not interested in the amplitude, only the time at which the echo is received.

    Thank you!
     
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    which op amps are you using?
     
  3. Scone

    Thread Starter New Member

    Apr 3, 2010
    5
    0
    Hey,

    The op amps I'm using are the 'AD817AN' by Analog Devices. A datasheet is available here.

    I'm using a non-inverting configuration (schematic, R1 = 1k, R2 = 10k). The signal is centred on 6V, and the -/+ voltages for the op amps are 0V and 12V (so in the schematic, the '0V' label actually refers to a 6V virtual ground).

    Thanks
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  5. Scone

    Thread Starter New Member

    Apr 3, 2010
    5
    0
    I've added a basic 50kHz low pass filter to the input - the first stage of the amplifier now looks like the attached schematic.

    I applied a 10kHz signal (of ±10mV) to the input, and it was amplified perfectly (by 30x). However, when I connected the 40kHz receiver, the output was zero (i.e. a constant 6V), even though the input signal to pin 2 was about ±50mV.

    I connected the 40kHz oscillator circuit (that was previously connected to the transmitter) directly to the input of the amplifier (between a pair of resistors so that the input was a ±1V square wave). The output was about half the input.

    I can't understand why it's not working - why would it amplify a 10kHz signal but not a 40Khz one?

    Thanks
     
  6. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    The 50 KHz low pass lets the op amp amplify anything below 50 KHz, including noise. The lack of response at 40 KHz may point to a miscalculation.

    A narrow bandpass, like the twin-T referenced above is going to be superior, but hard to center over the 40 KHz signal of interest. The gain and selectivity are worth the effort, though.

    You might also look into how to make a vircual ground - http://www-k.ext.ti.com/SRVS/Data/ti/KnowledgeBases/analog/document/faqs/virtual.htm
     
  7. Scone

    Thread Starter New Member

    Apr 3, 2010
    5
    0
    I'm not certain that the problem is the filter - measuring pin 3 (the input pin) on the op amp shows that the 40kHz signal is getting past the capacitor, and is still double the output signal. Is it still worth trying the twin-T filter?
     
  8. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Look at the circuit. Your filter is only eliminating response to sounds above some frequency, which may include the signal you want to amplify. In essence, all environmental sounds are still going to be present as a noise component, as they are just about all below 40 KHz.

    A narrow bandpass filter may be the best way to have a circuit that responds only to your 40 KHz signal.
     
  9. Scone

    Thread Starter New Member

    Apr 3, 2010
    5
    0
    Since the addition of the low-pass filter there is no noise on the input or output - the signal on both ends is perfectly clean. I don't think that improving the filter will fix the problem.

    The problem is that, although the circuit can amplify a 10kHz signal generated by my PC's soundcard, it simply halves the input when connected to a 40kHz receiver. The filter is definitely allowing the 40kHz signal through - when a generated 40kHz square wave was connected to the filter's input, a 40kHz sine wave was at its output, as would be expected.

    The problem may be the way in which I've connected the inputs - I connected the transducer between the 6V rail and the input labelled on my schematic, and did the same with the input from the soundcard. Is this correct? Would both signals be centred on 6V?

    I apologise if it looks like I'm ignoring your advice - I'm not, I just don't see how improving the filter would have an effect if a clean version of the desired signal is already passing through it.

    Thanks
     
  10. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    If you look at the response, the values you are using for the folter may be a bit off, placing the 40 KHz in the rolloff knee. Make the cap a bit smaller, or the resistor larger and see if the signal improves.
     
Loading...