{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 7: The 555 timer" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.1: Monostable_Multivibrator.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "////Ex 7.1\n", "clc;\n", "clear;\n", "close;\n", "format('v',9);\n", "th=4;//ms\n", "VCC=10;//V\n", "C=0.05;//micro F(choosen between 0.01<=C<=1)\n", "R=th*10^-3/(1.1*C*10^-6)/1000;//kohm\n", "C1=0.01;//micro F(assumed)\n", "C2=0.01;//micro F(choosen between 0.01<=C<=1)\n", "R2=th*10^-3/(10*C2*10^-6)/1000;//kohm\n", "C3=10;//micro F\n", "disp('Design values are : ');\n", "disp(C,'Capacitance C(micro F)');\n", "disp(R,'Resistance R(kohm)');\n", "disp(C1,'Capacitance C1(micro F)');\n", "disp(C2,'Capacitance C2(micro F)');\n", "disp(R2,'Resistance R2(kohm)');\n", "disp(C3,'Capacitance C3(micro F)');\n", "//Answer of R2 is wrong in the book." ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.2: Value_of_R.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "////Ex 7.2\n", "clc;\n", "clear;\n", "close;\n", "format('v',9);\n", "ft=2;//kHz\n", "C=0.01;//micro F\n", "T=1/ft;//ms\n", "n=3;//for divide-by-3 circuit\n", "th=(0.2+(n-1))*T;//ms\n", "R=th/(1.1*C);//kohm\n", "disp(R,'Value of Resistance R(kohm)');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.3: Astable_Multivibrator.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "////Ex 7.3\n", "clc;\n", "clear;\n", "close;\n", "format('v',9);\n", "fo=2;//kHz\n", "D=70;//%(duty cycle)\n", "T=1/fo;//ms\n", "VCC=12;//V\n", "tC=D*T/100;//ms\n", "tD=T-tC;//ms\n", "C=0.05;//micro F(choosen between 0.01<=C<=1)\n", "RB=tD*10^-3/(0.69*C*10^-6)/1000;//kohm\n", "RA=tC*10^-3/(0.69*C*10^-6)/1000-RB;//kohm\n", "disp('Design values are : ');\n", "disp(C,'Capacitance C(micro F)');\n", "disp(RA,'Resistance RA(kohm)');\n", "disp(RB,'Resistance RB(kohm)');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.4: Design_a_square_wave_generator.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "////Ex 7.4\n", "clc;\n", "clear;\n", "close;\n", "format('v',9);\n", "fo=2;//kHz\n", "D=50;//%(duty cycle)\n", "T=1/fo;//ms\n", "VCC=10;//V\n", "tC=D*T/100;//ms\n", "tD=T-tC;//ms\n", "C=0.1;//micro F(choosen between 0.01<=C<=1)\n", "RB=tD*10^-3/(0.69*C*10^-6)/1000;//kohm\n", "RA=T*10^-3*1.45/(C*10^-6)/1000-RB;//kohm\n", "disp('Design values are : ');\n", "disp(C,'Capacitance C(micro F)');\n", "disp(RA,'Resistance RA(kohm)');\n", "disp(RB,'Resistance RB(kohm)');\n", "disp('RA & RB should be equal for 50% duty cycle.')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.5: Astable_Multivibrator.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "////Ex 7.5\n", "clc;\n", "clear;\n", "close;\n", "format('v',9);\n", "fo=2;//kHz\n", "D=40;//%(duty cycle)\n", "T=1/fo;//ms\n", "VCC=10;//V\n", "tC=D*T/100;//ms\n", "tD=T-tC;//ms\n", "C=0.22;//micro F(choosen between 0.01<=C<=1)\n", "RB=tD*10^-3/(0.69*C*10^-6)/1000;//kohm\n", "RA=T*10^-3*1.45/(C*10^-6)/1000-RB;//kohm\n", "disp('Design values are : ');\n", "disp(C,'Capacitance C(micro F)');\n", "disp(RA,'Resistance RA(kohm)');\n", "disp(round(RB),'Resistance RB(kohm)');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.6: Astable_Multivibrator.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "////Ex 7.6\n", "clc;\n", "clear;\n", "close;\n", "format('v',9);\n", "fo=700;//Hz\n", "D=50;//%(duty cycle)\n", "T=1/fo*1000;//ms\n", "VCC=10;//V\n", "tC=D*T/100;//ms\n", "tD=T-tC;//ms\n", "C=0.05;//micro F(choosen between 0.01<=C<=1)\n", "RB=tD*10^-3/(0.69*C*10^-6)/1000;//kohm\n", "RA=T*10^-3*1.45/(C*10^-6)/1000-RB;//kohm\n", "disp('Design values are : ');\n", "disp(C,'Capacitance C(micro F)');\n", "disp(round(RA),'Resistance RA(kohm)');\n", "disp(round(RB),'Resistance RB(kohm)');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 7.7: Astable_Multivibrator.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "////Ex 7.7\n", "clc;\n", "clear;\n", "close;\n", "format('v',9);\n", "fo=800;//Hz\n", "D=60;//%(duty cycle)\n", "T=1/fo*1000;//ms\n", "VCC=10;//V\n", "tC=D*T/100;//ms\n", "tD=T-tC;//ms\n", "C=0.047;//micro F(choosen between 0.01<=C<=1)\n", "RB=tD*10^-3/(0.69*C*10^-6)/1000;//kohm\n", "RA=tC*10^-3*1.45/(C*10^-6)/1000-RB;//kohm\n", "disp('Design values are : ');\n", "disp(C,'Capacitance C(micro F)');\n", "disp(round(RA),'Resistance RA(kohm)');\n", "disp(round(RB),'Resistance RB(kohm)');" ] } ], "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 }