1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Precision Rectifier...what's going on here?

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by Rich D., Mar 22, 2016.

  1. Rich D.

    Rich D. Member

    Joined:
    Feb 3, 2014
    Messages:
    203
    Likes:
    15
    Location:
    West Chester, PA
    Hi smart guys!

    I am trying to breadboard a precision rectifier. It's end use is in an audio circuit, to drive a bar graph level meter. I have all the audio working fine, but for some reason I am continued to be stalled on this $%^&* rectifier circuit. See attached schematic.

    What is puzzling is me is: I am using a Schottky diode in an op-amp feedback path. I am driving it with a 12-volt pk-pk sine wave signal at 2KHz, so I see both + and - 6 volt peaks on the input relative to ground. When I connect the first diode D1 only (cathode on output) I get a clean output signal - both + and - sides with no gain or level shift or rectification showing. But when I connect the other diode D2 only, the op-amp output goes to the negative rail and just refuses to budge. With both diodes in I get a clean signal with both polarities showing up on the output again. It appears to need D1 in there to prevent going negative rail, and it appears D2 has no effect whatsoever. Either way I am not seeing any rectified signal.

    This is an over-simplified circuit I made to try to figure out what is going on with the op-amp and diodes. Eventually I expect to have a 10K resistor in series with the feedback diodes so they effectively sum their currents to the negative input. I will then tap the outputs thru the diodes to sum in the next op-amp stage. The negative peak is summed inverted but the positive peak is summed straight up, resulting in an output that is the desired "mmm" signal. When I do add those resistors and look for a 1/2 wave rectified signal, I don't see anything useful at all.

    I hope to make a rectifier similar to one of the two diagrams I found on the inter-webs, also attached. That is of course if I can figure out why my rectifiers are not working.

    What I did verify: Power is clean, stable +/-15V. 1uF decoupling at chip package. Note: not 0.1 uF, but 1.0 uF ceramics. Diodes test OK, about 350mV drop forward biased, open when reversed biased. Diodes rated for 40 volts. This particular Op amp works fine as a voltage follower, and I have several more of the same type in the circuit running audio from 20Hz to 100KHz. The other op-amp in the package is grounded as a voltage follower to reduce weird noise.

    What could I be missing here?
     

    Attached Files:

  2. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,044
    Likes:
    541
    Location:
    AZ 86334
    The reason that sample.bmp is not working as a rectifier is that it is a voltage follower.

    182.gif
     
    • Agree Agree x 1
  3. Rich D.

    Rich D. Member

    Joined:
    Feb 3, 2014
    Messages:
    203
    Likes:
    15
    Location:
    West Chester, PA
    That is an OVER-SIMPLIFIED circuit I used to verify the components. I didn't expect it to rectify, I DID expect it to not go rail-negative as I wrote.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,044
    Likes:
    541
    Location:
    AZ 86334

    Then post the circuit you are complaining doesn't work instead of an OVER-SIMPLIFIED one!
     
  6. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,044
    Likes:
    541
    Location:
    AZ 86334
    Here is a precision half-wave circuit that prevents pin1 of the opamp from railing:

    182a.gif
     
  7. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,251
    Likes:
    1,218
    Location:
    Cardiff, Wales
    I can't replicate that effect in an LTspice simulation, regardless of which opamp model I use (though I don't have a model of the MC33078). I suspect a bad connection to D2 somewhere, or a duff D2.
     
  8. Rich D.

    Rich D. Member

    Joined:
    Feb 3, 2014
    Messages:
    203
    Likes:
    15
    Location:
    West Chester, PA
    Imagine the Sample circuit without D1. THAT doesn't work for no explained reasons. It just goes negative even though the op-amp and both diodes test ok. There apparently IS something wrong, but I can't figure out what it is. Even with it this simple there still must be something wrong here.

    Does the op-amp work? As a voltage follower, the amp can output a clean sine wave +/- 26 volts peak-to-peak.

    It always goes negative unless there is a current coming out of the - input, thru the diode, and then thru the output to the negative rail. When that current is allowed to flow, the op-amp appears to behave like all op amps normally do.

    As for op-amp similarities, it is for the most part an LM833.
     
    Last edited: Mar 22, 2016
  9. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,044
    Likes:
    541
    Location:
    AZ 86334
    If the reverse leakage of the single diode is less than the input bias current for the opamp, then the output will rail. With back-to-back diodes, the input bias current causes an offset, but the opamp output will be no more than one forward-biased diode-drop from the non-inverting input...

    The input bias current of the opamp has to come from somewhere!
     
  10. Rich D.

    Rich D. Member

    Joined:
    Feb 3, 2014
    Messages:
    203
    Likes:
    15
    Location:
    West Chester, PA
    Thanks, that is something to consider.

    I can tell you the diode is spec'd at a leakage of 200nA at 30V.
    The MC33078 or 9 wants a bias current of 300nA, max at 750nA. It's offset current is 25nA, max of 150nA.

    So does that mean it should or shouldn't work?
    I'll have to figure out what that all means. I was intending to use BAT43 diodes I ordered, they have worse: 500nA leakage, but for today all I have are Vishay SD101C diodes.
     
  11. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,044
    Likes:
    541
    Location:
    AZ 86334
    If the reverse leakage of the diode is less than the opamp bias current, it will rail. Even if you select a diode with a higher reverse leakage, your circuit is a bad design.

    You need to add a resistor from the non-inverting input of the opamp to somewhere, specifically to provide a path for the input bias current. Look at the circuit of post #5 and ask yourself why is R3 there?
     
  12. Rich D.

    Rich D. Member

    Joined:
    Feb 3, 2014
    Messages:
    203
    Likes:
    15
    Location:
    West Chester, PA
    I do have a resistor from the + input to ground. Co-incidentally it is also 200K. I figured the - input gets current from the feedback. Are you suggesting that the leakage current from the diode is not enough to properly provide a bias current to the op-amp? That could make sense to me, even though I never had a circuit with that kind of problem. If that is the case, how could it be improved...or more exactly...how can the attached circuit concept be made to work (the full wave rectifier, not the Sample)?

    I wouldn't call this a design, it's simply parts I stuck into a solderless breadboard to investigate why I am having trouble getting this circuit (attached) to work in the solderless breadboard. In this circuit, I expect to see a + peak at the bottom (cathode) of D2, and a - peak at the anode of D1. My only change is I wanted to inject the signal into this on the + input to take advantage of the higher-Z / reduced loading of the signal, though I would gladly add another voltage follower if necessary.
     

    Attached Files:

  13. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,044
    Likes:
    541
    Location:
    AZ 86334
    I meant to say the inverting input.
     
    Last edited: Mar 22, 2016
  14. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,044
    Likes:
    541
    Location:
    AZ 86334
    Last edited: Mar 22, 2016
  15. bountyhunter

    bountyhunter Well-Known Member

    Joined:
    Jul 17, 2009
    Messages:
    1,560
    Likes:
    81
    I have a precision rectifier circuit tested and built used for driving my bar graph. I also have a version with a peak detector which you will want if you want to see the signal better. I can post the circuits if you want them, I don't have any interest in troubleshooting SPICE circuits when I already have built circuits that actually work.

    TO ADD: the file loader here can't find a JPEG sitting on my desktop, so I guess I can't load the schematic.
     
    Last edited: Mar 22, 2016
  16. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,440
    Likes:
    933
    Location:
    Canada, of course!
    ONLINE
    The MC33078 opamp has PNP input transistors that float high when a reverse-biased feedback diode tries to make the input low but it cannot.
    Then when the inverting input floats high the output goes as low as it can.
     
    • Thanks Thanks x 1
  17. Rich D.

    Rich D. Member

    Joined:
    Feb 3, 2014
    Messages:
    203
    Likes:
    15
    Location:
    West Chester, PA
    I think I'll try the TI & Burr Brown circuit next. That's like the one I saw on a website for Elliot Sound Productions, but with different values.

    superior pfwr an001-f6.gif

    ...it worked, but was prone to oscillate at times, it will need tweaking.
     
  18. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,044
    Likes:
    541
    Location:
    AZ 86334
    Not surprising if you built it on a plug-in bread-board. It will likely be more stable on a real ground plane. The lower resistor values might help, especially on the plug board
     
  19. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,440
    Likes:
    933
    Location:
    Canada, of course!
    ONLINE
    The TL07x, TL08x and most other opamps with a good high frequency output oscillate at a high frequency if a capacitance to ground more than 100pF is directly on their output. When feeding a shielded audio cable that has hundreds of pF of capacitance I connect a 100 ohm resistor in series with the output then the resistor prevents the capacitance of the cable from causing oscillation.

    Almost any circuit will oscillate when built on a solderless breadboard with the capacitance between its many rows of contacts and its jumper wires all over the place.
     
  20. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,151
    Likes:
    907
    Location:
    Rochdale UK
    ONLINE
    Hi BH.... If you can't upload a picture just drag/drop...
     

    Attached Files:

  21. Rich D.

    Rich D. Member

    Joined:
    Feb 3, 2014
    Messages:
    203
    Likes:
    15
    Location:
    West Chester, PA
    ...that's what I figured. I also thought if I could get it to work well on a solderless, it most certainly would work better when I go to PCB.

    BTW: I am using a 33078/9 op-amp only because that is the component I am using for most of the rest of the circuit. It's GBW is 16 MHz.

    bountyhunter: I'd love to see a schematic that actually worked if you could pull it off. Sure, the TI thing worked, but that is using an $11 chip. I'd like to see a circuit work that wasn't built by someone with millions of dollars of funding!

    For better or worse, this attached circuit is what I am going to try next.
    Harp12 Channel Rev4b.jpg
     

Share This Page