Continue to Site

# precision squarer

Status
Not open for further replies.

#### gustavo

##### New Member
Hi everybody,

I've been trying to understand how the precision squarer which is proposed in the LM111 datasheet from national ( 9.0 typical applications) works but I wasn't be able. It is suposed that Vout=Vin^2 but I can't find out how, so any explanation is welcome.

Thanks

I cant speak for the LM111, but the LM311 (which I believe is a similar part) is a comparator with an open collector output. For example, if the output is tied through a resistor to +5 and the - input is set to 1.5V, anytime the + input is higher than 1.5 the output will be pulled to Vcc by the external resistor, when the + input is less than 1.5, then the output will be pulled to 0 by the transistor internal to the comparator. In this way, you could for instance feed a sine wave into the comparator and output the corresponding rectangular pulses. There is an example that I posted in This thread.

The red line is a very noisy input signal which I have squared up (the blue signal) using an LM311.

Last edited by a moderator:
gustavo said:
Hi everybody,

I've been trying to understand how the precision squarer which is proposed in the LM111 datasheet from national ( 9.0 typical applications) works but I wasn't be able. It is suposed that Vout=Vin^2 but I can't find out how, so any explanation is welcome.

Thanks

You just have a misunderstanding.

The "squaring effect" is referring to square-wave edges. If an RC roll-off was presented, the output would be square(sharp edge)

The squaring that you thought it was is analog multiplication which that part does not do.

For "squaring" circuits think "rounded edges in, square edges out"

Opticon is correct, for an analog squaring circuit, see National Semiconductor Application Note: AN222. The circuit in the LM111 data sheet is bizarre, the LM111 is used as an op amp which sets the emitter voltage of Q4 at about 10 times the saturation voltage of Q2. Why go to that trouble, I don't know. All the action is in Q4 and Q3. Q4 is operated in the reverse mode because it switches faster that way and the saturation voltage is lower than in the normal mode. The current gain is way low, but that is not a problem here. Nowdays a person would just buy a fast comparator!

thanks a lot for your answers, they are very useful. Finally i understood the circuit, and now i'm coping with the circuit proposed in AN222...perhaps in a couple of days i ask you about this one ;-)

Here is how this circuit really works.
They used a comparator as an op amp because it needs to have very low output impedance at high frequency, and adding a capacitor such as C2 to an ordinary op amp's output will cause most types to oscillate, although there are ways around it.

Edit:
There is something wrong with this thread. I posted a schematic with it, but it fell off. The explanation above looks pretty lame without the schematic. I'll try again now.

#### Attachments

• squarer.GIF
15.8 KB · Views: 549
great explanation, but i still have 2|3 doubts about the circuit...

1.- the clip voltage (output) is as you point out Vref*(Rf/2.7k)+1 or Vref*((Rf/2.7)+1)

2.- I have problems understanding the function of D2 and D3, the anode of D3 is connected to a fixed voltage (i think) and it only conduces in one direction, from output to the output of the opamp(comparator). About D2 I simply don't know what it is doing there

3.- I suppose that R3 is the pull-up resistor needed by the open collector output of the comparator, am i right?

I think that's all, the main problem is with D2 and D3 and how changes the output.

thanks

Just trying things out

Will this post take the thread to the top of the listing ?

D3 is needed to isolate the output from the low impedance of the op amp output, D2 is for temperature compensation.

gustavo said:
great explanation, but i still have 2|3 doubts about the circuit...

1.- the clip voltage (output) is as you point out Vref*(Rf/2.7k)+1 or Vref*((Rf/2.7)+1)

2.- I have problems understanding the function of D2 and D3, the anode of D3 is connected to a fixed voltage (i think) and it only conduces in one direction, from output to the output of the opamp(comparator). About D2 I simply don't know what it is doing there

3.- I suppose that R3 is the pull-up resistor needed by the open collector output of the comparator, am i right?

I think that's all, the main problem is with D2 and D3 and how changes the output.

thanks
You are correct about #1. The voltage at the node labeled "op amp output" is Vref*((Rf/2.7k)+1).

The whole purpose of this circuit is to produce a pulse waveform whose amplitude is precisely controlled. Below is another attempt to explain how it works:

The voltage on the capacitor C2 is one diode drop (V(D2)~0.7v) below the voltage at the op amp output. When the TTL input signal is high, Q2 is on, clamping the output voltage very close to GND (~50mv in the simulation) and reverse biasing D3. When the TTL signal goes low, Q2 turns off, and the output rapidly (tens of nanoseconds) rises until D3 conducts. The voltage at OUT is now equal to the voltage at the op amp output, because both are one diode drop above the voltage on C2. When the TTL input goes back high, the output, of course, rapidly returns to near GND.
So, the result is a pulsed waveform at OUT which is the opposite polarity of the TTL input and whose low level is zero volts, and whose high level is the voltage at the op amp output, which is defined by the equation above. As was noted in the schematic, the high level can be changed by changing the value of Rf. The reference voltage circuit can be replaced with a modern shunt reference such as one of **broken link removed** and a resistive voltage divider.

Status
Not open for further replies.

Replies
14
Views
2K
Replies
3
Views
2K
Replies
3
Views
2K
Replies
2
Views
1K
Replies
29
Views
4K