Summary of the invention
Between the technology that the present invention will solve, topic is to make the compatibility of sensing net node controller strong and be convenient to miniaturization.
For solving the problems of the technologies described above, the invention provides a kind of wireless sensing net node controller, it comprises a core bottom plate, a plurality of interface conversion submodule;
Described core bottom plate, comprises a plurality of general-purpose communication interfaces, the multiplexing selector switch of a plurality of UART/SPI, a protocol analysis processing module;
Described protocol analysis processing module, be used for according to the state of the multiplexing selector switch of each UART/SPI, the data that each general-purpose communication interface of core bottom plate is received, or core bottom plate mails to the data of each general-purpose communication interface, according to UART, SPI or I2C communication protocol, processes;
Described interface conversion submodule, comprise one with suitable submodule general-purpose communication interface, a special purpose interface of the general-purpose communication interface of described core bottom plate, the interface conversion submodule of certain type of special purpose interface is for being converted to UART, SPI or I2C data by the data of this type of special purpose interface, and exporting the respective foot of described submodule general-purpose communication interface to, described interface conversion submodule is communicated by letter with the general-purpose communication interface of described core bottom plate by its submodule general-purpose communication interface.
Described general-purpose communication interface, can comprise UART reception/SPI input pin, UART transmission/SPI output pin, I2C serial data stitch, I2C serial clock stitch;
The multiplexing selector switch of described UART/SPI, has 1,0 two state;
When the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface is 1, described protocol analysis processing module, the data that core bottom plate is mail to the UART transmission/SPI output pin of this general-purpose communication interface send data according to UART communication protocol after packing and processing, and the data that this general-purpose communication interface UART receptions/SPI input pin is received are carried out dissection process after according to the reception of UART communication protocol; When the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface is 0, described protocol analysis processing module, the data that core bottom plate is mail to the UART transmission/SPI output pin of this general-purpose communication interface send data according to SPI communication protocol after packing and processing, and the data that this general-purpose communication interface UART receptions/SPI input pin is received are carried out dissection process after according to the reception of SPI communication protocol; State regardless of the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface, described protocol analysis processing module, the data that core bottom plate is mail to the I2C serial data stitch of this general-purpose communication interface send data according to I2C communication protocol after packing and processing, and the data that the I2C serial data stitch of this general-purpose communication interface is received are carried out dissection process after receiving according to I2C communication protocol.
Described general-purpose communication interface, can also comprise that a SPI clock pin, one reseting pin/SPI enable pin, a supply pin, a lower margin, a plurality of reserved control signal pin.
The special purpose interface of described interface conversion submodule can be UART, SPI, I2C, RS485, RS232, RS422, CAN, USB, TCP/IP or GPS.
For solving the problems of the technologies described above, the present invention also provides a kind of core bottom plate, and it comprises a plurality of general-purpose communication interfaces, the multiplexing selector switch of a plurality of UART/SPI, a protocol analysis processing module;
Described general-purpose communication interface, comprises UART reception/SPI input pin, UART transmission/SPI output pin, I2C serial data stitch, I2C serial clock stitch;
The multiplexing selector switch of described UART/SPI, has 1,0 two state;
When the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface is 1, described protocol analysis processing module, the data that core bottom plate is mail to the UART transmission/SPI output pin of this general-purpose communication interface send data according to UART communication protocol after packing and processing, and the data that this general-purpose communication interface UART receptions/SPI input pin is received are carried out dissection process after according to the reception of UART communication protocol; When the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface is 0, described protocol analysis processing module, the data that core bottom plate is mail to the UART transmission/SPI output pin of this general-purpose communication interface send data according to SPI communication protocol after packing and processing, and the data that this general-purpose communication interface UART receptions/SPI input pin is received are carried out dissection process after according to the reception of SPI communication protocol; State regardless of the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface, described protocol analysis processing module, the data that core bottom plate is mail to the I2C serial data stitch of this general-purpose communication interface send data according to I2C communication protocol after packing and processing, and the data that the I2C serial data stitch of this general-purpose communication interface is received are carried out dissection process after receiving according to I2C communication protocol.
Described general-purpose communication interface, can also comprise that a SPI clock pin, one reseting pin/SPI enable pin, a supply pin, a lower margin, a plurality of reserved control signal pin.
For solving the problems of the technologies described above, the present invention also provides a kind of sensor wireless method of network entry, and its technical scheme adopting is:
The transducer of certain style interface is received a general-purpose communication interface of a core bottom plate by the interface conversion submodule of this type of special purpose interface, core bottom plate by another general-purpose communication interface the interface conversion submodule by a kind of wireless type special purpose interface with gateway aggregation node radio communication;
Interface conversion submodule, comprise one with suitable submodule general-purpose communication interface, a special purpose interface of the general-purpose communication interface of described core bottom plate, the interface conversion submodule of certain type of special purpose interface is used for the data of this type of special purpose interface to be converted to UART, SPI or I2C data, and exports the respective foot of described submodule general-purpose communication interface to;
The interface conversion submodule of certain type of special purpose interface, the sensor communication by its special purpose interface with this type of interface, communicates by letter with the general-purpose communication interface of described core bottom plate by its submodule general-purpose communication interface;
Core bottom plate comprises a plurality of general-purpose communication interfaces, the multiplexing selector switch of a plurality of UART/SPI, a protocol analysis processing module;
Described protocol analysis processing module, according to the state of the multiplexing selector switch of each UART/SPI, the data that each general-purpose communication interface of core bottom plate is received, or core bottom plate mails to the data of each general-purpose communication interface, according to UART, SPI or I2C communication protocol, processes;
One general-purpose communication interface of core bottom plate is communicated by letter with the submodule general-purpose communication interface of the interface conversion submodule of a wireless type special purpose interface, and passes through wireless type special purpose interface and the gateway aggregation node radio communication of the interface conversion submodule of this wireless type special purpose interface.
Described general-purpose communication interface, can comprise UART reception/SPI input pin, UART transmission/SPI output pin, I2C serial data stitch, I2C serial clock stitch;
The multiplexing selector switch of described UART/SPI, has 1,0 two state;
When the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface is 1, described protocol analysis processing module, the data that core bottom plate is mail to the UART transmission/SPI output pin of this general-purpose communication interface send data according to UART communication protocol after packing and processing, and the data that this general-purpose communication interface UART receptions/SPI input pin is received are carried out dissection process after according to the reception of UART communication protocol; When the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface is 0, described protocol analysis processing module, the data that core bottom plate is mail to the UART transmission/SPI output pin of this general-purpose communication interface send data according to SPI communication protocol after packing and processing, and the data that this general-purpose communication interface UART receptions/SPI input pin is received are carried out dissection process after according to the reception of SPI communication protocol; State regardless of the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface, described protocol analysis processing module, the data that core bottom plate is mail to the I2C serial data stitch of this general-purpose communication interface send data according to I2C communication protocol after packing and processing, and the data that the I2C serial data stitch of this general-purpose communication interface is received are carried out dissection process after receiving according to I2C communication protocol.
Described general-purpose communication interface, can also comprise that a SPI clock pin, one reseting pin/SPI enable pin, a supply pin, a lower margin, a plurality of reserved control signal pin.
The special purpose interface of described interface conversion submodule can be UART, SPI, I2C, RS485, RS232, RS422, CAN, USB, TCP/IP or GPS.
Wireless sensing net node controller of the present invention, adopts core bottom plate to add the pattern of interface conversion submodule combination, by general-purpose communication interface (USCI), connects, and core bottom plate and interface conversion submodule are independent.Each general-purpose communication interface (USCI) on core bottom plate is compatible SPI, UART and I2C all, SPI and UART pin divide the configuration can be multiplexing by the multiplexing selector switch of UART/SPI, rely on core bottom plate to realize UART/SPI and the selection of I2C interface, realized the multiplexing of UART and SPI interface simultaneously.Wireless sensing net node controller of the present invention, transducer in the face of diversified data-interface, only need to select corresponding interface conversion submodule to realize the conversion of different communications protocol, just can directly apply, realize reading in of sensing data, greatly improved the compatibility of Node Controller, and core bottom plate is owing to needn't corresponding data interface being set for the various distinct interfaces of transducer, thereby the miniaturization of wireless sensing net node controller is also convenient in the miniaturization of being convenient to core bottom plate, and the design of interface conversion submodule interface conversion does not relate to complex processor, greatly reduce system development time and the development difficulty of whole Node Controller, reduced development cost.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Should be appreciated that preferred embodiment described herein, only for description and interpretation the present invention, is not intended to limit the present invention.And in the situation that not conflicting, embodiment and the feature in embodiment in the present invention can combine mutually.Embodiment based in the present invention, the every other embodiment that those of ordinary skills obtain, belongs to the scope of protection of the invention.
Wireless sensing net node controller, comprises a core bottom plate, a plurality of interface conversion submodule;
Described core bottom plate as shown in Figure 1, comprises a plurality of general-purpose communication interfaces (USCI) 5, the multiplexing selector switch 7 of a plurality of UART/SPI, a protocol analysis processing module 1.
Described general-purpose communication interface (USCI) execution mode as shown in Figure 2, comprise that UART reception/SPI input pin (RXx/SOMIx) 1, SPI clock pin (CLKx) 2, reseting pin/SPI enable pin (Reset/STEx) 3, supply pin (VCCx) 4, UART transmission/SPI output pin (TXx/SIMOx) 5, lower margin (GND) 6, I2C serial data stitch (SDA) 7, I2C serial clock stitch (SCL) 8, a plurality of reserved control signal pin (Ctrlx_0, Ctrlx_1, Ctrlx_2, Ctrlx_3) 9,10,11,12;
The multiplexing selector switch 7 of described UART/SPI, has 1,0 two state;
Described protocol analysis processing module, be used for according to the state of the multiplexing selector switch of each UART/SPI, the data that each general-purpose communication interface of core bottom plate is received, or core bottom plate mails to the data of each general-purpose communication interface, according to UART (Universal Asynchronous Receiver/Transmitter, UART Universal Asynchronous Receiver Transmitter), SPI (serial peripheral interface, Serial Peripheral Interface (SPI)) or I2C (Inter-Integrated Circuit, I2C bus) communication protocol carry out dissection process; And be packaged into by replying the packet that meets this respective application layer communication protocol standard;
When the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface is 1, described protocol analysis processing module, the data that core bottom plate is mail to the UART transmission/SPI output pin of this general-purpose communication interface send data according to UART communication protocol after packing and processing, and the data that this general-purpose communication interface UART receptions/SPI input pin is received are carried out dissection process after according to the reception of UART communication protocol;
When the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface is 0, described protocol analysis processing module, the data that core bottom plate is mail to the UART transmission/SPI output pin of this general-purpose communication interface send data according to SPI communication protocol after packing and processing, and the data that this general-purpose communication interface UART receptions/SPI input pin is received are carried out dissection process after according to the reception of SPI communication protocol;
State regardless of the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface, described protocol analysis processing module, the data that core bottom plate is mail to the I2C serial data stitch of this general-purpose communication interface send data according to I2C communication protocol after packing and processing, and the data that the I2C serial data stitch of this general-purpose communication interface is received are carried out dissection process after receiving according to I2C communication protocol.
Described core bottom plate, can also comprise a plurality of analog input interfaces 6, a power module 2, an electric weight detection module 3, a configuration information memory module 4.
Described analog input interface 6, for directly accessing conditioned analog signal;
Described power module 2, is used to core bottom plate power supply;
Described electric weight detection module 3, is used to core bottom plate that system battery information about power is provided;
Described configuration information memory module 4, for storing the configuration information of core bottom plate;
Described interface conversion submodule, comprise one with suitable submodule general-purpose communication interface, a special purpose interface of the general-purpose communication interface (USCI) of described core bottom plate, the interface conversion submodule of certain type of special purpose interface is for being converted to UART, SPI or I2C data by the data of this type of special purpose interface, and export the respective foot of described submodule general-purpose communication interface to, described interface conversion submodule is communicated by letter with the general-purpose communication interface of described core bottom plate by its submodule general-purpose communication interface, with core bottom plate, connects;
The sensor interface of described interface conversion submodule can be UART, SPI, I2C, RS485, RS232, RS422, CAN, USB, TCP/IP or GPS etc. interface.
Adopt above-mentioned wireless sensing net node controller to realize sensor wireless method of network entry as follows:
The transducer of certain style interface is received a general-purpose communication interface of a core bottom plate by the interface conversion submodule of this type of special purpose interface, core bottom plate by another general-purpose communication interface the interface conversion submodule by a kind of wireless type special purpose interface with gateway aggregation node radio communication;
Interface conversion submodule, comprise one with suitable submodule general-purpose communication interface, a special purpose interface of the general-purpose communication interface of described core bottom plate, the interface conversion submodule of certain type of special purpose interface is used for the data of this type of special purpose interface to be converted to UART, SPI or I2C data, and exports the respective foot of described submodule general-purpose communication interface to;
The interface conversion submodule of certain type of special purpose interface, the sensor communication by its special purpose interface with this type of interface, communicates by letter with the general-purpose communication interface of described core bottom plate by its submodule general-purpose communication interface;
Core bottom plate comprises a plurality of general-purpose communication interfaces, the multiplexing selector switch of a plurality of UART/SPI, a protocol analysis processing module;
Described protocol analysis processing module, according to the state of the multiplexing selector switch of each UART/SPI, the data that each general-purpose communication interface of core bottom plate is received, or core bottom plate mails to the data of each general-purpose communication interface, according to UART, SPI or I2C communication protocol, processes;
One general-purpose communication interface of core bottom plate is communicated by letter with the submodule general-purpose communication interface of the interface conversion submodule of a wireless type special purpose interface, and passes through wireless type special purpose interface and the gateway aggregation node radio communication of the interface conversion submodule of this wireless type special purpose interface.
Described general-purpose communication interface, can comprise UART reception/SPI input pin, UART transmission/SPI output pin, I2C serial data stitch, I2C serial clock stitch;
The multiplexing selector switch of described UART/SPI, has 1,0 two state;
When the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface is 1, described protocol analysis processing module, the data that core bottom plate is mail to the UART transmission/SPI output pin of this general-purpose communication interface send data according to UART communication protocol after packing and processing, and the data that this general-purpose communication interface UART receptions/SPI input pin is received are carried out dissection process after according to the reception of UART communication protocol; When the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface is 0, described protocol analysis processing module, the data that core bottom plate is mail to the UART transmission/SPI output pin of this general-purpose communication interface send data according to SPI communication protocol after packing and processing, and the data that this general-purpose communication interface UART receptions/SPI input pin is received are carried out dissection process after according to the reception of SPI communication protocol; State regardless of the multiplexing selector switch of UART/SPI corresponding to a general-purpose communication interface, described protocol analysis processing module, the data that core bottom plate is mail to the I2C serial data stitch of this general-purpose communication interface send data according to I2C communication protocol after packing and processing, and the data that the I2C serial data stitch of this general-purpose communication interface is received are carried out dissection process after receiving according to I2C communication protocol.
Described general-purpose communication interface, can also comprise that a SPI clock pin, one reseting pin/SPI enable pin, a supply pin, a lower margin, a plurality of reserved control signal pin.
The special purpose interface of described interface conversion submodule is UART, SPI, I2C, RS485, RS232, RS422, CAN, USB, TCP/IP or GPS.
Described core bottom plate, can also comprise a plurality of analog input interfaces;
Described a plurality of analog input interface, directly accesses conditioned analog signal.
Described core bottom plate, can also comprise configuration information memory module;
Described configuration information memory module, the configuration information of storage core bottom plate.
Described core bottom plate, can also comprise power module, electric weight detection module;
Described power module, core bottom plate power supply;
Described electric weight detection module, for core bottom plate provides system battery information about power
A specific embodiment:
Wireless sensing net node controller comprises the GPS interface conversion submodule shown in the RS485 interface conversion submodule shown in the wireless receiving and dispatching interface conversion submodule shown in a core bottom plate and a Fig. 3, two Fig. 4, a Fig. 5.
Core bottom plate, the MSP430F5438 microcontroller of selection TI company, low in energy consumption, the highest 18MHz of system clock, has inner phase-locked loop, 256KB FLASH, the RAM of 16KB; It is integrated with inner 12bitADC, has 12 external analog passages, can directly access conditioned analog signal; Have 4 general-purpose communication interfaces (USCI) as shown in Figure 2, support UART, SPI and I2C communication, pin support UART and SPI mouth are multiplexing, if general-purpose communication interface (USCI) is controlled and programmed, can also expand more general-purpose communication interface.As shown in Figure 1, four multiplexing selector switches 6 of UART/SPI, four general-purpose communication interfaces (USCI) in difference corresponding diagram 2, when the multiplexing selector switch of a UART/SPI pulls out to 0 time, general-purpose communication interface (USCI) corresponding to the multiplexing selector switch of this UART/SPI is supported SPI and I2C interface, when the multiplexing selector switch of a UART/SPI pulls out to 1 time, corresponding to the general-purpose communication interface (USCI) of the multiplexing selector switch of this UART/SPI, support UART and I2C interface.
As shown in Figure 3, wireless receiving and dispatching interface conversion submodule has adopted the low-power consumption MCU-Si1000 (Silicon Labs company product) of the EZRadioPRO transceiver of integrated 240~960MHz, this wireless receiving and dispatching interface conversion submodule is integrated submodule general-purpose communication interface, TCP/IP wireless-specific interface, this wireless receiving and dispatching interface conversion submodule is converted to UART data by TCP/IP interface data, and export the respective foot of described submodule general-purpose communication interface to, wireless receiving and dispatching interface conversion submodule is connected with the general-purpose communication interface (USCI) of core bottom plate by its submodule general-purpose communication interface, use UART communications protocol, UART reception/SPI input pin (RXx/SOMIx) in the general-purpose communication interface of core bottom plate shown in Fig. 2 (USCI) connects the U_Tx signal of wireless receiving and dispatching interface conversion submodule, UART transmission/SPI output pin (TXx/SIMOx) connects the U_Rx signal of wireless receiving and dispatching interface conversion submodule, the supply pin (VCCx) of the general-purpose communication interface of core bottom plate (USCI) and lower margin (GND) are for powering to wireless receiving and dispatching interface conversion submodule, UART baud rate is made as 9600, 8 of data bit, 1 position of rest.
As shown in Figure 4, RS485 interface conversion submodule adopts two line RS485 data transmit-receive chip I SO15 of the band isolation of TI company, can realize the conversion between UART and half-duplex RS 485 signals, this RS485 interface conversion submodule is integrated submodule general-purpose communication interface, RS485 special purpose interface, this RS485 interface conversion submodule is converted to UART data by RS485 interface data, and export the respective foot of described submodule general-purpose communication interface to, RS485 interface conversion submodule is connected with the general-purpose communication interface (USCI) of core bottom plate by its submodule general-purpose communication interface, use UART communications protocol, UART reception/SPI input pin (RXx/SOMIx) in the general-purpose communication interface of core bottom plate shown in Fig. 2 (USCI) connects the U_Tx signal of RS485 interface conversion submodule, UART transmission/SPI output pin (TXx/SIMOx) connects the U_Rx signal of RS485 interface conversion submodule, the supply pin (VCCx) of the general-purpose communication interface of core bottom plate (USCI) and lower margin (GND) are for powering to RS485 interface conversion submodule, UART baud rate is made as 4800 according to connected RS485 interface sensor, 8 of data bit, 1 position of rest.
As shown in Figure 5, GPS interface conversion submodule adopts the L20GPS module of QUECTEL company, there is high sensitivity, can quick obtaining satellite-signal, this GPS interface conversion submodule is integrated submodule general-purpose communication interface, GPS wireless-specific interface, this GPS interface conversion submodule is converted to UART data by GPS wave point data, and export the respective foot of described submodule general-purpose communication interface to, GPS interface conversion submodule is connected with the general-purpose communication interface (USCI) of core bottom plate by its submodule general-purpose communication interface, use UART communications protocol, UART reception/SPI input pin (RXx/SOMIx) in the general-purpose communication interface of core bottom plate shown in Fig. 2 (USCI) connects the U_Tx signal of GPS interface conversion submodule, UART transmission/SPI output pin (TXx/SIMOx) connects the U_Rx signal of GPS interface conversion submodule, the supply pin (VCCx) of the general-purpose communication interface of core bottom plate (USCI) and lower margin (GND) are for powering to GPS interface conversion submodule, UART baud rate is made as 4800, 8 of data bit, 1 position of rest, during due to GPS interface conversion submodule continuous firing, power consumption is very large, the Reset signal that the reseting pin/SPI of described general-purpose communication interface (USCI) enables pin (Reset/STEx) is used for wake/sleep GPS interface conversion submodule to reduce system power dissipation.
In this embodiment, core bottom plate can connect the digital sensor of two-way RS485 interface (as digital gas sensor, atmospherium etc.), analog sensor, a road gps signal of 12 tunnel 4~20mA outputs, the wireless receiving and dispatching interface conversion submodule adjustable by working frequency points is sent to gateway aggregation node by effective information.
Wireless sensing net node controller of the present invention, adopts core bottom plate to add the pattern of interface conversion submodule combination, by general-purpose communication interface (USCI), connects, and core bottom plate and interface conversion submodule are independent.Each general-purpose communication interface (USCI) on core bottom plate is compatible SPI, UART and I2C all, SPI and UART pin divide the configuration can be multiplexing by the multiplexing selector switch of UART/SPI, rely on core bottom plate to realize UART/SPI and the selection of I2C interface, realized the multiplexing of UART and SPI interface simultaneously.Wireless sensing net node controller of the present invention, transducer in the face of diversified data-interface, only need to select corresponding interface conversion submodule to realize the conversion of different communications protocol, just can directly apply, realize reading in of sensing data, greatly improved the compatibility of Node Controller, and core bottom plate is owing to needn't corresponding data interface being set for the various distinct interfaces of transducer, thereby the miniaturization of wireless sensing net node controller is also convenient in the miniaturization of being convenient to core bottom plate, and the design of interface conversion submodule interface conversion does not relate to complex processor, greatly reduce system development time and the development difficulty of whole Node Controller, reduced development cost.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, be equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.