0-2.3VDC Input to 0-1mA Logarithmic Output

Thread Starter

Reverie

Joined Aug 13, 2024
8
I want to create a circuit which will receive an input of 0-2.3 VDC from an Arduino style module, and output a logarithmic signal to a 1mA meter. I only want to utilize the first 1.15 volts of the input from the module, and clamp the circuit output to the meter to 1mA at that point. I want a three decade log output scale which will display on the meter as 0-5, 5-50 and 50-500 ranges. The meter is ~135 ohms. I'd appreciate if anyone can help me with this!
 

BobTPH

Joined Jun 5, 2013
11,474
Is the 0-2.3 V output used for anything other than driving the meter? If not, it would be far easier to do the scaling digitally in the Arduino and the use a DAC to drive the meter.

In fact, it is likely simpler to do it digitally even if the signal is needed.

I mean, you have computer, why not use it?
 

sparky 1

Joined Nov 3, 2018
1,218
The computer program is not dependent on high precision component tolerance like finding a 5.037 Ohm resistor,
Thinking about logarithmic signal being derived as a function, The analog is different, possibly a newer approach might help.
Try entering code below and run it, what is the next logical step to interfacing some kind of hardware on your display. Then what?
Read an encoder or potentiometer? then what is next in producing logarithmic value on your display. That is the start.
From small beginnings you can develop code from there you have a platform to test and decide which ideas work for you.

Online C Compiler - online editor (onlinegdb.com)

#include <stdio.h>
#include <math.h>

int main() {
double num, result;

// Prompt the user to enter a number
printf("Enter a number: ");
scanf("%lf", &num);
 
Last edited:

Thread Starter

Reverie

Joined Aug 13, 2024
8
Is the 0-2.3 V output used for anything other than driving the meter? If not, it would be far easier to do the scaling digitally in the Arduino and the use a DAC to drive the meter.

In fact, it is likely simpler to do it digitally even if the signal is needed.

I mean, you have computer, why not use it?
Hi Bob, and thank you for your reply.

The truth is that I'm a bit of a novice, and don't have an Arduino board. i'm assembling this project with a cheap Arduino module and surplus medical equipment parts... This is just a fun project, and I want to accomplish it in the analog realm. I'm not on the wrong forum, am I?

The output will only drive the meter. The meter is a double limit opto model, and it will control another device. To me, the information in the first tenth of a volt is the most important - hence I want to see that part of the output expanded relative to higher values.

My expertise doesn't extend this far into designing the correct op amp circuit beyond recognizing that such a chip can be set up in a log configuration. I'm baffled by the low input voltage behavior; I barely comprehend how to use a resistor to convert voltage to current, nevermind how to implement the correct offset... Hoping someone is willing to do some hand-holding.

fwiw, The project is monitoring and control of purified water quality.
 

BobTPH

Joined Jun 5, 2013
11,474
Why don’t you tell us what you have and what you are trying to accomplish. You will get better help that way. To us non-novices, your proposed solution has us scratching our heads about why you are doing that.
 
Last edited:

Thread Starter

Reverie

Joined Aug 13, 2024
8
I have this:

IMG-20240725-WA0021.jpg
Conductivity module - 0-1000 uM/cm, 0-2.35V

IMG-20240812-WA0008.jpg
Opto setpoint 1mA meter, ~135 ohm

I want to interface these so that the first 1% of the module's output moves the needle an inch so I'm able to differentiate when the conductivity is under 5 uM/cm, for example.

Am I hearing that it's just more practical to pursue a digital solution?
 

Ian0

Joined Aug 7, 2020
13,101
Analogue logarithmic amplifiers don't usually present much of a problem provided that you buy some good op-amps. As you don't need high precision (your meter has no scale!) the temperature drift won't be a problem. You will definitely need positive and negative power supplies.
Your probe outputs a voltage - it would be good if you knew the output impedance. If it is high, add a unity-gain op-amp as a buffer. Then apply the first circuit from TI's application note and connect the meter to the output via a current-limiting resistor.

First add 865Ω (820Ω+47Ω) in series with the meter, that makes it into a voltmeter reading 1V full scale.
Then see how far you get with the calculations . . .
 

Thread Starter

Reverie

Joined Aug 13, 2024
8
It seems to have a high impedance output. I immersed the probe into a solution which should have deflected the needle 60%, but it only deflected it about 10%. I found this surprising, and want to double check it, because it seems implausible that the module wouldn't drive a 1 milliamp meter. Scale, lol. Yes, I covered the existing scale so i didn't need to look at it. It had bad feng shui. I'll print one up that matches whatever I obtain after final testing with standard solutions.

After sleeping on this, I wonder if perhaps I should instead use a linear amp to get the voltage range higher, then just clamp portions of the range with Zeners.
 

BobTPH

Joined Jun 5, 2013
11,474
For a high impedance output, you will want a voltage follower as the first stage. This effectively puts no load on the sensor.

Follow it with log amp and your done.

I would use the meter as a voltmeter. A 1 mA meter is 1000Ω / volt. Put a 4.7K resistor in series with it and you have a 5V voltmeter.

I would suggest a 5V supply and a rail-to-rail op amp. This will clamp the output to 5V so the meter would not be over-driven.

Then it just comes down to scaling your log amp for the desired range.
 

Ian0

Joined Aug 7, 2020
13,101
As I said before, you will need positive and negative supplies, as the log function is an inverting stage. Generating a half-supply rail as an earth will make things rather complicated.
 

BobTPH

Joined Jun 5, 2013
11,474
As I said before, you will need positive and negative supplies, as the log function is an inverting stage. Generating a half-supply rail as an earth will make things rather complicated.
So change my idea to scale the meter to 2.5V and use a buffered virtual ground.
 

BobTPH

Joined Jun 5, 2013
11,474
Presumably. So you probably need two isolated supplies or a bipolar supply.

The bipolar supply is arguably simpler.
 

Thread Starter

Reverie

Joined Aug 13, 2024
8
For a high impedance output, you will want a voltage follower as the first stage. This effectively puts no load on the sensor.

Follow it with log amp and your done.

I would use the meter as a voltmeter. A 1 mA meter is 1000Ω / volt. Put a 4.7K resistor in series with it and you have a 5V voltmeter.

I would suggest a 5V supply and a rail-to-rail op amp. This will clamp the output to 5V so the meter would not be over-driven.

Then it just comes down to scaling your log amp for the desired range.
Understood on the voltage follower.

I used "Method 1" to determine the meter resistance. What wrong with my numbers?
R=2202 ohms
E=2.338V @ 1mA (observed VOM readings)
(2.338/0.001)-2202=136 ohms

Scaling the amp has been giving me agita. I'll need some help there when I get to that part. The bit about the output going high at <2V input, for instance.

The MC1485 chip I'm using doesn't provide for offset null capability, so I guess I'll need uA741?

Whatever power is required, no problem. I'm prototyping with these things

IMG-20240812-WA0006.jpeg
 
Top