# Signal Magnitude Conversion.

Discussion in 'The Projects Forum' started by NoSkill, Jul 18, 2011.

1. ### NoSkill Thread Starter Member

Jan 18, 2007
13
0
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.

2. ### castley Member

Jul 17, 2011
31
0
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.

3. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,434
1,625
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.

4. ### NoSkill Thread Starter Member

Jan 18, 2007
13
0
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.

5. ### Jaguarjoe Active Member

Apr 7, 2010
770
90
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.

6. ### NoSkill Thread Starter Member

Jan 18, 2007
13
0
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?

7. ### CDRIVE Senior Member

Jul 1, 2008
2,223
99
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.

8. ### Jaguarjoe Active Member

Apr 7, 2010
770
90
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?

9. ### NoSkill Thread Starter Member

Jan 18, 2007
13
0
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.

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?

10. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
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.

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.

11. ### CDRIVE Senior Member

Jul 1, 2008
2,223
99
If you're now saying that your signal is 0 to +-24V then you should have stated that from the get go... UUGH!

12. ### NoSkill Thread Starter Member

Jan 18, 2007
13
0
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.

13. ### wayneh Expert

Sep 9, 2010
12,368
3,224
It's one that can sense the voltage at its input pins, and respond properly, all the way to both rails of its power supply.

14. ### CDRIVE Senior Member

Jul 1, 2008
2,223
99
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.

File size:
69.9 KB
Views:
15
15. ### Jaguarjoe Active Member

Apr 7, 2010
770
90
Here is one choice for a buffer op amp. Out of the zillions you found, there will be a few others you could use too. I never could find the input Z for the MSP part:

http://www.futurlec.com/Linear/OPA4343UApr.shtml

If your voltage divider uses 210k and 30.1k 1% resistors you will be within 0.33% of 24:3. This will place a 100ua load on the 24v signal.