# Bil Herd: Computing with Analog

When I was young the first “computer” I ever owned was an analog computer built from a kit. It had a sloped plastic case which had three knobs with large numerical scales around them and a small center-null meter. To operate it I would dial in two numbers as indicated by the scales and then adjust the “answer” by rotating the third dial until the little meter centered. Underneath there was a small handful of components wired on a terminal strip including two or three transistors.

In thinking back about that relic from the early 1970’s there was a moment when I assumed they may have been using the transistors as logarithmic amplifiers meaning that it was able to multiply electronically. After a few minutes of thought I came to the conclusion that it was probably much simpler and was most likely a Wheatstone Bridge. That doesn’t mean it couldn’t multiply, it was probably the printed scales that were logarithmic, much like a slide rule.

Did someone just ask what a slide rule was? Let me explain further for anyone under 50. If you watch the video footage or movies about the Apollo Space Program you won’t see any anyone carrying a hand calculator, they didn’t exist yet. Yet the navigation guys in the first row of Mission Control known aptly as “the trench”, could quickly calculate a position or vector to within a couple of decimal places, and they did it using sliding piece of bamboo or aluminum with numbers printed on them.

I inherited my first slide rule from my Dad who had used his in college. That slide rule has 32 or 33 scales on it, each a different mathematical computation, and was made of bamboo, a fact my Dad pointed out that during the winter the guys with the aluminum slide rules had a harder time as the cold would cause them to get stuck. I used a slide rule in my 10th grade chemistry class, and by the 12th grade everybody had “four banger” calculators. You couldn’t open a newspaper without seeing advertisement for the calculators as they quickly dropped from \$100-\$400 down to \$29.

Jump forward to today as I sit in front of a breadboard with a couple of analog Op Amp modules and a couple of little voltmeters. There are three basic styles of DC amplification with Op Amps; inverting, non-inverting and differencing depending on which inputs you inject the signal. In the case of differencing, the signal is injected into both inputs.

It’s easy to see then how to add two voltages together, I go so far as to print the formulas on my own PCB’s to help me remember but the determining factor is there will be a voltage divider formed by the resistors that is connected to one or more inputs. Simply put, a circuit that feeds a proportion of the signal back into the inverting input will have a gain set by that proportion.

Quickly becoming bored with addition and subtraction we move up to multiplication. Using a venerable Analog Devices AD633 four quadrant multiplier, it’s easy to show multiplication in action and wiring the same voltage to both inputs results in square/square root. What makes the AD633 so usable is it has been engineered to be somewhat precise about utilizing the internal logarithmic behavior and then includes gain so that the small usable area of the curve becomes a bigger usable area… big enough to see on my little three digit voltage displays.

And finally we take multiplication back to AC where the fun is; injecting a tone in one terminal and a control voltage in the other we recreate a Voltage Controlled Gain block like might be found in an analog synthesizer or as part of an Automatic Gain Control (AGC) system. This is the heart of Amplitude Modulation as used in radios and complex audio synthesis such as ring modulators in 1970’s synthesizers.

The AD633 does a good job of multiplying both DC and AC signals. Basically it uses the inherent logarithmic characteristics of diode/transistors junctions but is also surrounded by carefully trimmed parts (laser trimmed resistors) and built in amplification to make the most use of the desired log responses.

Photo of Science Fair Computer courtesy of [Dan Mathias] of Futurebots

## 34 thoughts on “Bil Herd: Computing with Analog”

1. Interesting article. Not just +50s who know what a slide rule is though – I’m 18 and have had one for years :) although I suspect I am definitely in a minority :P

1. Mushroomglue says:

I’m 18 too; I don’t have one, but I know roughly how to use one. I’ve also got a mechanical calculator sat on my desk…

2. saidone says:

I am still using my Jeppesen CR-3 when flying, it can do some neat math. And I am not alone: it is also still widely used, produced and sold ;-)

3. I’m 23 and I’ve never even heard of them before. It depends who you know and how often you talk to your grandparents I guess. Lol

1. static says:

depends on the experiences of your grandparents as well. very few of my parents and grandparents generations attended college, and many of them didn’t attend high school.

I have two slide rules and I’m 19. One small for technicians and the other one 12 inches long with the scale split in half for extra precision. However I don’t use them much since I’ve memorized logarithmic tables.
A year ago, I lost it at school. A day after, one of our teachers found me and gave it to me. He said: “I think this is yours, since no one else on this school uses it.”

2. Stephen says:

If you have an analogue multiplier circuit you can draw Lorenz’s attractor on your oscilloscope.

3. Steven says:

Although I don’t use it anymore, my slipstick still holds a place of honor somewhere in a desk drawer.

1. static says:

I’m nor sure somewhere in a desk drawer is really a place of honor.;)

4. jacques says:

Ok, addition is easy, now could we see how to make some multiplly

1. Bil Herd says:

Yup I multiply with the AD633 for both DC and Audio near the end of the video.. By hooking both inputs together it also does squares and also can be used as an AM modulator/Voltage Controlled Amplifier.

1. Bil Herd says:

Right and the number of adjustments to center the range in the usable logarithmic response is very visible and a fairly accurate representation of how many things you would have to tweak just to get close. Also temperature skews right away.. By using the AD 633 in this case (the part is older than my son) you get the benefit of laser trimmed resistors and basically a balanced circuit to start with. The amps to bring the log range out to where I can demonstrate voltages between 1-9 is just an added plus.

I have also seen using the filament of a bulb or photo receptor to get the log function also.

2. tekkieneet says:

I would assume that the implementation could be made onto a chip with the same trimming etc., so the temperature are tracking. I think of it more as a mental gymnastic. Fun to watch, but really hurts my brain to try. I did say it was neat. The type of neat trick that should also be called a hack. :)

Yes, this stuff is old. I found that because of the limiting technology back then, that there are more ingenious solutions. These days youngsters just throw resources at things and lacks the elegance of simplistic designs.

1. Bob says:

More MIPS … more MIPS. Analog isn’t dead lol. A digital solution can only have the correct result so many million times a second and some times that isn’t good enough. You need analog that always has the correct result. DSP can only go so far, after that you need analog.

For many the stumbling blocks in analog are op-amps, phase locked loops and carrierless modulation.

2. tekkieneet says:

We are at a point (in last few years) when a power supply using digital control feedback loops beats analog in performance. When I say digital, I mean high MIPS application specific DSP stuff not the crappy Arduino/PIC feedback loops (which I can easily beat as in PWM frequency & BW with analog chips from 1980’s.) Stuff you can tune their performance, trade off and do stuff that is hard in analog.

These days we also have DPLL, NCO and SDR. Fun things and good times for people that know how to do it either way. The rest just like their blinking LED.

5. phreaknik says:

Great article/video! More like this!!!!

1. Bil Herd says:

What I learned while doing this is that the particular logarithmic scale you used wasn’t critical, you could use a natural log or a 10 base log and still multiply. This wasn’t immediately obvious to me due to my weak math background. (But the computer I use is very good at math)

1. tekkieneet says:

That’s one of the reasons why sometimes we use dB (20*log10(output/input)) for things e.g. amplifier gains, insertion losses etc. even now that we have computers.

So at the syslem level, you can just add them together to get the overall gain… effectively multiply them.

2. enl says:

I was the end f the slipstick era… went through college with both a sliderule and an HP calculator. Used the sliderule more (circular 14″ equivalent) Have a 4 foot Pickett classroom rule hanging on the wall next to me right now… grabbed it out of the dumpster at work.

As for logs, I tell my students that all logs are the same, as are all exponentials. The only difference due to the base is scale in one dimension, just like all sine/cosine or quadratic are the same except for scale and shift. This is in contrast to higher degree polynomials and composited functions, which are distinct under linear transforms.

As a side note: my favorite multipliers are still the transconductance amp (fastish one or two quadrant) and the LED/CdS (slow two quadrant) pair.

6. This is just what i keep visiting Hackaday for. Thank you for the history and electronics lesson!

7. janostman says:

That’s not even fun, slideruler or not. You don’t use a shovel when building a house but machines? Do you want them to use that on the ISS today? Probably not. Or use a horse and carriage instead of a car? Some things better left alone and forgotten.

1. FredTheRanger says:

Who cares how anything works? Let’s just all go watch Jersey Shore.

2. static says:

The tools you use today the progeny of the tools you declare to be forgotten.

3. pcf11 says:

8. windsoftime says:

+100 Hawkwind

9. Keith says:

What if you were to try and make an ALU out of analog components? Couldn’t it be faster? Like doing operations in less time and some operations in constant time vs linear time?

1. Dax says:

It would probably have settling times longer than the digital versions because it has to be read out somehow and ADC is not exactly simple.

The main advantage would be if you don’t need very much precision.

1. Greenaum says:

Maybe if you kept the total capacitance low, and the resistance as well, currents would be able to flow and settle easily and quickly. But then power consumption would be way up. Hm, maybe there’s a swings:roundabouts formula for this somewhere.

1. Keith says:

Well we are talking performance here and if we only need so much accuracy? Why hasn’t been employed more often? I know there are ADCs that can easily do 4 GSPS. I can think of graphic applications where an approximate number would just be fine.

10. stormdog says:

I must be a dinosaur. Nobody mentioned high school slide rule competitions.

1. Bil Herd says:

Which competitions specifically, as there was the see who can multiply fastest and then there was see who could beat the cr@p out of each other better…the sliderule basically being a condoned weapon you were allowed to carry. I was also pretty wicked with a violin bow….

1. Stormdog says:

Hah! I guess I’d forgotten about dueling with sliderules.
I don’t have any experience with violin bows, so I’ll bow to your expertise there.