summaryrefslogtreecommitdiff
path: root/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/14-Operational_Amplifiers.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/14-Operational_Amplifiers.ipynb')
-rw-r--r--Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/14-Operational_Amplifiers.ipynb188
1 files changed, 188 insertions, 0 deletions
diff --git a/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/14-Operational_Amplifiers.ipynb b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/14-Operational_Amplifiers.ipynb
new file mode 100644
index 0000000..7a735fa
--- /dev/null
+++ b/Electronic_Devices_and_Circuits_by_D_C_Kulshreshtha/14-Operational_Amplifiers.ipynb
@@ -0,0 +1,188 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14: Operational Amplifiers"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.1: Calculate_voltage_gain_and_input_and_output_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Calculate voltage gain and input and output resistance\n",
+"clear;\n",
+"clc;\n",
+"//soltion\n",
+"//given\n",
+"\n",
+"R1=20*10^3;//ohm\n",
+"Rf=2000*10^3;//ohm\n",
+"Acl=-Rf/R1;\n",
+"Ricl=R1;\n",
+"Ro=0;\n",
+"printf('The voltage gain= %.0f\n',Acl);\n",
+"printf('The input resistance =%.0f kΩ\n',R1/1000);\n",
+"printf('The output resistance =%.0f Ω\n',Ro);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.2: Find_the_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Find the output voltage\n",
+"clear;\n",
+"clc;\n",
+"//soltion\n",
+"//given\n",
+"\n",
+"R1=20*10^3;//ohm\n",
+"Rf=2000*10^3;//ohm\n",
+"v1=4;//V\n",
+"v2=3.8;//V\n",
+"vo=v2*(1+Rf/R1)-(Rf/R1)*v1;\n",
+"printf('The output voltage= %.1f V',vo);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.4: Design_an_adder_circuit_using_an_op_amp.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Design an adder circuit using an op amp\n",
+"clear;\n",
+"clc;\n",
+"//soltion\n",
+"//given\n",
+"\n",
+"//Vo=-(V1+10*V2+100*V3)\n",
+"Rf=100*10^3;//ohm\n",
+"C1=1; //coefficient of V1\n",
+"C2=10; //coefficient of V2\n",
+"C3=100; //coefficient of V3\n",
+"R1=Rf/C1;\n",
+"R2=Rf/C2;\n",
+"R3=Rf/C3;\n",
+"printf('R1 = %.0f kΩ\n',R1/1000);\n",
+"printf('R2 = %.0f kΩ\n',R2/1000);\n",
+"printf('R3 = %.0f kΩ\n',R3/1000);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.5: Calculate_CMRR_in_dB.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Calculate CMRR in dB\n",
+"clear;\n",
+"clc;\n",
+"//soltion\n",
+"//given\n",
+"\n",
+"Ad=100; //differential mode gain\n",
+"Ac=0.01; //common mode gain\n",
+"CMRR=20*log10(Ad/Ac);\n",
+"printf('The CMRR in dB %.0f dB',CMRR);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.6: Calculate_the_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Calculate the output voltage\n",
+"clear;\n",
+"clc;\n",
+"//soltion\n",
+"//given\n",
+"\n",
+"Ad=2000; //differential mode gain\n",
+"CMRR=10000;\n",
+"V1=10^-3;//V\n",
+"V2=0.9*10^-3;//V\n",
+"Vd=V1-V2;\n",
+"Vc=(V1+V2)/2;\n",
+"Vo=Ad*Vd*(1+Vc/(CMRR*Vd));\n",
+"printf('The output voltage is %.2f mV',Vo*1000);"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}