Inverting Op Amp ampilifier

Thread Starter

bigbigblue

Joined Mar 15, 2006
42
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
 

Thread Starter

bigbigblue

Joined Mar 15, 2006
42
Originally posted by hgmjr@Mar 24 2006, 11:44 PM
The opamps in your schematic appear to have the negative and positive swapped around.

hgmjr
[post=15393]Quoted post[/post]​
I think this is simply a symbol anomoly - the spice model ports are connected to the correct symbol pins.
 

n9352527

Joined Oct 14, 2005
1,198
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.
 

JoeJester

Joined Apr 26, 2005
4,390
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.
 

Thread Starter

bigbigblue

Joined Mar 15, 2006
42
Originally posted by JoeJester@Mar 25 2006, 06:41 AM

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.
[post=15409]Quoted post[/post]​
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.
 

n9352527

Joined Oct 14, 2005
1,198
Originally posted by bigbigblue@Mar 25 2006, 12:05 PM
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.
[post=15414]Quoted post[/post]​
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).
 

Thread Starter

bigbigblue

Joined Mar 15, 2006
42
Originally posted by n9352527@Mar 25 2006, 11:18 AM
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).
[post=15415]Quoted post[/post]​
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.
 

n9352527

Joined Oct 14, 2005
1,198
Originally posted by bigbigblue@Mar 25 2006, 01:44 PM
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.
[post=15416]Quoted post[/post]​
Interesting approach. So it essentially just ignored floating components and carried on.
 

JoeJester

Joined Apr 26, 2005
4,390
">WARNING: VU2: NO DC VALUE, TRANSIENT TIME 0 VALUE USED"
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.
 
Top