Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The traditional logarithmic amplifier circuit is described in National Appnote 311:

enter image description here

This circuit uses the difference of two transistor currents to generate the log of the input over a pretty wide range.

The well-matched transistor pair Q1a and Q1b are halves of the LM394 "supermatch" transistor pair. But National discontinued this part last year with no clear replacement.

I can use LM3406 array, but the specs are far worse. There are plenty of arrays of '2222 or '3904 available, but there is no mention of matching in the datasheet. The transistors might be on separate dies for all I know.

TI still sells some Burr Brown log amps but they are expensive. LOG101 is $18.37 in onesies. Analog makes the AD606 for $43.88 each or the AD830x parts for $12 - $20.

How can I (cheaply) make a logarithm?

share|improve this question
just searching around I found that futurlec.com is selling the lm394 at a very affordable rate, check futurlec.com/cgi-bin/search/search.cgi?search=lm394. scratch that, i just realized you said "obsolete", darn I need sleep. – KerxPhilo Mar 10 '11 at 9:37
As far as I know, there is a new model named LM394BH, which I wonder if it's what you want, but I still hope it can help you. – alisa Jun 1 at 9:47
up vote 3 down vote accepted

I remember some years ago using the Analog Devices MAT02 for this purpose. It seems that this is not recommended for new designs but the replacement is the MAT12.

share|improve this answer
MAT12 is still in production, but octopart.com shows 13 pieces available worldwide, for $22 each. So no cheaper than the LOG101. – markrages Mar 10 '11 at 15:23

How about the LS312 from Linear Systems? Some people in other forums claim it's better than the 5% worst-case matching described on the datasheet.

share|improve this answer
That's an interesting forum thread, especially the story about MAT12. – markrages Mar 10 '11 at 16:35

enter image description here

I had this idea for a quick and dirty log amp. If you modulated the reference voltage by 3dB, the output would probably average to about the right value. That would more-or-less be an interpolation between 3dB values.

Two LM3915s can be stacked to get 60 dB range.

This is probably not the way to go unless there is a need for an LED bargraph in the circuit already.

share|improve this answer

The Analog Devices SSM2212 is a cheaper ($2.50 in quantity) alternative to the MAT12, with similar headline specs.

Cheaper matched NPN pairs include the DMMT3904W and DMMT5551 from Diodes Inc. and the PMP4501, PMP4201 and BCM847 from NXP, which are roughly an order of magnitude cheaper than the SSM2212 but have a maximum offset voltage an order of magnitude worse (1-2mV).

share|improve this answer

A year ago, I tried to build Thomas Henry's X-4046 VCO where the LM394 is used. 10-15$ for for this rare beast is too high and there are a lot of fakes on Ebay and I decided to substitute. I don't know what a miracle happened but I have found the 100% substitution of it, produced by reincarnated plant in Riga owned by Russians. The chip has almost the same name: AS394. The specs are identical to the original. Same cases: dip8 and CAN. You can find them here But the plant does not sell them directly. You have to find the dealer in Moscow (can find an email or phone in case someone need it). The price for 1 unit is around 2-3$ (depend on quantity).

share|improve this answer

This circuit looks to be a log amplifier using two op-amps, two transistors, a few passives and a current source. However, I'm not sure how suitable it is for your application.


enter image description here

share|improve this answer
falstad links don't work for me. I just get the default circuit. please post a screenshot. – markrages Mar 10 '11 at 16:32
@markrages, see screenshot. The circuit is also under Circuits > Op-Amps > Amplifiers > Log Amplifier. – Thomas O Mar 10 '11 at 17:37
@ThomasO, as previously noted, does falstad simulator use real components, because, like most things, they can very easy to build accurately if you get a 100% match to spec on every component. – Kortuk Mar 11 '11 at 9:40
Especially in this circuit, which lives and dies by transistor matching, the simulator is going to give a very optimistic performance estimate. Those "transistors" are identical. – markrages Mar 12 '11 at 4:17
@markrages. I tried adjusting the Hfe of the transistors and unless it was something like 20-100 it kept a very clean log output. I'm not sure to what extent other parameters would matter, though. – Thomas O Mar 12 '11 at 8:31

TI manufactures the LM194/394 now. You can also go to THAT corporation and use their PNP/NPN oairs and quads. THAT 300 series: 36 V, 30 mA, hfe 75-100, Ft 320 MHz

share|improve this answer
TI still lists the part in their catalog, but designates it as obsolete. There is no commitment that if you design it in to your circuit, you will be able to purchase it later. – The Photon Jul 16 '13 at 20:44
TI isn't making the part at all as far as I can tell. They are just listing the National Semi datasheet as a courtesy since they bought National. – markrages Jul 18 '13 at 19:19

Maxim-IC has a couple of log amps, and so does TI, but Analog Devices makes I think the biggest selection.

Intersil makes a number of transistor arrays some are certainly single die and well matched.

share|improve this answer
I mentioned TI and ADI in my question. As usual, Maxim parts do not exist. octopart.com/partsearch/#search/requestData&q=max4206 – markrages Mar 26 '11 at 22:21
Octopart is not comprehensive. For example, does not search Maxim-Direct, i.e. direct from Maxim world-wide. shop.maxim-ic.com/storefront/… – mctylr Mar 27 '11 at 3:41
Maxim direct is saying 15 weeks lead time for single parts. So Maxim doesn't have any either. – markrages Mar 27 '11 at 14:03
You were looking at the part with Pb, look at MAX4207ETE+, the Pb-free/RoHS version which is in stock. – mctylr Mar 27 '11 at 18:33
ok, I can buy one for $19. I'd rather the LOG101 and skip the Maxim hassle. (BTW, why do they list non-RoHS parts at all?) – markrages Mar 27 '11 at 18:41

TI has a bunch of chips that implement log amps. There's LOG101, LOG102, LOG112 and others. I don't know what the definitive chip is but there are many chips that implement the whole circuit. They're wildly expensive for some reason but you can find LOG102 on Fleabay for $5.

share|improve this answer

protected by Dave Tweed Jun 1 at 10:31

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.