# 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

## 1 Answer

One resistor and one capacitor, forming a low pass filter, removing everything but the DC component. Unity-gain buffers can optionally be added on the input and output, if necessary to isolate the circuit from external loads. simulate this circuit – Schematic created using CircuitLab

With a pulse frequency of 1 kHz and component values selected to give a relatively low ripple, this is the result from a simulation in LTspice showing the DC output at levels 10 mV, 100 mV and 300 mV respectively from an input pulse width of 10 µs, 100 µs and 300 µs. If you have a different pulse frequency (though you did not mention anything about that in the question), you can scale the output by inserting a resistor across C1 as a voltage divider, or add a gain before R1 using an opamp. • This is the same as the integrator that OP already dismissed. If the voltage of the incoming pulse changes, then the output of this circuit will change proportionally. – The Photon Mar 7 '16 at 22:47
• 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
• What "voltage" are you actually expecting? You seem to be relating a time value to an expected voltage level. As shown you should expect a DC voltage related to the duty cycle of the signal. So with the ratio of 200us/400us you should get 50% of the original pulse "voltage" height. If you need to fine tune the voltage output to get a specific voltage level you could add a high value variable resistor across the cap then take your output on the center pin. (and maybe add another cap from the center pin to ground.) – Nedd Mar 8 '16 at 5:35
• @dory Since τ is a time and the output is a voltage, I don't see how you can possibly get τ as an output. If you need the output to have a given scale, and work in a specific range of inputs, you must specify that in your question. – pipe Mar 8 '16 at 8:30
• @ThePhoton The incoming pulse train has an amplitude of 1 volt, as specified in the question. – pipe Mar 8 '16 at 8:31