Author Topic: Circuit stopped working when I swapped op amp  (Read 1066 times)

0 Members and 1 Guest are viewing this topic.

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1017
  • Country: gb
Circuit stopped working when I swapped op amp
« on: May 20, 2022, 12:13:14 am »
I've got a peak detector circuit based on:

https://www.electronics-tutorial.net/wp-content/uploads/2015/09/Peak_D2.png

it worked fine with an MCP6024, when a 100KHz sine signal (+/- voltage about 2.5V) was fed in it outputted the max peak height as DC voltage level, but I've tried swapping to an MCP6004 now, and it has completely stopped working. With the 6004 the output stays at 2.5V constantly, however large or small the incoming sine wave's amplitude gets.

It isn't a dead chip, I've tried with several MCP6004s.

And it isn;t an error in the circuit layout, the 6004 and 6024 are fully pin compatible so I've levered one out of a breadboard setup and put the other in, when a 6024 goes in it works, when a 6004 goes in all I get is a constant voltage.

My input resistor is 19K, the feedback resistor is 27K for some slight amplification, the diode is 1n4148, the capacitor is 100Nf and the timing resistor 10K. The op amp is powered with about 4.8V (5V but some losses in breadboard wires) and gnd.

Any thoughts?

Thanks

« Last Edit: May 20, 2022, 12:28:26 am by Infraviolet »
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3036
  • Country: us
Re: Circuit stopped working when I swapped op amp
« Reply #1 on: May 20, 2022, 12:53:47 am »
Couple of things to note:

1.
Quote
My input resistor is 19K, the feedback resistor is 27K for some slight amplification, ...

There is no amplification in this circuit.

2. If you have any unused op amps you should read this thread:

https://www.eevblog.com/forum/beginners/should-spare-op-amp-connections-be-left-floating-or-tied-to-ground/msg4180723/#msg4180723

3. The MC6004 datasheet has a section on designing a peak detector. In particular, the relatively low slew rate of the device (0.6V/us) has to be taken in consideration.

MC6004 datasheet:

https://ww1.microchip.com/downloads/aemDocuments/documents/MSLD/ProductDocuments/DataSheets/MCP6001-1R-1U-2-4-1-MHz-Low-Power-Op-Amp-DS20001733L.pdf

By contrast, the MC6024 has a slew rate of 7V/us.

MC6024 datasheet:

https://ww1.microchip.com/downloads/en/DeviceDoc/20001685E.pdf

4. The MC6024 datasheet says the op-amp is "unity gain stable" but that doesn't appear on the MC6004 datasheet. In any case, read the section in both datasheets on "Capacitive Loads".
« Last Edit: May 20, 2022, 12:57:29 am by ledtester »
 
The following users thanked this post: rstofer

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1017
  • Country: gb
Re: Circuit stopped working when I swapped op amp
« Reply #2 on: May 20, 2022, 09:09:34 am »
1. Ok, thanks for alerting me to that.

2. I do have op amps in the same package floating, but that makes things a bit noisier to my understanding, it shouldn't prevent one op amp on the package from doing any outputting at all? And I was getting away with floating op amps when it was an MCP6024, so why wouldn't the 6004 like this?

3.For a 100KHz wave of about 1V maximum amplitude I should be within the 0.6V/uS slew rate, and surely if I wasn't then I'd just have a bit slower a response to changes in signal amplitude, not a constant fixed output?

4.Wouldn't a lack of unity gain stabilty just put some slight oscillations on to the output dc waveform, and some ugly transients as it changes when the amplitude of the input wave rises or falls? I did spot the section on capacitive loads, but placing an appropriate resistor between the op amp's output and the diode's input didn't help at all, the MCP6024 still works when I do this, but the 6004 doesn't.

Thanks
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1017
  • Country: gb
Re: Circuit stopped working when I swapped op amp
« Reply #3 on: May 20, 2022, 09:25:52 pm »
I'm really at a loss to explain why this simple circuit won't work with a different op amp used, but I've also noticed, which might be relevant, that the 6004 also doesn't work too well on another separate op amp task either, when used elsewhere (and as a separate chip, not a shared one in the same package) to provide an extremely strong bandpass amplification. The amplification in question turns out to be several times less than when using a 6024 is the same role.

So it is looking like I need to pick a different op amp, the 6024 is perfect but it isn't available in the form factor I need for the final design that this breadboarding work is in aid of. Is there anything I can get in SOIC which has not got lead times of several months and worse, with the same pin arrangement as the MCP6024 but which would work a lot more like it than the 6004 does?
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1017
  • Country: gb
Re: Circuit stopped working when I swapped op amp
« Reply #4 on: May 21, 2022, 01:01:36 pm »
Would the MCP6294 be cross compatible with my use case of a 6024? The main difference I spot is the 6294 is marketed as "general purpose" where the 6024 which works is caleld "precision". Those are avalable, however minimum purchase quantity is 10 and at present chip crisis prices plus shipping that comes to spending rather a lot on something for which I wouldn't know whether or not it would work. Especially problematic as I'd have to buy twice if they did work, one lot of more DIP chips than I needed to prototype with and then another lot of more SOIC chips than I'm needing if they did work so I could then use them on the PCB I'm designing (which has to go in a pretty tight space).
 

Offline CMTan

  • Contributor
  • Posts: 34
  • Country: sg
Re: Circuit stopped working when I swapped op amp
« Reply #5 on: May 23, 2022, 06:35:50 am »
I think you have stepped into typical problem of this type of peak detector.

In the positive half cycle the OP amp works as expected, but in the negative half cycle, the OP amp actually goes into negative saturation making the diode reverse biased.  This negative saturation is problem if you do not select the right op amp.  Typically, when a OP amp goes into saturation (negative or positive), it takes a much much longer time for the OP amp to recover back to normal operation.  Some OP amp just does not recover.

If you try to reduce the frequency to say 10Khz, you might get the peak detector working with MCP6004.  Unfortunately, this is not always mentioned in the OP specification.  Try to use a another peak detector design.  This is one of the problem with this simple peak detector.  Typically for these type of design, you need a high speed OP (a few order faster than the highest freq) to get this to work, so that the recovery time is still within the response time of you max operating frequency.

If you look at the bandwidth for MCP6024, it is 10Mhz, but for MCP6002, its only 1Mhz.  You might think that 1Mhz should be able to handle 100Khz signal, but no, the recovery is much longer than the response time of the system.  When that happen, the the capacitor is charged but never discharge resulting in you observed when the IC is changed.
« Last Edit: May 23, 2022, 07:08:25 am by CMTan »
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 6779
  • Country: pl
Re: Circuit stopped working when I swapped op amp
« Reply #6 on: May 23, 2022, 08:30:32 am »
This is a good observation.

Another problem is slew rate. On negative half-cycles, the output slews towards ground. If it manages to get all the way to ground, a positive half-cycle lasts only 5µs and the output can only slew up to 3V before another negative half-cycle begins.

Testing at 10kHz is a good idea. You would need a scope to really see what's going on at 100kHz.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19525
  • Country: gb
  • 0999
Re: Circuit stopped working when I swapped op amp
« Reply #7 on: May 23, 2022, 08:46:10 am »
Add another op-amp.
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1017
  • Country: gb
Re: Circuit stopped working when I swapped op amp
« Reply #8 on: May 23, 2022, 08:59:19 am »
CMTan, thank you, very helpful.

Is this sort of recovery time typically publicised in datasheets, or is this one of those hihgly variable properties which manufacturers try to avoid making any promises about.

magic, thank you, the input wave never has quite such an amplitude so as to go all the way to ground. I have been using a scope to observe what is going on, but couldn't make much sense of what I was seeing before given today's advice. I can test the principle at 10KHz, but will have to find an op amp with speed comparable to the mcp6024 for the final design, it does have to be at close to 100KHz.

Zero999, any alternative designs which still feature just one op amp? I'm very constrained for board space (mdimensions of where the finished thing must go in to) and am using quad op amp packages, I have enough room for everything involved in the whole circuit if I dedicate one op amp in a package to this process, but daren't add extra op amp packages of any sort. I'm breadboarding now, but it is all in aid of having a design to go on a very small PCB later.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6203
  • Country: ro
Re: Circuit stopped working when I swapped op amp
« Reply #9 on: May 23, 2022, 09:04:13 am »
See if any of these helps:


Online Zero999

  • Super Contributor
  • ***
  • Posts: 19525
  • Country: gb
  • 0999
Re: Circuit stopped working when I swapped op amp
« Reply #10 on: May 23, 2022, 10:39:00 am »
CMTan, thank you, very helpful.

Is this sort of recovery time typically publicised in datasheets, or is this one of those hihgly variable properties which manufacturers try to avoid making any promises about.

magic, thank you, the input wave never has quite such an amplitude so as to go all the way to ground. I have been using a scope to observe what is going on, but couldn't make much sense of what I was seeing before given today's advice. I can test the principle at 10KHz, but will have to find an op amp with speed comparable to the mcp6024 for the final design, it does have to be at close to 100KHz.

Zero999, any alternative designs which still feature just one op amp? I'm very constrained for board space (mdimensions of where the finished thing must go in to) and am using quad op amp packages, I have enough room for everything involved in the whole circuit if I dedicate one op amp in a package to this process, but daren't add extra op amp packages of any sort. I'm breadboarding now, but it is all in aid of having a design to go on a very small PCB later.

Try this, but don't expect great performance at 100kHz.
« Last Edit: May 23, 2022, 10:55:37 am by Zero999 »
 

Offline CMTan

  • Contributor
  • Posts: 34
  • Country: sg
Re: Circuit stopped working when I swapped op amp
« Reply #11 on: May 23, 2022, 04:56:15 pm »
CMTan, thank you, very helpful.

Is this sort of recovery time typically publicised in datasheets, or is this one of those hihgly variable properties which manufacturers try to avoid making any promises about.

magic, thank you, the input wave never has quite such an amplitude so as to go all the way to ground. I have been using a scope to observe what is going on, but couldn't make much sense of what I was seeing before given today's advice. I can test the principle at 10KHz, but will have to find an op amp with speed comparable to the mcp6024 for the final design, it does have to be at close to 100KHz.

Zero999, any alternative designs which still feature just one op amp? I'm very constrained for board space (mdimensions of where the finished thing must go in to) and am using quad op amp packages, I have enough room for everything involved in the whole circuit if I dedicate one op amp in a package to this process, but daren't add extra op amp packages of any sort. I'm breadboarding now, but it is all in aid of having a design to go on a very small PCB later.

Unfortunately, I have not seen it in OP specification on the time taken to get out of saturation.  However, there is one indication for MCP6004 that it should work at lower frequency.  Refer to datasheet at Fig 2.21.  It says "show no phase reversal", so the OP amp should not lock up or misbehave under saturated condition, it just take more time to get back to normal.  Some OP will indicate that phase reversal can happen, and I am not sure if every manufacturer mention it even if they know it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf