Abstract:
A control circuit for a speakerphone circuit which utilizes an event driven circuit to determine the appropriate gain for the receive and transmit channels is provided. Detectors monitor the relative magnitudes of the signal in the transmit and receive channels. Separate signal-to-noise detectors determine whether signals present in the two channels are voice signals. The event driven circuit receives these inputs, and dependent on the present state (i.e., transmit, receive, or idle) transitions to a new state in accordance with predefined criteria incorporated into the event driven circuit. In particular, the present invention allows a transition in a single step from a receive to a transmit state, without passing through an idle state. Transition or dummy states allow implementation with simple logic and provide hysteresis.

Description:
This is a continuation of application Ser. No. 08/067,460, filed May 5, 1993, now abandoned. 
    
    
     BACKGROUND 
     The present invention relates to control circuits for speakerphone circuits. 
     A typical speakerphone circuit has a transmit channel coupled between a microphone and the telephone line, and a receive channel coupled between the telephone line and a speaker. Each of the channels has an attenuator or amplifier whose gain can be adjusted by a control circuit. In a typical &#34;four-point&#34; sensing scheme, the signal before and after the attenuator in the transmit and receive channels are monitored, providing four inputs to a control circuit. In conjunction with other signals, the control circuit uses the four-point sense inputs to switch the speakerphone to the channel with the greater speech signal. 
     Where voice signals are detected in both channels, one scheme adjusts the gain of the two amplifiers so they are equal, and then measures the two signals to determine which is larger, switching to the channel which has the larger signal. This allows one party to break in on the other, even though the amplifier for the interrupting party is attenuated compared to the other channel. Such a system is shown, for instance, in U. S. Pat. No. 4,724,540. This mode where both gains are equal is referred to as an &#34;idle mode&#34;. Thus, a two-step process is followed to allow transition to another channel. First, the gains are equalized to enter into the &#34;idle mode&#34;. Second, the amplitudes of the signals are compared while in the idle mode, and the channel with the highest amplitude signal is provided with the greater gain, to activate that channel. 
     Only one channel at a time can be provided with high gain in order to avoid &#34;singing&#34;, caused by signal from the speaker feeding back into the microphone through acoustic coupling or by signal from the microphone feeding back through the hybrid side tone to the speaker through electrical coupling. 
     U. S. Pat. No. 4,879,745, assigned to IBM, shows a speakerphone in which the Signals are converted into digital form. That digital speakerphone then uses a synchronous state machine to control the selection of either the transmit or receive audio path. Such a system provides the advantage of more flexibility in switching paths, but at the cost of the additional complexity of the digital circuitry. 
     SUMMARY OF THE INVENTION 
     The present invention provides a control circuit for a speakerphone circuit which utilizes an event driven system to determine the appropriate gain for the receive and transmit channels. Detectors monitor the relative magnitudes of the signal in the transmit and receive channels. Separate signal-to-noise detectors determine whether signals present in the two channels are speech or background noise. The control circuit uses these inputs, in conjunction with the present state of the system (i.e., transmit, receive, or idle) and transitions to a new state in accordance with predefined criteria incorporated into the control algorithm. In particular, the present invention allows a transition in a single step from a receive to a transmit state, without going through the idle mode. The ability to remember a current state provides the ability to implement a more sophisticated scheme for determining when to transition to a different state. The present invention is able to provide the event driven control circuit without requiring complex, digital programming, with the addition of &#34;dummy&#34; or &#34;transition&#34; states in the state diagram implemented by the control circuitry. 
     In the preferred embodiment, there are three active states; a receive state in which the gain of the receive attenuator is high compared to the transmit attenuator, a transmit state in which the transmit attenuator has a high gain compared to the receive attenuator, and an idle state in which the gains of the two attenuators are equalized. The control system transitions from the transmit to the receive state when voice is detected in the receive channel which has an amplitude greater by a preset margin than the amplitude of the transmit channel. Conversely, a transition is made from the receive state to the transmit state when there is voice detected in the transmit channel and the amplitude of the signal in the transmit channel is greater than the receive channel signal by a second preset margin. Transitions are made from the receive or transmit state to the idle state when no voice signal is detected in the receive or transmit channels, respectively. Transitions are made from the idle state to the receive or transmit state upon the detection of voice in that particular channel and the signal being above a predetermined minimum magnitude. Transition states are provided between the above states for two reasons: 1) to enable the implementation in simple logic by giving an even number of states, and 2) to provide hysteresis during the changing of states to prevent bouncing back and forth between states during a change. 
     For a fuller understanding of the nature and advantages of the invention, reference should be made to the ensuing detailed description taken in conjunction with the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a four-point sensing circuit utilizing the present invention; 
     FIG. 2 is a table setting forth the comparator conditions for the comparators of FIG. 1; 
     FIG. 3 is a state diagram setting forth the event driven operation of the control circuit of FIG. 1; 
     FIG. 4 is a state diagram of an alternate event driven circuit; 
     FIG. 5 is a block diagram of the control circuit of FIG. 1; 
     FIG. 6 is a circuit diagram of the control circuit of FIG. 5; and 
     FIG. 7 is a block diagram of the logic circuit of FIG. 5. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     FIG. 1 is a block diagram of a speakerphone circuit according to the present invention. A microphone 10 provides a signal through a microphone amplifier 12, a voltage controlled amplifier 14, a second amplifier 16, and a transmission circuit 18 coupled to the phone line. A receive channel provides a signal from transmission circuit 18 through a filtering amplifier 20, a voltage controlled amplifier 22, and a speaker amplifier 24 to a speaker 26. A control circuit 28 controls the gain of the transmit amplifier 14 and a receive amplifier 22. 
     The gain of the transmit and receive channel amplifiers are set to opposite levels, so that only one channel has its gain set to a high value at any one time. The exception is the idle mode, in which both gains are equalized when neither party is talking, or when the predominant signal in both channels is noise. 
     The control circuit operates on four inputs. A first input is indicated as A. This signal comes from a comparator 30 which receives its inputs through peak detectors 32 and 34, respectively, from the output of amplifier 16 on the transmit channel and the output of amplifier 20 on the receive channel. Similarly, a comparator 36 provides signal B from a comparison of the signals provided through peak detectors 38 and 40 coupled to the output of microphone amplifier 12 and speaker amplifier 24, respectively. 
     The other inputs, which indicate whether voice is present, are from noise discriminator circuits 42 and 44. These circuits, which indicate the noise level, are compared to the signals from peak detectors 38 and 34, respectively, in comparators 46 and 48, respectively, to provide signals T and R to the control circuit. The signal T indicates the presence of voice in the transmit channel, while the signal R indicates the presence of voice in the receive channel. 
     FIG. 2 sets forth the comparator conditions for one embodiment of the present invention. These conditions require that one signal not merely exceed the other in the comparator, but the other is exceeded by a designated margin. Basically, the A and B signals, which have 2:1 and 1.1:1 ratios, are used for transitioning from the idle state, where no signal is detected in either channel, to one of the channels. The larger comparison of 10:1 and 18.8:1 required for signals A and B is used to transition from the transmit to the receive channel, or vice versa, when one party is trying to break in on the other. A larger ratio is required here so that one party is not constantly interrupted by small sounds. 
     The comparison ratios set forth above are determined in practice by the gain and attenuation aspects of the signal paths to the comparators in FIG. 1. The gain of the microphone 10, the transmit attenuator 14 and the amplifiers 12, 16 along with the peak detector circuit 32 determine the gain of that path, for instance. Different gain ratios may be used for different applications. For instance, in a car telephone, where there is large background noise, a large threshold may be required to transmit a signal from the car to break in on the signal being received. Conversely, in the normal office environment, it may be desirable to have the gains approximately equal. 
     FIG. 3 is a state diagram illustrating the operation of a simplified control circuit utilizing the inputs designated in FIG. 1 with the conditions set forth in FIG. 2. The state diagram shows four states, a receive state 50, an idle state 52, a transmit state 54, and a dummy state 56. The transitions to the dummy state actually pass through it to the next state, as indicated by the arrows. The dummy state is included for the particular embodiment, using latches to implement the event driven circuit. Two latches are used, designated X and Y, providing four possible states. To ensure correct operation, it is not permissible for both latches to change simultaneously. In a system containing only three states this condition cannot be realized. Therefore a dummy state is included in the transition from transmit to receive or vice versa, allowing first one latch to change and then the other. Other system implementations could be used which would not require such a dummy state. 
     The signals used in the event driven circuit are the inputs to control circuit 28 of FIG. 1, and indicate the following: 
     T=Voice present on transmit channel 
     T=Noise or no voice present on transmit channel 
     R=Voice present on receive channel 
     R=Noise or no voice present on receive channel 
     A=Rx signal&gt;Tx signal 
     A=Rx signal&lt;Tx signal 
     B=Tx signal&lt;Rx signal 
     B=Tx signal&gt;Rx signal 
     The idle state 52 is the state in which the circuit will remain when the noise is greater than speech in the two channels or when there is no signal at all present. In this state, the gain of the two voltage controlled amplifiers will be equal. A transition from the idle state to receive state 50 is indicated by AR, indicating that the receive signal is greater than the transmit signal, and that a voice signal is present on the receive channel. Because of the various gain levels in the signal path, the conditions set forth in FIG. 2, are that the receive channel magnitude be greater than twice the transmit channel magnitude. Once in the receive state 50, the gain of the receive attenuator is adjusted upward, such that the transition to the transmit state 54, indicated by the condition AT, requires that the transmit channel be more than ten times the magnitude of the receive channel. The rest of the state diagram should be self-explanatory. 
     Upon transition from one state to another, the gains of the attenuators 14 and 22 are adjusted to reflect the new state of the system, creating different comparison ratios for determining the transition to the next state. Hysteresis is thereby introduced into the system to prevent unwanted rapid switching between the transmit and receive states. 
     FIG. 4 shows the preferred embodiment of the state diagram. Two extra switching states are included in the system, increasing the required number of states to five. The extra states ensure that the gain change of the attenuators, which occurs at a rate much slower than the operation of the control system, is completed before the system enters a new stable state (transmit or receive). Three latches are used, designated X, Y and Z providing eight possible states. To ensure correct operation, three dummy states, SD1, SD2 and SD3 are included in the state diagram. In addition to the extra switching states a more complete set of comparisons is made. For example the transition from idle state 60 to receive state 62 requires a condition ABR, indicating that not only must Rx be greater than Tx by the value corresponding to the gain presented by the signal paths to comparator 30, but also by the gain corresponding to the signal paths to comparator 36. Thus, this condition effectively requires that the larger of the two be present to effect the transition. The transition from receive state 62 to transmit switching state 65 requires the condition BT+AT (the symbol+indicating an 0R condition). This condition effectively allows a transition from the receive channel to the transmit channel upon the lesser threshold of two comparators being met. 
     FIG. 5 is a block diagram of control circuit 28 of FIG. 1. Although T and T and A and A, etc., signals are shown in FIG. 1, in the implementation of FIG. 5, only the A, B, T and R signals are provided from the comparators. These are inverted through inverters U1-U4 and provided to a logic block 510, which implements the event driven circuit. The logic block provides Rx and Tx output signals to control circuit 512. The output signal Rx is active when the event driven circuit enters the states RX, RXS or SD1. The output signal Tx is activated when the system enters the states TX, TXS or SD2. 
     The details of control circuit 512 are shown in FIG. 6. FIG. 6 shows differential amplifier 414, with output CTN and CTP providing the gain control signals to attenuators 14 and 22 of FIG. 1. These are connected to feedback through current setting amplifiers 420 and 430 for the transmit and receive channels, respectively, and through operational amplifiers 422 and 432, respectively. These are in turn coupled to transistors 424 and 434 to a capacitor 412 and resistor 413, which is connected to two current sources in a current switching circuit 610 coupled to the Rx and Tx signals of FIG. 5. 
     FIG. 7 shows the detail of logic block 510 of FIG. 5. The inputs are shown on the left to a series of switches, with latches X, Y and Z being shown on the right side of the figure. 
     As will be understood by those familiar with the art, the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. For example, different state transition rules could be used or different logic implementation of the event driven circuit could be implemented, such as one using a ROM for storing the states. Accordingly, the disclosure of the preferred embodiment of the invention is intended to be illustrative, but not limiting, of the scope of the invention which is set forth in the following claims.