Inverting Op Amp ampilifier

Discussion in 'General Electronics Chat' started by bigbigblue, Mar 24, 2006.

  1. bigbigblue

    Thread Starter Active Member

    Mar 15, 2006
    38
    0
    Hi,
    I have a particular problem with an inverting op amp amplifier. I have a signal which is "sensitive" - sorry I'm not sure of the right term to use here.

    I am using a HEXSense FET to detect the current in a stepper motor driver. I have read an application note which states that the "sensitive" sensing voltage of the FET should be amplified through use of a virtual ground op amp amplifier, which will obviously invert the polatiry of the signal (ie an inverting amplifier). My problem is that I need the output voltage from the amplifier to be of the same polarity as the input signal.

    No problem I thought, I'll simply put the output of the inverting amplifier through a second, unity gain inverting amplifier to get it back to the same polarity (only amplified).

    Rather than heat up the soldering iron, I decided to simulate the circuit in B2 Spice to see if it worked as I expected, but it doesn't. The trace from the B2 Spice Oscilloscope is attached, as is a jpeg of the circuit I am simulating.

    In the circuit the signal generator provides a 1V peak to peak, centered around + 0.5V, 20 kHz square wave into the inverting input of the first op amp (the RED trace on the scope) and the output from the second op amp is the BLUE trace. The opamps are both TL084's.

    I don't understand WHY this doesn't work. If anyone can shed any light on this I would be very appreciative.

    Regards and thanks
    Pete
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    The opamps in your schematic appear to have the negative and positive swapped around.

    hgmjr
     
  3. bigbigblue

    Thread Starter Active Member

    Mar 15, 2006
    38
    0
    I think this is simply a symbol anomoly - the spice model ports are connected to the correct symbol pins.
     
  4. n9352527

    AAC Fanatic!

    Oct 14, 2005
    1,198
    4
    I've never used B2 Spice before, so I'm sorry if I am wrong about this. Shouldn't your 12V supplies to the opamps be grounded on one side? They currently appear to be floating on one side. Normally in other variety of SPICE, these would flag some errors, so I don't know why they didn't in B2 Spice, or as I said, they might already be connected to something but the schematic doesn't show it.
     
  5. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    My bad. I looked at it again and see that it is hooked up correctly.

    hgmjr
     
  6. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,159
    The things I noticed ....

    I concur with N92's comments concerning the 12 volt sources not being grounded is a problem.

    The 12 volt source connected to the negative terminal of the opamp needs to be the negative terminal of the battery vice the positive terminal. Nevermind, I see where you have -12 as the voltage source. Sometimes it's clearer to rotate your source than put the negative sign on the value.

    Connect a ground to the open terminal of your power sources. That should solve your problem.

    Attached is the schematic and output from my spice program.
     
  7. bigbigblue

    Thread Starter Active Member

    Mar 15, 2006
    38
    0
    Hi - Thanks for going to the effort of simulating this. I feel a bit of a fool for missing that. I'm new to B2 Spice and analogue electronics in general and I had a problem earlier where connecting the - end of the power supply to 0V had caused B2Spice to throw an error stating I had a short circuit, so I assumed it connected the "open" terminal to ground itself.

    Anyways - I connected the open terminals to ground (no "short circuit" error this time !) and it works a treat.

    Many thanks for your help.
     
  8. n9352527

    AAC Fanatic!

    Oct 14, 2005
    1,198
    4
    When the supplies were floating on one sides, did you get any error at all? You see, most SPICEs out there would flag that as a floating node and throw an error. The algorithms dictate that any node should have a path to the ground, either directly or through other components. I'm curious to know if B2 Spice handles that differently and didn't throw any error at all. If that was the case, it would be a very interesting thing to look into (at least for me).
     
  9. bigbigblue

    Thread Starter Active Member

    Mar 15, 2006
    38
    0
    I retried the simulation with one side of each "voltage source" as the device I used as the V+ / V- supplies is called in B2Spice and there was only one line O/P in the simulation log file which reads :

    ">WARNING: VU2: NO DC VALUE, TRANSIENT TIME 0 VALUE USED"

    However, there is no device in my circuit called VU2, so I'm not sure what this message means.
     
  10. n9352527

    AAC Fanatic!

    Oct 14, 2005
    1,198
    4
    Interesting approach. So it essentially just ignored floating components and carried on.
     
  11. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,159
    I took that warning as Voltage, U2, in essence you have no voltage on the op amp labled U2. Check your view tab to see if you can turn on labels. That way your components will be numbered.

    N93, Some spice programs will warn you and then continue on with the simulation. I tried duplicating the problem [no grounds for the sources] and the output was in the uV range. I also received 4 warnings concerning the sources not being connected, identified by each pin.

    bigbigblue, you need to find where the error code explainations are for your spice program.
     
Loading...