# Measuring pulse width with limited components

I have an impulse train of amplitude 1V with constant pulse width $\tau$ and I would like to build a circuit that takes this signal and converts it to a constant DC voltage of value $\tau$. I can only use opamps, comparators, resistors, DC power supply, diodes and capacitors. How can I build such a circuit?

I thought about using an integrator but this will not really give me the area under the pulse but rather an antiderivative of the signal I believe.

EDIT : In response to a comment of @pipe, here's what I can tell more about the circuit :

• The input impulse train can have a pulse width from [~0 to 300us] that is constant.
• Let's say that my expected values for the output voltage is in mV such that 300mV correspond to a pulse width of 300us.
• What range of $\tau$ do you need to be able to measure? 1 minute to 1 hour? 1 ps to 10 ps? Somewhere in between? – The Photon Mar 7 '16 at 22:37
• From 100us to 300us I'd say – Dory Mar 7 '16 at 22:45
• A google search yields the circuit found here: edn.com/design/analog/4347834/… The advantage over a simple RC circuit is that it will give the result after just 1 pulse, while an RC circuit would take many pulses to reach steady-state output voltage, more if the duty-cycle is low. – tokamak Mar 7 '16 at 22:47
• Yes, I've seen this too. But I think he uses analog switches which I cannot use. – Dory Mar 7 '16 at 23:00
• Yeah, you'd have to roll your own analog memory circuit to replace the quad switch, but it's a start. Here's another possibility, you should be able to adjust the RC elements to get it to work with your desired range of pulse width: circuitswiring.com/pulse-width-to-analog-voltage-demodulator-2 – tokamak Mar 7 '16 at 23:02

• I've replicated this circuit in LTSpice with a train impulse of width $\tau$ 200us and period 400us but I'm not getting $\tau$ as an output voltage even when I change the values of R1 and C1. Is this possible? – Dory Mar 7 '16 at 23:44