# Analog Design for Breadboard Squareroot Function.

#### NVCC_ENVCC

Joined May 6, 2024
4
I'm trying to design a analog square root sub circuit to process an input voltage and output sqrt(vin). I want to Use something other than a log and antilog amplifier with a voltage divider in between but I'm really struggling to design an alternative as I am still learning. I have tried a rigging together translinear based BJT circuits but really struggled with working with input currents and seeing expected voltage changes. I have proposed a new design using NPN BJTs and opamps to equate Vbe off effectively an attempt at a darling transistor against a regular log amp circuit. But I'm lost with the fact Vout would be a current sink and how to implement this is a wider circuit. I also don't know if this a passable implementation as I would really tack on another op amp to compensate the gain as shown in the photo. Please can someone give me direction on how to finish this circuit so I can sim and build it or advise me of my mistakes and lead me the correct direction as I'm really going round in circles with this one.

#### NVCC_ENVCC

Joined May 6, 2024
4
Note a mis-calc with not including the extra terms in the ln() on both sides to alter the gain factor by B, and Is terms.

#### BobTPH

Joined Jun 5, 2013
9,264
What circuit behavior are you trying to exploit?

The exponential behavior of diodes and transistors is a well known fact that can be utilized in computing math functions.

Do you know of any other behavior that would lend itself to computation of a square root?

#### crutschow

Joined Mar 14, 2008
34,837
You can use an analog multiplier configured to do square-roots (below):

And here's a design for a simple square-root, voltage-to-current converter.

The current can then be converted to a voltage by a transimpedance configured op amp.
(Note that the 15V supply required is -15V to ground.
It's not stated, but the circuit should still operate with a lower negative voltage with appropriate adjustment of the 100kΩ resistor value.)
Edit: Noticed a problem with that circuit--
It would appear that the 1.2kΩ resistor at the bottom also would need to go to the negative voltage for the circuit to operate, since other wise there's no voltage across the two right-bottom transistors for them to conduct current.

Last edited:

#### NVCC_ENVCC

Joined May 6, 2024
4
What circuit behavior are you trying to exploit?

The exponential behavior of diodes and transistors is a well known fact that can be utilized in computing math functions.

Do you know of any other behavior that would lend itself to computation of a square root?
I'm only aware of the Shockley Eq which I'm trying to use to sqrt() and input voltage

#### NVCC_ENVCC

Joined May 6, 2024
4
You can use an analog multiplier configured to do square-roots (below):
View attachment 321758

And here's a design for a simple square-root, voltage-to-current converter.
View attachment 321765
The current can then be converted to a voltage by a transimpedance configured op amp.
(Note that the 15V supply required is -15V to ground.
It's not stated, but the circuit should still operate with a lower negative voltage with appropriate adjustment of the 100kΩ resistor value.)
Edit: Noticed a problem with that circuit--
It would appear that the 1.2kΩ resistor at the bottom also would need to go to the negative voltage for the circuit to operate, since other wise there's no voltage across the two right-bottom transistors for them to conduct current.
Thank you for your response, can I implement a voltage multiplier without addition components, given I only have resistors, BJTs, caps, inductors, and op amps?

#### crutschow

Joined Mar 14, 2008
34,837
can I implement a voltage multiplier
Not easily.
Why not just do the square-root circuit I posted?
I only have resistors, BJTs, caps, inductors, and op amps?
You can't use diodes?
Is not, then you can use a BJT as a near ideal diode by connecting the collector to the base.

#### MisterBill2

Joined Jan 23, 2018
19,398
There is an analog multiplier IC that has been used to generate the root function. It was the LM1496. There may be more modern versions available, but that one was well discussed in the National Semiconductor "1978 Applications Manual" So it is not a new> The primary device. The primary benefit was that it did not depend on the temperature affected nonlinear properties of PN junctions.
Probably there are now other analog multiplier ICs around, although I have never needed to use them.

#### crutschow

Joined Mar 14, 2008
34,837
Probably there are now other analog multiplier ICs around
There are many.
One is shown in post #4 (AD633).

#### MisterBill2

Joined Jan 23, 2018
19,398
There are many.
One is shown in post #4 (AD633).
GOOD!! I was hoping that there were more and beter analog multipliers available now. I have not looked at any current application notes, but the original notes did include a square root scheme. Hopefully the Analog Devices notes also include that function. For my projects that would have been done in the controls computer, possibly by a math co-processor. But I only wrote the descriptions of what the software would do, not the actual code. Except for PLCs.