Help with amplifier. Not amplifying as it should be.

Thread Starter

kris_maher

Joined Apr 24, 2009
90
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.
 

Attachments

Last edited:

steveb

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

Thread Starter

kris_maher

Joined Apr 24, 2009
90
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.
 

Attachments

Thread Starter

kris_maher

Joined Apr 24, 2009
90
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:
Schmitt TriggerCharacteristic Operation:
The Schmitt trigger outputs:

0
if the voltage is rising and Vin > V+g+
1
if the voltage is falling and Vin < V+g-

where:
V+g+ = 1.6 V (Vih)
V+g- = 0.9 V (Vil)
So according to that it should work but it's not. Any ideas? Thanks everyone.
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
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.
 

Thread Starter

kris_maher

Joined Apr 24, 2009
90
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:

Thread Starter

kris_maher

Joined Apr 24, 2009
90
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 :)
 

Attachments

millwood

Joined Dec 31, 1969
0
wouldn't it be just easier to set up U2A as a schmitt trigger and use just one opamp instead of two?
 

SgtWookie

Joined Jul 17, 2007
22,230
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.
 

Attachments

millwood

Joined Dec 31, 1969
0
Err well I'm not all that familiar with combining those functions like that.
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.
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
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.
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
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:

Thread Starter

kris_maher

Joined Apr 24, 2009
90
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.
Why would I need to offset it anyway? It's on -3 to 3V.
 

SgtWookie

Joined Jul 17, 2007
22,230
Why would I need to offset it anyway? It's on -3 to 3V.
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?
 

SgtWookie

Joined Jul 17, 2007
22,230
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.
 
Top