Summary of the invention
The present invention relates generally to a kind of 360 ° of omnirange communication devices that are applied near infrared communication, mainly comprises: near infrared emission portion, infrared signal acceptance division, slope comparer, TXD signal shielding portion.This circuit adopts Central Symmetry design, do not need to aim at infrared transmitting tube and the receiving tube of the communication of ammeter end near infrared, can realize arbitrarily angled communication, this circuit can compatible to IEC standard and the requirement of the near infrared communication reading of ansi standard, without aligning, gets final product communication.
Technical scheme 1: near infrared reading device, it for and the infrared communication portion of an ammeter between communication coupling, comprise a near infrared reading device body, it improves design and is: one end of described near infrared reading device body is provided with data-interface.
The end of described near infrared reading device body is provided with read head housing, in described read head housing, is provided with reading module, described reading module connection data interface.
In a preferred embodiment, described reading module has comprised DSP, signal emission part, signal receiving part, slope comparer and TXD signal shielding portion, wherein said DSP is the infrared communication portion sending and receiving infrared signal to ammeter by described signal emission part and signal receiving part respectively, and between described signal emission part and signal receiving part, has been connected slope comparer and the TXD signal shielding portion of coupling with it.
In a preferred embodiment, near infrared reading device further comprises power supply, and it is described DSP, and signal emission part and signal receiving part provide operating voltage, and further connects described data-interface, by described data-interface, obtains external power source.
Described data-interface is aviation plug or USB interface.
In a preferred embodiment, described signal emission part comprises infrared emission array and the switching device being coupled with it, by described switching device Q1, be controlled by the TXD signal end of DSP and further controlled described infrared emission array, wherein said infrared emission array comprises several parallel and symmetrically arranged infrared transmitting tubes.
In a preferred embodiment, described switching device is triode Q1.
In a preferred embodiment, described signal receiving part comprises pull-up device and the infrared receiving tube T1 being attached thereto, and receives the infrared signal of the infrared communication portion of ammeter by described infrared receiving tube T1.
In a preferred embodiment, described current potential pull-up device is pull-up resistor R4.
In a preferred embodiment, the input end access signal receiving part of described slope comparer, and comprise: controlled break-make device, it is connected to described signal receiving part, according to the signal of the infrared receiving tube T1 of this signal receiving part, to late-class circuit, causes break-make to control;
Pull-up device, it connects described controlled break-make device, with signal boost that its break-make is drawn or decay to the first voltage;
Partial pressure device, it connects described controlled break-make device, with the signal dividing potential drop that its break-make is drawn, obtains second voltage;
Comparer U1B, it is accessed the first and second voltages of described pull-up device and partial pressure device respectively as anode and negative terminal, to judge a digital signal to the RXD signal end of DSP.
In a preferred embodiment, described controlled break-make device is diode D7 parallel with one another, D9; Described pull-up device is pull-up resistor R8; Described partial pressure device is divider resistance R6, R12.
In a preferred embodiment, further comprise the capacitive device in parallel with described partial pressure device, it carries out charging and discharging in the make and break process of described controlled break-make device, so that produce a fixedly difference between described the first voltage and second voltage.
In a preferred embodiment, described capacitive device is capacitor C2.
In a preferred embodiment, the TXD signal end of the described TXD signal shielding access DSP of portion, and control described slope comparer, it comprises:
Switching device, it accesses described TXD signal end and further controls late-class circuit according to its level;
Pull-up device, it connects described controlled break-make device, with signal boost that its break-make is drawn or decay to the first voltage;
Partial pressure device, it connects described controlled break-make device, with the signal dividing potential drop that its break-make is drawn, obtains second voltage;
Comparer U1A, it is accessed the first and second voltages of described pull-up device and partial pressure device respectively as anode and negative terminal, to judge the digital signal output of a Digital Signals slope comparer.
In a preferred embodiment, described switching device is diode D8, and described pull-up device is pull-up resistor R11, and described partial pressure device is divider resistance R9, R10.
Technical scheme 2: ammeter, it is arranged between mains supply line and electrical network user load, it improves design and is: comprise according to aforesaid near infrared reading device, and watchcase with matching, in described watchcase, be provided with processor and infrared communication portion, described infrared communication portion is electrically connected to processor, in wherein said watchcase, is fixed with iron prop, in described near infrared reading device, be fixed with magnetic post, described iron prop is corresponding with described Ci Zhu position and can be adsorbed on together.
In a preferred embodiment, ammeter realization has comprised step with the method that external unit carries out near infrared data communication:
1) data-interface by described near infrared reading device connects an external data equipment and obtains power for operation support;
2) boss of described near infrared reading device one end is aimed at and inserted in the locating slot that described watchcase is corresponding, make infrared communication portion and the mutual communication coupling over against ground of reading module in described watchcase;
3) described external data equipment sends read signal by reading module to infrared communication portion: by DSP, its TXD signal end is placed in to low level, the low level signal of switching device that inputs to signal emission part by resistance R 5 makes it conducting, and then make first voltage of described power supply offer infrared emission array, make it to send infrared signal to infrared communication portion;
4) processor of described ammeter receives this infrared signal by infrared communication portion, and feedback data signal is to signal receiving part;
5) by the infrared receiving tube T1 of described signal receiving part, receive the data-signal of this feedback, described infrared receiving tube T1 is in magnifying state, its C utmost point is in a uncertain low level state of level, now its C pole tension is infrared emittance and the proportional relation of dispersion angle with the infrared communication portion of described ammeter, when the infrared emittance of described infrared communication portion and dispersion angle increase, C pole tension levels off to 0V gradually; When described infrared communication portion finishes transmitted data signal, the C pole tension of described infrared receiving tube T1 is promoted to described the first voltage by pull-up device;
6) pass through data-interface data information to external data equipment.
In a preferred embodiment, in step 3), when described signal emission part does not receive the signal from TXD signal end, described DSP is set to high level, and the high level signal of switching device that inputs to signal emission part by resistance R 5 makes it cut-off; In step 5), when not receiving the data-signal of infrared communication portion, the C pole tension of described infrared receiving tube T1 is placed in by force the first voltage by pull-up device.
In a preferred embodiment, when infrared receiving tube T1 receives the data-signal of feedback, start to enter magnifying state, its C pole tension starts to decline, make the controlled break-make device of slope comparer start conducting, cause respectively the anode of comparer U1B and the first and second voltage drops that negative terminal obtains;
By capacitive device, the anode voltage drop speed of described comparer U1B is controlled as higher than negative terminal voltage, made comparer U1B be output as low level, it is low level that RXD signal end starts by high level saltus step;
When the C of infrared receiving tube T1 pole tension is stabilized in a low level, because of the pressure drop difference on controlled break-make device, cause the positive terminal voltage of comparer U1B to be less than negative terminal voltage, make comparer U1B maintain low level output, RXD signal end continues to be output as low level signal;
When infrared receiving tube T1 stops receiving the data-signal of feedback, start to become cut-off state from magnifying state, its C pole tension starts to rise to the first voltage, makes the side of the positive electrode voltage of described controlled break-make device start to rise;
By divider resistance, capacitive device is charged, cause the negative terminal voltage pulling speed of comparer U1B lower than positive terminal voltage, the output of comparer U1B is exported high level by pull-up resistor, RXD signal end output high level.
In a preferred embodiment, when the TXD of DSP signal end is made as high level, the switching device cut-off of described TXD signal shielding portion, make the anode input voltage of comparer U1A be promoted to the first voltage by pull-up resistor, the negative terminal voltage of wherein said comparer U1A is the second voltage described the first voltage dividing potential drop being obtained by divider resistance, now the positive terminal voltage of comparer U1A, higher than negative terminal voltage, does not control comparer U1A to the negative terminal of slope comparer;
When the TXD of DSP signal end is made as low level, the switching device conducting of described TXD signal shielding portion, makes the positive terminal voltage of comparer U1A be made as the output low level lower than negative terminal voltage by pull-up device;
The comparer U1B negative terminal voltage of slope comparer is pulled to low level, makes its anode input voltage perseverance be greater than negative terminal input voltage and export high level, RXD signal end output high level.
Beneficial effect of the present invention is apparent, and this programme adopts Central Symmetry design.By slope comparer, overcome infrared reception signal rising edge/negative edge that the differential seat angle between infrared receiving tube and the infrared transmitting tube of equipment brings problem slowly, realized infrared transmitting tube and infrared receiving tube non-central to punctual communication function.
Embodiment
With reference to Figure 1A, Figure 1B, between near infrared reading device and the infrared communication portion of an ammeter, realize communication coupling, comprise a near infrared reading device body 4, the rear end of near infrared reading device body 4 is provided with data-interface 5.
The end of described near infrared reading device body 4 is provided with read head housing 6, in described read head housing 6, is provided with reading module 7, described reading module 7 connection data interfaces 5.
With reference to Fig. 2, in a preferred embodiment, described reading module 7 has comprised DSP(digital signal processor) 706, signal emission part 702, signal receiving part 703, slope comparer 704 and TXD signal shielding portion 705, wherein said DSP706 is the infrared communication portion 201 sending and receiving infrared signals to ammeter by described signal emission part 702 and signal receiving part 703 respectively, and between described signal emission part 702 and signal receiving part 703, have been connected slope comparer 704 and the TXD signal shielding portion 705 of coupling with it.
In a preferred embodiment, near infrared reading device 10 further comprises power supply 701, and it is described DSP706, and signal emission part 702 and signal receiving part 703 provide operating voltage, and further connect usb data interface 707, by described usb data interface 707, obtain outside+12V electric power source.
In a preferred embodiment, described data-interface is aviation plug or USB interface, generally selects USB interface, in technical grade instrument, can select aviation interface.
With further reference to Fig. 2, in a preferred embodiment, signal emission part 702 comprises an infrared emission array, and the switching device (the better triode Q1 that selects) being coupled with it, by described triode Q1, be controlled by the TXD signal end of DSP and further controlled described infrared emission array, wherein said infrared emission array comprises several parallel and symmetrically arranged infrared transmitting tubes.
In Fig. 2, provide the preferred embodiment of a signal emission part 702, it is by resistance R 1, R2, and R3, R5, infrared transmitting tube D1, D2, D3, D4, D5, D6(selects infrared transmitting tube D1 and D2, D3 and D4, D5 and D6 interconnect and form array), triode Q1 forms.When normal, TXD signal end is made as high level, and the B utmost point signal that TXD signal end is input to positive-negative-positive triode Q1 by resistance R 5 is high level, makes its cut-off, infrared transmitting tube D1, and D2, D3, D4, D5, D6 does not launch infrared signal.When TXD signal end is set to low level, TXD signal end is by low level signal of the B utmost point of resistance R 5 input switch pipe Q1, Q1 conducting, from power supply 701+3.3V supply voltage flows through D1, D2, R1, D3, D4, R2, D5, D6, R3, infrared transmitting tube D1, D2, D3, D4, D5, D6 transmitting infrared signal is to ammeter.
Simultaneously, in PCB design, infrared transmitting tube D1, D2, D3, D4, D5, is arranged symmetrically with centered by D6, adds that infrared transmitting tube has certain circular cone emission angle, no matter how infrared communication head is placed, all guaranteed that ammeter side infrared communication portion 201 all can receive the infrared signal of sufficient intensity, guaranteed the reliability transmitting.
In a preferred embodiment, described signal receiving part comprises pull-up device (resistance R 4) and the infrared receiving tube T1 being attached thereto, and receives the infrared signal of the infrared communication portion 201 of ammeter by described infrared receiving tube T1.
In Fig. 2, provide the preferred embodiment of a signal receiving part 703, it is mainly comprised of resistance R 4 and infrared receiving tube T1.
Wherein, when ammeter is without infrared emission signal during to communication section 201, infrared receiving tube T1 cut-off, the C utmost point of T1 is moved to high level in resistance R 4.When receiving the infrared signal of infrared transmitting tube transmitting of ammeter of non-central aligning, infrared receiving tube T1 enters magnifying state, the C utmost point of T1 is in a uncertain low level state of level, the voltage of its C utmost point is relevant with infrared divergence angle with the infrared intensity of the infrared transmitting tube of ammeter side, when the infrared transmitting tube infrared intensity of ammeter larger, when infrared divergence angle is larger, the voltage of the C utmost point more approaches 0V.When the infrared communication portion 201 of ammeter finishes infrared emission, the C utmost point of T1 is pulled in resistance R 4 is raised to 3.3V voltage.
In a preferred embodiment, the infrared receiving tube T1 of the input end access signal receiving part 703 of described slope comparer 704, and comprise: controlled break-make device (is preferably diode D7 parallel with one another, D9), it is connected to described signal receiving part 703, according to the signal of its infrared receiving tube T1, to late-class circuit, causes break-make to control; Pull-up device (resistance R 8), it connects described controlled break-make device (diode D7), with signal boost that its break-make is drawn or decay to the first voltage+3.3V; Partial pressure device (divider resistance R6, R12), it connects described controlled break-make device (diode D9), obtains second voltage (lower than+3.3V, the value that test draws is+3.0V) with the signal dividing potential drop that its break-make is drawn; Comparer U1B, it is accessed the first and second voltages of described pull-up device and partial pressure device respectively as anode and negative terminal, to judge a digital signal to the RXD signal end of DSP706.
In a preferred embodiment, further comprise the capacitive device (capacitor C2) in parallel with described partial pressure device (resistance R 12), it carries out charging and discharging in the make and break process of diode D7 and D9, so that produce a fixedly difference 0.3V between described the first voltage+3.3V and second voltage+3.0V.
In Fig. 2, provide the preferred embodiment of a slope comparer 704, it is by resistance R 8, R6, and R12, R7, diode D7, D9, capacitor C 2, comparer U1B forms.
When not receiving infrared signal, exports infrared receiving tube T1 high level, diode D7 now, and D9 ends.The anode input of comparer U1B is by move in resistance R 8+3.3V voltage, the negative terminal input of comparer U1B draws the voltage of an approach+3.3V by resistance R 6 and R12 dividing potential drop, now the positive terminal voltage of comparer U1B is greater than negative terminal voltage, comparer U1B output terminal is moved to high level on pull-up resistor R7, and output RXD signal is high level.
When infrared receiving tube pipe T1 receives infrared signal, T1 starts to enter magnifying state, and its C pole tension starts to decline, diode D7, and D9 starts conducting, and the anode of comparer U1B and negative terminal voltage be respectively because of the D7 of conducting, D9 and declining.But because the reason that the capacitor C of negative terminal 2 exists, the anode voltage drop speed of U1B is faster than negative terminal, and in a very short work timing, positive terminal voltage is lower than negative terminal voltage subsequently, comparer U1B output low level, it is low level that RXD signal end starts by high level saltus step.
When the C of infrared receiving tube T1 pole tension is stabilized in a low level, because flow through on-off switch D7, the electric current of D9 is different, and pressure drop different (and the pressure drop of D7 is less than the pressure drop of D9), cause positive terminal voltage to be less than negative terminal voltage, comparer U1B maintains low level output, and RXD signal end continues output low level signal.When T1 stops receiving infrared signal, infrared receiving tube T1 starts to become cut-off state from magnifying state, the C pole tension of T1 starts to rise to+3.3V, the side of the positive electrode voltage of on-off switch D7 and D9 starts to rise, because resistance R 6 need to be charged to capacitor C 2, the voltage that causes the rate of voltage rise of comparer U1B negative terminal to be slower than anode rises, subsequently again can be in a very short work timing, the positive terminal voltage of comparer U1B is higher than negative terminal voltage, comparer U1B output is by pull-up resistor R7 output high level, thus RXD signal output high level.
In a preferred embodiment, the TXD signal end of the described TXD signal shielding 705 access DSP706 of portion, and control described slope comparer 704, it comprises: switching device (diode D8), and it accesses described TXD signal end and further controls late-class circuit according to its level; Pull-up device (pull-up resistor R11), its connects aforementioned controlled break-make device, with signal boost that its break-make is drawn or decay to the first voltage+3.3V; Partial pressure device (divider resistance R9, R10), it connects described controlled break-make device, with the signal dividing potential drop that its break-make is drawn, obtains second voltage+2.4V; Comparer U1A, it is accessed the first and second voltages of described pull-up device and partial pressure device respectively as anode and negative terminal, to judge the digital signal output of a Digital Signals slope comparer.
In Fig. 2, provide the preferred embodiment of a TXD signal shielding portion 705, it is by resistance R 11, R9, and R10, capacitor C 1, diode D8, comparer U1A forms.Because the difference of the simulating signal that infrared receiving tube T1 receives distance, emissive porwer etc., the comparer of routine techniques cannot correctly be treated to digital signal, so the present embodiment has designed this slope comparer.
When TXD is high level, switch D8 cut-off, moved on the R11+3.3V of anode input voltage of comparer U1A, the negative terminal input voltage of comparer U1A by R9 and R10 right+3.3V dividing potential drop obtains.Now the positive terminal voltage of U1A is higher than negative terminal voltage, and comparer U1A exports high-impedance state, the negative terminal of slope comparer is not controlled, and the variation of simulating signal slope is judged.
For example, on analog signal waveform, select 2 A and B, we judge A, 2 of B, wherein A point is that voltage starts drop point, and B point is that voltage starts rising point, is mapped in the quadrant coordinate system, be expressed as first and the line of fourth quadrant, the line rising is at first quartile, and slope is for just, and comparer is exported high level.Drop to fourth quadrant, slope is negative, comparer output low level.For be high or be low situation always always, slope is 0, and comparer output is not done and changed.
When TXD output low level, switch D8 conducting, after the positive terminal voltage of comparer U1A is drop-down by D8, be less than the voltage of negative terminal, comparer output low level, the negative terminal of slope comparer U1B pulled down to low level, the permanent negative terminal input that is greater than U1B of anode input of U1B, U1B exports high level, and RXD is high.When there is saltus step from low to high in TXD signal end, switch D8 ends again, but because 1 charging of 11 pairs of capacitor C of resistance R needs the regular hour just can be charged to the negative terminal voltage higher than U1A, the delay signal that this period of duration of charging guaranteed infrared receiving tube after TXD saltus step and produce because the turn-off time that junction capacity effect causes is later than the infrared transmitting tube turn-off time is by TXD signal to shielding, and RXD signal end there will not be an of short duration low level pulse after the saltus step of TXD signal end is high level.When communication head receives the infrared signal of ammeter transmitting, TXD signal shielding circuit has discharged the control to slope comparer negative terminal, the infrared signal that slope comparer again can normal process infrared receiving circuit receives.
Invent on this basis a kind of ammeter, it is arranged between mains supply line and electrical network user load, as Figure 1A, Figure 1B and Fig. 2, it comprises according to aforesaid near infrared reading device, and watchcase 2 with matching, in described watchcase 2, be provided with processor and infrared communication portion 201, described infrared communication portion 201 is electrically connected to processor, in wherein said watchcase 2, be fixed with iron prop 1, in described near infrared reading device, be fixed with magnetic post 3, the position of described iron prop 1 and described magnetic post 3 is corresponding and can be adsorbed on together.
In a preferred embodiment, ammeter realization has comprised step with the method that external unit carries out near infrared data communication:
1) data-interface by described near infrared reading device connects an external data equipment and obtains power for operation support;
2) boss of described near infrared reading device one end is aimed at and inserted in the locating slot that described watchcase is corresponding, make infrared communication portion and the mutual communication coupling over against ground of reading module in described watchcase;
3) described external data equipment sends read signal by reading module to infrared communication portion: by DSP, its TXD signal end is placed in to low level, the low level signal of switching device that inputs to signal emission part by resistance R 5 makes it conducting, and then make first voltage of described power supply offer infrared emission array, make it to send infrared signal to infrared communication portion;
4) processor of described ammeter receives this infrared signal by infrared communication portion, and feedback data signal is to signal receiving part;
5) by the infrared receiving tube T1 of described signal receiving part, receive the data-signal of this feedback, described infrared receiving tube T1 is in magnifying state, its C utmost point is in a uncertain low level state of level, now its C pole tension is infrared emittance and the proportional relation of dispersion angle with the infrared communication portion of described ammeter, when the infrared emittance of described infrared communication portion and dispersion angle increase, C pole tension levels off to 0V gradually; When described infrared communication portion finishes transmitted data signal, the C pole tension of described infrared receiving tube T1 is promoted to described the first voltage by pull-up device;
6) pass through data-interface data information to external data equipment.
In a preferred embodiment, in step 3), when described signal emission part does not receive the signal from TXD signal end, described DSP is set to high level, and the high level signal of switching device that inputs to signal emission part by resistance R 5 makes it cut-off; In step 5), when not receiving the data-signal of infrared communication portion, the C pole tension of described infrared receiving tube T1 is placed in by force the first voltage by pull-up device.
In a preferred embodiment, when infrared receiving tube T1 receives the data-signal of feedback, start to enter magnifying state, its C pole tension starts to decline, make the controlled break-make device of slope comparer start conducting, cause respectively the anode of comparer U1B and the first and second voltage drops that negative terminal obtains;
By capacitive device, the anode voltage drop speed of described comparer U1B is controlled as higher than negative terminal voltage, made comparer U1B be output as low level, it is low level that RXD signal end starts by high level saltus step;
When the C of infrared receiving tube T1 pole tension is stabilized in a low level, because of the pressure drop difference on controlled break-make device, cause the positive terminal voltage of comparer U1B to be less than negative terminal voltage, make comparer U1B maintain low level output, RXD signal end continues to be output as low level signal;
When infrared receiving tube T1 stops receiving the data-signal of feedback, start to become cut-off state from magnifying state, its C pole tension starts to rise to the first voltage, makes the side of the positive electrode voltage of described controlled break-make device start to rise;
By divider resistance, capacitive device is charged, cause the negative terminal voltage pulling speed of comparer U1B lower than positive terminal voltage, the output of comparer U1B is exported high level by pull-up resistor, RXD signal end output high level.In a preferred embodiment, when the TXD of DSP signal end is made as high level, the switching device cut-off of described TXD signal shielding portion, make the anode input voltage of comparer U1A be promoted to the first voltage by pull-up resistor, the negative terminal voltage of wherein said comparer U1A is the second voltage described the first voltage dividing potential drop being obtained by divider resistance, now the positive terminal voltage of comparer U1A, higher than negative terminal voltage, does not control comparer U1A to the negative terminal of slope comparer;
When the TXD of DSP signal end is made as low level, the switching device conducting of described TXD signal shielding portion, makes the positive terminal voltage of comparer U1A be made as the output low level lower than negative terminal voltage by pull-up device;
The comparer U1B negative terminal voltage of slope comparer is pulled to low level, makes its anode input voltage perseverance be greater than negative terminal input voltage and export high level, RXD signal end output high level.
Aforementioned embodiments is only the better embodiment to technical solution of the present invention, is not the restriction to technical solution of the present invention, and technology category of the present invention and claims are as the criterion with claims.