Does anyone know how the following capacitor and resistor values have been calculated? I am trying to learn how to pick values from a design perspective
Attachments
-
25.9 KB Views: 61
You're probably right.crutschow, I think he wants to know how to calc the differentiator
Yes, but he has to pick a resistor value first.crutschow, I think he wants to know how to calc the differentiator
No, it won't; the PWM signal contains not only it's base frequency, but many harmonics of the base frequency.I understand that the RC form a High Pass filter, only allowing higher frequencies, thus creating a spike effect. However according to calculation, the cut off frequency is around 23kHz. which is much higher than the frequency range from the PWM. Will this not completely stop all frequencies?
Thank you, that makes sense. So i suppose the design approach was to design a RC differentiator that created a pulse of approx 5us? then choosing components that closely matched that spec?No, it won't; the PWM signal contains not only it's base frequency, but many harmonics of the base frequency.
But rather than think in terms of frequency, and filtering, think instead of R7 and C8 as a differentiator circuit with an RC time constant of 6.8 kΩ * 1 nF = 6.8 μs: on the rising edge of the PWM signal, it lets through a short positive pulse to pin 3 of U5.1 (actually, a waveform with a sharp positive leading edge, followed by an exponential decay back down to zero); and on the falling edge of the PWM signal, it lets through a short negative pulse. Because of the way the inputs of U5.1 are biased, only the positive pulse has any effect; the op amp, which is used as a comparator in that part of the circuit, "squares up" that pulse to produce on its output an approximately rectangular pulse of roughly 5 μs duration to drive the gate of JFET J1.
Yes, although that "spec" may have only been approximate, like "need a pulse long enough to ensure the integrator gets reset."Thank you, that makes sense. So i suppose the design approach was to design a RC differentiator that created a pulse of approx 5us? then choosing components that closely matched that spec?
I rather doubt it, as the pulse seems to be used only to turn on J1, resetting the integrator. It doesn't appear to go to the microcontroller or anywhere else.The clock in the micrcontroller was prescaled, giving a time period of 5us (Making each tick duration 5us) Would this be related to reason for the pulse length ?
But surely the length of the pulse is defined by the the length of the time it takes for the integrator to reach 0v? Would a longer pulse not hold the integrator at 0V, and a shorter prevent it from reaching 0v? Or am I not understanding it properly?Yes, although that "spec" may have only been approximate.
I rather doubt it, as the pulse seems to be used only to turn on J1, resetting the integrator.
No, you're correct.But surely the length of the pulse is defined by the the length of the time it takes for the integrator to reach 0v? Would a longer pulse not hold the integrator at 0V, and a shorter prevent it from reaching 0v? Or am I not understanding it properly?
Actually, since this is a pulse forming circuit, C8 and R7 are chosen to define the width of the output pulse required to reset the integrator, based on the R1-R5 trip point. The timer is triggered by the input waveform positive edge, so the output pulse must be more narrow than the input waveform's minimum positive half-cycle pulse width. As long as the output pulse is less than 20% of the input waveform's negative half-cycle pulse width, C8 will have enough time to recover before the next positive edge. Thus, C8-R7 are related to different parameters of the input's two half-cycles, not simply its frequency.C8 and R7 are chosen based on the frequency of the incoming square wave.
the output pulse must be more narrow than the input waveform's minimum positive half-cycle pulse width:Actually, since this is a pulse forming circuit, C8 and R7 are chosen to define the width of the output pulse required to reset the integrator, based on the R1-R5 trip point. The timer is triggered by the input waveform positive edge, so the output pulse must be more narrow than the input waveform's minimum positive half-cycle pulse width. As long as the output pulse is less than 20% of the input waveform's negative half-cycle pulse width, C8 will have enough time to recover before the next positive edge. Thus, C8-R7 are related to different parameters of the input's two half-cycles, not simply its frequency.
Also, the reset pulse calculates out to less than 5 us. Are you sure the opamp can produce such a narrow pulse cleanly?
ak
Input waveform = RAW_SQthe output pulse must be more narrow than the input waveform's minimum positive half-cycle pulse width:
by input waveform, do you mean the waveform that is outputted from the DAC to drive the sawtooth?
If RAW_SQ has a 50/50 duty cycle, then the two half-cycles are of equal width.I am a bit confused when you mention the negative half cycle, surely it will be equal to the positive?
During the positive half-cycles, C8 is charged through R7; during the negative half cycles, it is discharged through R7. For consistent pulse widths, you want C8 completely discharged before the next positive edge comes along. Standard engineering time constant approximations:if this is the case, 20% of 119.5 us is 23.9 us. where did you get the 20% value from ?
I started there. But R1-R5 set up a trip point that is 50% of Vcc, not 63%. So the actual pulse width is |ln(0.5)|xRxC = 4.71 usDid you calculate the the reset pulse using the time constant equation as OBW0549 showed above?
