summaryrefslogtreecommitdiff
path: root/Integrated_Circuits_by_Dr._Sanjay_Sharma/Ch_06_1.ipynb
blob: 2a99912c5aaca7a0851fb493e76753475857fa1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter : 6 - Sinusoidal Oscillators"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.3 : Page No - 272"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from numpy import pi\n",
      "#Given data\n",
      "R3 = 6 # in k ohm\n",
      "R4 = 2 # in k ohm\n",
      "A = 1+(R3/R4) \n",
      "if A>3 :\n",
      "    print \"The circuit will work as the oscillator\"\n",
      "R = 5.1 # in k ohm\n",
      "R = R * 10**3 # in ohm\n",
      "C = 0.001 # in \u00b5F\n",
      "C = C * 10**-6 # in F\n",
      "f = 1/(2*pi*R*C) # in Hz\n",
      "f = f * 10**-3 # in kHz\n",
      "print \"The frequency of oscillations = %0.4f kHz\" %f"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The circuit will work as the oscillator\n",
        "The frequency of oscillations = 31.2069 kHz\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.4 : Page No - 272\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "C = 0.05 # in \u00b5F\n",
      "C = C * 10**-6 # in F\n",
      "f = 1 # in kHz\n",
      "f = f * 10**3 # in Hz\n",
      "R = 1/(2*pi*f*C) # in ohm\n",
      "R = R * 10**-3 # in k ohm\n",
      "print \"The value of R1 = R2 = %0.3f k\u03a9\" %R \n",
      "R4 = 10 # in k ohm\n",
      "print \"The value of R3 = %0.f k\u03a9\" %R4 \n",
      "R3 = 2*R4 # in k ohm\n",
      "print \"The value of R4 = %0.f k\u03a9\" %R3"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of R1 = R2 = 3.183 k\u03a9\n",
        "The value of R3 = 10 k\u03a9\n",
        "The value of R4 = 20 k\u03a9\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}