I'm quite new to pspice and I'm trying to simulate the dc transfer function of an op-amp in log configuration.
Here my circuit. I'm using Kicad and ngspice:
R3 and R4 are there because it gave me warnings about a singular matrix.
I set the simulation for a dc sweep of V1 between 0 and 3V:
.dc V1 0 3 100m
Here the netlist:
.title KiCad schematic
.include "/home/mark/Development/Kicad/pspice/1N4148.lib"
.include "/home/mark/Development/Kicad/pspice/mcp6001.lib"
XD1 output Net-_R1-Pad2_ 1N4148
R3 0 Net-_R3-Pad2_ 1
XU1 0 Net-_R1-Pad2_ Net-_U1-Pad4_ Net-_U1-Pad5_ output MCP6001
R1 input Net-_R1-Pad2_ 1k
V1 input 0 dc 3
V2 Net-_U1-Pad4_ Net-_R3-Pad2_ dc 5
R4 Net-_R4-Pad1_ 0 1
V3 Net-_R4-Pad1_ Net-_U1-Pad5_ dc 5
.save @r3[i]
.save @r1[i]
.save @v1[i]
.save @v2[i]
.save @r4[i]
.save @v3[i]
.save V(Net-_R1-Pad2_)
.save V(Net-_R3-Pad2_)
.save V(Net-_R4-Pad1_)
.save V(Net-_U1-Pad4_)
.save V(Net-_U1-Pad5_)
.save V(input)
.save V(output)
.dc V1 0 3 100m
.end
Here the pspice model for the op-amp and here for the diode. In kicad I adjusted the pin ordering as usual.
This is the output of the simulation:
In cyan the input signal and in orange the output one. The output is stick to the negative rail. I played with the value of R1 from 100R to 1M without affecting the output signal.
Is there something wrong in my simulation setup or in my circuit?