# Square wave generator

Can you explain what for is resistance R101 on next schematic: I understand why we need R105 (open collector) and R102 (positive feedback). But R101? and C11? Thank you.

• Can you explain what the circuit is intended to do? – Andy aka Nov 14 '14 at 11:05
• On the left is oscillatorhy circuit, C12 is just split capacitor, R103 and R104 is voltage divider for input '2'. Around LM311 construcuted comparator with positive feedback, so input sine wave transforms to square waves and goes to microcontroller timer pin. so we can count frequency – Robert Nov 14 '14 at 11:10
• For those asking what this is supposed to do, this looks like the much-copied front end for AADE's LC meter. Kind of a painful lesson on why publishing schematics and equations is risky for the creator. – Spehro Pefhany Nov 14 '14 at 11:31

## 5 Answers

The shown squarewave generator is based on the working principle of a "Schmitt-trigger oscillator" (astable multivibrator). In such a circuit we always have fixed positive as well as time-dependent negative feedback realized by the time constant T=R101*C11.

Explanation: Start with an (assumed) positive output voltage. After the capacitor C11 is fully charged we have full negative feedback and only fractional positive feedback. Hence, the positive voltage at the inv. terminal overrides the positive voltage at the non-inv. terminal. As a result, the output will switch to a negative voltage - and the same sequence starts again with an opposite sign.

Note that the pos. feedback causes two important effects: At first, it makes a certain degree of hysteresis and, secondly, it drastically enhances the switching speed of the output voltage because positive feedback always supports the speed of a voltage change.

I think is for the feedback of you comparator, the capacitor C11 is charged through this resistor (R101) and the voltage ov the pin IN- is changed to balance the state of your comparator.

• This is a non-answer. You can't possibly answer this without knowledge of what the circuit is intended to do. – Andy aka Nov 14 '14 at 11:07
• The circuit is squre wave generator like the Schmitt trigger. the resistor R101 and the capacitor C11 are set to fix the frequency of the square wave. – R Djorane Nov 14 '14 at 12:55

They appear to be used to set the basic frequency/period of oscillation of the LM311 comparator being used as an astable multivibrator.

Without knowing what the circuit is supposed to do (especially the part left of C12: what's the purpose of Lx? I guess it's not just an inductor but it may pick up some signal) it is hard to explain it completely.
Maybe it helps if you know that the part right of C12 forms a relaxation oscillator whose frequency is proportional to 1 / (C11 * R101).

• This should be a comment. Guesses are not really useful. Let the OP explain things first is my humble opinion. – Andy aka Nov 14 '14 at 11:07
• @Andy aka: yes, I agree he should explain. But I think the 2nd half of my answer might actually answer OPs question (or help him to find the answer). – Curd Nov 14 '14 at 11:10

R101 and C11 form a low pass filter from the output to the input. If the output is a 50:50 mark-space ratio square wave, then the average voltage at pin 3 will equal the average voltage on pin 2 (determined by R103 and R104). If the output waveform was not 50% duty, then the average voltages on pin 2 and 3 would not be equal and the action of the circuit would be to modify the output to be 50% duty cycle.

My belief is that R101 and C11 are used to ensure that the output square wave duty cycle is very close to 50%. It may be required to be 50% because of the circuit that follows this circuit.