Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Log to Lin?? Is that a thing??

Status
Not open for further replies.

DJAE

New Member
Hi all,
Sorry if this is dumb, or if it has been asked a million times:

If a have a circuit which is outputting a voltage which is logarythmically related to power (i.e. an output from a detector in a dummyload which rectifies the AC signal) in the range of 0-150v is there any way (other than getting out a calculator or creating a log scale meter - which ironically loses accuracy the more power you use) to convert this log scale back to a linear one? I have found plenty of reading material on log amps, but nothing about doing it this way around!

Was considering reducing the voltage down and using a PIC ADC, but my code writing abilities aren't all that. Just wondered if there were an easier of doing it than this?

As always any help greatfully recieved.

Thanks
 
Hi,

Yes that thing is called "anti log".

If you have something that outputs a log value assuming log base 10 then that means you have to take the number 10 up to that power to get the 'linear' value (ie antilog).

For example, log10(2)=0.30103 and 10^0.30103=2.

This means you'd need an anti log circuit or else use the uC chip. There are various anti log circuits.
 
Last edited:
Hello again:
This is an RF dummylaod (VHF) where the power is going through a 50r load and is being sniffed and rectified through quite a nice little diode.
This outputs a value (in volts) which is converted to power (fairly traditionally):
(Vout x 1.414)^2/50

Any ideas?
 
Hello again:
This is an RF dummylaod (VHF) where the power is going through a 50r load and is being sniffed and rectified through quite a nice little diode.
This outputs a value (in volts) which is converted to power (fairly traditionally):
(Vout x 1.414)^2/50

Any ideas?

Sorry, value is (actually):
(((Vout+Vdrop)x1.414)^2)/50

Where Vdrop is (fairly obviously) the volatge drop of the diode!
 
DJAE,

Why are you multiplying by 1.414 (root 2) ?

At an inspired guess the detector is measuring the peak voltage, so you need to divide by 1.414 to get the RMS value before doing the power calculation.

JimB
 
That's clearly what i meant! Sorry!
I am menat to be working!
 
Last edited:
If you want a linear display of power you need a "square root" converter rather than a Log or Anti-Log converter.

Having said that a square rooter could be made using Log and Anti-Log functions.

To make a meter with a linear scale of power you would have to do this:

1 Take the Log of the voltage
2 Divide the Log by 2 (dividing the Log by two gives the square root)
3 Take the Antilog (now have a number which is linear with power rather than voltage
4 Scale it to give the correct power range on the meter.

Does this help?

Jimb
 
It might help when my brain kicks in.... wait for it.....

So, i have a voltage out of the detector... i feed that into a black box which divides it in half... i then do what with that voltage (the output of the black box)?

OR

I have the voltage from the detector.. I have a black box to convert that to log10, then divide that in half and scale that?

OR

I'm really stupid and don't quite get it! Could you explain the circuit topology using black boxes (generic circuit elements to perform the desired function) or a block diagram?

Sorry to be thick but this is something that's been bugging me for ages.
Thanks SOOOO much for your help so far!
 
OK

To try and get your mind right, have a look at the attachment, hopefully it should explain things a bit better.

JimB
 
Ok, that makes a lot more sense, thank you.
Here is my next question; the log converter and antilog are log10 standard fare are they? So effectively there is hope of me being able to do what i want then [use a few passives and opamps and make my output linear and use a nice volt meter for display]?
If so thats very interesting, why dont more meters do it?
 
Here is my next question; the log converter and antilog are log10 standard fare are they?
Dont know, never used one.

JimB
 
Hi,

The way i read this question was that the output of the existing "power meter" was a voltage that represented the power but it was a log10 scaling. That means that if the power was 10 watts the output would be 1 volt, and if the power was 100 watts the output would be 2 volts, and if the power was 1000 watts (not that it goes that high) it would output 3 volts, with the addition of some linear scaling to get the range to 0 to 150 volts.

This kind of output requires an anti log converter as shown:

1 volt output: 10^1=10 volts out
2 volt output: 10^2=100 volts out
3 volt output: 10^3=1000 volts out (not that it goes this high)

So if the actual power was 225 watts the power meter would output 2.35 volts scaled by a factor K up to 150 volts.


So is that how the existing "power meter" works or not?
 
Last edited:
A log converter can simply be an opamp with a diode in the negative feedback path (i.e. a logarithmic amplifier) . Conversely, "anti-log" is simply an opamp with a diode leading to the inverting terminal (w/ resistor in feedback) (i.e. an exponential amplifier).

The base of the logarithm/exponent depends on the value of the resistor used in the amplifier. Changing temperature may have a disabling effect...
 
For over a century we have lived with non linear scales printed on the back of needle based meters. If your PIC programming isn't upto much and you do appear not to understand power and logs, then my friend you are in for a world of hurt.

The pic JimB posted is complex, but correct.

You need to learn one or the other to progress. I would suggest in this day and age to use an ADC on a PIC and do all the sums in software. Designing log and anti log circuits isn't something you just pick up overnight. It can be done with a few op-amps but you really need a good understanding of amplifiers before you even start making them intentionally non linear.
 
DJAE,

Why are you multiplying by 1.414 (root 2) ?

At an inspired guess the detector is measuring the peak voltage, so you need to divide by 1.414 to get the RMS value before doing the power calculation.

JimB
Many RF detector diode circuits are designed to have a square-law output, meaning the output voltage is proportional to square of the diode input voltage, giving an output that's proportional to diode input power, not the input voltage.
 
So why doesn't the OP post his detector circuit?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top