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