Flash Code for 555 Timer Astable Frequency Computation

 

 

 

 

         

Shown below is a 'running' Macromedia Flash program for computing the output frequency of a 555 timer connected as an astable multivibrator, based on the values of R1, R2, and C1 used. Likewise shown below the program window is the Flash code used for the application, for reference by students learning to program in Flash in the context of electronics engineering.

   

 

A 555 timer connected as an astable multivibrator will exhibit an output that continuously toggles between '1' and '0'.  The sum of the amount of time that it is '1' (T1) and the amount of time that it is '0' (T2) is the period of oscillation.  The frequency f of the oscillation is the reciprocal of the period, or f = 1/(T1+T2), where T1 and T2 are in seconds and f is in Hertz.  Furthermore, T1 = 0.693 x (R1 + R2) x C1 while T2 = 0.693 x R2 x C1, so f = 1.44 / [(R1+2R2)C1].

          

For consistency, the R1 and R2 values must be inputted in M-ohms and the C1 value must be inputted in microFarads for an output frequency that is in terms of Hz.   To try the program, input the following values: R1 = 0.005 (for 5 kilo-ohms), R2 = 0.005 (for 5 kilo-ohms), C1 = 0.1 (for 0.1 microFarad).  The frequency resulting from these component values is estimated to be 960 Hz, while T1 = 0.000693 second and T2 = 0.0003465 second.

  

         
         

mx.accessibility.ButtonAccImpl.enableAccessibility();
         
function Compute(){
     var R1:Number = parseFloat(txtR1.text);
     var R2:Number = parseFloat(txtR2.text);
     var C1:Number = parseFloat(txtC1.text);
     txtT1.text = 0.693 * (R1 + R2) * C1;
     txtT2.text = 0.693 * (R2) * C1;
     txtFreq.text = 1.44 / ((R1 + (2 * R2)) * C1);
}
          
cmdCompute.addEventListener("click",Compute);