Voltage is just a reference?

Discussion in 'General Electronics Chat' started by imkyj, Feb 26, 2013.

  1. imkyj

    Thread Starter New Member

    Jan 30, 2013
    5
    0
    Hi,

    I have heard that voltage measurement is just a reference. So if a microcontroller is powered up by a 5v source and I connect the ground terminal of a microcontroller to 5v and the v+ to 10v, would it still work out fine? Or would the chip burn? I have to do that because i need to amplify my analog input signal using an Op Amp (I will connect the negative supply input of the op amp to 0v and the positive supply input of the op amp to 10v, with the "ground" set to be 5v) which requires negative voltage and I only have 1 adjustable power supply available.
     
  2. panic mode

    Senior Member

    Oct 10, 2011
    1,318
    304
    if the microcontroller is running on 5V, you can power it from:
    a) +5V and 0V
    b) +10V and +5V
    c) 0V and -5V
    d) 275V and 270V
    e) "x" and "x-5V"

    choice of reference is yours.

    for example if you are powering microcontroller from 9V battery and need 5V but also negative voltage for say analog stage or some opamps, you can use 5.1V zener with cathode connected to "+" of the battery (this is your "+5V") and resistor from zener anode to "-" terminal of the battery (this is your "-4V". midpoint (where zener and resistor are together) is your "ground" or "0V".

    note, this is not optimal for battery operation because it would continuously draw current from battery. better would be to use large value resistor (so current through zener is low) and then voltage follower (if you have opamps in a circuit, you may have one spare).
    also adding a capacitor across zener would be good idea.
     
    Last edited: Feb 26, 2013
    imkyj likes this.
  3. imkyj

    Thread Starter New Member

    Jan 30, 2013
    5
    0
    But what if i need to input the analog signal into the micro controller? Will things change? If my analog input after amplification should be 1.2v for instance, the analog voltage should be 6.2v since my ground is at 5v. Therefore what would my analog signal into the microcontroller be if the microcontroller is grounded at 5v? Would it be 1.2v or 6.2v?
     
  4. panic mode

    Senior Member

    Oct 10, 2011
    1,318
    304
    stop thinking like that...

    think in terms of voltages relative to your reference point. if we have defined "GND" than this is your 0V and everything else is relative to it. so your 1.2V will be 1.2V (relative to GND) and if you really insist, that will be 1.2-(Vx) as measured relative to some circuit node that is at potential Vx (if Vx=-5V, then measuring from Vx to analog input will indeed show 6.2V). as far as microcnotroller goes though, world is in 0..5V range. the only parts of the circuit having anything to do with negative supply are opamps but NOT the microcontroller.

    if you use opamps to amplify some input, it is your job to make sure that range is something that analog input of MCU will handle. for example using inverting amp may be not a good choice if the sensed signal is positive (because opamp output would go into negative range).
     
  5. imkyj

    Thread Starter New Member

    Jan 30, 2013
    5
    0
    Alright thanks so much! I think I got it. I am confused because the ADC input into the MCU has only 1 terminal, meaning I have got nothing except the GND terminal of the MCU to reference from. Therefore I'm worried that if the MCU's ADC input will detect something more because it has nothing to reference with. So since I'm setting my "GND" as 5v with respect to Vx, I should be able to assumt that the ADC input with reference to Vx is 6.2v and to my "GND" is 1.2 v right?
     
  6. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,220
    Start with one "GND" and reference all voltages to that. That should help you sort it out. And all voltages and components must have one side connected to this "GND". They cannot be floating.
     
  7. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    If the voltage swing output of your op amp is > 5V, reduce the amount of amplification so the peaks are never > 5.4V or < 0.5v (roughly, check datasheet for maximums). Outside that range, the uC will be reversed biased (bad), or not able to read the signal since it can only see that 5V "window" of the signal.
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    In your first post you said that all you had was one adjustable supply and that you were going to set it to 10V (relative to it's negative terminal) and then use 5V (relative to the supply's negative terminal) as the "ground" for you MCU and opamp. That's fine, but you need to actually have a node that is "ground". Panic mode touched on t in his post above. It's very important that you be sure that however you are getting your "ground" that it be able to maintiain a stable voltage (relative to the supply's terminals) while sourcing or sinking whatever current it might be required to.
     
  9. imkyj

    Thread Starter New Member

    Jan 30, 2013
    5
    0
    Yes I managed to keep the limits of my Op Amp output within 0 to 5 v but that is with reference to my "GND" (The voltage is actually between 5v to 10v since my "GND" is 5v). So as long as my entire circuit is connected to this "GND", the voltage input to the MCU will be shown as "0v to 5v" since it is with reference to my "GND" right? I know I shouldnt think of it this way but I just wanna make sure before anything disastrous happen to my MCU since the ADC input should be within the range of 0v to 5v.
     
  10. imkyj

    Thread Starter New Member

    Jan 30, 2013
    5
    0
    So long as I connect everything (Op Amp, MCUs) with reference to this 5v "GND" it will work just fine?
     
  11. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Might I suggest to stop calling it ground and refer to it as common, that is the proper term, though the two are used interchangeably. All other voltages are with reference to this common voltage, the 5V you keep referring to. So the 5V becomes 0V compared to itself, the(previous) 0V becomes -5V, compared to common, and your 10V becomes 5V compared to common. All you ahve done is changed the reference voltage, since voltage is always referenced to a specific potential.
     
  12. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    I think part of your problem is hinted at in the title you chose for the thread. The notion that "voltage is just a reference" is incorrect. A "voltage" is a measure of the difference in electrical potential energy between two points, just as "height" is a measure of the difference in two elevations. The key is that we can't talk about the "voltage" of a point any more than we can talk about the "height" of a point. Applying those terms to a single point requires that we have an agreed upon reference that serves as our unspoken other point so that we have a "difference" to work with. So when I say that a hill is one thousand feet tall, that only has meaning to you if you know whether the reference I am using is the ground around the base of the hill, the third step of the courthouse in the city near the hill, or mean sea level, or something else entirely. I can choose ANY reference I want and that choice has no effect on the altitude of the summit of that hill. The same is the case for voltage. What is important for your MCU inputs is that the voltage difference between the input and the GND terminal of the MCU be within the specified limits.
     
  13. #12

    Expert

    Nov 30, 2010
    16,248
    6,745
    No, it isn't! The voltage is actually between 0 and 5 volts because you have declared ground as the middle of your 10 volt supply. Quit changing your ground reference in the middle of a paragraph and you will quit screwing your head into a hole.
     
Loading...