Inverting Opamp Simulation
Calculations which show "show Vin should be 1.02V as no current will be drawn towards negative terminal of opamp" are badly in error. As Peter Bennett, has pointed out, your power supply must be grounded. So the op amp portion would look like







simulate this circuit &ndash; Schematic created using CircuitLab

However, this will also not work. Since the negative supply of the LM324 is ground, the output cannot drive lower than this. To fix this, you would make







simulate this circuit

At this point the op amp can drive its output to a negative current.

However, it still won't work as you think.

Although the inputs to an op amp don't actually draw zero current, you can generally treat them as if they can. That means that the + input will be held at ~ground. It's true that the -input will not draw any current, but the output will, through the feedback resistor. The - input will create what is called a "virtual ground", typically from microvolts to  millivolts from ground, depending on the input characteristics of the op amp. Therefore the right-hand side of R1 will effectively be held at ground, and the voltage at the junction of R1/R4/R5 will be pulled down. In this case, since R1 is so much less than R4 and R5, it will be pulled down a lot. The actual value will be 0.114 volts, and the output will nominally be -0.114 volts.

EDIT - There are three ways to get -1.02 volts out of the op amp.

The "simplest", that is, the one involving the fewest changes in component values, is simply to add a buffer to the 1.02 volt junction. This can be done with another LM324 section configured as a voltage follower.







simulate this circuit

In this case, since the op amp inputs draw essentially no current, the voltage at the input of the op amp will be 1.02, and so will the output.

The second way is to change component values.

First, change R1 and R2 to 10k. You want to do this anyway, since an LM324 cannot put out the current you will need for large output voltages. As an example, if you wanted to output 10 volts, R2 would require 100 mA, and that is far beyond what an LM324 can provide.

Assuming you want to change the fewest number of components besides R1 and R2, you can either change R4 or R5. For instance, if R5 is increased to 1.11 k, the voltage will remain at 1.02 volts.

The third way, which minimizes the total number of components, is simply to eliminate R4 and R5, but change either R1 or R2 so that the gain of the op amp is approximately -.204 .

This can be done by 







simulate this circuit

You should note that you can do this with an LM324, which is unity-gain stable (and then some) but you cannot do it with all op amps. Some require gains as high as 10 in order to be stable, and in this circuit would need a small feedback capacitor as well as R2.

Also note that, for what you are doing, R3 is not needed, and you can tie the + input directly to ground. If you decide to keep it, it should be equal to the parallel value of the resistors connected to the - input. I've shown the correct value in the last schematic. All of the previous examples have been wrong, but I didn't want to distract you.