Help with amplifier. Not amplifying as it should be.

Discussion in 'The Projects Forum' started by kris_maher, Jul 17, 2009.

  1. kris_maher

    Thread Starter Active Member

    Apr 24, 2009
    90
    0
    Hi,

    I firstly would like to add I'm doing an ultrasonic project. For the receiver I've simulated a circuit which amplifies 100mV input to around 5V using an Opamp.

    However when I check using an oscilloscope at the output of the Opamp the amplitude is basically 5V DC (ie. a straight line), I'm expecting an amplified sine wave instead.

    I've fed at the input to the circuit a signal that is meant to simulate what the receiver ultrasonic device picks up (the transmitter transmits a square wave but the receiver receives a weakend sine wave echo). A sine wave with 100Vp-p amplitude with a frequency at 40KHz (ultrasonic) is inputted.

    Any ideas?

    Thanks everyone!

    BTW I've included the pics of the simulation using multisim. The yellow line from channel A is the final opamp output and the cyan sine wave from channel b is the input signal.

    It's my wish once this is done to put the amplified sine wave at 5Vp-p through a comparator (with reference at 5V, same as before but comparing against 2.5V provided by two 1k resistors) to produce a clean square wave that the microcontroller can make sense of.

    PS: I've done it all on multisim as I don't have access to a real oscilloscope till next week as well as I don't have the components on hand will need to order them once I know that this works for certain. I've had troubles with my previous receivers so I'm hoping this design will work out.

    PS2: yes it was a 2 stage amplifier before but I removed the 2nd amplifier as it wasn't necessary. Also a filter isn't necessary as well I believe so.
     
    Last edited: Jul 18, 2009
  2. kris_maher

    Thread Starter Active Member

    Apr 24, 2009
    90
    0
    I just would like to add that the Voltage p-p is not being amplified for some reason. It's still in mV.
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You're supplying 5v to both supply pins.
    Try -5v (named Vee) on pin 4, +5 (named Vcc) on pin 8.
     
  4. steveb

    Senior Member

    Jul 3, 2008
    2,433
    469
    Before getting into the details of the design, can you explain why the OPAMP is being powered by 5 VDC on both power pins?
     
  5. kris_maher

    Thread Starter Active Member

    Apr 24, 2009
    90
    0
    ahh yes woops. I supplied Vcc for both pins, V- (pin 4) should have been negative. It's fine now.

    thanks.

    The receiver is not complete yet, I'll need to convert this signal into a square wave. I'll use a voltage comparator for that and report back if it's all good.
     
  6. kris_maher

    Thread Starter Active Member

    Apr 24, 2009
    90
    0
    Hi,

    I've tried using the Schmitt Trigger. The pics are posted below.

    With the Schmitt instead of converting the sine wave into a square wave it's just DC with no amplitude.

    I'm not familiar with setting the threshhold voltages in the schmitt trigger using multisim, the properties tabs do not include this at all.

    The program manual simply states for the Schmitt Trigger:
    So according to that it should work but it's not. Any ideas? Thanks everyone.
     
    Last edited: Jul 18, 2009
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Look at channel 2 on the scope (rightmost image). You have 2v/div selected. The voltage being measured is far less than that.

    No wonder that the Schmitt trigger isn't toggling.
     
  8. kris_maher

    Thread Starter Active Member

    Apr 24, 2009
    90
    0
    the schmitt trigger is supposed to act on the amplified voltage which is around 6.42Vp-p (left of resistor R5). Channel 2 is actually the original un-amplified input signal, that's not going to the schmitt trigger. So what shall I do?
     
    Last edited: Jul 18, 2009
  9. kris_maher

    Thread Starter Active Member

    Apr 24, 2009
    90
    0
    ok instead of using the built in schmitt trigger I decided to build my own from scratch. At the output it provides a clean 5Vp-p square wave. As the maximum rating on the ATmega32 is 5.5V I had to keep it around this much.

    The output of my schmitt trigger is 6V, but using a parallel resistors in a ratio of about 0.8 the voltage is down to around 5Vp-p.

    So would this work on a practical setting?? The simulation seems to think so. I'll need to start ordering the parts soon.

    I'd love to know your opinion and I hope this time the receiver works :)
     
  10. millwood

    Guest

    wouldn't it be just easier to set up U2A as a schmitt trigger and use just one opamp instead of two?
     
  11. kris_maher

    Thread Starter Active Member

    Apr 24, 2009
    90
    0
    Err well I'm not all that familiar with combining those functions like that.
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Your Schmitt trigger wasn't working because the input wasn't going high enough to trip it.

    The output of your opamp might be 6v p-p, but it's centered around 0v. You'd need to offset it to Vcc/2, or 2.5v.

    Attached is one way of accomplishing that. Note that I've increased the gain of the opamp.
     
  13. millwood

    Guest

    a schmitt trigger is nothing but a comparator whose "trigger" point depends on the input as well as the comparator's current state.

    an opamp is a comparator when you run it open loop.

    so if you combine the two, you get the following.

    once the opamp is triggerred, it stays at 5v, so the non-inverting input of the opamp stays at 5/10k*47=25mv.

    so when the input signal goes above 25mv on the non-inverting end, the opamp flips and output 0 which is fed back to the opamp as 0 on the non-inverting end. so the opamp stays flipped.

    and the reverse happens when the input signal goes below 0 and the opamp flips to 5v.
     
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    While you can use an opamp as a comparator, they're really not designed to be run open-loop. Bandwidth suffers quite a bit, and the outputs spend nearly all their time in saturation, leading to high power dissipation and heating.

    If you really want open-loop gain, you should be looking at a true comparator instead. Their open-collector outputs are designed to be operated in constant saturation.

    [eta]
    You might consider looking at an LM392. Digikey stocks them:
    http://www.digikey.com/scripts/DkSearch/dksus.dll?PName?Name=296-20854-5-ND
    It's low bandwidth (only 1MHz) but it contains both an opamp and a comparator. Pinout is the same as an LM358 dual opamp and LM393 dual comparator.

    I didn't have an LM392 in my library, but see the attached for a circuit simulation using roughly equivalent parts.
    [eta]
    This circuit won't work with an LM392 due to that IC having only a single ground rather than separate Vee and GND pins for the opamp and comparator. See the following post for a version that will work with an LM392.
     
    Last edited: Jul 19, 2009
  15. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Had to revise the circuit; forgot that the LM392 doesn't have separate supplies for Vee. :rolleyes:
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Oh, take another look at your simulation. You've labeled the output in the wrong place; you're only getting about 23mV p-p. Once you read the output, you'll likely find you're only getting a swing of 1.5v to 3.5v, unless you're using a rail to rail opamp.

    Note also the slow rise and fall times; it will look more like a clamped triangle wave than a square wave.
     
    Last edited: Jul 18, 2009
  17. kris_maher

    Thread Starter Active Member

    Apr 24, 2009
    90
    0
    Why would I need to offset it anyway? It's on -3 to 3V.
     
  18. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Because the Schmitt trigger inverter you put in the circuit had trigger points of 1/3 Vcc and 2/3 Vcc (or that's where they generally are for CMOS circuits).

    5v*1/3 = 1.667v for the lower trip point. 5v*2/3 = 3.333v for the upper trip point. Since your -3v to 3v sine wave never reached 3.333v, your Schmitt trigger never tripped.

    Does that make sense to you?
     
  19. kris_maher

    Thread Starter Active Member

    Apr 24, 2009
    90
    0
    yes yes..

    Thanks..I'll do a little circuitry this Sunday morning and hopefully luck shines upon me.
     
  20. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Luck has little to do with it ;)

    Are you certain that your input will be around 100mV AC, 200mV p-p? If not, the gain will need some adjusting.
     
Loading...