Inverting Op Amp

Discussion in 'The Projects Forum' started by bluesteel, May 3, 2010.

  1. bluesteel

    Thread Starter New Member

    May 3, 2010
    5
    0
    Hi All

    ive had a look around but cant seem to find any answers for what im trying to do

    i have a signal that basically goes from 5v to 0v and i need to invert it to 0v to 5v

    i have used a simple inverting op amp circuit based on an lm741

    the actual input voltages are 4.8v to 0.9v and i cant quite get the output to reflect that properly.
    i have changed the input resistor to change the high output side, and that is now up to 4.5v and that is good.
    i cannot however get the low output side to drop under 1v

    attatched is a diagram with what i have
    DIAGRAM

    any help would be awesome

    cheers
     
  2. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    If you want to use an op amp, then you need to use a comparator op amp or you can use the 741 as a comparator if the signal is not switching too fast. However, a single transistor can do the job. Use a logic level MOSFET with a resistor between its drain and Vcc (5V) and get the output from the drain-ground. When the input signal (gate) is 4.8V, the MOSFET will conduct and thus the output voltage will be close to zero volts. When the input voltage is 0.9V, MOSFET will be off and thus the output voltage will be 5V. Make sure the input voltage drops below 0.9V because logic level MOSFETs have a minimum threshold voltage of 1V.
    You can use a BJT instead of a MOSFET but you will need to put a diode in series with its base to ensure it turns off at 0.9V or use a darlington one.
     
  3. bluesteel

    Thread Starter New Member

    May 3, 2010
    5
    0
    i think i may not explained myself properly

    its actually for a throttle position sensor in a car,
    it is a pot with 5 volts being fed into it,
    the voltage on its output goes between 4.8v and 0.9v and everything in between, depending on where the throttle is
     
  4. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Why do you want to invert its output?

    If the signals is read by a microcontroller then you can do the inversion by software.
     
  5. bluesteel

    Thread Starter New Member

    May 3, 2010
    5
    0
    i need the original signal to go to the ECU (engine control unit)
    and i need the signal inverted to go to the TCU (transmission control unit)

    unfortunately i cannot modify how the signals read by the control units as they are sealed units.

    the easiest way i can think of is to invert the signal before the TCU, then everything happy.

    i just do not know the best way of doing this, and from googling it seemed like an inverting op amp should invert the signal

    cheers
     
  6. Bychon

    Member

    Mar 12, 2010
    469
    41
    Look at Electro-tech/projects/inverting op-amp to see another answer that might help.
     
  7. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    If the maximum input voltage to the ECU and TCU is 5V, then it would be safer to supply the op amp with 5V and use a rail to rail op amp instead of the old 741. Rail to rail means the op amp can output a voltage very close to the supply voltage.
    For the circuit to work properly, you will to have a gain of 1. Thus, the two resistor in you diagram must have the same value (i.e 50k). Also, you will need to bias the non-inverting input at 2.5V. This can be done with two 10K resistors forming a voltage divider assuming you are going to use 5V for the op amp supply (otherwise choose the appropriate resistor values or use a voltage reference IC).
     
  8. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    It would be a good idea to step in with some words of caution about such projects. We have yet to set an explicit policy about automotive electronics, but tapping into ECU controls and sensors is simply not a good idea. Your modifications and wiring can't be tested and proven as well as the OEM stuff. Failure to provide for future problems can result in a runaway car, resulting in the possibility of harm.

    Are you certain you want to make changes like that? What is your source for information that leads you to want to modify the electronics? What happens if the modification malfunctions?
     
  9. bluesteel

    Thread Starter New Member

    May 3, 2010
    5
    0
    Thanks mik3, i will grab a lm358, and remake it with that and see how it goes, sounds promising tho!
     
  10. bluesteel

    Thread Starter New Member

    May 3, 2010
    5
    0
    cheers for the words of warning!

    i have a car that has bits of everything in it, and the auto gearbox came out of a later model car then the engine
    somewhere between the 2 models they switched the Throttle sensor from 5-0v to 0-5v.
    i have the wiring diagrams for both control units, and they expect the opposite signals
    and if the circuit fails, the essentials of the car still work, the auto box just dosent shift like it should!

    cheers
     
  11. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    The LM358 is not a rail-to-rail opamp but it can be used if you powers it by 12V instead.

    Using resistors as voltage divider to get the 2.5V can shift your circuit operating point with supply voltage changes so I have used a 2.5V reference TL431 instead. With the TL431 the opamp's output voltage is not sensitive to supply voltage changes.

    See the simulation results using 5V and 12V power supply with a LM358(LM324) opamp.

    [​IMG]

    [​IMG]
     
Loading...