Centering a square wave

WBahn

Joined Mar 31, 2012
32,840
As the voltage source changes you get a step change in the voltage at V1. But after that you have an RC circuit that is charging/discharging with a 14 ms time constant, which is a lot longer than the 1 ms dwell time of the source waveform at each level, so you end up with a good approximation to a linear ramp.
 

crutschow

Joined Mar 14, 2008
38,508
I'm not getting how that 'tooth saw' wave, in V1, is being produced.
It's caused by the limited low frequency response of the capacitor as it provides current through the diode clippers.
As the capacitor charges when providing this current the voltage across the capacitor increases, giving the tooth saw voltage waveform.
A larger capacitor would reduce this drop but there's no particular advantage to doing that.
 

WBahn

Joined Mar 31, 2012
32,840
It would be a good exercise for you to analyze the circuit in steady state (say beyond 20 ms) and figure out the response over the course of one cycle.
 

Thread Starter

rfpd

Joined Jul 6, 2016
101
What about eliminating R1 and R2, and adding two clip diodes inverse parallel with R4? Maybe keeping R1 as a current limiter.

ak
Sorry about reopening the post, but I was testing in multisim and the only thing the diodes are doing is limiting the voltage, instead of getting a sinve wave of 377mV I get 100mV or less.

I'm refering to the last circuit crutschow posted.
 

Attachments

AnalogKid

Joined Aug 1, 2013
12,130
1 K and 1 uF is a time constant of 1 ms, so there should be considerable sag in a 5 ms period - as shown in your images. Wally's circuit time constant is four times larger, with much less sag.

ak
 

Thread Starter

rfpd

Joined Jul 6, 2016
101
1 K and 1 uF is a time constant of 1 ms, so there should be considerable sag in a 5 ms period - as shown in your images. Wally's circuit time constant is four times larger, with much less sag.

ak
Yeah I just checked the output, it will also take more time to stabilize, converting that to a sine wave (pic below).

Just one more question, I think I understood why it gets centered, I mean a montage like that will make the voltage, after the capacitor, drop to zero, so I guess since it's a square wave, it will oscilate around zero. If it the resistor was first, it would start at zero and grow up until 5 V and oscilate there, right? And what is R1 doing in this montage?
 

Attachments

Top