Incoming voltage offset/scaling question

Discussion in 'General Electronics Chat' started by marcelds, Dec 20, 2014.

  1. marcelds

    Thread Starter New Member

    Nov 8, 2012
    Hi All,
    First question, I'm getting my bearings, but still learning.

    I have a sensitive ADC whose inputs are strictly 0-5V. I'm working with a system that has three main oscillating signal types: -5V/5V, 0-10V, and anything below 10V and ground. This one input must accept all three types.
    My first idea ignored the first type. A pot controlling feedback on a non-inverting op amp could amplify anything oscillating under 0-10V to the 0-10V range, then divided it in half with a voltage divider.This worked great in simulations and could take both of the second types well. A zener diode to ground just before the input protected against anything over 5V.
    The problem is the first type. If I add a 5V offset, the other two types float too high over ground.
    Any ideas or feedback welcome, this is one of the first circuits I'm laying out from scratch.
    Thanks kindly,
  2. wayneh


    Sep 9, 2010
    Are all these voltages referenced to the same ground? If not, ±5V is no different than 0-10V.
  3. marcelds

    Thread Starter New Member

    Nov 8, 2012
    Right, but the ADC input can't accept negative voltages. To get the full range, it needs to be offset first.
  4. #12


    Nov 30, 2010
    So you want a single circuit that outputs the same result for a zero volt input as it does for a negative 5 volt input? Then acts in a linear way for all voltages more positive?
    I don't think you can get there from here, but this site contains a lot of smart people. Wait a while and see what arrives.
    Last edited: Dec 20, 2014
  5. ScottWang


    Aug 23, 2012
    1. -5V/5V -- Using an op amp to offset the voltage to 0~10V, and using voltage divider dividing to 0~5V
    2. 0-10V -- Using the voltage divider dividing to 0~5V.
    3. anything below 10V -- Using the voltage divider dividing to 0~5V

    So here you can see, you just need to care about the input 1 and using the voltage divider dividing to 0~5V cascading with ADC, and in parallel a 5.1V zener with ADC to protecting ADC itself, and adding a cd4051 to selecting the input voltages and using the math to calculating the values of input 1, 2, 3.
  6. JWHassler

    Active Member

    Sep 25, 2013
    What does 'anything below 10V and ground' mean? Is it the same as 0-10V?

    Does it need to accept all three input-ranges at the same time? Design it for the highest positive and negative voltages expected, i.e. +10/-5. The ADC would be a bit (ha) underutilized, but we pay for versatility.
  7. marcelds

    Thread Starter New Member

    Nov 8, 2012
    That's a little unclear, sorry. Some signals will oscillate between 0-3V, others at 0-8V, etc. Needs to be adjustable to get full range, can't be fixed gain - not hard to do with a feedback pot.

    Otherwise, having an offset switch that adds 5V might be the ticket out I guess, then scale everything else to 0-10V and divide to get the 0-5V input range?
  8. MrChips


    Oct 2, 2009
    Design the input stage to accept -10VDC to +10VDC.

    Then attenuate and level shift that to your 0-5VDC ADC input.
  9. crutschow


    Mar 14, 2008
    Do you need to respond to all signals at the same time or will you switch between signals?
  10. marcelds

    Thread Starter New Member

    Nov 8, 2012
    It needs to be able to respond to all three kinds of signal at any time. I'd like it to be as user-friendly as possible, and flipping a switch when the incoming signal uses bipolar power is kind of a frustrating.
    That sounds great, but won't unipolar signals only reach half the range of the adc?
  11. Alec_t


    Sep 17, 2013
    Yes (well, if not half then some other known fraction). So allow for that in software.
    How will you distinguish between the three types of input signal?
    Last edited: Dec 21, 2014
  12. MrChips


    Oct 2, 2009
    What resolution do you need? How many bits of conversion is your ADC?

    If you have a 12-bit ADC then you are still have 11 bits to work with which will give you 0.05% resolution.

    You will most likely be using 1% resistors in your 4:1 attenuation.
  13. eetech00

    Senior Member

    Jun 8, 2013

    As Mr Chips suggested, you could do something like this.