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

A BASIC TEMPEFATUNES.COIITFOLIING DEVICE   IA5



                    Let s  go over them one at a time.

                  l.  A simple  universai conlroller would allow us to controi  one set  point  or  propcrty.  For
                    the  purposc  of this discussion, we are assuming  thisis a tcmperature. The instrument
                    musl allow us to control a temperature. In order to do this, it must have a connec-
                    tion fbr the temperature sensor,  and wha! we  provide  will depend on the  sensor  we
                    have selected. We will use  an LM34 temperature-sensing IC as  our detector. This
                    device uses a three  wirc connection. so we wili provide  a three  screw tcrminal 1br

                  2. The device musthavean  adjlrstable senirg variable ofsome  sort to which the above
                    temperature  is to be compared. This is the  output  set  point  control device. Fot our
                    insfiumcnt,  we will use apotentiometer  Once  rvc  have the two signals in ourinstru-
                    ment working, we can make adecision  as lo whether we wantto turn on the heat  or
                    the rcfrigeration. This will be determincd wilh the software we will write  to control
                    the instmment.  (The potentiometer  is a thr€e-wire voltage  divider that we wiil use
                    to  parallel  ihe input  that the lempeiature detector is  providing.  This  isjust like what
                    we discussed earlier in this book, and will make the comparisons  casiex)
                  3. We need a wry to tum the actual instrunent function  on and off. Tbis swilch is not
                    the  on/o1T switch lor the instrument b t another  switch that allows us to activate rhe
                    operational  portion  oflhe instrumentwhen  we are rcady to start rhe instrument. This
                    switch lets us  play  with our  setup and  get  every thing  j  ust right before we activate the
                    instrument. Asinple SPST switch will be adequate forthis and we will use a small
                    toggle switch forit. Sincewemay wanttomountrhis switch  at arcmote location lor
                    some of our applications, we will connect ihe switch to  the board via two sctew ter-
                    minals. The  major iuncdon ofa switch like this is  to allow our insfument to be con-
                                                 I
                    trolledby anolher electronic device This is  a very  powerlul  capability and is rhe first
                    step in the extended automation  process,
                  4, The controlier needs a couple  of connectors that the outpur signal appears on. We
                    will connect the controlled machine  compoDent  (heater  relay, and  so on) to thjs
                    point.Ifwe have  to ampljfy the conloi signal, this is where  the  relay  (ransislor)  or
                    whateverwill  be connected.Ifwe latef want toreverse  the signal liom nomrlly  off
                    to normally  on. this is wherc we  program  the logic  to do so. This is the output of the
                    instmmcnt.  We will annunciaterhe signal with  an LED and use two screw renninals
                    as the connection  points.
                  5. The instrument needs  some sort of indicator on ir to tell us when  the output irom thc
                    instrumentis  active. Thisis aconvenience itemthat makes  the instnrmcndconfoller
                    more user-friendly.  Wc will add an LED toindicate  this on ourconffoller When this
                    LED is  on, the instrumenl is  putting  out a  signal at the outpul conneclors. This LED
                    also lets us see &e instrument operating wilhouthaving  10 connect up to areal con-
                    trol point.  and so on,

                                                                     No matter whar  you  are
                    The  prcceding  describes almost all instrument/confollers.
                  askrd to control, the instrument  you  design will have the  preceding  basic modules  or
                  conponents in some lbrm or anoaher, Il may control one function,  or it may  control a
                  hundred functions,  but each function will suppot the  previously  mentioncd abilities.
   184   185   186   187   188   189   190   191   192   193   194