Help with amplifier. Not amplifying as it should be.

Thread Starter

kris_maher

Joined Apr 24, 2009
90
Oh in any case it should amplify it from what the simulation indicates, yes voltage p-p is dropped by half at the output of the amplification if it goes to like 50mV amplitude, but the opamp (schmitt trigger) amplifies it back up to 6V.

From what I remember of last semester the receiver picked up anywhere between 50-200mv p-p at the most distant extremes. This was 2 metres from the transmitter. I also had 'noise' issues or maybe the ocmponents I choose were not right for the job where the received signal would just muffle or flicker spontaneously if you know what I mean on the oscilloscope. And sometimes it would reach saturation and not show anything at all - it would go just flat or as a vertical line on the display that won't respond to any distance change.

When those guys were assessing me last semester they thought it was noise and suggested I use a notch filter at the receiver. But from memory when I was simply testing the receiver by itself (that is, it connected to the oscilloscope directly. No circuitry) it always picked up a clean but weakened sine wave from the distance of around 2 metres from the transmitter. No noise, and people were talking in the background. I always tested in indoor conditions. It's an indoor product meant-to-be.

I'm not too sure why the previous receivers failed last time, they failed to simulate properly on multisim when I checked this time, so I hope this time it works. I'll need to check on a real oscilloscope on monday and see what happens.
 

SgtWookie

Joined Jul 17, 2007
22,230
OK, well, instead of going the opamp-to-Schmitt-trigger route, you may want to stick with the last circuit that I posted. You will find that the adjustment for the bias on the noninverting input will be quite "touchy". Instead of a single 10k pot, you may wish to use two 4.7k resistors on either side of a 1k 10-turn trimpot. If you don't get the bias set correctly (roughly the same DC level as the inverting input) then you'll either get a flat-line output, or a very badly clipped sine wave.

You can always adjust the trigger levels by increasing the feedback resistor from the output of the comparator. Increasing the resistance will decrease the Schmitt-trigger thresholds.

I suggest that you do not decrease the feedback resistor, as excessive hysteresis will result, and you will wind up with a "stuck" output from the comparator.

Note that the opamp doesn't necessarily have to be a "rail to rail" type, but a 741 opamp just wouldn't work in this application; it's just too slow, and with a Vcc of 5v, the output voltage swing would be limited to around 1.8v to 3.2v.

If the opamp you use has more than one channel, make sure to turn the unused amps into voltage followers by connecting their outputs to their inverting inputs, and connect the noninverting inputs to the bias resistor; that way the outputs won't be in constant saturation.
 

Thread Starter

kris_maher

Joined Apr 24, 2009
90
Well then, What's with the R11? That's a 10k Trimpot turned half-way (with the 50%)?
And the a,b,c and d are labels?
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Well then, What's with the R11? That's a 10k Trimpot turned half-way (with the 50%)?
Right, that's the one that for "real world parts" you should replace the pot with a 1k 10-turn (or more) trimpot, with 5k or 10k resistors on either side.

The reason you'll need to "tweak" it a bit is because of what is known as "input offset voltage". It may be anywhere from 1mV to 5mV on the input (depends on actual opamp used), but it's amplified in the output by the same amount that the signal is. Having a pot there allows you to compensate for the input offset voltage.
[eta]
With no signal input (roughly Vcc/2), adjust the pot until the difference between the inverting input and the output is as close to zero as you can.

And the a,b,c and d are labels?
They relate to the simulated O-scope display on the bottom. The green trace is (D), the violet trace is (A), yellow trace is (C), and cyan trace is (B). It just makes it easier to see where the signals were taken from.

R7 is the one that you can increase to decrease the hysteresis on the comparator. You could add a pot of anywhere from 100k to 1 Meg to "dial in" how much hysteresis you want. 100k would probably be a good bet.
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Oh btw sarge, would that be a digital or an analog trimpot?
A simple analog trimpot would work very well. There is no need for the cost and complexity of a digital pot. I suggest using a 10-turn (or more) trimpot.

To make adjustment of R11 easier:
1) Connect the left side (signal input) of C1 to ground.
2) Adjust R11 until the noninverting and inverting inputs have nearly a 0v difference between them. This is the coarse adjustment.
3) Adjust R11 until the difference across R2 is nearly 0v. This compensates for the input offset of the opamp.
[eta]
Just to make things a bit easier, attached is a schematic with the additions of resistors on both ends of R11, and another trimpot to adjust the hysteresis of the comparator. You'll find the latter useful with lower levels of signal input, as if the hysteresis is too large, the output won't toggle.
 

Attachments

Last edited:

Thread Starter

kris_maher

Joined Apr 24, 2009
90
Thanks for that..

To start off with the receiver I built my one first on the breadboard but excluding the schmitt trigger circuitry (just upto 3K resistor and that's it done so far). At this point the simulation indicates a sine wave 6V p-p for a 200mV p-p input.

I'm not sure what the input is at this stage since I'm at home working on the real thing but the output voltage just after the 3K resistor is around 1.2V (not p-p) but it is changing values constantly. I'll need to obverse the waveforms of course. Also I'm viewing this value in DC mode on the multimeter.

I'm using the 7905 voltage regulator to generate the needed -5V to be fed into the LMC6032. 2 batteries actually, one for -5V and the other for +5V.

Since I have 2 grounds, one for the +5V rail and the other for the -5V rail, my question is does it matter which ground I connect the ultrasonic transducer (for receive) and the LMC6032 IC to?

I've connected both of these to the -5V rail ground.

I won't be able to see what's happening on a real oscilloscope until tomorrow...
 

SgtWookie

Joined Jul 17, 2007
22,230
OK, so you're doing something completely different than what I posted.

If you don't post your current circuit configuration, I'm afraid that you won't receive much help, as I am not sure what you are doing.
 

Thread Starter

kris_maher

Joined Apr 24, 2009
90
Hi SgtWookie,

I ran into a few difficulties with my one which I'll look into later so I built your receiver circuit up till B.
I didn't have a 330K resistor on me atm so I used 300k instead for the feedback.
This is my waveform from the oscilloscoppe on attachment.

I'm using an analog trimpot, the one you use a screwdriver to turn it to 50%. It has 3 legs, the middle leg is connected to the LM358's non-inverting positive input. The other leg is conmnected to the 10k resistor which in turn is connected to the 5V supply. And the third leg of the trimpot is connected to the 10k R4 which in turn is connected to ground.

The V- for the LM358 is connected to ground, and the V+ to Vcc = 5V.
 

Attachments

Last edited:

Thread Starter

kris_maher

Joined Apr 24, 2009
90
As a test I remvioed the R9 and R10 resistors and the below is what I got.

It now responds to any objects moving up and down as shown on the 2nd attachment (view3.jpg) with a greater p-p voltage. Though it looks more saw tooth in a way now.

What do you guys think?
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Check the resistors you're using for R9, R10, and R1. They should be 10k Ohms (Brown Black Orange).

By the way, not shown in the schematic I drew are bypass capacitors for the opamp and comparator supply pins.
You should have a 0.1uF (100nF) capacitor from the Vcc to Vee/GND pins, as close as possible with the leads very short.
 

Thread Starter

kris_maher

Joined Apr 24, 2009
90
So there should be a Vee your saying? That is -5V and not just a ground?

BTW ill add the capacitors.

Also why do you think before it caused so much noise?
 

Thread Starter

kris_maher

Joined Apr 24, 2009
90
Ok so how's this.

The thing is on the simulation it comes up fine however when the real thing comes these noise issues arise.

Also it's best I add that on the oscilloscope (real one) the sine wave output (ac coupling) is not greater than 1 volt, it's in mV as the screen shot shows.
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
So there should be a Vee your saying? That is -5V and not just a ground?
No. In the schematic I drew, there is only Vcc (+5v) and ground; so Vee is also ground.

BTW ill add the capacitors.
Good. :) Keep in mind that ALL IC's should have "bypass capacitors" across their power/ground pins.

Also why do you think before it caused so much noise?
It could be simply due to the type of resistors you're using, or due to the lack of bypass capacitors. Most opamps are pretty good at rejecting noise on the power supply, but still - virtually all analog and digital ICs should have bypass capacitors.

Carbon composition resistors are quite noisy; those usually have dark brown cylindrical bodies, and are largely obsolete. Carbon film resistors usually have light tan/beige bodies in sort of a "dumbbell" shape. They are less noisy and much more stable than the old carbon composition types.
Metal film resistors are also generally in the "dumbbell" shape, but the bodies are light blue in color. I don't know about you, but I find it more difficult to correctly determine the color bands on the light blue background.

Here is a page that shows a graphic of the "dumbbell" shape; it's also a handy value calculator:
http://samengstrom.com/nxl/3660/4_band_resistor_color_code_page.en.html
 

SgtWookie

Joined Jul 17, 2007
22,230
Double-check your 300k Ohm feedback resistor.
Are you certain that it's 300k Ohms? (Orange, Black, Yellow, tolerance band)
[eta]
Can you post an image of how you're breadboarding the circuit?
 

Thread Starter

kris_maher

Joined Apr 24, 2009
90
Whatever that is to the right of the 1st ultrasonic transducer (This is most left. This one is the transmitter. The most right is the receiving one) is the receiver circuit that's been done up till point B on your schematic.

Whatever is to the left of it is related to the transmitter, it works fine.

BTW I just replaced the 300k 1% with a 330k 1% resistor.

You'll notice that R9 and R10 are not on here (the waveform for this I posed at top of this page). The top most right blue wire is the output. And I'm just using a wire coming from the ground to check via the oscilloscope.

Also the bottom most right thin yellow wire that seems to be floating out of the picture is the wire I'm using to connect the oscilloscope black cable to the circuit's ground.

PS: I know it's kinda me messy, I intend to fix it up with a larger breadboard that has more space.
 

Attachments

Last edited:

Thread Starter

kris_maher

Joined Apr 24, 2009
90
Ahh sorry, I've added a annotated version of the above pic. It explains where all the components are with labels.

Also btw are the bypass capacitors I've added correct? I'll add the 2 resistors I removed back on and add the bypass capacitors tomorrow when im in the lab.

thanks for your help, I hope it's not too much trouble..
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
You're using metal film resistors, which is good from a noise standpoint, but it's also hard to read the color bands (for me, at least).
R2, going from pin 1 to pin 2 (B7 to C8) looks like brown-brown-black-red, which would be 11k Ohms instead of 300k or 330k Ohms. What does it measure with your Ohmmeter when it is out of the circuit? If it's actually 11k Ohms, that would explain why you were getting such a low P-P output before.

Since it's so difficult to read the color bands on the metal film resistors, I suggest that you measure each one before placing it in the circuit.

With R9 & R10 out of the circuit, the opamp is nearly running open loop.

You've used a 3/4 turn carbon film trimmer for R11. It will be difficult to adjust it precisely. It will likely be much more noisy than a 10-turn or 21-turn trimpot. You can quiet down the noise by adding a small capacitor (say, 100pF to 10nF) from R11's wiper to ground.

I see you're using stranded wire. You would have an easier time of it if you could find some small gauge (AWG 20 or 22) solid core wire. The stranded wire may cause you to wind up with unexpected circuit paths. Pieces of the stranded wire can break off and get stuck inside the breadboard. Also, the use of larger gauge wire can stretch the contacts inside the breadboard, making for unreliable connections later on with smaller gauge wire.
 
Top