Circuit to calculate square root of voltage?

C

Chaos Master

Jan 1, 1970
0
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]
 
K

Ken Smith

Jan 1, 1970
0
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?

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.
 
S

Spehro Pefhany

Jan 1, 1970
0
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?

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
 
C

CFoley1064

Jan 1, 1970
0
Subject: Circuit to calculate square root of voltage?
From: Chaos Master [email protected]
Date: 12/3/2004 9:35 PM Central Standard Time
Message-id: <[email protected]>

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?

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

http://www.analog.com/UploadedFiles/Data_Sheets/277093686AD633_e.pdf

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
 
K

Ken Smith

Jan 1, 1970
0
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).

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.
 
J

John Popelish

Jan 1, 1970
0
Chaos said:
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?
Others have described the log-antilog method (shown on page 9 of this
data sheet)
http://www.analog.com/UploadedFiles/Data_Sheets/737468486AD538_c.pdf

so I will point you to another method that involves an analog
multiplier in a feedback loop described here:
http://www.phys.ualberta.ca/~gingrich/phys395/notes/node109.html
(figure 14 of this data sheet).
http://www.analog.com/UploadedFiles/Data_Sheets/737468486AD538_c.pdf
or page 8 of
http://www.intersil.com/data/fn/fn2477.pdf
 
C

Chaos Master

Jan 1, 1970
0
John Popelish to stdout:

[circuit: V(OUT)=SQRT V(IN)]
Others have described the log-antilog method (shown on page 9 of this
data sheet)
http://www.analog.com/UploadedFiles/Data_Sheets/737468486AD538_c.pdf

so I will point you to another method that involves an analog
multiplier in a feedback loop described here:
http://www.phys.ualberta.ca/~gingrich/phys395/notes/node109.html
(figure 14 of this data sheet).
http://www.analog.com/UploadedFiles/Data_Sheets/737468486AD538_c.pdf
or page 8 of
http://www.intersil.com/data/fn/fn2477.pdf

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.
 
S

Stefan Wyss

Jan 1, 1970
0
Chaos Master said:
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]

Here you got it:
http://www.edn.com/archives/1997/112097/24di_07.htm

Cu, Stefan
 
N

Nicholas O. Lindan

Jan 1, 1970
0
Chaos Master said:
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?

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

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

Jim Thompson

Jan 1, 1970
0
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

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
 
W

Winfield Hill

Jan 1, 1970
0
Jim Thompson wrote...
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.

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

Chaos Master

Jan 1, 1970
0
Nicholas O. Lindan to stdout:
And don't forget the 's.e.d answer to everything': A PIC.

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

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.
 
J

Jim Thompson

Jan 1, 1970
0
Jim Thompson wrote...

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

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
 
T

Tim Wescott

Jan 1, 1970
0
Jim said:
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

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".
 
F

Fred Bartoli

Jan 1, 1970
0
Chaos Master said:
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.

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 www.tech-chat.de)
 
R

Rich Grise

Jan 1, 1970
0
Jim Thompson wrote...

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

Does anybody even make them any more? The 1496 was the only one of the
three that I found that wasn't stamped "OBSOLETE".

What would somebody use these days?

(Oh, right! All together now, "Use a PIC"! ;-) )

Cheers!
Rich
 
F

Frank Bemelman

Jan 1, 1970
0
"Fred Bartoli"
<fred._canxxxel_this_bartoli@RemoveThatAlso_free.fr_AndThisToo> schreef in
bericht
[snip]
But hey, we've used a PIC.

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

Spehro Pefhany

Jan 1, 1970
0
"Fred Bartoli"
<fred._canxxxel_this_bartoli@RemoveThatAlso_free.fr_AndThisToo> schreef in
bericht
[snip]
But hey, we've used a PIC.

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

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
 
G

Glen Walpert

Jan 1, 1970
0
"Fred Bartoli"
<fred._canxxxel_this_bartoli@RemoveThatAlso_free.fr_AndThisToo> schreef in
bericht
[snip]
But hey, we've used a PIC.

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

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.

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.

<OT> 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 </OT>.

Regards,
Glen
 
T

Tony Williams

Jan 1, 1970
0
Chaos Master said:
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).

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.
 
Top