Summary of the invention
The object of the invention is, in order to overcome deficiency of the prior art, provides a kind of gateway circuit of wireless sensor network.This wireless sensor network gateway possesses the advantages such as the communication modes of support is flexible, low in energy consumption, volume is little, disposal ability is strong, also possesses the real-time storage function of data; When the one party of communication breaks down, wireless sensor network gateway storing data automatically is in this locality; When communication recovers, resume the data of storage, thereby improved the reliability of system.The present invention simultaneously can also carry out remote upgrade to its firmware by several communication modes, to support more function, therefore possesses higher flexibility.
In order to realize foregoing invention object, technical scheme of the present invention adopts as follows:
A gateway circuit of wireless sensor network, comprises microcontroller circuit, serial communication circuit, ethernet circuit, memory circuit, mutual circuit, debug i/f circuit, power circuit and clock circuit.
Microcontroller circuit comprises microcontroller, serial communication circuit is connected with microcontroller serial port signal, ethernet circuit is connected with microcontroller ethernet port signal, memory circuit is connected with I/O mouth signal with microcontroller SPI port signal, mutual circuit is connected with microcontroller pulse modulation output port signal and I/O mouth signal, debug i/f circuit is connected with microcontroller debug port signal, and power circuit provides power supply for whole gateway, and clock circuit provides clock for microcontroller.
Described microcontroller circuit comprises microcontroller, a MII interface gating resistance R 1 and the first pull down resistor R2, one end of the one MII interface gating resistance R 1 is connected with microcontroller 41 pin, the other end ground connection of the one MII interface gating resistance R 1, one end of the first pull down resistor R2 is connected with microcontroller 58 pin, another termination 3.3V power supply of the first pull down resistor R2;
Described serial communication circuit comprises the first filter capacitor C31, the second filter capacitor C32, the 3rd filter capacitor C33, the 4th filter capacitor C34, connector J2, connector J3, connector J4, serial communication level transferring chip U4, one end of the first filter capacitor C31 is connected with 4 pin of serial communication level transferring chip U4, the other end of the first filter capacitor C31 is connected with 5 pin of serial communication level transferring chip U4, one end of the second filter capacitor C32 is connected with 1 pin of serial communication level transferring chip U4, the other end of the second filter capacitor C32 is connected with 3 pin of serial communication level transferring chip U4, one end of the 3rd filter capacitor C33, one end of the 4th filter capacitor C34, 15 pin of serial communication level transferring chip U4, 2 pin of connector J2, 5 pin of connector J3, the 2 pin ground connection of connector J4, the other end of the 3rd filter capacitor C33 is connected with 2 pin of serial communication level transferring chip U4, the other end of the 4th filter capacitor C34 is connected with 6 pin of serial communication level transferring chip U4, and 1 pin of connector J2 connects 5V power supply, 1 pin of connector J3, 4 pin, 6 pin, 7 pin, 8 pin, 9 pin are unsettled, and 2 pin of connector J3 are connected with 14 pin of serial communication level transferring chip U4, and 3 pin of connector J3 are connected with 13 pin of serial communication level transferring chip U4,1 pin of connector J4, 16 pin of serial communication level transferring chip U4 connect 3.3V power supply, 3 pin of connector J4 are connected with microcontroller 13 pin, 4 pin of connector J4 are connected with microcontroller 12 pin, 11 pin of serial communication level transferring chip U4 are connected with microcontroller 27 pin, 12 pin of serial communication level transferring chip U4 are connected with microcontroller 26 pin, 7 pin of serial communication level transferring chip U4, 8 pin, 9 pin, 10 pin are unsettled.
Described ethernet circuit comprises the 5th filter capacitor C27, the 6th filter capacitor C28, the 7th filter capacitor C29, the 8th filter capacitor C30, the first pull-up resistor R5, the second pull-up resistor R6, the second pull down resistor R7, the 3rd pull down resistor R8, the first current-limiting resistance R3, the second current-limiting resistance R4, connector ETH, one end of the 5th filter capacitor C27, one end of the first pull-up resistor R5, 4 pin of connector ETH are connected with microcontroller 46 pin, one end of the 6th filter capacitor C28, one end of the second pull-up resistor R6, 3 pin of connector ETH are connected with microcontroller 43 pin, one end of the 7th filter capacitor C29, one end of the second pull down resistor R7, 7 pin of connector ETH are connected with microcontroller 40 pin, one end of the 8th filter capacitor C30, one end of the 3rd pull down resistor R8, 8 pin of connector ETH are connected with microcontroller 37 pin, one end of the first current-limiting resistance R3 is connected with 2 pin of connector ETH, one end of the second current-limiting resistance R4 is connected with 11 pin of connector ETH, the other end of the first current-limiting resistance R3 is connected with microcontroller 59 pin, the other end of the second current-limiting resistance R4 is connected with microcontroller 60 pin, the other end of the 5th filter capacitor C27, the other end of the 6th filter capacitor C28, the other end of the second pull down resistor R7, the other end of the 3rd pull down resistor R8, the 10 pin ground connection of connector ETH, the other end of the 7th filter capacitor C29, the other end of the 8th filter capacitor C30, the other end of the first pull-up resistor R5, another termination 3.3V power supply of the second pull-up resistor R6,1 pin of connector ETH, 5 pin, 6 pin, 12 pin connect 3.3V power supply, and 9 pin of connector ETH are unsettled.
Described memory circuit comprises the 5th pull-up resistor R27, flash memory U3,3 pin of one end of the 5th pull-up resistor R27, flash memory U3 are connected with microcontroller 73 pin, 5 pin of the other end of the 5th pull-up resistor R27, flash memory U3 connect 3.3V power supply, 1 pin of flash memory U3 is connected with microcontroller 29 pin, 2 pin of flash memory U3 are connected with microcontroller 30 pin, the 4 pin ground connection of flash memory U3,6 pin of flash memory U3 are connected with microcontroller 72 pin, 7 pin of flash memory U3 are connected with microcontroller 28 pin, and 8 pin of flash memory U3 are connected with microcontroller 31 pin.
Described mutual circuit comprises the 3rd current-limiting resistance R21, the 4th current-limiting resistance R22, the 5th current-limiting resistance R23, the 6th current-limiting resistance R17, the first indicator light D2, the second indicator light D3, the 3rd indicator light D4, the 6th pull-up resistor R18, the 7th pull-up resistor R24, the 8th pull-up resistor R25, the first build-out resistor R19, the second build-out resistor R20, the first triode Q5, the first matching capacitance C35, buzzer BZ1, the first button BSL, the second button RESET, one end of the 3rd current-limiting resistance R21 is connected with the negative electrode of the first indicator light D2, the other end ground connection of the 3rd current-limiting resistance R21, one end of the 4th current-limiting resistance R22 is connected with the negative electrode of the second indicator light D3, the other end of the 4th current-limiting resistance R22 is connected with microcontroller 71 pin, one end of the 5th current-limiting resistance R23 is connected with the negative electrode of the 3rd indicator light D4, and the other end of the 5th current-limiting resistance R23 is connected with microcontroller 70 pin, one end of the 6th current-limiting resistance R17, one end of the 6th pull-up resistor R18, the base stage of the first triode Q5 connects, and the other end of the 6th current-limiting resistance R17 is connected with microcontroller 67 pin, the first indicator light D2, the second indicator light D3, the anode of the 3rd indicator light D4 connects 3.3V power supply, the other end of the 6th pull-up resistor R18, the emitter of the first triode Q5 connects 5V power supply, one end of the 7th pull-up resistor R24, one end of the first button BSL is connected with microcontroller 61 pin, another termination 3.3V power supply of the 7th pull-up resistor R24, one end of the 8th pull-up resistor R25, one end of the second button RESET is connected with microcontroller 64 pin, another termination 3.3V power supply of the 8th pull-up resistor R25, one end of the first build-out resistor R19, the collector electrode of the first triode Q5, one end of buzzer BZ1 is connected with one end of the second build-out resistor R20, the anodic bonding of the other end of the first build-out resistor R19 and the first matching capacitance C35, the other end of the second build-out resistor R20, the other end of buzzer BZ1 is connected with microcontroller 66 pin, the other end of the first matching capacitance C35, the other end of the first button BSL, the other end ground connection of the second button RESET.
Described debug i/f circuit comprises the 9th pull-up resistor R9, the tenth pull-up resistor R10, the 11 pull-up resistor R11, the 12 pull-up resistor R12, the 13 pull-up resistor R13, the 14 pull-up resistor R14, the 15 pull-up resistor R15, the 16 pull-up resistor R16, connector JTAG, one end of the 9th pull-up resistor R9, 3 pin of connector JTAG are connected with microcontroller 89 pin, one end of the tenth pull-up resistor R10, 5 pin of connector JTAG are connected with microcontroller 78 pin, one end of the 11 pull-up resistor R11, 7 pin of connector JTAG are connected with microcontroller 79 pin, one end of the 12 pull-up resistor R12, 9 pin of connector JTAG are connected with microcontroller 80 pin, one end of the 13 pull-up resistor R13 is connected with 11 pin of connector JTAG, one end of the 13 pull-up resistor R13 is connected with 13 pin of connector JTAG, one end of the 14 pull-up resistor R14 is connected with 15 pin of connector JTAG, one end of the 15 pull-up resistor R15 is connected with 17 pin of connector JTAG, one end of the 16 pull-up resistor R16 is connected with 19 pin of connector JTAG, the other end of the 9th pull-up resistor R9, the other end of the tenth pull-up resistor R10, the other end of the 11 pull-up resistor R11, the other end of the 12 pull-up resistor R12, the other end of the 13 pull-up resistor R13, the other end of the 14 pull-up resistor R14, the other end of the 15 pull-up resistor R15, the other end of the 16 pull-up resistor R16, 1 pin of connector JTAG, 2 pin of connector JTAG connect 3.3V power supply, and 13 pin of connector JTAG are connected with microcontroller 77 pin, 4 pin of connector JTAG, 6 pin, 8 pin, 10 pin, 12 pin, 14 pin, 16 pin, 18 pin, 20 pin ground connection.
Described power circuit comprises fuse F1, the 9th filter capacitor C17, the tenth filter capacitor C18, the 11 filter capacitor C19, the 12 filter capacitor C20, the 13 filter capacitor C1, the 14 filter capacitor C2, the 15 filter capacitor C3, the 16 filter capacitor C4, the 17 filter capacitor C5, the 18 filter capacitor C6, the 19 filter capacitor C7, the 20 filter capacitor C8, the 21 filter capacitor C9, the 22 filter capacitor C10, the 23 filter capacitor C11, the 24 filter capacitor C12, the 25 filter capacitor C13, the 26 filter capacitor C14, the 27 filter capacitor C15, the 28 filter capacitor C16, button cell BT1, two Schottky D1, three terminal regulator U1, connector J1, one end of fuse F1, the positive terminal of the 9th filter capacitor C17, one end of the tenth filter capacitor C18 is connected with the input of three terminal regulator U1, the other end of fuse F1, 2 pin of connector J1 connect 5V power supply, the positive terminal of the 11 filter capacitor C19, the positive terminal of the 12 filter capacitor C20, the output of three terminal regulator U1, one end of the 13 filter capacitor C1, one end of the 14 filter capacitor C2, one end of the 15 filter capacitor C3, one end of the 16 filter capacitor C4, one end of the 17 filter capacitor C5, one end of the 18 filter capacitor C6, one end of the 19 filter capacitor C7, one end of the 20 filter capacitor C8, one end of the 21 filter capacitor C9, one end of the 22 filter capacitor C10, an anode of two Schottky D1 connects 3.3V power supply, one end of the 23 filter capacitor C11, one end of the 24 filter capacitor C12, one end of the 25 filter capacitor C13, one end of the 26 filter capacitor C14, one end of the 27 filter capacitor C15, the anodal termination 2.5V power supply of the 28 filter capacitor C16, another anodic bonding of the positive terminal of button cell BT1 and two Schottky D1, the negative electrode of two Schottky D1, microcontroller 55 pin connect VBAT power supply, 1 pin of connector J1, the negative pole end of the 9th filter capacitor C17, the other end of the tenth filter capacitor C18, the other end of the 11 filter capacitor C19, the negative pole end of the 12 filter capacitor C20, the other end of the 13 filter capacitor C1, the other end of the 14 filter capacitor C2, the other end of the 15 filter capacitor C3, the other end of the 16 filter capacitor C4, the other end of the 17 filter capacitor C5, the other end of the 18 filter capacitor C6, the other end of the 19 filter capacitor C7, the other end of the 20 filter capacitor C8, the other end of the 21 filter capacitor C9, the other end of the 22 filter capacitor C10, the other end of the 23 filter capacitor C11, the other end of the 24 filter capacitor C12, the other end of the 25 filter capacitor C13, the other end of the 26 filter capacitor C14, the other end of the 27 filter capacitor C15, the negative pole end of the 28 filter capacitor C16, the negative pole end ground connection of button cell BT1.
Described clock circuit comprises the second matching capacitance C21, the 3rd matching capacitance C22, the 4th matching capacitance C23, the 5th matching capacitance C24, the 6th matching capacitance C25, the 7th matching capacitance C26, the first crystal oscillator Y1, the second crystal oscillator Y2, the 3rd crystal oscillator Y3, the 3rd build-out resistor R26, one end of the second matching capacitance C21, one end of the first crystal oscillator Y1, one end of the 3rd build-out resistor R26 is connected with microcontroller 52 pin, one end of the 3rd matching capacitance C22, the other end of the first crystal oscillator Y1, the other end of the 3rd build-out resistor R26 is connected with microcontroller 53 pin, one end of the 4th matching capacitance C23, one end of the second crystal oscillator Y2 is connected with microcontroller 48 pin, and one end of the 5th matching capacitance C24 is connected with microcontroller 49 pin with the other end of the second crystal oscillator Y2, one end of the 6th matching capacitance C25, one end of the 3rd crystal oscillator Y3 is connected with microcontroller 16 pin, and one end of the 7th matching capacitance C26 is connected with microcontroller 17 pin with the other end of the 3rd crystal oscillator Y3, the other end of the second matching capacitance C21, the other end of the 3rd matching capacitance C22, the other end of the 4th matching capacitance C23, the other end of the 5th matching capacitance C24, the other end of the 6th matching capacitance C25, the other end ground connection of the 7th matching capacitance C26.
Compared to existing technology, the invention has the advantages that:
(1), processor ability is strong, low in energy consumption;
(2), can connect wireless sensor network subnet, GSM/GPRS network and LAN;
(3), possess larger memory capacity, when certain network breaks down, can buffer memory mass data.
Embodiment
Below in conjunction with accompanying drawing, the present invention is further illustrated.
As shown in Figure 1, wireless sensor network system comprises wireless sensor network subnet 1-1, wireless sensor network gateway 1-2, GSM/GPRS network 1-3, LAN 1-4, terminal use 1-5.
As shown in Figure 2, wireless sensor network gateway 1-2 comprises microcontroller 2-1, serial communication circuit 2-2, ethernet circuit 2-3, memory circuit 2-4, mutual circuit 2-5, debug i/f circuit 2-6, power circuit 2-7 and clock circuit 2-8.
As shown in Figure 3, described microcontroller circuit comprises microcontroller, a MII interface gating resistance R 1 and the first pull down resistor R2, one end of the one MII interface gating resistance R 1 is connected with microcontroller 41 pin, the other end ground connection of the one MII interface gating resistance R 1, one end of the first pull down resistor R2 is connected with microcontroller 58 pin, another termination 3.3V power supply of the first pull down resistor R2, microcontroller 1 pin, 2 pin, 5 pin, 6 pin, 10 pin, 11 pin, 18 pin, 19 pin, 22 pin, 23 pin, 24 pin, 25 pin, 34 pin, 35 pin, 47 pin, 51 pin, 74 pin, 75 pin, 90 pin, 91 pin, 92 pin, 95 pin, 96 pin, 99 pin, 100 pin are unsettled, microcontroller 3 pin, 8 pin, 20 pin, 32 pin, 36 pin, 44 pin, 56 pin, 68 pin, 81 pin, 83 pin, 84 pin, 93 pin, 98 pin connect 5V power supply, microcontroller 4 pin, 9 pin, 15 pin, 21 pin, 33 pin, 39 pin, 45 pin, 50 pin, 54 pin, 57 pin, 63 pin, 65 pin, 69 pin, 76 pin, 82 pin, 85 pin, 86 pin, 87 pin, 94 pin, 97 pin ground connection, microcontroller 7 pin, 14 pin, 38 pin, 62 pin, 88 pin connect 2.5V power supply, and microcontroller 12 pin connect serial communication circuit, are used for receiving the serial data from connector J4, and microcontroller 13 pin connect serial communication circuit, are used for sending serial data, microcontroller 16 pin to connector J4, 17 pin connect clock circuit, be used for providing clock to the Ethernet interface in microcontroller, microcontroller 26 pin connect serial communication circuit, be used for receiving the serial data from serial communication level transferring chip U4, microcontroller 27 pin connect serial communication circuit, be used for sending serial data, microcontroller 28 pin to serial communication level transferring chip U4, 29 pin, 30 pin, 31 pin, 72 pin, 73 pin connect memory circuit, are used as read-write and control signal between microcontroller and flash memory U3, microcontroller 37 pin, 40 pin, 43 pin, 46 pin connect ethernet circuit, are used as Local network communication, and microcontroller 37 pin are connected with the first pull down resistor R2, in order to mate the Ethernet interface in microcontroller, and microcontroller 48 pin, 49 pin connect clock circuit, are used for providing operation clock to microcontroller microcontroller 52 pin, 53 pin connect clock circuit, be used for providing time-of-day clock to microcontroller, microcontroller 55 pin connect power circuit, be used for providing power supply to the time-of-day clock in microcontroller, microcontroller 58 pin connect a MII interface gating resistance R 1, the MII function of the Ethernet interface being used in gating microcontroller, microcontroller 59 pin, 60 pin connect ethernet circuit, are used as the indication of ethernet communication, and microcontroller 61 pin connect mutual circuit, are used as key-press input, and microcontroller 64 pin connect mutual circuit, are used as reset key input, microcontroller 66 pin, 67 pin connect mutual circuit, for controlling the sounding of buzzer, and microcontroller 70 pin, 71 pin connect mutual circuit, for controlling the light on and off of indicator light, and microcontroller 77 pin, 78 pin, 79 pin, 80 pin, 89 pin connect debug i/f circuit, and for program debugging, microcontroller adopts the chip that the model of Texas Instruments company is LM3S8630-IQC50, the one MII interface gating resistance R 1 adopts 10KW/0.125W resistance, the first pull down resistor R2 adopts 12.4KW/0.125W resistance.
As shown in Figure 4, described serial communication circuit comprises the first filter capacitor C31, the second filter capacitor C32, the 3rd filter capacitor C33, the 4th filter capacitor C34, connector J2, connector J3, connector J4, serial communication level transferring chip U4, one end of the first filter capacitor C31 is connected with 4 pin of serial communication level transferring chip U4, the other end of the first filter capacitor C31 is connected with 5 pin of serial communication level transferring chip U4, one end of the second filter capacitor C32 is connected with 1 pin of serial communication level transferring chip U4, the other end of the second filter capacitor C32 is connected with 3 pin of serial communication level transferring chip U4, one end of the 3rd filter capacitor C33, one end of the 4th filter capacitor C34, 15 pin of serial communication level transferring chip U4, 2 pin of connector J2, 5 pin of connector J3, the 2 pin ground connection of connector J4, the other end of the 3rd filter capacitor C33 is connected with 2 pin of serial communication level transferring chip U4, the other end of the 4th filter capacitor C34 is connected with 6 pin of serial communication level transferring chip U4, and 1 pin of connector J2 connects 5V power supply, 1 pin of connector J3, 4 pin, 6 pin, 7 pin, 8 pin, 9 pin are unsettled, and 2 pin of connector J3 are connected with 14 pin of serial communication level transferring chip U4, and 3 pin of connector J3 are connected with 13 pin of serial communication level transferring chip U4,1 pin of connector J4, 16 pin of serial communication level transferring chip U4 connect 3.3V power supply, 3 pin of connector J4 are connected with microcontroller 13 pin, 4 pin of connector J4 are connected with microcontroller 12 pin, 11 pin of serial communication level transferring chip U4 are connected with microcontroller 27 pin, 12 pin of serial communication level transferring chip U4 are connected with microcontroller 26 pin, 7 pin of serial communication level transferring chip U4, 8 pin, 9 pin, 10 pin are unsettled.The first filter capacitor C31 adopts 0.1uF/25V ceramic disc capacitor, the second filter capacitor C32 adopts 0.1uF/25V ceramic disc capacitor, the 3rd filter capacitor C33 adopts 0.1uF/25V ceramic disc capacitor, the 4th filter capacitor C34 adopts 0.1uF/25V ceramic disc capacitor, connector J2 adopts 0.1uF/25V ceramic disc capacitor, connector J3 adopts XH2.54-2P connector, connector J4 adopts XH2.54-4P connector, serial communication level transferring chip U4 adopts the semi-conductive MAX3232E of U.S. letter, serial communication circuit is used for connecting microcontroller and wireless sensor network subnet and GSM/GPRS network, the first filter capacitor C31 wherein, the second filter capacitor C32, the 3rd filter capacitor C33, the 4th filter capacitor C34 is used for providing filtering for serial communication level transferring chip U4, connector J2, connector J3 is used for connecting outside GSM/GPRS module, GSM/GPRS module adopts the ZHD1X series GSM/GPRS module of Beijing Zhen Hong great achievement Science and Technology Ltd., with access GSM/GPRS network, connector J4 is used for connecting outside radio sensing network node, radio sensing network node adopts the BX-WSN of Hangzhou Bai Xiang Science and Technology Ltd., with access radio sensing network subnet, serial communication level transferring chip U4 is used for realizing the conversion of Transistor-Transistor Logic level and EIA level in RS232 serial communication.
As shown in Figure 5, described ethernet circuit comprises the 5th filter capacitor C27, the 6th filter capacitor C28, the 7th filter capacitor C29, the 8th filter capacitor C30, the first pull-up resistor R5, the second pull-up resistor R6, the second pull down resistor R7, the 3rd pull down resistor R8, the first current-limiting resistance R3, the second current-limiting resistance R4, connector ETH, one end of the 5th filter capacitor C27, one end of the first pull-up resistor R5, 4 pin of connector ETH are connected with microcontroller 46 pin, one end of the 6th filter capacitor C28, one end of the second pull-up resistor R6, 3 pin of connector ETH are connected with microcontroller 43 pin, one end of the 7th filter capacitor C29, one end of the second pull down resistor R7, 7 pin of connector ETH are connected with microcontroller 40 pin, one end of the 8th filter capacitor C30, one end of the 3rd pull down resistor R8, 8 pin of connector ETH are connected with microcontroller 37 pin, one end of the first current-limiting resistance R3 is connected with 2 pin of connector ETH, one end of the second current-limiting resistance R4 is connected with 11 pin of connector ETH, the other end of the first current-limiting resistance R3 is connected with microcontroller 59 pin, the other end of the second current-limiting resistance R4 is connected with microcontroller 60 pin, the other end of the 5th filter capacitor C27, the other end of the 6th filter capacitor C28, the other end of the second pull down resistor R7, the other end of the 3rd pull down resistor R8, the 10 pin ground connection of connector ETH, the other end of the 7th filter capacitor C29, the other end of the 8th filter capacitor C30, the other end of the first pull-up resistor R5, another termination 3.3V power supply of the second pull-up resistor R6,1 pin of connector ETH, 5 pin, 6 pin, 12 pin connect 3.3V power supply, and 9 pin of connector ETH are unsettled.The 5th filter capacitor C27 adopts 0.00001uF/25V ceramic disc capacitor, the 6th filter capacitor C28 adopts 0.00001uF/25V ceramic disc capacitor, the 7th filter capacitor C29 adopts 0.00001uF/25V ceramic disc capacitor, the 8th filter capacitor C30 adopts 0.00001uF/25V ceramic disc capacitor, the first pull-up resistor R5 adopts 50W/0.125W resistance, the second pull-up resistor R6 adopts 50W/0.125W resistance, the second pull down resistor R7 adopts 50W/0.125W resistance, the 3rd pull down resistor R8 adopts 50W/0.125W resistance, the first current-limiting resistance R3 adopts 330W/0.125W resistance, the second current-limiting resistance R4 adopts 330W/0.125W resistance, connector ETH adopts the J3011G21DNL of Pulse company ethernet connector, and ethernet circuit is used for connecting microcontroller and Ethernet, the 5th filter capacitor C27 wherein, the 6th filter capacitor C28 is used for data to send differential line filtering over the ground, the 7th filter capacitor C29, the 8th filter capacitor C30 is used for to data receiver differential line to 3.3V power filter, the first pull-up resistor R5, the second pull-up resistor R6 is used for data to send on differential line and move 3.3V power supply to, the second pull down resistor R7, the 3rd pull down resistor R8 is used for data receiver differential line to pull down to ground, the first current-limiting resistance R3, the second current-limiting resistance R4 carries out current limliting to the inner integrated indicator light of connector ETH, and connector ETH is as RJ45 joint.
As shown in Figure 6, described memory circuit comprises the 5th pull-up resistor R27, flash memory U3,3 pin of one end of the 5th pull-up resistor R27, flash memory U3 are connected with microcontroller 73 pin, 5 pin of the other end of the 5th pull-up resistor R27, flash memory U3 connect 3.3V power supply, 1 pin of flash memory U3 is connected with microcontroller 29 pin, 2 pin of flash memory U3 are connected with microcontroller 30 pin, the 4 pin ground connection of flash memory U3,6 pin of flash memory U3 are connected with microcontroller 72 pin, 7 pin of flash memory U3 are connected with microcontroller 28 pin, and 8 pin of flash memory U3 are connected with microcontroller 31 pin.The 5th pull-up resistor R27 adopts 100KW/0.125W resistance, flash memory U3 to adopt the M25P80-MN6 of company of Micron Technology; memory circuit is used for memory communicating data; the 5th pull-up resistor R27 is wherein used for flash memory U3 to carry out write-protect; beyond preventing, write; flash memory U3 is used for storing data, and capacity is 8M bit.
As shown in Figure 7, described mutual circuit comprises the 3rd current-limiting resistance R21, the 4th current-limiting resistance R22, the 5th current-limiting resistance R23, the 6th current-limiting resistance R17, the first indicator light D2, the second indicator light D3, the 3rd indicator light D4, the 6th pull-up resistor R18, the 7th pull-up resistor R24, the 8th pull-up resistor R25, the first build-out resistor R19, the second build-out resistor R20, the first triode Q5, the first matching capacitance C35, buzzer BZ1, the first button BSL, the second button RESET, one end of the 3rd current-limiting resistance R21 is connected with the negative electrode of the first indicator light D2, the other end ground connection of the 3rd current-limiting resistance R21, one end of the 4th current-limiting resistance R22 is connected with the negative electrode of the second indicator light D3, the other end of the 4th current-limiting resistance R22 is connected with microcontroller 71 pin, one end of the 5th current-limiting resistance R23 is connected with the negative electrode of the 3rd indicator light D4, and the other end of the 5th current-limiting resistance R23 is connected with microcontroller 70 pin, one end of the 6th current-limiting resistance R17, one end of the 6th pull-up resistor R18, the base stage of the first triode Q5 connects, and the other end of the 6th current-limiting resistance R17 is connected with microcontroller 67 pin, the first indicator light D2, the second indicator light D3, the anode of the 3rd indicator light D4 connects 3.3V power supply, the other end of the 6th pull-up resistor R18, the emitter of the first triode Q5 connects 5V power supply, one end of the 7th pull-up resistor R24, one end of the first button BSL is connected with microcontroller 61 pin, another termination 3.3V power supply of the 7th pull-up resistor R24, one end of the 8th pull-up resistor R25, one end of the second button RESET is connected with microcontroller 64 pin, another termination 3.3V power supply of the 8th pull-up resistor R25, one end of the first build-out resistor R19, the collector electrode of the first triode Q5, one end of buzzer BZ1 is connected with one end of the second build-out resistor R20, the anodic bonding of the other end of the first build-out resistor R19 and the first matching capacitance C35, the other end of the second build-out resistor R20, the other end of buzzer BZ1 is connected with microcontroller 66 pin, the other end of the first matching capacitance C35, the other end of the first button BSL, the other end ground connection of the second button RESET.The 3rd current-limiting resistance R21 adopts 1KW/0.125W resistance, the 4th current-limiting resistance R22 adopts 470W/0.125W resistance, the 5th current-limiting resistance R23 adopts 470W/0.125W resistance, the 6th current-limiting resistance R17 adopts 5.1KW/0.125W resistance, the first indicator light D2 adopts red light emitting diodes, the second indicator light D3 adopts green LED, the 3rd indicator light D4 adopts yellow light-emitting diode, the 6th pull-up resistor R18 adopts 10KW/0.125W resistance, the 7th pull-up resistor R24 adopts 10KW/0.125W resistance, the 8th pull-up resistor R25 adopts 10KW/0.125W resistance, the first build-out resistor R19 adopts 220W/0.125W resistance, the second build-out resistor R20 adopts 3.3KW/0.125W resistance, the first triode Q5 adopts 8550 triodes, the first matching capacitance C35 adopts 47uF/10V electrochemical capacitor, buzzer BZ1 adopts passive buzzer, the first button BSL adopts and is of a size of 12*12*10 button, the second button RESET adopts and is of a size of 12*12*10 button, mutual circuit is used to provide sound and light alarm output, connect user key-press, the 3rd current-limiting resistance R21 is wherein used for to the first indicator light D2 current limliting, the 4th current-limiting resistance R22 is used for to the second indicator light D3 current limliting, the 5th current-limiting resistance R23 is used for to the 3rd indicator light D4 current limliting, the 6th current-limiting resistance R17 is used for the base stage current limliting to the first triode Q5, whether the first indicator light D2 is used to refer to power supply normal, whether the second indicator light D3 is used to refer to and radio sensing network Subnetwork connection, the 3rd indicator light D4 is used to refer to whether there is fault, the 6th pull-up resistor R18 is used for preventing the unexpected conducting of the first triode Q5, the 7th pull-up resistor R24 draws on being used for the first button BSL to carry out, the 8th pull-up resistor R25 draws on being used for the second button RESET to carry out, the first build-out resistor R19 is used for mating the first matching capacitance C35, the second build-out resistor R20 is used for mating buzzer BZ1, the first triode is used for providing power supply for buzzer, the first matching capacitance C35 is used for mating the first build-out resistor R19, buzzer BZ1 is used for sounding, the first button BSL is used for upgrading microcontroller program, the second button RESET is used for resetting system.
As shown in Figure 8, described debug i/f circuit comprises the 9th pull-up resistor R9, the tenth pull-up resistor R10, the 11 pull-up resistor R11, the 12 pull-up resistor R12, the 13 pull-up resistor R13, the 14 pull-up resistor R14, the 15 pull-up resistor R15, the 16 pull-up resistor R16, connector JTAG, one end of the 9th pull-up resistor R9, 3 pin of connector JTAG are connected with microcontroller 89 pin, one end of the tenth pull-up resistor R10, 5 pin of connector JTAG are connected with microcontroller 78 pin, one end of the 11 pull-up resistor R11, 7 pin of connector JTAG are connected with microcontroller 79 pin, one end of the 12 pull-up resistor R12, 9 pin of connector JTAG are connected with microcontroller 80 pin, one end of the 13 pull-up resistor R13 is connected with 11 pin of connector JTAG, one end of the 13 pull-up resistor R13 is connected with 13 pin of connector JTAG, one end of the 14 pull-up resistor R14 is connected with 15 pin of connector JTAG, one end of the 15 pull-up resistor R15 is connected with 17 pin of connector JTAG, one end of the 16 pull-up resistor R16 is connected with 19 pin of connector JTAG, the other end of the 9th pull-up resistor R9, the other end of the tenth pull-up resistor R10, the other end of the 11 pull-up resistor R11, the other end of the 12 pull-up resistor R12, the other end of the 13 pull-up resistor R13, the other end of the 14 pull-up resistor R14, the other end of the 15 pull-up resistor R15, the other end of the 16 pull-up resistor R16, 1 pin of connector JTAG, 2 pin of connector JTAG connect 3.3V power supply, and 13 pin of connector JTAG are connected with microcontroller 77 pin, 4 pin of connector JTAG, 6 pin, 8 pin, 10 pin, 12 pin, 14 pin, 16 pin, 18 pin, 20 pin ground connection.The 9th pull-up resistor R9 adopts 10KW/0.125W resistance, the tenth pull-up resistor R10 adopts 10KW/0.125W resistance, the 11 pull-up resistor R11 adopts 10KW/0.125W resistance, the 12 pull-up resistor R12 adopts 10KW/0.125W resistance, the 13 pull-up resistor R13 adopts 10KW/0.125W resistance, the 14 pull-up resistor R14 adopts 10KW/0.125W resistance, the 15 pull-up resistor R15 adopts 10KW/0.125W resistance, the 16 pull-up resistor R16 adopts 10KW/0.125W resistance, connector JTAG adopts the double 2.54mm spacing of 20 pin connector, debug i/f circuit has been used for the on-line debugging of microcontroller and program to write, the 9th pull-up resistor R9 is used for to drawing on 3 pin of connector JTAG, the tenth pull-up resistor R10 is used for to drawing on 5 pin of connector JTAG, the 11 pull-up resistor R11 is used for to drawing on 7 pin of connector JTAG, the 12 pull-up resistor R12 is used for to drawing on 9 pin of connector JTAG, the 13 pull-up resistor R13 is used for to drawing on 11 pin of connector JTAG, the 14 pull-up resistor R14 is used for to drawing on 15 pin of connector JTAG, the 15 pull-up resistor R15 is used for to drawing on 17 pin of connector JTAG, the 16 pull-up resistor R16 is used for to drawing on 19 pin of connector JTAG, connector JTAG is used for connecting outside JTAG debugger.
As shown in Figure 9, described power circuit comprises fuse F1, the 9th filter capacitor C17, the tenth filter capacitor C18, the 11 filter capacitor C19, the 12 filter capacitor C20, the 13 filter capacitor C1, the 14 filter capacitor C2, the 15 filter capacitor C3, the 16 filter capacitor C4, the 17 filter capacitor C5, the 18 filter capacitor C6, the 19 filter capacitor C7, the 20 filter capacitor C8, the 21 filter capacitor C9, the 22 filter capacitor C10, the 23 filter capacitor C11, the 24 filter capacitor C12, the 25 filter capacitor C13, the 26 filter capacitor C14, the 27 filter capacitor C15, the 28 filter capacitor C16, button cell BT1, two Schottky D1, three terminal regulator U1, connector J1, one end of fuse F1, the positive terminal of the 9th filter capacitor C17, one end of the tenth filter capacitor C18 is connected with the input of three terminal regulator U1, the other end of fuse F1, 2 pin of connector J1 connect 5V power supply, the positive terminal of the 11 filter capacitor C19, the positive terminal of the 12 filter capacitor C20, the output of three terminal regulator U1, one end of the 13 filter capacitor C1, one end of the 14 filter capacitor C2, one end of the 15 filter capacitor C3, one end of the 16 filter capacitor C4, one end of the 17 filter capacitor C5, one end of the 18 filter capacitor C6, one end of the 19 filter capacitor C7, one end of the 20 filter capacitor C8, one end of the 21 filter capacitor C9, one end of the 22 filter capacitor C10, an anode of two Schottky D1 connects 3.3V power supply, one end of the 23 filter capacitor C11, one end of the 24 filter capacitor C12, one end of the 25 filter capacitor C13, one end of the 26 filter capacitor C14, one end of the 27 filter capacitor C15, the anodal termination 2.5V power supply of the 28 filter capacitor C16, another anodic bonding of the positive terminal of button cell BT1 and two Schottky D1, the negative electrode of two Schottky D1, microcontroller 55 pin connect VBAT power supply, 1 pin of connector J1, the negative pole end of the 9th filter capacitor C17, the other end of the tenth filter capacitor C18, the other end of the 11 filter capacitor C19, the negative pole end of the 12 filter capacitor C20, the other end of the 13 filter capacitor C1, the other end of the 14 filter capacitor C2, the other end of the 15 filter capacitor C3, the other end of the 16 filter capacitor C4, the other end of the 17 filter capacitor C5, the other end of the 18 filter capacitor C6, the other end of the 19 filter capacitor C7, the other end of the 20 filter capacitor C8, the other end of the 21 filter capacitor C9, the other end of the 22 filter capacitor C10, the other end of the 23 filter capacitor C11, the other end of the 24 filter capacitor C12, the other end of the 25 filter capacitor C13, the other end of the 26 filter capacitor C14, the other end of the 27 filter capacitor C15, the negative pole end of the 28 filter capacitor C16, the negative pole end ground connection of button cell BT1.Fuse F1 adopts 2 amperes of fuses, the 9th filter capacitor C17 adopts 33uF/10V electrochemical capacitor, the tenth filter capacitor C18 adopts 0.1uF/25V ceramic disc capacitor, the 11 filter capacitor C19 adopts 100uF/10V electrochemical capacitor, the 12 filter capacitor C20 adopts 0.1uF/25V ceramic disc capacitor, the 13 filter capacitor C1 adopts 0.1uF/25V ceramic disc capacitor, the 14 filter capacitor C2 adopts 0.1uF/25V ceramic disc capacitor, the 15 filter capacitor C3 adopts 0.1uF/25V ceramic disc capacitor, the 16 filter capacitor C4 adopts 0.1uF/25V ceramic disc capacitor, the 17 filter capacitor C5 adopts 0.1uF/25V ceramic disc capacitor, the 18 filter capacitor C6 adopts 0.1uF/25V ceramic disc capacitor, the 19 filter capacitor C7 adopts 0.1uF/25V ceramic disc capacitor, the 20 filter capacitor C8 adopts 0.1uF/25V ceramic disc capacitor, the 21 filter capacitor C9 adopts 0.1uF/25V ceramic disc capacitor, the 22 filter capacitor C10 adopts 0.1uF/25V ceramic disc capacitor, the 23 filter capacitor C11 adopts 0.1uF/25V ceramic disc capacitor, the 24 filter capacitor C12 adopts 0.1uF/25V ceramic disc capacitor, the 25 filter capacitor C13 adopts 0.1uF/25V ceramic disc capacitor, the 26 filter capacitor C14 adopts 0.1uF/25V ceramic disc capacitor, the 27 filter capacitor C15 adopts 0.1uF/25V ceramic disc capacitor, the 28 filter capacitor C16 adopts 2uF/10V electrochemical capacitor, button cell BT1 adopts CR1220 button cell, two Schottky D1 adopt the two Schottky diodes of the BAT54C of FAIRCHILD semiconductor company, three terminal regulator U1 adopts the LM1117IMPX-3.3 of semiconductor company of Texas Instrument, connector J1 adopts 2.54mm spacing connector, other circuit module that power circuit is gateway circuit of wireless sensor network provides 5V, 3.3V and VBAT power supply, fuse F1 is used for damage system under protective circuit fault, the 9th filter capacitor C17, the tenth filter capacitor C18 is used for as the input filtering of three terminal regulator U1, the 11 filter capacitor C19, the 12 filter capacitor C20, the 13 filter capacitor C1, the 14 filter capacitor C2, the 15 filter capacitor C3, the 16 filter capacitor C4, the 17 filter capacitor C5, the 18 filter capacitor C6, the 19 filter capacitor C7, the 20 filter capacitor C8, the 21 filter capacitor C9, the 22 filter capacitor C10 is used for as 3.3V power filter, the 23 filter capacitor C11, the 24 filter capacitor C12, the 25 filter capacitor C13, the 26 filter capacitor C14, the 27 filter capacitor C15, the 28 filter capacitor C16 is used for as 2.5V power filter, button cell BT1 is used for providing stand-by power supply for the time-of-day clock module of microcontroller, two Schottky D1 are used for selecting the time-of-day clock module that of 3.3V and time-of-day clock is microcontroller that power supply is provided, three terminal regulator U1 is used for producing 3.3V power supply, connector J1 is used for connecting outside 5V power supply.
As shown in figure 10, described clock circuit comprises the second matching capacitance C21, the 3rd matching capacitance C22, the 4th matching capacitance C23, the 5th matching capacitance C24, the 6th matching capacitance C25, the 7th matching capacitance C26, the first crystal oscillator Y1, the second crystal oscillator Y2, the 3rd crystal oscillator Y3, the 3rd build-out resistor R26, one end of the second matching capacitance C21, one end of the first crystal oscillator Y1, one end of the 3rd build-out resistor R26 is connected with microcontroller 52 pin, one end of the 3rd matching capacitance C22, the other end of the first crystal oscillator Y1, the other end of the 3rd build-out resistor R26 is connected with microcontroller 53 pin, one end of the 4th matching capacitance C23, one end of the second crystal oscillator Y2 is connected with microcontroller 48 pin, and one end of the 5th matching capacitance C24 is connected with microcontroller 49 pin with the other end of the second crystal oscillator Y2, one end of the 6th matching capacitance C25, one end of the 3rd crystal oscillator Y3 is connected with microcontroller 16 pin, and one end of the 7th matching capacitance C26 is connected with microcontroller 17 pin with the other end of the 3rd crystal oscillator Y3, the other end of the second matching capacitance C21, the other end of the 3rd matching capacitance C22, the other end of the 4th matching capacitance C23, the other end of the 5th matching capacitance C24, the other end of the 6th matching capacitance C25, the other end ground connection of the 7th matching capacitance C26.The second matching capacitance C21 adopts 0.000018uF/25V ceramic disc capacitor, the 3rd matching capacitance C22 adopts 0.000018uF/25V ceramic disc capacitor, the 4th matching capacitance C23 adopts 0.000018uF/25V ceramic disc capacitor, the 5th matching capacitance C24 adopts 0.000018uF/25V ceramic disc capacitor, the 6th matching capacitance C25 adopts 0.000018uF/25V ceramic disc capacitor, the 7th matching capacitance C26 adopts 0.000018uF/25V ceramic disc capacitor, the first crystal oscillator Y1 adopts the 32.768KHz crystal oscillator of HC-49/US encapsulation, the second crystal oscillator Y2 adopts the 8MHz crystal oscillator of HC-49/US encapsulation, the 3rd crystal oscillator Y3 adopts the 25MHz crystal oscillator of HC-49/US encapsulation, the 3rd build-out resistor R26 adopts 1MW/0.125W resistance, and clock circuit is used for as microcontroller provides clock, the second matching capacitance C21, the 3rd matching capacitance C22, the 3rd build-out resistor R26 is used for assisting the first crystal oscillator Y1 starting of oscillation, the 4th matching capacitance C23, the 5th matching capacitance C24 is used for assisting the second crystal oscillator Y2 starting of oscillation, the 6th matching capacitance C25, the 7th matching capacitance C26 is used for assisting the 3rd crystal oscillator Y3 starting of oscillation.
The course of work of the present invention is: wireless sensor network subnet, wireless sensor network gateway, GSM/GPRS network, LAN, terminal use have formed whole wireless sensor network system.Wireless sensor network subnet is realized the intercommunication with other network by wireless sensor network gateway, such as LAN, GPRS/GSM network etc.Wireless sensor network gateway has served as the function served as bridge of wireless sensor network subnet to other network, generally includes the functions such as protocol conversion, transfer of data, data storage, Configuration Online.Data up: the data of wireless sensor network subnet are imported wireless sensor network gateway into, if wireless sensor network gateway is access to LAN network, GPRS/GSM network, the direct forwarding data of wireless sensor network gateway is to far-end server (terminal use), otherwise, wireless sensor network gateway is first stored in data in inner flash memory, by the time after access to LAN network, GPRS/GSM network, is forwarded to far-end server (terminal use) again; Data descending: far-end server (terminal use) sends data or order to wireless sensor network gateway, and wireless sensor network gateway forwards these data to wireless sensor network subnet, and record order content is in internal flash simultaneously.When.
Microcontroller completes the core of wireless sensor network gateway and controls, serial communication circuit is used for connecting microcontroller and wireless sensor network subnet and GSM/GPRS network, ethernet circuit is used for connecting microcontroller and Ethernet, memory circuit is used for memory communicating data, mutual circuit is used to provide sound and light alarm output, connecting user key-press debug i/f circuit has been used for the on-line debugging of microcontroller and program to write, other circuit module that power circuit is gateway circuit of wireless sensor network provides 5V, 3.3V and VBAT power supply, clock circuit is used for providing clock for microcontroller.
Finally, it should be noted that above what enumerate is only specific embodiments of the invention.Obviously, the invention is not restricted to above embodiment, can also have a lot of distortion.All distortion that those of ordinary skill in the art can directly derive or associate from content disclosed by the invention, all should think protection scope of the present invention.