# Positive Square wave peak detect - irrespective of duty cycle

Status
Not open for further replies.

#### jamesh77

##### New Member
Hi all,

I want to design a circuit that is capable of receiving a Square wave that's amplitude can vary between 0-3.3v and it's duty cycle can vary also.

The circuit needs to output the peak value of the square waveform - irrespective of a change in the duty cycle.

I have been looking at positive peak detector circuits and filtered op amp circuits but neither do what i want to do.

Thanks,
Jamesh77

How long does the peak value need to be retained?
Under what conditions should it be reset?
What is the input pulse frequency?
What realistic tolerance do you need?
In what way are the circuits you've considered inadequate?

amplitude can vary between 0-3.3v
How close to zero?
1-3.3V is one thing. But 0.001 to 3.3V is another. (it is hard to find the peak of a very small signal) Just an idea, that requires validation................A triggered sample and hold, utilizing the squarewave's leading edge to trigger it?

Bu the question begs: how narrow would the narrowest squarewave be? milliseconds? microseconds? nanoseconds?

Hi all,

I want to design a circuit that is capable of receiving a Square wave that's amplitude can vary between 0-3.3v and it's duty cycle can vary also.

The circuit needs to output the peak value of the square waveform - irrespective of a change in the duty cycle.

I have been looking at positive peak detector circuits and filtered op amp circuits but neither do what i want to do.

Thanks,
Jamesh77

You can also do it with a microcontroller with ADC. A reasonable answer really depends on:
1) the max frequency of the square wave
2) minimum duty cycle
3) expected range of peak voltages (can 0.001v be a "peak", can 0.00001 volts be a peak?)
4) what resolution do you need for peak? (Should the detector discriminate between 1.2500 and 1.2501V?

How will you reset the peak detector at the end of an acquisition period?

I have been looking at positive peak detector circuits and filtered op amp circuits but neither do what i want to do.
Why not? If you post a schematic of what you have tried, and list the specific reasons the circuit does not meet your requirements, the you will get actual advice instead of playing 20 questions. As it is, your problem might be solved by simply increasing the size of a capacitor. OR, it might require a microcontroller with an on-board A/D converter, an external precision voltage reverence, and a month of software development - we have no way of knowing.

ak

Everyone seems to be asking the same questions. Maybe we should wait for answers if the OP ever returns.

Mike.

The switching frequency is 25kHz. (The output of the circuit should be continous and the propagation delay between the input and output of the circuit should be <1ms)

The peak of the square wave will range between 0 - 3.3v. (The output of the circuit should be as representative of the peak value of the square wave as possible.) I'm not sure how much of a problem ringing will be. Ideally this should be as small as possible so that it does not false trigger the comparator circuit.

The output of this circuit will be fed to a comparator circuit to see if the peak of the square wave exceeds the reference voltage of 0.5v.

I don't want to use a uC for this circuit.

I have been looking at similar circuits to this...but the diodes are irrelevent as the voltage of the square wave doesn't swing below 0v. ( trying to read the peak of a square wave with a peak of 0.1v is unobtainable with the voltage drop of the diode anyway~) Why do you need a peak detector if, ultimately, all you need to know is if a signal goes above 0.5V?

Indeed. Can't you just use your comparator to look for a level of 0.5V directly on the incoming square-wave, and then latch the result (either for as long as you need it or until the next rising-edge comes along)? That sounds a lot easier...

trying to read the peak of a square wave with a peak of 0.1v is unobtainable with the voltage drop of the diode anyway~
No, it isn't.

ak

If you use a R-R input & R-R output op-amp then you do not need the -Vee. (it is ground) And D2 can be removed. This circuit does not have the 0.7V drop of D1. When Vin = 1V the output = 1V. When Vin=0V the output will slowly drop back at a rate of (C Rl) which you can make very long. So you want the RC time constant to be much longer than 25khz.
Then you will have the comparitor at 0.5V behind this.
I see why you can not have the comparitor first.

Thanks Ron ill have a go at simulating it

The switching frequency is 25kHz. (The output of the circuit should be continous and the propagation delay between the input and output of the circuit should be <1ms)

The peak of the square wave will range between 0 - 3.3v. (The output of the circuit should be as representative of the peak value of the square wave as possible.) I'm not sure how much of a problem ringing will be. Ideally this should be as small as possible so that it does not false trigger the comparator circuit.

The output of this circuit will be fed to a comparator circuit to see if the peak of the square wave exceeds the reference voltage of 0.5v.

I don't want to use a uC for this circuit.

I have been looking at similar circuits to this...but the diodes are irrelevent as the voltage of the square wave doesn't swing below 0v. ( trying to read the peak of a square wave with a peak of 0.1v is unobtainable with the voltage drop of the diode anyway~)

View attachment 112658

There is no diode "voltage drop" in a circuit like that, as the series diode in inside the op-amp feedback loop.

The opamp is comparing the voltage on the capacitor - after the diode - to the varying input voltage & the opamp output will go to whatever voltage is needed, subject to supply and device limits, to charge the cap to the required voltage to equals the input peaks.

Status
Not open for further replies. 