Hi, I was wondering what is the cheapest (and hopefully, simple to wire up) way to get an analog square function. I.e., input a voltage x, and get voltage x^2 out. Or x^2/10. Or some reasonable approximation of either of those.
The standard trick is to feed the voltage into both inputs of a multiplier chip. But even those AD633 chips are tough to afford on my budget (around 20 USD each).
Didn't find your answer? Ask the community — no account required.
D
Don Y
formatting link
If your need is not an "academic exercise", you might consider WHY you need such a transfer function -- its role in your design. (i.e., thinking about the design differently may eliminate that "need").
In addition to voltage range/domain, you should also consider bandwidth desired.
E
Edward Rawde
I'd start with this:
formatting link
Which leads to
formatting link
leads to
formatting link
P
Phil Hobbs
If you want to do analog computing, you’re pretty well stuck with multipliers or log/antilog chips.
If you’re trying to linearize a control loop, you can play pretty fast and loose with discrete BJTs, because that doesn’t need high accuracy, and the loop will track out the offsets.
Cheers
Phil Hobbs
J
Jan Panteltje
For AC signals I wonder if you use a cheap analog volume control chip and put the signal on both the gain control and the signal input. Have not tried it though.
B
Bill Sloman
The late Jim Thompson's MC1496 is a lot cheaper - if a lot nastier - and Digikey has it for $0.35 on cut tape.
You'd probably need to trim out offsets to get any kind of accuracy for low level inputs. The MC1495, which was closer to a proper multiplier, is now obsolete.
B
bitrex
A pretty low parts count squarer is this old chestnut from EDN:
formatting link
The ends of Vcontrol and V_in are both approximately at virtual ground, so use equal-value resistors to make a current divider and drive them with the voltage you want to square.
It's only one quadrant but it's decently fast and accurate and doesn't need AC coupling, and even if you have to take the abs I think it's still cheaper and way less fiddly than trying to roll your own logger/antilogger.
J
John R Walliker
Another possibility is the LM13700 which comes in a dual in line package so it is easy to wire up. You may need some extra components around it.
formatting link
John
B
bitrex
It works pretty good for squaring, see e.g. figure 24/25:
formatting link
Drive ports Vi and Iabc with a current and you get Io = [Iabc*Ii]/Id. Feed Io back to Id and you can get a square root while you're at it!
B
bitrex
Or rather you'd probably want to do some math on Io before feeding it back to take the square root, of some function of x^2.
W
Waldek Hebisch
Standard apprach for low-accuracy approximation is diode-resistor network. But such network gets inpractically large if you need good approximation.
C
Christopher Howard
Thank you. Looking at all the suggestions put forward, it seems like — for my application — that just getting the AD633 might be best choice. My analog computer is short one multiplier for a simulation I wanted to play with, and I wonder if there was some easy trick to get a reasonably accurate square function without getting a decent multiplier. In a lot of basic physics simulations, one has to square velocity to get things like drag or lift forces.
Line approximation with a resistor-diode has some appeal. Maybe it could be accurate enough for my little educational experiments? I think, to pull it off, I would need to use trim pots — two per segment, for the biasing and the attenuating.
The schematic from the neurological paper seemed to be a line approximation solution with some of the diodes in the op amp feedback. I didn't try to get the whole research paper so I'm not sure how one would work out the correct resistor values.
I downloaded the information on the MC1496-D and LM13700. I see the basic idea is that these chips also produce products of signals, but beyond that I can't make any intelligent comments at present. My analog computer is usually dealing with signals in the range of a few hundred Hz up to a few kHz. I am curious if maybe something could be done with the gain control pin on the LM386 chip (I have quite a few of those). It looks like, using a series RC network, that the gain can be set anywhere from 20 to 200.
D
Don Y
If you can limit the domain (and thus, range) over which it must apply, you can get good results (for some value of "good").
We used it to monitor the instantaneous voltage at a thermal prinhead to adjust "print time" (duty cycle) for a desired level of contrast (knowing power dissipated is V^2/R -- R being a device-specific constant).
But, we only had to accommodate the extent of the "load regulation" of the power supply (when the load can vary from nothing to dozens of amps at a 400Hz rate)
J
john larkin
A simple opamp circuit with some resistors and diodes can have a several-segment approximation to a square root. I did that in a steamship throttle control once and it worked well enough.
John Larkin Highland Tech Glen Canyon Design Center Lunatic Fringe Electronics
B
Bill Sloman
Didn't you have a DEC digital processor to play with for that gig?
The DEC PDP-8 I got to play with for my Ph.D. project could be persuaded to do multiplication and division - I used it for signal averaging - and square root extraction shouldn't have been difficult.
J
john larkin
Yes. I had a PDP-8 12-bit machine running FOCAL, and simulated the steam valve, the turbines, the prop, the hull, and the ocean. I plotted the responses on a teletype machine. We showed it to the shipyard and the owners and they liked it and we got tho sell them the engine room consoles. That was for the 32,000 hp, LASH ships. I think I was a sophmore at Tulane at the time.
Sea trials were fun. People treated this gawky kid like a god and I got my own cabin.
The actual control loop was feed-forward from the throttle to the steam valve position, with a diode nonlinear function generator, and limited-influence RPM feedback. That limited the number of people who might be killed if the feedback tach failed. Which one did, but that's another story.
Ships are most all diesels now. Steam plants are efficient but complex and it's hard to get crews who can run them.
John Larkin Highland Tech Glen Canyon Design Center Lunatic Fringe Electronics
B
Buzz McCool
I didn't know that. Thanks for sharing.
J
john larkin
Steamships burn Bunker-c, which is about the cheapest hydrocarbon available. It's stiff tar at room temperature. Nasty, stinky stuff.
John Larkin Highland Tech Glen Canyon Design Center Lunatic Fringe Electronics
L
Liz Tuddenham
You need steam to heat it so that it can flow into the burners. The steam comes from the boilers that are heated by burning the fuel - but the fuel can't be burnt until it has been heated by the steam wbich can't be made until.....
Steam plants are complex....
B
bitrex
Even in olden times large steam engines were started by smaller auxiliary steam engines..
My book on the topic, "Steam" by Babcock & Wilcox is an 1891 printing and was already in its 16th edition:
formatting link
It has some water damage which I figure is appropriate for a vintage book on steam, sort of like an old cook book with food stains on it.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.