Page 187 -
P. 187

174   Chapter Eleven

                          The other option I thought of was to put 10 miniature SPDT relays on the
                        interface board. This way the interface board could switch electric power on
                        and off directly from the board.
                          The advantage of the active high output signal is cost. This board would cost
                        much less than the interface board containing 10 relays. The advantage of the
                        relay board is that the miniature power relays have enough current capacity
                        to directly control small dc motors and other electric circuits.
                          I couldn’t decide between the two approaches,  so I have included both
                        designs. You can choose which interface circuit suits you. The front ends of
                        both circuits are identical and function in the same manner. The outputs are
                        different and are explained separately.
                          Since we are controlling 10 outputs, we only need 11 commands—10 com­
                        mands for active on/off switches and 1 command to turn everything off. In gen­
                        eral, it is better if the main speech recognition board jumper (WD) is set to the
                        20 two­second word length option. The 20 two­second word mode has a better
                        word recognition accuracy than the 40 one­second setting. However, the inter­
                        face board will work with both modes. This makes it possible to experiment
                        with the speaker­independent system described earlier.
                          The speech interface circuit needs to perform a couple of jobs. First it needs
                        to determine when the speech recognition circuit has detected a spoken word.
                        After a word has been detected, it must distinguish whether the word detected
                        is a recognized command word or an unrecognized word. If the word is a recog­
                        nized command word, it passes the binary information to the output. If the
                        detected word is not a command word, it must block any change to the output.


            How the circuit works
                        Before we can get into the nuts and bolts of how the interface circuit functions,
                        we must look at the binary information output by the speech recognition cir­
                        cuit. The output of the speech recognition circuit consists of two 4­bit binary­
                        coded decimal (BCD) numbers. This binary (BCD) information is shown on the
                        speech circuit’s two­digit digital display. Whenever a word is detected, the cir­
                        cuit uses the digital display to output the word number it has recognized, or
                        else it outputs its unrecognized/error code. If the word detected is not recog­
                        nized, the circuit will display one of the following error codes:

                          55 �  word too long
                          66 �  word too short
                          77 �  word no match

                          Our interface design incorporates a PIC microcontroller (see Fig.  11.7 or
                        11.8). A preprogrammed microcontroller’s (16F84) first job is to determine if a
                        word has been spoken. To do this, we use an LM339 comparator. A reference
                        voltage for the comparator is generated using a voltage divider made up of
   182   183   184   185   186   187   188   189   190   191   192