Hello,
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…….
Schematic:
http://i47.tinypic.com/6q9y15.jpg
…..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:
http://www.ti.com/lit/ds/symlink/opa335.pdf
LM258 opamp datasheet:
http://www.ti.com/lit/ds/symlink/lm258.pdf
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…….
Schematic:
http://i47.tinypic.com/6q9y15.jpg
…..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:
http://www.ti.com/lit/ds/symlink/opa335.pdf
LM258 opamp datasheet:
http://www.ti.com/lit/ds/symlink/lm258.pdf