Hi,
I am trying to construct a simple current to voltage convertor using the LM358 single-supply op-amp. As a basic starting point, I am using two stages. The first stage below is a voltage buffer that will later be converted to an I-to-V stage. (Voltage source will become a current source and a resistor will be added.)
The second stage consists of a bias voltage applied on the first stage output followed by a simple buffer.
I am unable to understand the voltage plot at node 6 (capacitor C1 output). This should show a an AC coupled (no dc offset) complete sine wave, but ngspice shows kind of a rectified sine wave output!
Any idea?
Thanks for your help, Anand
========================================================================== .include /cygdrive/c/work/ngspice/library/LM358-NAT.lib
*First stage
- NI, INV, POS, NEG, OP X1 1 2 3 4 5 LM358/NS Vp1 3 0 5V Vn1 4 0 0V R1 5 2 0.1 *Short circuit from o/p to inv Vsource 1 0 sin(0 1 625) *to be replaced with current source
*//////////////////////////////////////////////////////////////////////
- (C) National Semiconductor, Inc.
- Models developed and under copyright by:
- National Semiconductor, Inc.
*/////////////////////////////////////////////////////////////////////
- Legal Notice: This material is intended for free software support.
- The file may be copied, and distributed; however, reselling the
- material is illegal
*////////////////////////////////////////////////////////////////////
- For ordering or technical information on these models, contact:
- National Semiconductor's Customer Response Center
- 7:00 A.M.--7:00 P.M. U.S. Central Time
- (800) 272-9959
- For Applications support, contact the Internet address:
- snipped-for-privacy@galaxy.nsc.com
*//////////////////////////////////////////////////////////
*LM358 DUAL OPERATIONAL AMPLIFIER MACRO-MODEL *////////////////////////////////////////////////////////// *- connections: non-inverting input
- | inverting input
- | | positive power supply
- | | | negative power supply
- | | | | output
- | | | | |
- | | | | |
- supply current is 1/2 of total device current.
- Output crossover distortion with dual supplies
- is not modeled.
- IOS 2 1 5N
- I2 99 50 75U
- EH 99 98 99 49 1 G1 98 9 POLY(1) 5 6 0 9.8772E-4 0 .3459
- F6 50 99 POLY(1) V6 300U 1 E1 99 23 99 15 1 R16 24 23 17.5 D5 26 24 DX V6 26 22 .63V R17 23 25 17.5 D6 25 27 DX V7 22 27 .63V V5 22 21 0.27V D4 21 15 DX V4 20 22 0.27V D3 15 20 DX L3 22 28 500P RL3 22 28 100K
- .MODEL DX D(IS=1E-15) .MODEL QX PNP(BF=1.111E3)
- .ENDS