{ "cells": [ { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# Chapter 2: Interpretation of Data Sheets and Characteristics of an Op-Amp" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "## Example 2.1_a" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Output voltage is vo 2.4 Volts\n" ] } ], "source": [ "\n", "\n", "#Example 2.1_a\n", "#Determine the Output voltage for open-loop differential amplifier for figure 2_9\n", "\n", "#Variable declaration\n", "vin1=5*10**-6 #input voltage in volts\n", "vin2=-7*10**-6 #input voltage in volts\n", "A=200000 #Voltage gain\n", "\n", "#Calculation\n", "vo=A*(vin1-vin2) #Output voltage in volts\n", "\n", "#Result\n", "print \"Output voltage is vo\",vo,\"Volts\"\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "## Example 2.1_b" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Output voltage is vo -2000.0 Volts\n" ] } ], "source": [ "\n", "\n", "#Example 2.1_b\n", "#Determine the Output voltage for open-loop differential amplifier for figure 2_9\n", "\n", "#Variable declaration\n", "vin1=10*10**-3 #input voltage in volts\n", "vin2=20*10**-3 #input voltage in volts\n", "A=200000 #Voltage gain\n", "\n", "#Calculation\n", "vo=A*(vin1-vin2) #Output voltage in volts\n", "\n", "#Result\n", "print \"Output voltage is vo\",vo,\"Volts\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.2_a" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Output voltage is vo -4000.0 Volts\n" ] } ], "source": [ "\n", "#Example 2.2_a\n", "#Determine the Output voltage for an inverting amplifier for figure 2_10\n", "\n", "#Variable declaration\n", "vin1=20*10**-3 #input voltage in volts\n", "A=200000 #Voltage gain\n", "\n", "#Calculation\n", "vo=-A*(vin1) #Output voltage in volts\n", "\n", "#Result\n", "print \"Output voltage is vo\",vo,\"Volts\"\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "## Example 2.2_b" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Output voltage is vo 10.0 Volts\n" ] } ], "source": [ "\n", "#Example 2.2_b\n", "#Determine the Output voltage for an inverting amplifier for figure 2_10\n", "\n", "#Variable declaration\n", "vin1=-50*10**-6 #input voltage in volts\n", "A=200000 #Voltage gain\n", "\n", "#Calculation\n", "vo=-A*(vin1) #Output voltage in volts\n", "\n", "#Result\n", "print \"Output voltage is vo\",vo,\"Volts\"\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 0 }