Author Topic: Op amp not working out as planned  (Read 8998 times)

0 Members and 1 Guest are viewing this topic.

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Op amp not working out as planned
« on: March 04, 2018, 06:31:04 pm »
Hi

I've got a AD9833 DDS Signal Generator Module sending out a 1KHz sine wave.  I'm supposed to be amplifying it with a NJM5532 op amp (https://www.njr.com/semicon/PDF/NJM5532_E.pdf) running from the same 5v rail.  However, the output looks poor, being clipped and with ringing.

Here's how I have the op amp configured.

Any idea why the output signal looks so bad and why the gain isn't -10 ?

Thanks

 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: Op amp not working out as planned
« Reply #1 on: March 04, 2018, 06:44:05 pm »
running from the same 5v rail. 
Just the one supply ?
You will need both positive and negative power supplies to use any op-amp in that configuration. Also, the NE5532/34 requires a lot of headroom - If you have +5 and -5V supplies, the chip will only work properly with a signal within the range +3 to -3 (I think - look at the "common mode" range on the datasheet).

 
The following users thanked this post: netdudeuk

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #2 on: March 04, 2018, 07:00:30 pm »
Hi

Thanks for the prompt reply.

Yes, I'm using a single 5v supply.

I was taking the design from here but without wanting to add the offset voltage -

https://youtu.be/ts-JqEVzvDo?t=6m35s

He looks to be using a single supply rail here -

https://youtu.be/ts-JqEVzvDo?t=7m44s

He also uses a capacitor in the feedback loop which I don't have.

 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11631
  • Country: my
  • reassessing directives...
Re: Op amp not working out as planned
« Reply #3 on: March 04, 2018, 07:25:45 pm »
I was taking the design from here but without wanting to add the offset voltage -
https://youtu.be/ts-JqEVzvDo?t=6m35s
that is used for audio amplification from microphone which usually in 100mV range. multiply by 10 in your application is 1Vpp well within the supply range. your application is 600mV input that is 6Vpp output well outside your supply range, hence the clipping. to avoid clipping you should either reduce your input Vpp or increase the voltage supply range or reduce the opamp gain.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 
The following users thanked this post: netdudeuk

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: Op amp not working out as planned
« Reply #4 on: March 04, 2018, 07:26:42 pm »
I was taking the design from here but without wanting to add the offset voltage -
With a single supply it is not optional - you need to bias the op-amp to around 2.5V - as is shown at approximately 6:45. You will also require the decoupling caps - depending on what you are using as your signal source.
 
The following users thanked this post: cncrepair, netdudeuk

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Op amp not working out as planned
« Reply #5 on: March 04, 2018, 07:31:57 pm »
You can use a single supply as long as you bias the non-inverting input up to half of the rail voltage.  Then capacitively couple your AC signal or feed a signal that is biased up  the same as the non-inverting input.

Now all you have to worry about is gain and headroom.  If you use an op amp that can't pull within 2 volts of the top or bottom supply and you are using a 5V supply, you only have 1V left to work with on the output.  Your input needs to be less than 100 mV.


 
The following users thanked this post: netdudeuk

Offline mav_iqdirect

  • Contributor
  • Posts: 15
  • Country: us
Re: Op amp not working out as planned
« Reply #6 on: March 05, 2018, 10:44:43 am »
You can use some free circuit simulator (like partsim) to review your schematic. Just build your circuit here and see if it can work at all.
 
The following users thanked this post: netdudeuk

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Op amp not working out as planned
« Reply #7 on: March 05, 2018, 03:56:03 pm »
The minimum supply for a 5532 dual opamp is 6V so with only 5V it might not do anything or will work poorly. If the second opamp is not disabled or used properly then it could cause oscillation interference to the first opamp.
Of course its input must be biased at half the supply voltage if it has a single positive supply.
 
The following users thanked this post: netdudeuk

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19519
  • Country: gb
  • 0999
Re: Op amp not working out as planned
« Reply #8 on: March 05, 2018, 04:25:25 pm »
Yes, the NJM5532 isn't specified to work below a total supply voltage of 6V.

You're also exceeding the common mode input voltage range. The NJM5532 is only specified to work when its inputs are within 3V of either voltage rail, worst case, 2V being typical.
https://www.njr.com/semicon/PDF/NJM5532_E.pdf

You could try the LM358, but beware it will have crossover distortion, unless its output always either sinks or sources current. A better option is an op-amp designed for 5V operation, with a rail-to-rail output, such as the MCP602.
http://ww1.microchip.com/downloads/en/DeviceDoc/21314g.pdf
 
The following users thanked this post: netdudeuk

Offline metrologist

  • Super Contributor
  • ***
  • Posts: 2207
  • Country: 00
Re: Op amp not working out as planned
« Reply #9 on: March 05, 2018, 05:02:16 pm »
Just because I had this set up already, I modeled this using an LT1078 op amp.
 
The following users thanked this post: netdudeuk

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #10 on: March 05, 2018, 05:22:57 pm »
Guys

Thanks for all the replies.

My circuit may not be there yet but I've learned plenty in the meantime.

Looking at the schematic though, I'm pretty sure that the Great Scott video used a 5v supply with that op amp.

I have some MCP602s so I'll try one of those.

 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11631
  • Country: my
  • reassessing directives...
Re: Op amp not working out as planned
« Reply #11 on: March 05, 2018, 05:36:49 pm »
Looking at the schematic though, I'm pretty sure that the Great Scott video used a 5v supply with that op amp.
I have some MCP602s so I'll try one of those.
no opamp in this world can produce 6V from 5V rail, let alone -6V in inverting amp as your setup that i missed to see.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #12 on: March 05, 2018, 05:55:40 pm »
Looking at the schematic though, I'm pretty sure that the Great Scott video used a 5v supply with that op amp.
I have some MCP602s so I'll try one of those.
no opamp in this world can produce 6V from 5V rail, let alone -6V in inverting amp as your setup that i missed to see.

If I get your meaning, I was just saying that he seems to have used a single 5v supply rail (which, according to Hero999,  isn't supported), not that he was getting 6V out.

 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: Op amp not working out as planned
« Reply #13 on: March 05, 2018, 06:16:03 pm »
Looking at the schematic though, I'm pretty sure that the Great Scott video used a 5v supply with that op amp.
Those op-amps will be a bit lethargic at 5V - they are not designed for such low supply voltages. Your signal amplitude will be limited - fortunately you do not need much amplitude for a mic signal, but you do need to bias the op-amp into its working range.

Quote
I have some MCP602s so I'll try one of those.
I think you are going to half-disappointed ;) Consider applying -100mV to the input and calculate the voltage at the output. Now repeat the exercise with +100mV at the input - it should be obvious why it's not going to work. 
 
The following users thanked this post: netdudeuk

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #14 on: April 04, 2018, 04:42:22 pm »
Hi

I've replaced the NJM5532 with a MCP602 (http://ww1.microchip.com/downloads/en/DeviceDoc/21314g.pdf) running at 5V with the non-inverting input biased to 2.5V with two 10k resistors.

This is a single rail (2.7V to 6V) device with Rail-to-Rail output.

Things seem to look better on the scope.  No clipping.

I have a 4.7k resistor on the input and a 5.1k resistor in the feedback loop.  I was expecting the gain to be 5.1/4.7 = 1.085106382978723

I'm assuming that the actual gain is ( Vpp (Output) /2 ) / (Vpp (Input) /2 )  i.e. 360/280 = 1.285714285714286

So, theory and practise don't match up.  I'm assuming that's it is probably my theory that's not right  :)

What's the situation here ?

Thanks

 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Op amp not working out as planned
« Reply #15 on: April 04, 2018, 05:16:59 pm »
1) your average input voltage is about 400mV dc.  The NI input of the amp is biased at 2.5Vdc.  So your output is close to the positive rail.  Is that what you want?
2) your resistors are not as precise as your calculator.  With 5% tolerance, you are not too far off if the scope is giving you accurate measurements.  Why not ac couple the output so that you can display it with the scope 200mV/div like the input? The scope might give a more accurate readout??

It is not good engineering to keep all of those extra digits in your calculation.  Two significant digits is all you have.
 
The following users thanked this post: netdudeuk

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Op amp not working out as planned
« Reply #16 on: April 04, 2018, 05:54:36 pm »
The NJM5532 is a Japanese copy of an American NE5532 so some of them might work when its supply is only 5V instead of the minimum of 6V.
If you want everything you make to work perfectly then use the original IC not a copy and use it with a supply voltage that is guaranteed to work.
 
The following users thanked this post: netdudeuk

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #17 on: April 04, 2018, 06:10:10 pm »
1) your average input voltage is about 400mV dc.  The NI input of the amp is biased at 2.5Vdc.  So your output is close to the positive rail.  Is that what you want?
2) your resistors are not as precise as your calculator.  With 5% tolerance, you are not too far off if the scope is giving you accurate measurements.  Why not ac couple the output so that you can display it with the scope 200mV/div like the input? The scope might give a more accurate readout??

It is not good engineering to keep all of those extra digits in your calculation.  Two significant digits is all you have.

My resistors are from China so 5% is being optimistic ;)  Actually, I measured them previously and got 4.67k and 5.1k.

Here's what we have with AC coupling on the output.

 

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #18 on: April 04, 2018, 06:11:01 pm »
The NJM5532 is a Japanese copy of an American NE5532 so some of them might work when its supply is only 5V instead of the minimum of 6V.
If you want everything you make to work perfectly then use the original IC not a copy and use it with a supply voltage that is guaranteed to work.

That's the original IC that I ditched thanks.  However, it did come from RS so will be genuine.
« Last Edit: April 04, 2018, 06:36:52 pm by netdudeuk »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Op amp not working out as planned
« Reply #19 on: April 04, 2018, 08:55:55 pm »
1) your average input voltage is about 400mV dc.  The NI input of the amp is biased at 2.5Vdc.  So your output is close to the positive rail.  Is that what you want?
2) your resistors are not as precise as your calculator.  With 5% tolerance, you are not too far off if the scope is giving you accurate measurements.  Why not ac couple the output so that you can display it with the scope 200mV/div like the input? The scope might give a more accurate readout??

It is not good engineering to keep all of those extra digits in your calculation.  Two significant digits is all you have.

My resistors are from China so 5% is being optimistic ;)  Actually, I measured them previously and got 4.67k and 5.1k.

Here's what we have with AC coupling on the output.
Move your NI voltage from 2.5 to 1.5 and run it again just to see if the distortion goes away
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Op amp not working out as planned
« Reply #20 on: April 04, 2018, 10:06:20 pm »
I've replaced the NJM5532 with a MCP602 (http://ww1.microchip.com/downloads/en/DeviceDoc/21314g.pdf) running at 5V with the non-inverting input biased to 2.5V with two 10k resistors.

Biasing the +Ve input to 2.5V only makes sense if the signal is AC coupled to the 4k7 by adding a cap in series with it, at 100kHz a 0.1uF will do.
.  That took much longer than I thought it would.
 
The following users thanked this post: netdudeuk, Wimberleytech

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #21 on: April 05, 2018, 08:36:15 am »
Thanks for all the replies so far.

My original plan was to take the AD9833 DDS Signal Generator module and make a basic lab instrument with it.

I believe that I need to boost the output to a more useful level so decided to use an op amp to do that.

I'm now using the MCP602 op amp to do that at the moment but I'd probably like to end up with a range up to about 10Vdc.  So, that would need a different single supply rail to rail op amp.

The has an output frequency range of 0 MHz to 12.5 MHz and I'd want to be able to get all or most of that range out of it.

 

Offline Paul Moir

  • Frequent Contributor
  • **
  • Posts: 926
  • Country: ca
Re: Op amp not working out as planned
« Reply #22 on: April 05, 2018, 08:50:58 am »
You won't be able to get a 10v signal out of an opamp with a 6v max supply like the MCP602.  You would need more than a 10V supply because even "rail to rail" opamps get a little flaky in their performance near their supply rails.

Start by making a nice +15v/-15v supply for your opamp and use ones that will work with it.  Just an LM7815 + LM7915 will work very well.  Then start experimenting with opamps that work within it.  Your project is ambitious and it will grow a bit (eg, you'll want an offset control eventually) but you stand to learn quite a lot from it.

EDIT:  Maybe just a +12v/-12v would be better and give you a wider range of opamps.  Other's thoughts?
 
The following users thanked this post: netdudeuk

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #23 on: April 05, 2018, 09:00:53 am »
You won't be able to get a 10v signal out of an opamp with a 6v max supply like the MCP602.  You would need more than a 10V supply because even "rail to rail" opamps get a little flaky in their performance near their supply rails.

Start by making a nice +15v/-15v supply for your opamp and use ones that will work with it.  Just an LM7815 + LM7915 will work very well.  Then start experimenting with opamps that work within it.  Your project is ambitious and it will grow a bit (eg, you'll want an offset control eventually) but you stand to learn quite a lot from it.

EDIT:  Maybe just a +12v/-12v would be better and give you a wider range of opamps.  Other's thoughts?

Thanks for the reply.

I did mention in the previous post that the MCP602 would be no good for 10V and that I would need a different op amp.  Any suggestions please ?

I have a DP832 so I could supply the +15V/-15V with no issues although that would be two out of the three rails leaving me with only a 5V rail.

Single rail still seems easier, especially as I could get up to 15V from the DP832 as a starting point.

Learning is an objective.  I've already learned plenty from the project.

 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19519
  • Country: gb
  • 0999
Re: Op amp not working out as planned
« Reply #24 on: April 05, 2018, 10:42:28 am »
A bipolar power supply is probably easier, as there's no AC coupling to worry about.

Start from the beginning.

What peak input voltage and output voltages do you require? That will let you work out the gain, required bandwidth and slew rate.

What load is this going to be driving? Is it going to be via a long cable? If so, the load impedance, will have to match, the characteristic impedance of the cable.
https://en.wikipedia.org/wiki/Characteristic_impedance

Going from what you've said, you need a fairly fast op-amp. A 12.5MHz sine wave, with a peak voltage of 5V (10V peak to peak) is a slew rate of 392.75V/µs (see link below), and if you want a gain of two, you need a gain bandwidth product of more than double the maximum frequency.
http://www.radio-electronics.com/info/circuits/opamp_basics/operational-amplifier-slew-rate.php

I'd suggest a video amplifier IC, as a suitable op-amp won't be cheap. This is not a simple project. Careful attention needs to be given to layout, otherwise there will be problems with instability and oscillation.
 
The following users thanked this post: netdudeuk

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #25 on: April 05, 2018, 11:10:47 am »

The AD9833 has a VOUT Maximum of 0.65V and a VOUT Minimum of 38mV.

So, that's the peak input voltage.

Regarding the peak output voltage, here are the specifications for a branded budget 5MHz arbitrary function generator -

2mVpp~10Vpp (50?, ?10MHz)
4mVpp~20Vpp (high impedance, ?10MHz)

So, maybe something along these lines (Vpp and maximum frequency) looks sensible for my purpose, which is to have a signal generator to experiment with op amps (which I'm now actually doing), filters, etc ?

I'll not be putting the signal down long cables.

I understand that I'm going to have to put in more volts in if I want more volts out.

Thanks
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Op amp not working out as planned
« Reply #26 on: April 05, 2018, 07:40:58 pm »
The AD9833 has a VOUT Maximum of 0.65V and a VOUT Minimum of 38mV.

Yep, it outputs a constant amplitude sine, triangle or square. But with only 25M samples per second I think any wave over 1MHz is going to be quite rough, and 12.5MHz not really possible other than just a 12.5MHz square, unless I've missed something!
http://www.analog.com/media/en/technical-documentation/data-sheets/AD9833.pdf

Have you scoped the AD933's 38-650mV output directly to see what a ~1MHz+ sine, triangle and square look like?

I wouldn't know where to go from here in producing a variable amplitude, variable offset output, but you could get the AD9833's output to a 0V centered 1.25Vpp with something like this.

.  That took much longer than I thought it would.
 
The following users thanked this post: netdudeuk

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19519
  • Country: gb
  • 0999
Re: Op amp not working out as planned
« Reply #27 on: April 05, 2018, 08:02:57 pm »
The AD9833 has a VOUT Maximum of 0.65V and a VOUT Minimum of 38mV.

Yep, it outputs a constant amplitude sine, triangle or square. But with only 25M samples per second I think any wave over 1MHz is going to be quite rough, and 12.5MHz not really possible other than just a 12.5MHz square, unless I've missed something!
http://www.analog.com/media/en/technical-documentation/data-sheets/AD9833.pdf
Yes you have missed something: an anti-aliasing filter will theoretically give a pure sine wave, right up to half the sampling frequency. In practise, you'll probably be limited to less than half the sample rate, but it should be possible to get a much higher frequency, than 1MHz and still have a decent sine wave.

The problem will be the triangle wave and other arbitrary wave shapes, assuming this IC can do that, but I haven't chekted the data sheet.
 
The following users thanked this post: netdudeuk

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Op amp not working out as planned
« Reply #28 on: April 05, 2018, 08:30:16 pm »
"The problem will be the triangle wave and other arbitrary wave shapes"

It only does fixed amplitude 10 bit sine, triangle, and square, with a 28 bit word to set the frequency.
I love the way the data sheet keeps saying "No other components necessary". :-DD
« Last Edit: April 05, 2018, 08:34:02 pm by StillTrying »
.  That took much longer than I thought it would.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Op amp not working out as planned
« Reply #29 on: April 05, 2018, 08:40:50 pm »
At least to start with use a bipolar supply, you can work on making a single rail version after you have it working properly. Even a pair of 9V batteries can work quite well, op-amps typically draw very little current so you should be able to run it for a long time. Building a simple bench supply is another classic beginner project, it's hard to have too many power supplies.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Op amp not working out as planned
« Reply #30 on: April 05, 2018, 08:48:02 pm »
Quote
Yes you have missed something: an anti-aliasing filter will theoretically give a pure sine wave, right up to half the sampling frequency. In practise, you'll probably be limited to less than half the sample rate, but it should be possible to get a much higher frequency, than 1MHz and still have a decent sine wave.


Did you mean "smoothing filter," and more specifically a "brick wall smoothing filter" would be the only way to get a pure sine up to half the sampling frequency?
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Op amp not working out as planned
« Reply #31 on: April 06, 2018, 12:43:10 am »
Here's another +/- 12V version. Simply driving the top end R1 in the above schem. with -1V to +8V allows for the 1.2Vpp output to be offset all -Ve, all +Ve or centered on 0V of course, which looks like that.

Amplitude is still fixed at 1.2Vpp, until someone comes up with a good simple idea. :)

LT .asc if someone wants to play with it.
.  That took much longer than I thought it would.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19519
  • Country: gb
  • 0999
Re: Op amp not working out as planned
« Reply #32 on: April 06, 2018, 10:57:38 pm »
Here's another +/- 12V version. Simply driving the top end R1 in the above schem. with -1V to +8V allows for the 1.2Vpp output to be offset all -Ve, all +Ve or centered on 0V of course, which looks like that.

Amplitude is still fixed at 1.2Vpp, until someone comes up with a good simple idea. :)

LT .asc if someone wants to play with it.
Unfortunately the LT1022 is unsuitable for this application. It's over an order of magnitude too slow. Try a faster amplifier such as the AD818.


The AD9833 has a VOUT Maximum of 0.65V and a VOUT Minimum of 38mV.

So, that's the peak input voltage.

Regarding the peak output voltage, here are the specifications for a branded budget 5MHz arbitrary function generator -

2mVpp~10Vpp (50?, ?10MHz)
4mVpp~20Vpp (high impedance, ?10MHz)

So, maybe something along these lines (Vpp and maximum frequency) looks sensible for my purpose, which is to have a signal generator to experiment with op amps (which I'm now actually doing), filters, etc ?

I'll not be putting the signal down long cables.

I understand that I'm going to have to put in more volts in if I want more volts out.

Thanks

What's your budget?

High speed amplifier ICs aren't cheap, especially ones suitable for running off the higher supply voltages required to give 20Vpp. The AD818 I just mentioned above seems to be the best value for money and meets your specification.

You'll need an anti-aliasing filter. I think a passive, LRC design might be the best option here, as it's tricky to design an active filter at these frequencies.
 
The following users thanked this post: netdudeuk

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #33 on: April 26, 2018, 12:16:38 pm »
Here's another +/- 12V version. Simply driving the top end R1 in the above schem. with -1V to +8V allows for the 1.2Vpp output to be offset all -Ve, all +Ve or centered on 0V of course, which looks like that.

Amplitude is still fixed at 1.2Vpp, until someone comes up with a good simple idea. :)

LT .asc if someone wants to play with it.
Unfortunately the LT1022 is unsuitable for this application. It's over an order of magnitude too slow. Try a faster amplifier such as the AD818.


The AD9833 has a VOUT Maximum of 0.65V and a VOUT Minimum of 38mV.

So, that's the peak input voltage.

Regarding the peak output voltage, here are the specifications for a branded budget 5MHz arbitrary function generator -

2mVpp~10Vpp (50?, ?10MHz)
4mVpp~20Vpp (high impedance, ?10MHz)

So, maybe something along these lines (Vpp and maximum frequency) looks sensible for my purpose, which is to have a signal generator to experiment with op amps (which I'm now actually doing), filters, etc ?

I'll not be putting the signal down long cables.

I understand that I'm going to have to put in more volts in if I want more volts out.

Thanks

What's your budget?

High speed amplifier ICs aren't cheap, especially ones suitable for running off the higher supply voltages required to give 20Vpp. The AD818 I just mentioned above seems to be the best value for money and meets your specification.

You'll need an anti-aliasing filter. I think a passive, LRC design might be the best option here, as it's tricky to design an active filter at these frequencies.

I've ordered a AD818 thanks.
 

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #34 on: June 07, 2018, 06:00:30 pm »
I have the AD818 but TBH, I'm not sure to hook it up for this application.

Here's the data sheet -

http://www.analog.com/media/en/technical-documentation/data-sheets/AD818.pdf

Also, the data sheet states (gain ≥ 2, or gain ≤ –1).  Is this really the limit of how much it can boost the signal from the AD9833 ?

Thanks

 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19519
  • Country: gb
  • 0999
Re: Op amp not working out as planned
« Reply #35 on: June 07, 2018, 07:19:31 pm »
I have the AD818 but TBH, I'm not sure to hook it up for this application.

Here's the data sheet -

http://www.analog.com/media/en/technical-documentation/data-sheets/AD818.pdf

Also, the data sheet states (gain ≥ 2, or gain ≤ –1).  Is this really the limit of how much it can boost the signal from the AD9833 ?

Thanks
No, those are the minimum gains before it can become unstable and oscillate: ≥ means greater than or equal to and ≤ means less than or equal to.

This is very common on faster op-amps. Look at the OP37 datasheet, for example: it says gains >5.
http://www.analog.com/media/en/technical-documentation/data-sheets/OP37.pdf
« Last Edit: June 07, 2018, 07:21:30 pm by Hero999 »
 
The following users thanked this post: netdudeuk

Offline jmelson

  • Super Contributor
  • ***
  • Posts: 2765
  • Country: us
Re: Op amp not working out as planned
« Reply #36 on: June 07, 2018, 07:23:22 pm »
Assuming the first scope trace is the output from the DDS chip, that is 600 mV peak to peak.  Your resistors program the op amp to have a gain of 11.  So, you are expecting to get an output of 6.6 V P-P from a 5V power supply.  Clearly, it will HAVE to clip.

Jon
 

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #37 on: June 08, 2018, 09:27:08 am »
I have the AD818 but TBH, I'm not sure to hook it up for this application.

Here's the data sheet -

http://www.analog.com/media/en/technical-documentation/data-sheets/AD818.pdf

Also, the data sheet states (gain ≥ 2, or gain ≤ –1).  Is this really the limit of how much it can boost the signal from the AD9833 ?

Thanks
No, those are the minimum gains before it can become unstable and oscillate: ≥ means greater than or equal to and ≤ means less than or equal to.

This is very common on faster op-amps. Look at the OP37 datasheet, for example: it says gains >5.
http://www.analog.com/media/en/technical-documentation/data-sheets/OP37.pdf

Thanks.  Can I just use this in an inverting amplifier configuration like I did with the previous ones, using the same two resistor calculation to get the desired gain ?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19519
  • Country: gb
  • 0999
Re: Op amp not working out as planned
« Reply #38 on: June 08, 2018, 11:14:04 am »
Quote
Yes you have missed something: an anti-aliasing filter will theoretically give a pure sine wave, right up to half the sampling frequency. In practise, you'll probably be limited to less than half the sample rate, but it should be possible to get a much higher frequency, than 1MHz and still have a decent sine wave.


Did you mean "smoothing filter," and more specifically a "brick wall smoothing filter" would be the only way to get a pure sine up to half the sampling frequency?
Yes, you're right, I was talking about a brick wall filter, which is the only way to get a sine wave, up to half the sample rate. Unfortunately, it's useless for other wave shapes.

I have the AD818 but TBH, I'm not sure to hook it up for this application.

Here's the data sheet -

http://www.analog.com/media/en/technical-documentation/data-sheets/AD818.pdf

Also, the data sheet states (gain ≥ 2, or gain ≤ –1).  Is this really the limit of how much it can boost the signal from the AD9833 ?

Thanks
No, those are the minimum gains before it can become unstable and oscillate: ≥ means greater than or equal to and ≤ means less than or equal to.

This is very common on faster op-amps. Look at the OP37 datasheet, for example: it says gains >5.
http://www.analog.com/media/en/technical-documentation/data-sheets/OP37.pdf

Thanks.  Can I just use this in an inverting amplifier configuration like I did with the previous ones, using the same two resistor calculation to get the desired gain ?
Remind me which resistor values are you planning to use? A few schematics have been posted and I don't know which one you're referring to.

That op-amp should be fine for gains greater than 2, as long as the resistor values aren't too high. The bias current of that op-amp is fairly high, so high resistor values will cause it output DC point to drift significantly. High resistor values will also slow it down, as there it will take longer to charge/discharge the parasitic capacitances.

 
The following users thanked this post: netdudeuk

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #39 on: June 08, 2018, 11:30:12 am »
Quote
Yes you have missed something: an anti-aliasing filter will theoretically give a pure sine wave, right up to half the sampling frequency. In practise, you'll probably be limited to less than half the sample rate, but it should be possible to get a much higher frequency, than 1MHz and still have a decent sine wave.


Did you mean "smoothing filter," and more specifically a "brick wall smoothing filter" would be the only way to get a pure sine up to half the sampling frequency?
Yes, you're right, I was talking about a brick wall filter, which is the only way to get a sine wave, up to half the sample rate. Unfortunately, it's useless for other wave shapes.

I have the AD818 but TBH, I'm not sure to hook it up for this application.

Here's the data sheet -

http://www.analog.com/media/en/technical-documentation/data-sheets/AD818.pdf

Also, the data sheet states (gain ≥ 2, or gain ≤ –1).  Is this really the limit of how much it can boost the signal from the AD9833 ?

Thanks
No, those are the minimum gains before it can become unstable and oscillate: ≥ means greater than or equal to and ≤ means less than or equal to.

This is very common on faster op-amps. Look at the OP37 datasheet, for example: it says gains >5.
http://www.analog.com/media/en/technical-documentation/data-sheets/OP37.pdf

Thanks.  Can I just use this in an inverting amplifier configuration like I did with the previous ones, using the same two resistor calculation to get the desired gain ?
Remind me which resistor values are you planning to use? A few schematics have been posted and I don't know which one you're referring to.

That op-amp should be fine for gains greater than 2, as long as the resistor values aren't too high. The bias current of that op-amp is fairly high, so high resistor values will cause it output DC point to drift significantly. High resistor values will also slow it down, as there it will take longer to charge/discharge the parasitic capacitances.

The very first one right at the top of the post.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19519
  • Country: gb
  • 0999
Re: Op amp not working out as planned
« Reply #40 on: June 08, 2018, 12:10:23 pm »
Quote
Yes you have missed something: an anti-aliasing filter will theoretically give a pure sine wave, right up to half the sampling frequency. In practise, you'll probably be limited to less than half the sample rate, but it should be possible to get a much higher frequency, than 1MHz and still have a decent sine wave.


Did you mean "smoothing filter," and more specifically a "brick wall smoothing filter" would be the only way to get a pure sine up to half the sampling frequency?
Yes, you're right, I was talking about a brick wall filter, which is the only way to get a sine wave, up to half the sample rate. Unfortunately, it's useless for other wave shapes.

I have the AD818 but TBH, I'm not sure to hook it up for this application.

Here's the data sheet -

http://www.analog.com/media/en/technical-documentation/data-sheets/AD818.pdf

Also, the data sheet states (gain ≥ 2, or gain ≤ –1).  Is this really the limit of how much it can boost the signal from the AD9833 ?

Thanks
No, those are the minimum gains before it can become unstable and oscillate: ≥ means greater than or equal to and ≤ means less than or equal to.

This is very common on faster op-amps. Look at the OP37 datasheet, for example: it says gains >5.
http://www.analog.com/media/en/technical-documentation/data-sheets/OP37.pdf

Thanks.  Can I just use this in an inverting amplifier configuration like I did with the previous ones, using the same two resistor calculation to get the desired gain ?
Remind me which resistor values are you planning to use? A few schematics have been posted and I don't know which one you're referring to.

That op-amp should be fine for gains greater than 2, as long as the resistor values aren't too high. The bias current of that op-amp is fairly high, so high resistor values will cause it output DC point to drift significantly. High resistor values will also slow it down, as there it will take longer to charge/discharge the parasitic capacitances.

The very first one right at the top of the post.
So your original schematic?


I advise reducing them by a factor of ten: RIN = 1k, RF = 10k.

The advice previously given, regarding a dual power supply and output switch is still relevant: a dual 5V or single 10V power supply is essential with 600mVpp in and a gain of 10.
« Last Edit: June 08, 2018, 12:13:10 pm by Hero999 »
 

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #41 on: June 10, 2018, 04:32:50 pm »
So, no success, with virtually nothing on the output of the op amp.

I've checked the wiring several times and it looks ok.

RIN = 1k, RF = 10k
Non inverting input is biased to 5v
5v supply for the DDS and Arduino
10v supply for the AD818
Common ground

What could be causing this ?

Thanks

 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Op amp not working out as planned
« Reply #42 on: June 10, 2018, 05:03:38 pm »
You did not use a series input capacitor so its input DC voltage is amplified and causes its output to be close to 0V all the time.
 

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #43 on: June 11, 2018, 12:06:52 pm »
I added a series input capacitor and amended RF to 2K.  So, the gain should be 2.

However, the scope traces still don't look right (especially as it isn't inverting).

Either there is still something wrong with the circuit or I'm measuring it wrong  |O

 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19519
  • Country: gb
  • 0999
Re: Op amp not working out as planned
« Reply #44 on: June 12, 2018, 01:06:24 pm »
I added a series input capacitor and amended RF to 2K.  So, the gain should be 2.

However, the scope traces still don't look right (especially as it isn't inverting).

Either there is still something wrong with the circuit or I'm measuring it wrong  |O
That doesn't look right. Which trace is which? Where is the 'scope's 0V connection going to?

Please post a complete schematic and a photograph, showing how it's physically connected up.
 

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #45 on: June 12, 2018, 01:12:30 pm »
I added a series input capacitor and amended RF to 2K.  So, the gain should be 2.

However, the scope traces still don't look right (especially as it isn't inverting).

Either there is still something wrong with the circuit or I'm measuring it wrong  |O
That doesn't look right. Which trace is which? Where is the 'scope's 0V connection going to?

Please post a complete schematic and a photograph, showing how it's physically connected up.

The yellow trace is connected to the output of the DDS before the series input capacitor.  The blue trace is the output of the op amp.

So, yes, it doesn't look right.

The scope grounds, the ground for the 5 volt supply (Rigol DP832) and the ground for the 10 volt supply (the same DP832) are all connected together.

I'll need to get a photo and a schematic later.

Thanks
 

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #46 on: June 12, 2018, 04:18:17 pm »
Schematic and setup photos.

Thanks
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19519
  • Country: gb
  • 0999
Re: Op amp not working out as planned
« Reply #47 on: June 13, 2018, 05:43:21 pm »
Schematic and setup photos.

Thanks
That circuit looks fine.

Such a high speed op-amp shouldn't be used on breadboard, but it doesn't appear to be oscillating. If all the connections are good, then I'd suspect it's the op-amp. Can you change the op-amp for the TL071 or TL081?

If not, you could try the old '741 but the frequency would need to be lowered to 10kHz and a larger DC blocking capacitor used: try 1μF.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Op amp not working out as planned
« Reply #48 on: June 13, 2018, 11:10:09 pm »
The op amp might have more gain if you connected pin 4 to 0V. :)
.  That took much longer than I thought it would.
 
The following users thanked this post: netdudeuk

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #49 on: June 18, 2018, 03:33:47 pm »
The op amp might have more gain if you connected pin 4 to 0V. :)

It is working somewhat better now thanks  :)

I wanted to create an adjustable offset on the output so I connected the non inverting input to another rail on my PSU instead of the 5V.  The ground for this was connected to all the others.

However, if I dialled in anything more than a few hundred mV, I had what I'm guessing we'd describe as unwanted oscillation.  The basic sine wave was still there but rather than a line that traced the rise and fall of the signal, think of it as a many columned bar graph where the numbers followed the sine wave.  I don't have access to the equipment at the moment but hopefully it is clear what I mean.

Why would this be ?

Thanks again.

 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Op amp not working out as planned
« Reply #50 on: June 21, 2018, 06:37:54 am »
With a 100MHz op amp on a bread board with long leads I'm surprised you're getting anything other than oscillation!

100nF directly across it's supply pins 4,7, I'd be tempted to solder it on top of the carrier.
Replace some of the long breadboard leads with short 1 core wires.
Apply the +ve input adjust voltage through a ~4k7 resistor, and with a 100n to 1u cap between the +ve input and 0V. With a gain of -2 the voltage on the +ve input will only be adjustable between about 3V and 8V before the output clips at it's limits.
.  That took much longer than I thought it would.
 
The following users thanked this post: netdudeuk

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: Op amp not working out as planned
« Reply #51 on: April 15, 2019, 04:04:46 pm »
I've had some time away from this project but I'm back on it  ;)

I've set up a split rail supply for the op amp along with the 5v for the DDS and microcontroller.

There's an analogue ground from the DDS along with the digital one.  I guess the former is the right one to use.

The question is though, as the DDS and microcontroller have their own common 0v / ground line and the op amp doesn't, how do I connect this side of things to the op amp ?  And similarly, the op amp has an output but where's the equivalent 'ground reference' ?

I'd like to use the DS1054Z to show me the input and output traces to confirm operation.  While the scope ground on the input channel will connect ok to the DDS / microcontroller 'digital ground', I don't want to blow something up but putting the scope ground on the output channel to the wrong potential and cause a short.

Please forgive any bad terminology.

Thanks
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Op amp not working out as planned
« Reply #52 on: April 15, 2019, 07:45:14 pm »
The question is though, as the DDS and microcontroller have their own common 0v / ground line and the op amp doesn't, how do I connect this side of things to the op amp ?  And similarly, the op amp has an output but where's the equivalent 'ground reference' ?

I haven't kept up the various op amps and power supplies so this may be completely wrong...

The center point of your +-15V power supplies is ground.  If you ground both op amp inputs to this point, you should measure an output voltage of 0V relative to this ground.  In any event, you should have one supply that measures +15V to ground and the other measures -15V to ground.  This being the case, the output of the op amp can swing above and below ground.  How close the output can get to the rails is a datasheet issue.

Your other grounds should connect to this ground reference including your 5V supply, your single ended DDS gadget and your scope ground.

With dual supplies it's pretty easy to figure out where ground is.  In the case of single supplies, we have to create a virtual ground at 1/2 the rail voltage and somehow connect all the other grounds to that point.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf