Connect with us

Opamp current sense + peak detect is ok?

Discussion in 'General Electronics Discussion' started by eem2am, Nov 16, 2012.

Thread Status:
Not open for further replies.
Scroll to continue with content
  1. eem2am


    Aug 3, 2009

    Please can you say if my peak detector circuit is OK?…..I wondered if in real-life it may succumb to op amp horrors such as instability, inaccuracy, offset voltage, etc etc.?

    Heres the schematic of the current sense and peak detect and hold…….


    …..So, I must sense current in a LED lamp to see how much current is being drawn by the luninaire.

    The current might be 1A, or 2A, or 3A…..up to 10A. (depends on which luminaire is connected).

    The current is often PWM dimmed, and when it is, I am not interested in the average current, but just in the peak current level…..(i.e. that current that flows during the PWM dim ON interval)

    The problem is, a simple current sense amplifier would have zero output during PWM dimming OFF intervals……-and then the microcontroller may unfortunately read the current during one of these zero current intervals and “think” there’s no current……….so I want to capture and hold the peak current…………

    I cant use a simple diode detector, because the diode Vf introduces an error, and in any case, when the current is just 1A, the amplified sense voltage is just 100mV, and this is not enough to forward bias a diode.

    Do you think this circuit (above) will be ok in real life?…it works allright on the simulator (LTspice)

    The left hand side opamp will be an OPA335 in the real circuit, but I was thinking that for the right hand side opamp, I can get away with a cheap LM258…..Do you agree?

    OPA335 OPAMP datasheet:

    LM258 opamp datasheet:
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    At a quick glance it looks like this circuit could work.
    Two remarks, however:
    1) You don't need a Schottky diode in the rectifier section. The OpAmp will take care of the voltage drop across a standard diode. A Schottky diode has more leackage current which may be unwanted here.
    2) The 10kOhm resistor after the Schottky diode is unnecessary and in combination with the low-pass filter makes for a very slow responce of the circuit to peak current.

    Also you may have to tweak the RC components for "best" response to the actual signal.

  3. shrtrnd


    Jan 15, 2010
    eem2am, I've been trying to figure-out your posts.
    I think it would help a lot if you would tell us what you're trying to do.
    I'd hazard a guess with your posts about precision op amps and differential amplifiers,
    that you're working weighing or scales?
    Your concerns about precision in the components used may be justified (I work in an
    electronics standards lab), but that's an area not generally appreciated by very many
    people nowadays due to the reliabilty and in-general accuracy of components and circuits.
    I think it'd help a lot if you told us what you're working on.
    I work primarily test and measurement instruments right now, but I used to work in
    the mines up north. I know if you've got a scale reading incorrectly, for product running
    over conveyer scales continuously 24 hours a day, the production people get upset.
    Just a thought.
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    eem2am, I'm going to keep closing your threads until you can learn to stick to a single thread.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Thread Status:
Not open for further replies.
Electronics Point Logo
Continue to site
Quote of the day