Circuit to calculate square root of voltage?

1) (Easiest) Use a microcontroller (for example, a PIC). All you need is the chip (with program) and an RC low-pass filter/buffer on the PWM output if the micro doesn't have a DAC output. The micro can calculate the square root algorithmically or use a lookup table (LUT). 2) Use the relationship x^0.5 = exp(0.5*ln(x))

You can do this with a couple of quad op-amps and some matched transistors (see AofE page 254, for example, for a temperature-compensated type).

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany
Loading thread data ...

Others have described the log-antilog method (shown on page 9 of this data sheet)

formatting link

so I will point you to another method that involves an analog multiplier in a feedback loop described here:

formatting link
(figure 14 of this data sheet).
formatting link
or page 8 of
formatting link

--
John Popelish
Reply to
John Popelish

Here you got it:

formatting link

Cu, Stefan

Reply to
Stefan Wyss

Hello people.

I am looking for a circuit to calculate the square root of a voltage, V(out) = SQRT V(In). (e.g. I input 4V and 2V comes out, I input 3V and ~1.73V comes out).

Q: How can I do this?

[]s

-- Chaos Master®, posting from Canoas, Brazil - 29.55° S / 51.11° W

"Sing what you can't say / forget what you can't play Hasten to drown into beautiful eyes / Walk within my poetry, this dying music" - My loveletter to nobody

My e-mail address is renanDOTbirckATgmailDOTcom [DOT=. AT=@]. DON'T SPAM IT. REPLY TO NEWS UNLESS I ASK YOU TO REPLY BY MAIL. UNWANTED REPLIES = PLONK TO WHO SENT THEM.

NP in foobar2000: 02. Nightwish - [Angels Fall First] Angels Fall First [5:35]

Reply to
Chaos Master

John Popelish to stdout:

[circuit: V(OUT)=SQRT V(IN)]

Thank you and all others that replied, will put those PDF's in my download manager' queued downloads so it downloads them and I can read them when I have time.

[]s
--
Chaos Master®, posting from Canoas, Brazil - 29.55° S / 51.11° W

"Sing what you can't say / forget what you can't play
 Hasten to drown into beautiful eyes / Walk within my poetry, this dying 
music"
                 - My loveletter to nobody 


My e-mail address is renanDOTbirckATgmailDOTcom [DOT=. AT=@]. 
DON'T SPAM IT. REPLY TO NEWS UNLESS I ASK YOU TO REPLY BY MAIL
UNWANTED REPLIES = PLONK TO WHO SENT THEM.
Reply to
Chaos Master

How good does it have to be? How fast does it have to be?

You can use the exp(0.5 * ln(X) ) method. Both the exp() and ln() functions can be done using diode drops (usually E-B diode) I'm sure others will also suggest this one.

You can use a ADC-MICRO-DAC method. This is a one chip solution but it does require some programming. BTW: a 32 bit in, 16 bit out sqrt() on an

8051 only takes a few milliseconds.

You can use several straight lines to sort of do the curve. If you can stand the error this can lead to a low cost circuit that does what you need.

There are also pulsed circuits that will do sqrt() but they respond slowly. They are more accurate than the straight lines method though.

--
--
kensmith@rahul.net   forging knowledge
Reply to
Ken Smith

The square root function can be implemented by placing an analog IC multiplier in the feedback loop of an op amp.

formatting link

I've had to do this before for a low frequency app, and this solution with this IC worked well for me. I believe a sample circuit is in the data sheet. Also, old issues of AD's Analogue Dialogue have more.

Good luck Chris

Reply to
CFoley1064

Here's a funny idea:

If the micro has a ADC and a DAC and the DAC output can be used as the reference for the ADC:

The ADC's number is 2^N*X/Y where X is the input and Y is the REF voltage. All you have to do is scale the ADC number and apply it to the DAC output and you get the sqrt() function.

--
--
kensmith@rahul.net   forging knowledge
Reply to
Ken Smith

Yes, MC1494 fig 25, and MC1495 fig 27. But nothing in the MC1496 data. Jim, did you design those chips? Who wrote the datasheets?

--
 Thanks,
    - Win
Reply to
Winfield Hill

Dig back thru OLD MC1494-95-96 data sheets. One of them showed a multiplier in the feedback loop of an OpAmp to do square-root.

...Jim Thompson

-- | James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | |

formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.

Reply to
Jim Thompson

My only experience with the MC1495 in a commercial circuit was a controller board that I used to maneuver around. It was in a hybrid analog/digital control loop, where the processor did the "executive" control like setting targets and commanding mode changes, and the analog board actually closed the loops.

The multiplier took the secant of one axis angle and multiplied it by the the angle of a second axis to control a third. The ironic thing (to me) was that the processor was calculating the secant, all of the axis information was available to the processor, it would have taken one measly line of code to do the multiplication -- yet we had an analog part in there, in a spot where the specs were critical enough that every two years or so manufacturing engineering would have to re-spec a part because somebody's process had been "improved".

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Reply to
Tim Wescott

The MC1495 came first, and is nothing more than your basic (Barrie) Gilbert Cell.

The MC1496 stripped off linearizing diodes... for use as an RF signal mixer.

The MC1494 added level-shifting and various compensations, and was done by an employee of mine, Maurice Free, as his Master's Thesis, under my tutelage.

The data sheets were done by the Motorola Applications Department, as were most Motorola data sheets in the '60's. So they don't always make sense ;-)

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

"Chaos Master" wrote

And don't forget the 's.e.d answer to everything': A PIC.

Do it in software... Built in A/D -> sqrt() -> D/A

--
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
Remove spaces etc. to reply: n o lindan at net com dot com
psst.. want to buy an f-stop timer? nolindan.com/da/fstop/
Reply to
Nicholas O. Lindan

Nicholas O. Lindan to stdout:

A PIC... A PIC... everything is a PIC! :)

I want to do an analog solution first... without using the microcontroller or (A/D)/(D/A) converter.

[]s

-- Chaos Master®, posting from Canoas, Brazil - 29.55° S / 51.11° W

"Sing what you can't say / forget what you can't play Hasten to drown into beautiful eyes / Walk within my poetry, this dying music" - My loveletter to nobody

My e-mail address is renanDOTbirckATgmailDOTcom [DOT=. AT=@]. DON'T SPAM IT. REPLY TO NEWS UNLESS I ASK YOU TO REPLY BY MAIL UNWANTED REPLIES = PLONK TO WHO SENT THEM.

Reply to
Chaos Master

I'm not sure the protection networks in the PIC are very good diodes, though. They seem to behave like resistors in series with small diodes.

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

"Chaos Master" a écrit dans le message de news: snipped-for-privacy@News.individual.net...

How about that one ? Purely analogic but nevertheless uses a PIC. You use the input clamp diodes to give exp/log response. The PIC give them matched and in the same package. The pb is that they share a common connection at the supply rail and we have to do with this. Of course this circuit is not temperature stable and adding some compensation will probably lead to an even more completly stupid circuit.

But hey, we've used a PIC.

Dclamp Dclamp ___ .--||----+-|___|-. | | | R | | | | || | ___ | || | '-|- | ___ ___ IN -|___|-+-|- | ___ | >--+-|___|-+-|___|-+- OUT R | >+-|___|-+-|+/ R | R | .-|+/ 2R | |/| | | | |/| .-. | | === | | | | GND |R| | || | '-' '-|- | | | >--' +-----------------|+/ | |/| .-. | | |R| '-' | === GND (created by AACircuit v1.28 beta 10/06/04

formatting link

--
Thanks,
Fred.
Reply to
Fred Bartoli

"Fred Bartoli" schreef in bericht news:41b21319$0$25965$ snipped-for-privacy@news.free.fr...

[snip]

Excellent! ;-) No programming skills/tools needed either, this time.

--
Thanks, Frank.
(remove 'x' and 'invalid' when replying by email)
Reply to
Frank Bemelman

Even if they were good diodes they would make a lousy log amp (and thus a lousy square rooter) for reasons discussed here before and no doubt sitll findable with a google groups search on "log amp" or "logarithmic" or perhaps "multiplier", also discussed in some detail by Bob Pease in articles EDN articles available on the National web site.

The suggestion to use a multiplier in the feedback path of an op-amp IAW a number of data sheets and app notes from various mfgrs (originally by Analog Devices) was a good one.

But I have worked on control systems which did a square root pneumatically, and you could certainly still find examples of this in numerous refineries and power plants, far more accurate than anything which can be done with diodes and working reliably for decades in conditions too harsh for most electronic components .

Regards, Glen

Reply to
Glen Walpert

The data sheet for the Raytheon RC4200 multiplier (XY/Z) has a couple of tidy looking square root circuits. 8 resistors and 2x 8-pin DIP packages.

--
Tony Williams.
Reply to
Tony Williams

Jeez Louise. All these replies and nobody (that I spotted anyway) mentioned Translinear circuits? Are there no analog experts here at all? (Those suggesting microprocessors for getting an analog square root function have been noted down and are permanently disbarred. :-)

Who knows if any of this shows up online, but there is plenty in print, familiar to specialists. Try searching under "Translinear circuits" or "Barrie Gilbert" or possibly the latter's seminal pair of papers in the December 1968 _IEEE Journal of Solid-State Circuits_ of which the truly relevant one is not the "Precise four-quadrant multiplier with subnanosecond response" but rather "A new wide-band amplifier technique" which contains the insightful and prophetic phrase "The number of circuits that can be devised to perform functions of this kind is legion."

This is from memory, I am pressed for time. You can even do it all directly with FETs if you really want. Klumperink and Meyer and Mack and I wrote a broad survey paper in 96 though it does not mention square roots specifically. Evert Seevinck wrote a good thesis on the subject in 81 or

82, I wrote something back then that touched on the FET versions, many others did too. (Analog multipliers in feedback loops. Hmmph.)

-- Max

"Chaos Master" in news: snipped-for-privacy@News.individual.net...

Reply to
Max Hauser

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.