{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 4: Comparators and Controls" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.1 Page No 88" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "Vsat = 14.0 #Saturation Voltage\n", "R1 = 1000.0 \n", "R2 = 100.0 #Load resistances\n", "\n", "#Calculation\n", "Vut = (R2/(R1*R2))*Vsat\n", "\n", "#Result\n", "print\" Value of Upper Threshold Voltage = \",Vut*1000,\"mV\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Value of Upper Threshold Voltage = 14.0 mV\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.2 Page No 88" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "Vsat = -13.0 #Saturation Voltage\n", "R1 = 1000.0\n", "R2 = 100.0 #Load resistances\n", "\n", "#Calculation\n", "Vlt = (R2/(R1*R2))*Vsat\n", "\n", "#Result\n", "print\" Value of Lower Threshold Voltage = \",Vlt*1000,\"mV\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Value of Lower Threshold Voltage = -13.0 mV\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.4 Page No 94" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "Vut = 12.0\n", "Vlt = 8.0 #Upper and Lower Threshold Voltages \n", "Vsatp = 15.0\n", "Vsatm = -15.0 # Saturation Voltages\n", "R = 10*10**3 #Choosing R\n", "\n", "#Calculation\n", "Vh = Vut - Vlt # Hysteresis Voltage \n", "Vctr = (Vut + Vlt)/2.0 #Center Voltage\n", "n = (Vsatp - Vsatm)/Vh # Resistor Factor\n", "Vref = Vctr / (1 + (1/n)) #Reference Voltage\n", "Resistance = n * R\n", "\n", "#Result\n", "print\" Center Voltage = \", Vctr ,\"V\"\n", "print\" Resistor Factor = \" , n \n", "print\" Reference Voltage = \", round(Vref,2)\n", "print\" Feedback resistor is \", Resistance" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Center Voltage = 10.0 V\n", " Resistor Factor = 7.5\n", " Reference Voltage = 8.82\n", " Feedback resistor is 75000.0\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.5 Page No 95" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "Vsatp = 15.0\n", "Vsatm = -15.0 # Saturation Voltages\n", "Vh = 4.0 #Hysteresis Voltage\n", "Vctr = 10.0 #Center voltage\n", "\n", "#Calculation\n", "n = ((Vsatp - Vsatm)/Vh)-1 \n", "R = 10*10**3 #Input Resistance\n", "Vref = ((n + 1)*(Vctr))/n # Reference Voltage\n", "Resistance = n * R # Feedback Resistance\n", "\n", "#Result\n", "print\" Resistance Factor = \", n\n", "print\" Reference Voltage = \", round(Vref,2),\"V\"\n", "print\" Feedback Resistance = \", Resistance/1000,\"kohm\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Resistance Factor = 6.5\n", " Reference Voltage = 11.54 V\n", " Feedback Resistance = 65.0 kohm\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.6 Page No 98" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "Vut = 13.5\n", "Vlt = 10.5 #Upper and Lower Threshold Voltages\n", "Vref = -15 # Reference Voltage\n", "Vsatp = 13.0\n", "Vsatm = -13.0 #Saturation Voltages \n", "R = 10*10**3 # Input Resistance\n", "\n", "#Calculation\n", "Vctr = (Vut + Vlt)/2.0\n", "Vh = Vut - Vlt \n", "m = -(Vref / Vctr)\n", "Resistance = m * R \n", "n = (Vsatp-Vsatm)/Vh \n", "Resistance1 = n * R \n", "\n", "#Result\n", "print\" Hysteresis Voltage = \", Vh \n", "print\" Center Voltage = \", Vctr \n", "print\" Resistor mR = \", Resistance/1000,\"kohm\"\n", "print\" Resistor nR = \", round(Resistance1/1000,2),\"kohm\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Hysteresis Voltage = 3.0\n", " Center Voltage = 12.0\n", " Resistor mR = 12.5 kohm\n", " Resistor nR = 86.67 kohm\n" ] } ], "prompt_number": 6 } ], "metadata": {} } ] }