Circuit to control the pulse width of digital signals

Tags:
1. Feb 26, 2015

hamburg21

Hi all,

I am looking for circuits that control the pulse widths of digital signals and their applications. Specifically, I am looking for circuits that map and a single input pulse width x to a single output pulse width y through function f(x)=y. Thoughts?

2. Feb 26, 2015

Svein

3. Feb 26, 2015

hamburg21

Aren't one-shots and monostable multivibrators used for outputing pulses of fixed widths, so that the function above would be y = f(x) = c, where c is constant. What about something that doubles every input pulse width like y = f(x) = 2x?

4. Feb 26, 2015

Svein

Was that what you were after? I did not get that from your original question. I know how to make such a circuit, but I do not know whether it comes prepackaged.
Start out with something like this. Assume Vin=-Vref and use a comparator on Vout. Let the incoming pulse flip the switch to Vin. The integrator will integrate -Vin for the time the incoming pulse is active. The switch will then flip to Vref and the integrator will integrate back to 0. At that point, clamp the integrator.
http://www.hardwaresecrets.com/imageview.php?image=3741 [Broken]

Last edited by a moderator: May 7, 2017
5. Feb 26, 2015

hamburg21

Very nice! I agree that this will make f(x) = 2x! Did you just think this circuit up or is it used for some application?

I imagine you can stack these to make f(x) = 4x, etc. I wonder how to do f(x) = x^2....

6. Feb 26, 2015

Svein

This is a variation on the "dual slope A/D converter" design. The way I designed it, f(x) = (1+Vin/Vref). You are, of course, free to create your own versions. Look up "dual slope" on the web.

7. Feb 26, 2015

Svein

This is straining the analog circuits, but two integrators in series create an amplitude proportional to x2

8. Feb 26, 2015

hamburg21

Awesome, this was a great vocabulary lesson for me. Now I know what to search for in google and such. I will be on the lookout for applications of using pulse width functions for f(x) = m*x, where m is a constant slope.

9. Feb 26, 2015

hamburg21

By cascading integrators, would the amplitude still rise and fall to create an output width that follows f(x) = x^2?

10. Feb 26, 2015

Svein

Yes, since $\int_{0}^{x}\int_{0}^{x}1dt=\frac{1}{2}x^{2}$.

11. Feb 26, 2015

hamburg21

You mentioned that this can strain the analog circuits, is that because it would be slow?

12. Feb 26, 2015

Svein

No, because the amplitude is limited to what the analog circuitry can handle. I expect a range of 1:10 or thereabout. If you need a larger range, go digital.

13. Feb 26, 2015

donpacino

Im requesting clarification. By controlling the pulse width of a digital signal, do you mean you want to control the pulse width or duty cycle of a PWM signal?

If you need the amplitude of the signal to stay constant, and the pulse width to change then the integrator circuit will not work. The integrator circuit will simply find the 'average' value of the input.

14. Feb 26, 2015

donpacino

now if you include a comparator or some other sort of voltage buffer you will be fine

15. Feb 26, 2015

hamburg21

By controlling the pulse width, I mean that I have a single digital pulse of width x. For example, x = 15.33 ns, and I want a circuit that creates output pulses f(x) = 2x = y so that if I inject a pulse of width x, I get out a pulse of y = 30.66 ns.

16. Feb 26, 2015

hamburg21

I do not know if this will work for output widths x^2. The amplitude A will be A^2, but if I put a comparator on the output of the rise and fall of the integrators, it will not give me a width that is proportional to x^2.

17. Feb 26, 2015

hamburg21

For the case of a linear integrator, I can put a comparator on the output and raise and lower the threshold of the comparator to get different output width functions f(x) = m*x, where m is a constant multiplicative factor.

18. Feb 26, 2015

donpacino

not true

19. Feb 26, 2015

donpacino

you are not integrating the pulse width, you are multiplying it by 2. therefore 2 integrators would result in 4 times the pulse width

20. Feb 26, 2015

hamburg21

hmmm, why? I just did it in LTspice to check.

21. Feb 26, 2015

hamburg21

I am just going of the drawing that you posted - if the edges of the triangle were quadratic in shape on both sides (as opposed to linear), a comparator would not give me the correct pulse width out. However, if only one side was quadratic while the other was linear, I could see it working.

22. Feb 26, 2015

donpacino

you're talking about the a comparator on the output of the integrator right?
unless your circuit arrangement is different from what i think it is, you wont be linearly changing the pulse width.
the purpose of the comparator is to ensure that the voltage levels are enough to trigger logic.

23. Feb 26, 2015

donpacino

with one integrator the slope will be linear for the most part. even so the m factor will be non-linear

24. Feb 26, 2015

hamburg21

Yes, I am putting a logic gate on the output and then tuning the logic gate threshold. See attached photo of the simulation. As I raise the threshold of the gate, the triangle signal remains below the threshold longer, and gives me a larger multiplicative factor.

true.

Attached Files:

• inputoutput.png
File size:
26.8 KB
Views:
121
25. Feb 26, 2015

what?