Page 238 - Making PIC Microcontroller Instruments and Controllers
P. 238

236  U DEtrir  DII{GIHECOU  IEBS: cou  rllc  IARBIES

































                     #ffiffiS      tcontnuea)



                       This simple  escapement/nurble  chute will  be used for all the counting  projects with
                     simple  modifications and cha.nges  in sensor  posltions.  Prcvisions  should be made  for a
                     bin above and  belo\{'the escapemedto  acconmdate about a  pint  ofrnarbles  (amund  100).
                     The alesign should allow the marbles  to be rcfiImed to the top bin between  runs with
                     ease so that expodmental  counting can  prcceed  run after  run.without delay
                       For the first  gscapemenGbased
                                                counting  progam, the oscapement  will be  prc$arnmed
                     lo \ ork a. follow(:

                      l.  Ar ltanup.  lhe louergale  i. closed and lhe  uppergate isopen  Tbe syslem  ensures
                         this by starthg in this positio[  On reset,  go to this position.
                      2.  The counter  is set to 0.
                      3. Load |he  marbles.
                      4.  l-f $ere are any  marbles in $e sy(tem.  fie fiAt marble  come\ to rest again\l  $e lower
                         garc'
                      5.The op!ical detec@  conlrns this.
                      6.  If there  is a ma$le  above the lower gate,  the uppel gate  closes.
                      7.  Both gates  are closed  now.
                      8.  There  is a marble b€tween  the gates.
                      9.  The lower gate  opens and  deases the marble.
                     lO. The counter  incremenlsby orc atlhis  point.
                     I I . The lower gate  waits 0.01 seconds  and closes agail. This makes sure  the marble
                         has dropped away.
   233   234   235   236   237   238   239   240   241   242   243