[SOLVED] convert 5V signal to mV range

Status
Not open for further replies.

fm101

Member level 5
Joined
Apr 13, 2020
Messages
81
Helped
1
Reputation
2
Reaction score
4
Trophy points
18
Activity points
591
hello,
I have 0V to 5V signal output from arduino and I want to convert this signal to 0V to (10mV to 500mV) range. How can I accomplish this?
 

do you mean you want to change 0 to 5V to 0 to 0.5 V?
that is fairly straightforward - use a voltage divider and an op amp follower
since you didn't specify any other considerations, that should do

do you mean you want to convert 0 to 5V to an adjustable range of 0 to anything between 10 mV and 500 mV?

or do you mean something else?
 

If you are using PWM to do the 0 - 5V than use a PWM and the map() function
to map the 5V range to whatever range you want. Note at 10 mV you are down
in the noise so make sure your supply rail is very well bypassed. Recomenda-
tions for capacitors (lower ESR good) :



Combination of ceramic and polymer tant would be best.


Regards, Dana.
 

Hi,

Is the arduino output DC or PWM?
Do want your signal to be DC?
How much current do you want to draw?

Klaus
 

i used potentiometer and it worked
--- Updated ---

I could reduce the signal to mV level with potentiometer but after 400mV, the signal deteriorates. I tried to put a simple buffer with transistor after the potentiometer output and i got still lower down to 15mV but the signal further deteriorates drastically as shown in the picture below. I wanted signal at 15mV or possibly lower. How can I do this?

 
Last edited:

What do you mean "the signal deteriorates drastically"? That signal looks absolutely perfect to me, if I was a expecting a signal that looks exactly like that.

Are those noise spikes? Is there an oscillation? What ARE you expecting? What does your layout look like? We're not mind readers, you know.
 

The circuit diagram is above. I produced around 32.5KHz square wave output at arduino pin 13. I wanted to convert that 5V square wave to 20mV square wave. The oscilloscope is showing the deterioated 5V square after potentiometer and transistor. after potentiometer the signal is good to level 400mV or so.
 

You are keeping your scope probe on 10X when you look at low level signals ?

Probe compensated properly ?

How do you develop the low mV square wave, PWM DAC approach, R2R ladder.....?


Regards, Dana.
 
Last edited:

Something like this is what you are experiencing ?




Maybe this with a JFET -



You will have to adjust values and bias to get your exact requirements.

Input capacitances forming a differentiator with 10K pot the problem in first sim .....?


Regards, Dana.
 
Last edited:

Hi,

I see no need for a transistor. So the simplest way is to dismiss the transistor and use the pot output directly.

But 5V to 20mV is just a 250:1 voltage divider.
There are many websites that tell you how to use two resístors as voltage divider.

Klaus
 

If you need it buffered JFET not bad.

Or a OpAmp follower, reasonably fast Rail to Rail single supply one.


Regards, Dana.
 

A simple 5k pot will do the job, at 10mV out ( from say 1V in ) the Zout from the pot is 50 ohms - so really no buffer needed ...
 

Hi,

electrically, from the impedance I agree.
Usally 50 Ohms is low impedance enough.

Add here an OPAMP you get more errors than before:
* added offset
* added noise
* limited swing to GND

The only disadvantage of the pot here is that you can´t adjust it precisely.
with an expected ratio of 250:1 .. and the active angle of a pot of about 270° (as long as you don´t use multiturn pots)
you have to adjust it to 1° from it´s zero point.

So two fix resistors 10k + 39Ohms is what I´d use.

***
I really would be interested what this mV signal is used for.
In most cases it´s the other way round: you have a tiny mV signal and need to amplify it into a volts signal.

Klaus
 

Hi,

For sure possible.

In case you don´t want it adjuastable ... a pot makes not much sense.
But let´s say you want to have it "adjustable" to match to your application. Say you want the output to be 10mV +/-10%.
(I mean: 10% isn´t very precise, I use resistors with 1% standard)
Then even with a 10T pot you have to adjust it "exactly" to (360° *10T * 10% / 250) +/-1.44°

I personally would not use a 10T pot, although I most probably have one in stock.
Maybe one could use a 50T or 100T pot? --> not me

In the end it depends on what the OP needs ... we don´t know.

Klaus
 

i think using POT will do. I used 10K and have not tested the difference using 5K or 100K. I thought using buffer implemented with transistor will restore the degraded signal shape. transistor are faster and not limited with frequency response(vs op-amp slew rate and frequency response).
 

    barry

    Points: 2
    Helpful Answer Positive Rating
Hi,

Restore degraded shape:
No. A transistor adds distortion. It is responsible for the distortion you see. (especially in your case where it has no defined/stable operating current)
A resisitive divider does usually not add distortion. (At least far below a transistor)
The benefit of a transistor is that it can amplify voltage and current and can reduce impedance.

Transistor is faster?
Faster than a resistive divider? I guess not.
And compared to an OPAMP: There are slow transistors and fast OPAMPs. So it depends on the used parts, the used circuit, the requirements of the application (you still hide)

Klaus
 

yeah, right... transistor added distortion, buffering should restore signal loss but not applicable in this case or it is not so? i know resistive divider does not add distortion.
i meant discrete transistor are better than op-amp(not resistor) as op-amp as slow in high frequency range which i meant general op-amps which i have got and i know there are fast op-amps as well.

i used 3rd order RC filter which reduced the amplitude of the square wave from arduino but now the problem is that amplitude level got shifted from 0 to 5V to 2V to3V as shown in the figure below. how can i shift the output starting from 0V(not 2V, the signal in green)?

 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…