Level shifting

Discussion in 'The Projects Forum' started by windoze killa, Mar 4, 2006.

  1. windoze killa

    Thread Starter AAC Fanatic!

    Feb 23, 2006
    605
    24
    Hi guys. This post is to hopefully replace and rekindle one that vanished with the rest of the projects topic.

    I am try to work out how to take an I/P voltage that is between 2.5V and 5V and produce an O/P of 0V to 5V. I only have a +5V supply to work with which is where I am having the problem. I have tried everything but just can't come up with an answer.

    There has to be someone that can trip over an answer.

    Please

    someone

    anyone

    Ok. I will stop crawling now.
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,669
    804
    maybe you could use a reversed version of open collector - high side transistor and pull-down resistor.
     
  3. windoze killa

    Thread Starter AAC Fanatic!

    Feb 23, 2006
    605
    24
    Not quite sure what you mean?
     
  4. pebe

    AAC Fanatic!

    Oct 11, 2004
    628
    3
    A fairly simple way would be to use 2 opamps. The first would be in inverting mode with a gain of 2 and with the +ve input set at 2.5V. A 2.5V to 5V signal would then give 5V to 0V. A second amp would be used as a unity gain invertor.

    Your limitation is the 5V supply. There's no headroom outside the input voltages. But you could use a rail to rail op amp like the LT1782/83 if you were prepared to accept that the output would only swing to within a few millivolts of the rails.

    If the signal you are measuring is isolated from the 5V supply, then you could use a 555 set up as a voltage doubler to give a 10V supply, then you you would have a wider choice of op-amps. A lot depends on your circuit constraints.
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    I'm not sure that the two opamp circuit works like you think it does. I think the first inverter with a gain of 2 and an offset of 2.5 Volts suffers clipping.
    Attached is my three op-amp circuit which inverts with gain -1, then doubles with gain of 2, then inverts with gain of -1. The 2.5 volt offset is applied to the first and third amplifiers.

    [attachmentid=1228]

    The comment about not being able to reach the supply rail with a typical opamp is spot on.
     
  6. pebe

    AAC Fanatic!

    Oct 11, 2004
    628
    3
    OOOPS! You are quite right. This is the circuit I described, but the reference voltage to the +ve input of the first amp should be 2/3 rail volts - not the 1/2 rail that I said.

    I should have drawn it out first - not tried to work it out in my head!
     
  7. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    An elegant solution nonetheless. Three cheers for you!
     
  8. pebe

    AAC Fanatic!

    Oct 11, 2004
    628
    3
    Thanks!
     
  9. windoze killa

    Thread Starter AAC Fanatic!

    Feb 23, 2006
    605
    24
    I haven't had a chance to try this cct yet but will let you know how I go. Thanks for all your efforts.
     
  10. aac

    Active Member

    Jun 13, 2005
    35
    0
    I don't know how percise you are trying to be or temperature requirements and such but you can shift your signal down with a 2.5V zener and a resistor. The gain of 2 could be a non-inverting opamp with equal feedback resistors.
     
  11. pebe

    AAC Fanatic!

    Oct 11, 2004
    628
    3
    A simpler circuit.
     
  12. windoze killa

    Thread Starter AAC Fanatic!

    Feb 23, 2006
    605
    24
    I don't require it to be too precise. If the output went fron .5 to 4.5 that would be close enough.
     
  13. windoze killa

    Thread Starter AAC Fanatic!

    Feb 23, 2006
    605
    24
    This circuit did the job but it has all changed now. I have also posted in another forum that I have to use an LM324 which isn't rail to rail But I now have a 10V supply.
     
  14. pebe

    AAC Fanatic!

    Oct 11, 2004
    628
    3
    I've replied in the other forum.
     
Loading...