Circuit to control the pulse width of digital signals

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
67 replies · 7K views
hamburg21
Messages
36
Reaction score
0
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?
 
Engineering news on Phys.org
Svein said:
They are called one-shots or monostable multivibrators. Several versions exist. Take a look at http://www.onsemi.com/pub_link/Collateral/MC14538B-D.PDF
for an example.

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?
 
Seth Cohen said:
What about something that doubles every input pulse width like y = f(x) = 2x?
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.
433px-Basic_integrating_adc.svg.png
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
 
Last edited by a moderator:
  • Like
Likes   Reactions: 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...
 
Seth Cohen said:
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?
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.
 
Seth Cohen said:
I wonder how to do f(x) = x^2
This is straining the analog circuits, but two integrators in series create an amplitude proportional to x2
 
Svein said:
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.

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.
 
Svein said:
This is straining the analog circuits, but two integrators in series create an amplitude proportional to x2

By cascading integrators, would the amplitude still rise and fall to create an output width that follows f(x) = x^2?
 
Seth Cohen said:
By cascading integrators, would the amplitude still rise and fall to create an output width that follows f(x) = x^2?
Yes, since [itex]\int_{0}^{x}\int_{0}^{x}1dt=\frac{1}{2}x^{2}[/itex].
 
You mentioned that this can strain the analog circuits, is that because it would be slow?
 
Seth Cohen said:
You mentioned that this can strain the analog circuits, is that because it would be slow?
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.
 
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.
 
now if you include a comparator or some other sort of voltage buffer you will be fine
 
donpacino said:
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.
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.
 
Svein said:
Yes, since [itex]\int_{0}^{x}\int_{0}^{x}1dt=\frac{1}{2}x^{2}[/itex].
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.
 
donpacino said:
now if you include a comparator or some other sort of voltage buffer you will be fine

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.
 
Seth Cohen said:
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.
not true
 
Svein said:
Yes, since [itex]\int_{0}^{x}\int_{0}^{x}1dt=\frac{1}{2}x^{2}[/itex].
you are not integrating the pulse width, you are multiplying it by 2. therefore 2 integrators would result in 4 times the pulse width
 
donpacino said:
not true
hmmm, why? I just did it in LTspice to check.
 
donpacino said:
you are not integrating the pulse width, you are multiplying it by 2. therefore 2 integrators would result in 4 times the pulse width

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.
 
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 won't be linearly changing the pulse width.
the purpose of the comparator is to ensure that the voltage levels are enough to trigger logic.
 
Seth Cohen said:
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.
with one integrator the slope will be linear for the most part. even so the m factor will be non-linear
 
donpacino said:
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 won't be linearly changing the pulse width.
the purpose of the comparator is to ensure that the voltage levels are enough to trigger logic.

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.
 
Attachments
  • inputoutput.png
    inputoutput.png
    25 KB · Views: 537
donpacino said:
with one integrator the slope will be linear for the most part. even so the m factor will be non-linear

what?
 
Seth Cohen said:
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.
that is VERY nonlinear.

also i recommend adding a resistor as seen in the above circuit diagram.
 
Seth Cohen said:
what?
the slope on the output of the integrator will be linear allways. so the 'm' value that you talked about will vary with respect to your 'X' value based on the values of R and C
 
donpacino said:
that is VERY nonlinear.

also i recommend adding a resistor as seen in the above circuit diagram.

How is it nonlinear? f(x) = 2x <--- that is a linear gain. That is the effect want.

Adding a resistor - will do.
 
donpacino said:
the slope on the output of the integrator will be linear allways. so the 'm' value that you talked about will vary with respect to your 'X' value based on the values of R and C

Agreed, I can tune RC or I can tune the threshold ob the comparator to adjust m.