{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 11 Cathode ray oscilloscope"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 11_1 PG-11.16"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Refer to the figure-11.11 showwn\n",
      "from the figure we can see that the screen is divided such\n",
      "that one part of the half wave is sub-divided into 5 units\n",
      "1subdivision=(1/5)units=0.2 units\n",
      "amplitude of the positive peak signal=2division+3subdivision \n",
      "ie amplitude of the positive peak signal=2+3*0.2=2.6\n",
      "\n",
      " Therefore amplitude of the output voltage in volts=5.2 mV \n",
      "\n",
      "\n",
      " Therefore rms value of the output voltage in volts=3.6770 mV \n",
      "\n"
     ]
    }
   ],
   "source": [
    "from math import sqrt, pi\n",
    "print \"Refer to the figure-11.11 showwn\"\n",
    "print \"from the figure we can see that the screen is divided such\"\n",
    "print \"that one part of the half wave is sub-divided into 5 units\"\n",
    "print \"1subdivision=(1/5)units=0.2 units\"\n",
    "print \"amplitude of the positive peak signal=2division+3subdivision \"\n",
    "print \"ie amplitude of the positive peak signal=2+3*0.2=2.6\"\n",
    "Vp=2+3*0.2##amplitude of the peak voltage in terms of dividion\n",
    "Vpp=2*Vp##peak to peak voltage in terms of division\n",
    "VA=2##Vertical attenuation in (mV/div)\n",
    "V=Vpp*VA##required peak to peak output voltage in volts\n",
    "Vm=V/2##amplitude of the output voltage in volts\n",
    "print \"\\n Therefore amplitude of the output voltage in volts=%.1f mV \\n\"%(Vm)\n",
    "Vrms=Vm/sqrt(2)##rms value of the output voltage\n",
    "print \"\\n Therefore rms value of the output voltage in volts=%.4f mV \\n\"%(Vrms)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 11_2 PG-11.19"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " Therefore rms value of the output voltage in volts=2.1213 V \n",
      "\n",
      "\n",
      " Therefore frequency f=250 Hz \n",
      " \n"
     ]
    }
   ],
   "source": [
    "from math import sqrt, pi\n",
    "Vd=2##voltage per division in(V/div)\n",
    "Td=2e-3##time base division in (s/div)\n",
    "Vdiv=3##vertical occupancy in division as shown in the screen\n",
    "Vpp=Vd*Vdiv##peak to peak voltage \n",
    "Vm=Vpp/2##peak voltage\n",
    "Vrms=Vm/sqrt(2)##rms value of the output voltage\n",
    "print \"\\n Therefore rms value of the output voltage in volts=%.4f V \\n\"%(Vrms)\n",
    "Hdiv=2##horizontal occupancy in division as shown in the screen\n",
    "T=Hdiv*Td##time period of the waveform\n",
    "f=1/T##frequency\n",
    "print \"\\n Therefore frequency f=%.0f Hz \\n \"%(f)"
   ]
  }
 ],
 "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.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
