Circuit to control the pulse width of digital signals

In summary: 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...
  • #1
hamburg21
36
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
  • #3
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?
 
  • #4
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 hamburg21
  • #5
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
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.
 
  • #7
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
 
  • #8
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.
 
  • #9
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?
 
  • #10
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].
 
  • #11
You mentioned that this can strain the analog circuits, is that because it would be slow?
 
  • #12
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.
 
  • #13
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
now if you include a comparator or some other sort of voltage buffer you will be fine
 
  • #15
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.
 
  • #16
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.
 
  • #17
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.
 
  • #18
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
 
  • #19
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
 
  • #20
donpacino said:
not true
hmmm, why? I just did it in LTspice to check.
 
  • #21
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.
 
  • #22
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.
 
  • #23
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
 
  • #24
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: 416
  • #25
donpacino said:
with one integrator the slope will be linear for the most part. even so the m factor will be non-linear

what?
 
  • #26
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 teh above circuit diagram.
 
  • #27
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
 
  • #28
donpacino said:
that is VERY nonlinear.

also i recommend adding a resistor as seen in teh 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.
 
  • #29
im talking about the comparator......
 
  • #30
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.
 
  • #31
Seth Cohen said:
Agreed, I can tune RC or I can tune the threshold ob the comparator to adjust m.
no. the equation is not linear.
run a test for me. use a very small pulse width with your compactor setup
then use a very long pulse width with your comparator.
evaluate what the gains are. it will not be linear
make sure with the long pulse width you do not saturate your output voltage.
 
  • #32
donpacino said:
im talking about the comparator......

I am lost with respect to this. All I am trying to do is implement a circuit that:
1) I inject a single pulse of width x
2) the circuit responds by giving me a single pulse of width f(x)

This can be done for f(x) = mx using an opamp integrator circuit and a logic gate. The opamp integrator makes a triangle wave and the logic gate triggers off of it when it crosses the thresholds.
 
  • #33
I realize that. you are misunderstanding the purpose of the comparator. it does not in any way contribute to your pulse with manipulation (if you set the trigger low enough). its purpose is to provide a stable voltage to the logic

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.
 
  • #34
Seth Cohen said:
I am lost with respect to this. All I am trying to do is implement a circuit that:
1) I inject a single pulse of width x
2) the circuit responds by giving me a single pulse of width f(x)

This can be done for f(x) = mx using an opamp integrator circuit and a logic gate. The opamp integrator makes a triangle wave and the logic gate triggers off of it when it crosses the thresholds.
you have a circuit that does the correct thing, but completely misunderstood my comment about the comparator
 
  • #35
donpacino said:
no. the equation is not linear.
run a test for me. use a very small pulse width with your compactor setup
then use a very long pulse width with your comparator.
evaluate what the gains are. it will not be linear
make sure with the long pulse width you do not saturate your output voltage.

What do you mean by "the equation is not linear"

This seems like geometry.
donpacino said:
I realize that. you are misunderstanding the purpose of the comparator. it does not in any way contribute to your pulse with manipulation (if you set the trigger low enough). its purpose is to provide a stable voltage to the logic
I think there is a big misunderstanding. You guys are making me feel like I am taking crazy pills. See attached.
 

Attachments

  • flowRoot3817.png
    flowRoot3817.png
    9.2 KB · Views: 402

Similar threads

Replies
4
Views
813
Replies
20
Views
1K
  • Electrical Engineering
Replies
32
Views
2K
Replies
11
Views
1K
  • Electrical Engineering
Replies
4
Views
291
  • Electrical Engineering
Replies
7
Views
1K
  • Electrical Engineering
Replies
2
Views
460
  • Electrical Engineering
2
Replies
41
Views
3K
Replies
15
Views
1K
  • Electrical Engineering
Replies
13
Views
1K
Back
Top