Square root circuit

Hi all, I may need to make a square root circuit to linearize the gain in a temperature control loop with resistors as heaters. (Speed is not very important.) For ~$7 I can use an analog multiplier (AD633) or something with matched transistors. ala B. Pease page 30 here.

formatting link

I'm wondering if there is something else (in nature) that naturally takes a square root. For instance a silly idea would be to look at the temperature rise of a resistor driven by a voltage.... (kinda the inverse of the problem I'm trying to solve.)

(Oh sure the obvious answer is a computer.)

George H.

Reply to
George Herold
Loading thread data ...

Yup, a 40 cent uC is probably the answer here.

Reply to
bitrex

I recently did this, using a BJT with another one (diode-connected) as emitter degeneration, and another two diodes (bjts) from base to ground. To make it square-root, you put a bias resistor from the midpoint of the diodes to the positive supply, enough so that the forward voltage of the bottom one stays nearly constant with drive.

Not brilliant, but good enough for linearizing a heater.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

Here's a weird idea, don't know how practical it is...

Build an analog computer using op amps that solves the differential equation dy/dx - 1/(2x) = 0 using x as your input. Then run the solution through an exponential converter and the output of the exponentiator will be proportional to sqrt(x)...

Reply to
bitrex

Another way you maybe already know is to use a differential amplifier, an ordinary amplifier, and the analog multiplier as a squarer

The input is applied to the differential amplifier along with the output of the squaring circuit, so at the output of the differential amplifier you have K1(ae_2^2 - e_1) where e_1 is the input and e_2 is the square root output.

Then run that output through another amplifier with gain K2 and feed it to the input of the squarer so you have K1K2(ae_2^2 - e_1) = e_2

and if the gains K1 and K2 are large you then have ae_2^2 - e^1 = 0

Reply to
bitrex

One can also make an inverting opamp and add a diode across the feedback resistor, with maybe a little extra resistance in series with the diode. Like you say, not brilliant, but good enough. That's the first step towards a piecewise breakpoint thing.

You can get a single breakpoint (slope change) by using two opamps, summing their outputs, and scale so that one hits its rails. Or three. Or four.

High precision (like, 0.02%) math can be done with PWM multipliers, which can be cheap but take more thinking. Process controllers used to do that before uPs came along.

--

John Larkin         Highland Technology, Inc 
picosecond timing   laser drivers and controllers 

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

Two transistors an a few resistors can make a passable squaring circuit. An output amp and some feedback can make that a square root. I'll leave the details to the student.

All square roots get crazy near zero, which is a good reason to not do it too well.

--

John Larkin         Highland Technology, Inc 
picosecond timing   laser drivers and controllers 

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

I drew that up. "Scratching head..." I feed the base (of the transistor) with a current ? and take the output (voltage) from it's emitter.

No.. I feed the base with a voltage.

George H.

Reply to
George Herold

Yeah thanks, Once I have a multiplier it's fairly easy.

George H.

Reply to
George Herold

Try something really tacky like this:

Version 4 SHEET 1 880 680 WIRE -208 144 -240 144 WIRE -160 144 -208 144 WIRE -96 144 -160 144 WIRE 128 144 -16 144 WIRE 272 144 128 144 WIRE 368 144 272 144 WIRE 432 144 368 144 WIRE 272 176 272 144 WIRE -160 224 -160 144 WIRE 128 256 128 144 WIRE 272 288 272 256 WIRE -160 336 -160 304 WIRE 128 400 128 336 WIRE 272 400 272 352 WIRE 272 400 128 400 WIRE 272 432 272 400 WIRE 272 560 272 496 FLAG -160 336 0 FLAG 272 560 0 FLAG -208 144 IN FLAG 368 144 OUT SYMBOL res 288 272 R180 WINDOW 0 -53 70 Left 2 WINDOW 3 -53 38 Left 2 SYMATTR InstName R2 SYMATTR Value 0 SYMBOL diode 256 288 R0 WINDOW 0 64 13 Left 2 WINDOW 3 48 46 Left 2 SYMATTR InstName D1 SYMATTR Value 1N4148 SYMBOL res 0 128 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R3 SYMATTR Value 20K SYMBOL voltage -160 208 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 WINDOW 0 -67 106 Left 2 WINDOW 3 -65 174 Left 2 SYMATTR InstName V3 SYMATTR Value PULSE(0 10 0 2) SYMBOL diode 256 432 R0 WINDOW 0 64 13 Left 2 WINDOW 3 48 46 Left 2 SYMATTR InstName D2 SYMATTR Value 1N4148 SYMBOL res 112 240 R0 WINDOW 0 -66 31 Left 2 WINDOW 3 -66 65 Left 2 SYMATTR InstName R1 SYMATTR Value 5K TEXT -96 24 Left 2 !.tran 3 TEXT 64 24 Left 2 ;WORSE SQUARE ROOT TEXT 112 56 Left 2 ;JL July 2015 TEXT 320 392 Left 2 ;BAV23 DUAL

--

John Larkin         Highland Technology, Inc 
picosecond timing   laser drivers and controllers 

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

Oh boy, I've opened a can of worms now. (The can is my brain, and the worms my lack of understanding.) I get a Log function from diode-opamp thing.. (but how do I get the square root?) I could do a log anti-log, with a factor of 2 (or 1/2) somewhere.

Oh I'd never heard of that... V1 = pulse height, V2 = pulse width. Average is ~V1*V2... thanks

George H.

Reply to
George Herold

Oh sure once I have a multiplier, I make V^2 and just feed that back in an opamp.

Yeah.. that's why it's a bit scary for me to think about doing it with transistors. I'l make some silly mistake and the circuit will blow up when the temperature changes.

George H.

Reply to
George Herold

What you're trying to do is similar to what is done on the front end of some photodiode transimpedance amplifiers. There you've got to squeeze a big range into an ADC. Here is an example of Log TIA at Linear Tech.

formatting link

It's not a square root circuit but that's where I would start.

Reply to
Wanderer

That sort of thing is wild overkill to tweak the dynamics of a PID driving a resistive heater.

This is interesting because I now have a requirement to build two temperature controllers, on opposite sides of a roughly 1 square inch pcb, using 0805 resistors as the heaters. But maybe I should use mosfets as the heaters, and keep things linear. Heck, I may not need an opamp!

--

John Larkin         Highland Technology, Inc 
picosecond timing   laser drivers and controllers 

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

formatting link

Reply to
Simon S Aysdie

It just occurred to me that zener diodes might make nice heaters (but probably not for your app).

formatting link

The opamp current and thermal limits, so it probably doesn't blow up. Some artistic copper pours could help spread the heat.

It may need R9 to tame the loop gain, but it could drop something small, one volt maybe.

I need two heaters, one on each side of a tiny round PCB. The two Things have a nasty phase change sort of effect around room temp, and have to be heated to around 70C.

I guess resistors as heaters and PWM would work here too.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

Ahh.. got it, I drew Phil H's circuit like that the first time, but then didn't like the collector resistor.

Thanks Simon

George H.

Reply to
George Herold

Yeah well no one (but me) liked the FET as heater idea. (It still seems like the way to go... There's no room temperature pass element to get hot for one.)

George H.

Reply to
George Herold

I've heard of using zeners for heaters... don't you want to control current? Or is that the purpose of R9? Maybe split R9 in half and stick one piece on each side to balance the heat. (Maybe the matching is not that critical. The zener voltages won't match either.)

George H.

Reply to
George Herold

I've used mosfets as heaters several times. Works great, but you do need a current limit of some sort. Resistors limit themselves.

A 3-terminal voltage regulator makes a neat heater. It protects itself.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

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.