Summary of the invention
The object of the present invention is to provide a kind of switching and the energy automatic off-hook that can realize between circuitWith the telephone entry system of automatic hand-up, to improve its adaptability.
A kind of telephone entry system, comprising:
Carry out power detection circuit: for detection of the electricity condition that comes in circuit;
Circuit for answering: for completing the off-hook agreement of telephonic communication standard;
Modulation /demodulation module: for the order of modulation and demodulation circuit and voice signal;
Circuit is selected module: maybe need the circuit switching circuit of dialing according to current call circuit,It is connected with modulation /demodulation module;
Microcontroller: for receiving the detection signal of power detection circuit, according to detection signal controlCircuit for answering processed carries out automatic off-hook, on-hook operation, receives uploading of modulation /demodulation moduleSignal, issues control command to modulation /demodulation module, defeated after the modulation of modulation /demodulation moduleEnter circuit;
Memory module: be connected with microcontroller, the inside connections arranging in advance for storing userDialed number;
Interface module: for external system main-machine communication;
Voice amplifying circuit, after voice signal after the demodulation of modulation /demodulation module is amplified by raising one's voiceDevice is put outward.
Adopt telephone entry system of the present invention, communicating terminal is pre-stored according to memory moduleDialed number dialing, warp after the order of interface module input dial is via modem modulationCircuit transmission, the electricity condition that comes coming in power detection circuit detection line is uploaded to microcontroller. IfIncoming telephone signal detected, microprocessor control circuit access circuit for answering, completes automatic off-hook behaviourDo; If in communication process, the first on-hook of the other side, modulation /demodulation module detects that busy-back signal is alsoSend to microcontroller, microcontroller receives on-hook signal, and control circuit disconnects circuit for answering,Complete automatic hand-up function. In addition, microcontroller carrys out the letter of power detection circuit input according to two-wayNumber, judging the circuit of current call, control circuit is selected circuit, the circuit of current input companyReceive modulation /demodulation module, realize normal talking. Being stored in of setting in advance according to user depositedNumber in storage module, user can carry out dial-up to any road in two-way telephone wire,Carrying out circuit by microcontroller selects and finds the corresponding subscriber computer of this number, control circuitSelect module to switch to corresponding circuit. Compared with prior art, its can complete automatic off-hook,On-hook, the automatic switchover between circuit, supports multiplex telephony communication, its adaptability is stronger, makesWith more convenient.
Preferably, described come the detection signal of power detection circuit after electric capacity filters DC voltage,Through bridge path rectification, AC signal is changed into DC pulse signal, by voltage-stabiliser tube voltage stabilizing, capacitor filtering,After resistance current limliting, export microcontroller input interface to through optocoupler.
Preferably, described circuit for answering comprises the switch being connected with microcontroller, microcontroller controlThe corresponding off-hook of switching of switch processed, hook state change.
Preferably, described switch is a triode, the conducting of microprocessor control triode or cutOnly realize the switching to relay.
Preferably, it is relay that described circuit is selected module, Control pin and microcontrollerDevice output interface is connected.
Preferably, described voice amplifying circuit comprises power amplifier and wave filter, voice signalAfter being amplified by power amplifier, after wave filter filtering high-frequency interferencing signal, export loudspeaker to.
Preferably, described interface module and external system main-machine communication are a serial port circuit, by going here and thereMouth electrical level transferring chip is to its communication level conversion.
Preferably, the present invention also comprises the key dial-up circuit being connected with microcontroller, memoryIn store corresponding call number in a key dial module.
Detailed description of the invention
Below in conjunction with accompanying drawing, the present invention is further illustrated.
In the telephone line testing circuit of Fig. 1, telephone wire, in the time of the free time, has a 48VDC voltage, in the time having incoming call, in telephone wire can stack a 75V, the AC signal of 25Hz.Capacitor C 16 in circuit is used for isolating the DC voltage of 48V, and resistance R 3 use current limlitings, avoidElectric current is excessive, damages back end signal testing circuit. Rectification diode D1, D2, D4, D5 compositionAn interchange turns the bridgt circuit of direct current, and voltage-stabiliser tube D3 arrives the output voltage stabilizing of bridgt circuit above3V, they are jointly 75V, and the AC signal of 25Hz changes into 3V DC pulse signal. Electric capacityC15 is for filtering AC signal. Resistance R 2 is metering functions, prevents front end output signal mistakeDamage light lotus root P1 by force. Light lotus root P1 is used for isolating phone input circuit and single chip machine controlling circuitBetween electrical connection, avoid interference. Through circuit above, the DC pulse of 3V carrys out telecommunicationsNumber correctly output to the P0.0 mouth of single-chip microcomputer. R13 is the pull-up resistor of P0.0 mouth. ProcessThe SCM program of writing in advance, software can automatically identify electric impulse signal.
Circuit for answering as shown in Figure 2, when single-chip microcomputer pin P0.3 output low level, triodeQ1 conducting, relay H1 adhesive, relay pin 2 (H1_2) and telephone wire input socket pin2 (TEL1_2) conducting. At this moment be equivalent in two 48V AC line of telephone wire and on 680 EuropeResistance R 4 and capacitor C 17, according to telephone communication standard, telephone exchange is thought now phoneIn off hook state.
If user is provided with auto-pickup function in advance, single-chip microcomputer detects by P0.0 pinWhen having incoming call, by P0.3 pin output low level signal, control telephone wire and enter phone and pluckDynamo-electric road, thus realize auto-pickup function. If user's communication finishes, press on-hook button,Single-chip microcomputer, by P0.3 pin output high level signal, is controlled telephone wire and is entered incoming call detectionCircuit, thus realize on-hook function.
If the first osmanthus of the other side machine there will be the busy-back signal pulse of a 450Hz in telephone wire,When SCM program detects this signal, can think the other side's on-hook, simultaneously P0.3 pinDraw high, hang the machine, avoid the machine always in engaged condition, the other side does not come in,Thereby realize automatic hand-up function.
As Fig. 3 commutation circuit module circuit diagram, telephone signal testing circuit, can know currentWhich interior lines incoming call is, exports high or low level by SCM program control P0.4 mouth, controlsThe state of relay H3, thereby control telephone wire outputs to two lines of A, B of back-end circuit isWith TEL1_1, TEL1_2, or be connected with TEL2_1, TEL2_2. Realize the electricity that automatically switchesThe call of words interior lines is selected. If the external dial-up of the machine first allows single-chip microcomputer P0.4 mouth defeatedGo out corresponding level, after control relay handoff calls passage, then dial.
If Fig. 4 is microcontroller and memory module circuit diagram, U7 is pin-saving chip24C16B, is used for storing the inside connections dialed number that user arranges in advance, and off-position stillCan save data. The data communication of this chip adopts I2C interface, by the P2.6 of the machine single-chip microcomputerWith P2.7 Simulation with I 2C and chip communication, realize and write number data and read number data. Micro-STC12C5A16S2 in controller circuitry is the monolithic of a high speed, high reliability, two serial portsMovement sheet. This chip completes the function that all signals of the machine divide folding, Based Intelligent Control, while dispatching from the factoryProgramming fixed routine to its inside. The serial ports 0 of chip is used for phone modulation /demodulation module logicalLetter, serial ports 1 is used for communicating by letter with the system main control system of the machine outside. C24 is that chip power is defeatedEnter the filter capacitor of end. The electrify restoration circuit of C18 and R6 compositing chip. C21, C22 andThe clock circuit of Y1 compositing chip.
Fig. 5 is embodiment of the present invention voice amplification circuit diagrams, and this circuit is the sound of the other side's inputAfter amplification, directly output to the loudspeaker of 8 Europe, 2W. TDA2822 in circuit is aWide operating voltage, low noise, tonequality is good, integrated level is high, and the small-power that peripheral cell is few is amplifiedChip. Resistance R 29 in circuit is served as the load of front end output. It is defeated that C27 is used for filtering front endThe high-frequency interferencing signal going out. C3 is used for the DC component of isolated preceding-terminal output. Adjustable resistance RP1For regulation output wave volume. Other elements in circuit are required in power amplifier chips circuitPeripheral cell.
Fig. 6 is embodiment of the present invention modulation /demodulation module circuit diagram, and this module realizes in telephone wireModulating and demodulating signal function, can identify bell signal and busy-back signal, can export dialing letterNumber in telephone wire. This module and single-chip microcomputer use serial communication. This module can be uploaded phoneVarious signals in line are to single-chip microcomputer, or the order of single-chip microcomputer Sending dialled number and telephone number give shouldModule, through module, modulation changes into analog signal output in telephone wire. A, B in Fig. 5 areTwo line inputs in phone. RXD1 and TXD1 are and the serial ports pin of single chip communication.Microphone input when PH-MIC-, PH_MIC+ are telephone relation. PH-SP+, PH_SP-are electricityThe other side's voice output when words call.
Fig. 7 is embodiment of the present invention interface module circuit diagram, Transistor-Transistor Logic level is changed into RS232Level. In order to improve the stability of communication, the machine adopts RS232 with communicating by letter of external system main frameThe serial communication protocol of level. Therefore need to add the change-over circuit of a TTL RS 232. This electricityRoad also has an electrical isolation effect. The power supply in the machine,, signal and external system masterThe complete electrical isolation of machine. Avoid the external high frequency interfering signal to enter the machine, affect voice callSound quality. ADM3251E is that a high speed, 2.5KV isolate (power supply and data) completelyRS232 transceiving chip. Be applicable to very much using the occasion in communicating pair needs electrical isolation. ItsHis element is the required peripheral cell of this chip.
Fig. 8 is a key dial-up circuit schematic diagram, when user presses a button in two interior linesTime, when microcontroller detects this signal, first control circuit is selected circuit, transfer relay,Select being connected between modulation /demodulation module and this interior line socket. Deposit in advance by reading user againThe different extension of storage, sends to modulation /demodulation module this number, modulates through modulation /demodulation moduleAnd produce dialing signal in circuit, thereby realize a key dial feature.
Fig. 9 is that integrated circuit connects block diagram representation, and it comprises:
Carry out power detection circuit: for detection of the electricity condition that comes in circuit;
Circuit for answering: for completing the off-hook agreement of telephonic communication standard;
Modulation /demodulation module: for the order of modulation and demodulation circuit and voice signal;
Circuit is selected module: maybe need the circuit switching circuit of dialing according to current call circuit,It is connected with modulation /demodulation module;
Microcontroller: for receiving the detection signal of power detection circuit, according to detection signal controlCircuit for answering processed carries out automatic off-hook, on-hook operation, receives uploading of modulation /demodulation moduleSignal, issues control command to modulation /demodulation module, defeated after the modulation of modulation /demodulation moduleEnter circuit;
Memory module: be connected with microcontroller, the inside connections arranging in advance for storing userDialed number;
Interface module: for external system main-machine communication;
Voice amplifying circuit, after voice signal after the demodulation of modulation /demodulation module is amplified by raising one's voiceDevice is put outward;
One key dial-up circuit, is connected with controller, stores in a key dial module in memoryCorresponding call number.
The technical scheme above embodiment of the present invention being provided is described in detail, hereinApply principle and the embodiment of specific case to the embodiment of the present invention and set forth, withThe explanation of upper embodiment is only applicable to help to understand the principle of the embodiment of the present invention; Meanwhile, forOne of ordinary skill in the art, according to the embodiment of the present invention, detailed description of the invention and shouldWith all will change in scope, in sum, this description should not be construed as thisThe restriction of invention.