Signal Magnitude Conversion.

Thread Starter

NoSkill

Joined Jan 18, 2007
13
Hi,


I have a basic design question that I would like an opinion on. I have a signal that swings between 0-24V and need to route this signal as an input on my micro, that accepts signals from 0-3V.

My question is, what is the best way of achieving this signal conversion. Would an op-amp work? I also need the input on the micro to have very high impedance, as to not change the current on the 0-24V signal as it is used elsewhere as well.

Any ideas would be appreciated, thanks.
 

castley

Joined Jul 17, 2011
31
An op amp would have to have a negative gain. Why not use a simple resistive voltage divider to divide by 8. You can select the total resistance of high enough value to give whatever impedance you desire.
 

ErnieM

Joined Apr 24, 2011
8,377
I can't give a general rule here as your description is a bit vague. However, the game you want to play is to make a resistive divider so that the max 24V input gives you at most a 3V output. I say "at most" as you need to make sure if the occasional out of spec input comes along nothing will die.

So you need a basic divider ratio of 3/24 or .125. You also need to pick resistors so that their parallel resistance combo (that's the thevinin equivalent) is at most the max input impedance the micro can see. Now if the series resistance (that's what loads your sensor) is too low then you'll need an op amp as a buffer and let the series resistance grow to something acceptable.

So resistor divider drives (optional op amp stage that drives) the micro input.

You could place the op amp in the front of the chain gives the highest impedance but you need an op amp that can buffer the full 24V.
 

Thread Starter

NoSkill

Joined Jan 18, 2007
13
Thanks a ton for the information, extremely helpful. One last question, what do you mean by the maximum input impedance that the micro can see?

What I assumed was that the micro has an internal impedance, such that if I directly apply 3V across it from a voltage source it wouldn't fry it. Thus any additional impedance in series with with the micro's internal impedance would just increase the impedance, and the micro would see a smaller voltage.

Thus if I have a resistor ladder that tones down 24V to 3V, unless I put some resistors in parallel with the micro's internal resistance, I should not be able to damage it as the current should be low enough.

Then again, my initial assumption could be wrong. I know that the micro has internal pull ups and pull downs that I can enable on the GPIO but I am not sure how these play a part. If you could explain a bit more about what goes on inside that would be fantastic.
 

Jaguarjoe

Joined Apr 7, 2010
767
Build a unity gain non inverting voltage follower with one op-amp. It will have a very high input impedance which your 24v supply will like as well as a very low output impedance that your ADC will like. Use a rail to rail op-amp that will swing to almost Vee to almost Vcc. Make a suitable voltage divider to feed the op-amp such that it doesn't load your 24v line and reduces the voltage to 3 volts. Feed the op-amp direct into the ADC. The accuracy of this is determined by the accuracy of the divider resistors. You may want to add a low value trimpot into the divider to allow you to dial out any errors.
 

Thread Starter

NoSkill

Joined Jan 18, 2007
13
Build a unity gain non inverting voltage follower with one op-amp. It will have a very high input impedance which your 24v supply will like as well as a very low output impedance that your ADC will like. Use a rail to rail op-amp that will swing to almost Vee to almost Vcc. Make a suitable voltage divider to feed the op-amp such that it doesn't load your 24v line and reduces the voltage to 3 volts. Feed the op-amp direct into the ADC. The accuracy of this is determined by the accuracy of the divider resistors. You may want to add a low value trimpot into the divider to allow you to dial out any errors.
Thanks for the information, it seems I will have to read a little more. On more thing, could you suggest any part numbers for op-amps that would satisfy what you were suggesting? I looked on digikey and I found zillions and I am uncertain on which to pick. Are there any popular part numbers for op-amps?
 

CDRIVE

Joined Jul 1, 2008
2,219
What is your 0 to 24V signal source and are you going to feed it to an ADC input on your micro?

I suspect that a very simple question is being waaaaay over complicated here. The input Z of micro (except Vdd) are MOS gates. They should not play much of a role in designing a SIMPLE resistive voltage divider.
 

Jaguarjoe

Joined Apr 7, 2010
767
What kind of power supply do you have to work with? Is it split with (+), (-), and ground in the middle? What voltage is it?
How much of a load can the voltage divider place on the 24 volts you want to measure?
What controller are you using, and is it 1.8, 3.3 or 5 volt powered? What are the characteristics of its ADC input?
 

Thread Starter

NoSkill

Joined Jan 18, 2007
13
The microcontroller is a MSP430G2553 series which will be supplied by 3.3V. The 0-24V voltage signal is an outside signal with an external reference. This signal will need to be fed into the ADC on the MSP430. The load that the micro should be placing should be as low as possible.

The details about the ADC can be found here on page 38 here:http://focus.ti.com/lit/ds/symlink/msp430g2553.pdf

I am not sure how to really read them. For example, what is a negative voltage input range vs a positive voltage input range? Can the ADC take negative voltages? If so in comparison to which reference?
 

SgtWookie

Joined Jul 17, 2007
22,230
The ADC will need a low impedance input. This is generally accomplished by using a small cap, ~10nF, from the ADC input to ground.

You need to decide how much of a load you can place on your 24v source signal before the measurement will be affected. If 1mA isn't too much, you could use a resistive divider on the 24v side. If that's too much, you could use a rail to rail input/output opamp with a low offset wired as a voltage follower to supply a voltage divider, and another opamp wired as a voltage follower to keep the ADC input cap at the right voltage. Using a rail to rail opamp with a very low input offset will help to minimize errors.

I am not sure how to really read them. For example, what is a negative voltage input range vs a positive voltage input range? Can the ADC take negative voltages? If so in comparison to which reference?
It's not really a negative voltage reference; it's the low voltage reference.
VEREF- has a range of 0v to 1.2v.
VEREF+ has a range of 1.4v to 3v.
No, the ADC cannot take a negative voltage. If you feed any I/O pin a voltage outside a range of GND-0.3v to +V+0.3v you'll fry it.
 

Thread Starter

NoSkill

Joined Jan 18, 2007
13
There is no +-24 volts, just a positive 0 to 24V, I was just confused about what the datasheet meant by VEREF-.

Thanks for all the replies guys, I will design a voltage divider circuit, and take it from there.

Also, just for my own knowledge, what is a rail to rail op-amp? I've tried looking online, but its difficult to find its intended purpose. If you can point me to any reference to learn more that'd be great also.
 

CDRIVE

Joined Jul 1, 2008
2,219
Most voltage dividers are designed to give an easily converted voltage ratio like divide by 10. Fig A uses fixed resistors. Fig B shows an alternate scheme using a 200Ω pot. This arrangement makes fine adjustments easier. Figures A and B are both 10:1 ratio.
 

Attachments

Top