WTF is wrong with Sloman?
At least he doesn't have to worry about looking stupid in front of a customer. He doesn't have any.
WTF is wrong with Sloman?
At least he doesn't have to worry about looking stupid in front of a customer. He doesn't have any.
Works for me! Here's a 5-op-amp version with 0-10V in and 0-10V out. Final gain stage is 4.472 and input voltage is * 2.
Cyan- theoretical sqrt Red - input Violet- output
Divider: 2.5K + 1.035K + 2.055K + 2.316K + ?? for 200uA from reference.
Input resistor: 10.0K
Shunt resistors: 7.06K, 13.72K, 3.60K, 5.65K
It could obviously be made a bit better but that's way too much like work.
Lipstick applied and waiting for a smooch.
eems to
f the
y for the Porcine Cosmetic Award. ;)
on
ions between the desired curve and the linear segments.
ind the optimum location of all the breakpoints. I used Fletcher-Powell whe n I did it - it was better than Marquand for my task. There have been a few other schemes since then.
das
et Rob to explain it to you in more detail. You don't lose anything new by being stupid here, but you wouldn't want to do it in front of a customer.
I scribbled a graph in my notebook, it looks fine. A gain of three from 0-1 V. (inverting) And then I drew three more opamps (turning on at the right point) and sucking current out of the inverting input of the gain of three opamp, to reduce the gain.
Is that a bad idea? George H.
I was actually teasing Rick, who was talking about input bias current errors in that circuit.
The trick of using op amp clamps to switch in resistors at well-defined voltages is cute, especially since (as you say) a 324 is better than good enough, and costs pennies. Diodes come in duals for a couple of cents. Performance-wise, it's better than the Widlar approach, so you can get out the cold cream now. ;)
Cheers
Phil Hobbs
Of course there's a minor error in the schematic--resistors R1...i should go to the inverting inputs of the op amps, because that's where the clamping action takes place.
Cheers
Phil Hobbs
Sounds like a lot of parts. You don't need a very good approximation of a square root.
Thanks.
Years and years ago (probably not long after LTC was formed) I asked Bob Dobkin about making a chip that would be sort of a general purpose linearizer. He said they had considered it but thought the market size wouldn't support it. He was probably right, but I thought it interesting.
--sp
Gack, of course. That's why it's hard to proofread your own stuff- it looks like it should look not like it is!
On 01/07/2015 15:16, George Herold wrote:
A RF die-hard might try to shoehorn something out of the logarithmic response of super-regenerative receivers but here is an LTspice PWM squarer inside a servo that could be cheaply built using untrimmed jelly bean parts if needed.
Version 4 SHEET 1 984 680 WIRE -208 -656 -320 -656 WIRE 512 -656 -208 -656 WIRE -800 -624 -800 -656 WIRE -528 -624 -800 -624 WIRE 704 -624 704 -656 WIRE 816 -624 816 -656 WIRE -320 -608 -320 -656 WIRE -208 -608 -208 -656 WIRE -800 -592 -800 -624 WIRE 80 -544 80 -576 WIRE 816 -528 816 -544 WIRE 816 -528 784 -528 WIRE 784 -512 784 -528 WIRE 704 -496 704 -544 WIRE -48 -480 -48 -528 WIRE 816 -480 816 -528 WIRE -800 -464 -800 -512 WIRE -208 -448 -208 -528 WIRE -80 -448 -208 -448 WIRE 80 -448 80 -464 WIRE 208 -448 208 -480 WIRE 208 -448 80 -448 WIRE 656 -448 416 -448 WIRE 80 -432 80 -448 WIRE 80 -432 0 -432 WIRE -464 -416 -464 -448 WIRE -432 -416 -464 -416 WIRE -320 -416 -320 -528 WIRE -320 -416 -352 -416 WIRE -80 -416 -320 -416 WIRE 416 -416 416 -448 WIRE 368 -400 304 -400 WIRE -208 -384 -208 -448 WIRE -64 -352 -64 -384 WIRE -64 -352 -112 -352 WIRE 80 -352 80 -432 WIRE 272 -352 80 -352 WIRE 368 -352 272 -352 WIRE 656 -352 656 -448 WIRE -528 -336 -528 -624 WIRE -528 -336 -592 -336 WIRE -112 -320 -112 -352 WIRE 416 -320 416 -336 WIRE 512 -320 512 -656 WIRE 512 -320 416 -320 WIRE 816 -320 816 -400 WIRE 896 -320 896 -352 WIRE 896 -320 816 -320 WIRE 416 -304 416 -320 WIRE 272 -288 272 -352 WIRE 368 -288 272 -288 WIRE -208 -272 -208 -320 WIRE -48 -256 -48 -384 WIRE -16 -256 -16 -304 WIRE -16 -256 -48 -256 WIRE 304 -240 304 -400 WIRE 368 -240 304 -240 WIRE -464 -224 -464 -416 WIRE 208 -224 -464 -224 WIRE 304 -208 304 -240 WIRE 416 -208 416 -224 WIRE 656 -208 656 -272 WIRE 208 -176 208 -224 WIRE 352 -160 256 -160 WIRE -528 -112 -528 -176 WIRE 272 -112 272 -288 WIRE 272 -112 256 -112 WIRE -560 -96 -624 -96 WIRE -464 -80 -464 -224 WIRE -464 -80 -496 -80 WIRE -400 -80 -464 -80 WIRE -288 -80 -336 -80 WIRE -224 -80 -288 -80 WIRE -80 -80 -144 -80 WIRE -16 -80 -80 -80 WIRE 16 -80 -16 -80 WIRE 208 -80 208 -96 WIRE 208 -80 96 -80 WIRE -592 -64 -592 -336 WIRE -560 -64 -592 -64 WIRE 208 -64 208 -80 WIRE -16 -48 -16 -80 WIRE 272 -48 272 -112 WIRE 272 -48 256 -48 WIRE 352 0 352 -160 WIRE 352 0 256 0 WIRE 352 32 352 0 WIRE -528 48 -528 -48 WIRE -480 48 -480 16 WIRE -480 48 -528 48 WIRE 208 48 208 16 WIRE -16 64 -16 16 WIRE -624 96 -624 -96 WIRE -288 96 -288 -80 WIRE -288 96 -624 96 WIRE -176 144 -176 128 WIRE -80 144 -80 -80 WIRE -80 144 -176 144 FLAG 784 -512 0 FLAG 816 -656 P12 FLAG 896 -352 N12 FLAG -800 -464 0 FLAG -800 -656 INPUT FLAG 208 -480 PWM FLAG 656 -208 0 FLAG 704 -656 P5 FLAG 80 -576 P5 FLAG -48 -528 P12 FLAG -16 -304 N12 FLAG -112 -320 0 FLAG 304 -208 0 FLAG 416 -208 0 FLAG 704 -496 0 FLAG -16 64 0 FLAG -208 -272 0 FLAG 352 32 0 FLAG 208 48 0 FLAG -528 -176 P12 FLAG -480 16 N12 FLAG -464 -448 VX FLAG -176 128 [VX^2]/VREF SYMBOL voltage 816 -496 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName AnalogVee SYMATTR Value 12 SYMBOL voltage 816 -640 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName AnalogVcc SYMATTR Value 12 SYMBOL voltage -800 -608 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V3 SYMATTR Value PULSE(0 1.001 1m 48m) SYMBOL Comparators\\LT1011 -48 -432 R0 SYMATTR InstName U1 SYMBOL cap -224 -384 R0 SYMATTR InstName C1 SYMATTR Value 2n SYMBOL res 64 -560 R0 SYMATTR InstName R1 SYMATTR Value 330 SYMBOL res -336 -432 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R2 SYMATTR Value 2k SYMBOL sw 416 -432 R0 SYMATTR InstName S1 SYMATTR Value AS1 SYMBOL sw 416 -320 R0 SYMATTR InstName S2 SYMATTR Value AS2 SYMBOL sw 208 -192 M0 SYMATTR InstName S3 SYMATTR Value AS3 SYMBOL sw 208 -80 M0 SYMATTR InstName S4 SYMATTR Value AS4 SYMBOL voltage 656 -368 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName VREF SYMATTR Value 1 SYMBOL voltage 704 -640 R0 WINDOW 0 -131 6 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName LogicVcc SYMATTR Value 5 SYMBOL res -224 -624 R0 SYMATTR InstName R4 SYMATTR Value 200k SYMBOL res -336 -624 R0 SYMATTR InstName R5 SYMATTR Value 470k SYMBOL res 112 -96 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R3 SYMATTR Value 20k SYMBOL cap -32 -48 R0 SYMATTR InstName C2 SYMATTR Value 22n SYMBOL res -128 -96 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R6 SYMATTR Value 40k SYMBOL cap -336 -96 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C3 SYMATTR Value 100p SYMBOL Opamps\\LT1055 -528 -144 R0 SYMATTR InstName U2 TEXT 272 152 Left 2 ;July 2015 TEXT 680 -136 Left 2 !.model AS1 SW(Vt=1) TEXT 680 -96 Left 2 !.model AS2 SW(Vt=-1) TEXT -832 176 Left 2 !.tran 50m TEXT 680 -56 Left 2 !.model AS3 SW(Vt=1) TEXT 680 -16 Left 2 !.model AS4 SW(Vt=-1) TEXT -576 72 Left 2 ;SERVO TEXT 368 -88 Left 2 ;HC4053 TEXT 16 -296 Left 2 ;SELF-OSC PWMER TEXT 272 104 Left 2 ;Quick and Dirty Square Root using PWM inside a servo
I used whatever op-amp and comparator spice offered without thinking much - the circuit is just an idea-provoker. It is not yet optimised and I used a 0..1V input span and 1V reference to avoid scaling complications so that harms the dynamic range a bit. Might be good enough for your thermal stabilizer app.
Have fun!
piglet
Ahh, well those minor errors can confuse we bears with very little brain.
Muchas Gracias,
George H.
Yowser! OK that's over the top for me. But then piglet was always smarter than pooh bear. (I threw the analog multiplier at it yesterday and failed miserably, mostly (I think) because how it behaves near zero volts.
I'll have to look at it more closely tonight. Right now I've finally seen the light of Spehro's circuit and need to push some numbers around.
Thanks, George (bear of little brain) Herold.
That MCU is starting to look awfully good to me.
Yeah well as I said it's not an option. I was again using electronics to check my math yesterday. After finding that my model was wrong, I worked it out last night.
V in Sqrt V R (input) (V-break) (10 k ohm load)
1 1 7.07k 2 1.414 10k 4 2 7.07k 8 2.828 5kScope shot:
On a white protoboard even, :^)
Which I think just about beats this thread to death. (thanks all.)
George H.
eems to
f the
y for the Porcine Cosmetic Award. ;)
on
ions between the desired curve and the linear segments.
ind the optimum location of all the breakpoints. I used Fletcher-Powell whe n I did it - it was better than Marquand for my task. There have been a few other schemes since then.
das
et Rob to explain it to you in more detail. You don't lose anything new by being stupid here, but you wouldn't want to do it in front of a customer.
WTF the is wrong with Larkin? He makes a mistake, I tell him he's made a mi stake, and he gets obnoxious - as usual.
If I hadn't been mildly rude about pointing out the mistake, he wouldn't ha ve realised that he'd made a mistake.
I think DLUNU is channeling Phil Allison.
I'm not complaining about operational errors, I'm asking how it works. Now that I see someone pointed out that the circuit is drawn wrong I don't feel so stupid.
I originally read it like Spehro, interestingly--it was only when I looked closely at it that I noticed it was drawn wrongly. So I understood how it was supposed to work, and didn't really understand your difficulty.
The mind is funny sometimes.
Cheers
Phil Hobbs
Yeah, so how *is* the circuit supposed to work?
Paris in the the Spring
With the resistors connected to the inverting input, the op amp looks like an open circuit for output voltages below the threshold (where the diodes don't conduct).
Thus its resistor is effectively removed from the circuit. Once V_out crosses V_th, the op amp holds its end of the resistor at V_th, just like throwing a switch. That results in a gain change in the voltage divider, but ideally no voltage step.
It's a similar idea to the two-op-amp absolute value circuit, e.g. Fig
4.46 of AoE II. (iirc you don't have AoE III.)Cheers
Phil Hobbs
Have something to add? Share your thoughts — no account required.
Ask the community — no account required