# A Software Framework for Heterogeneous Wireless Sensor Network Towards Environmental Monitoring
## 3 Proposed WSN System Architecture
### Overall System Integration and Operation  
This proposed software framework provides an abstraction level for low-level microcontrollers in the network to collect data for users. With the Data-Management-Application module, users can easily modify collected data into forms that can be easily used with any other existing application. As shown in Figure 3, the system operation and the life cycle of acquired data are described as follows: (1) The output pins of environmental sensors (e.g., humidity and temperature sensors) are connected to the user I/O pins of wireless node module. Yet, each environmental sensor provides its analog output, referring to the supply voltage and ground voltage of the sensor node. Therefore, when an analog output is captured by a wireless node module, it is necessary to convert the analog output to an appropriate voltage with respect to the reference voltages of a wireless node module. In the proposed software framework, all sensor output pin voltages, device temperature, and device voltage sets are packaged in a Simple-Device object. Then, this object is compressed into a Simple-Message object, which is wrapped into a SimpliciT API package. (2) This package is wirelessly transmitted to an application point module, which decompresses a Simple-Message object back into a Simple-Device object. Then, a Simple-Communication object is used to send received environmental sensor data to a host computer in JSON format via the UART port. On the host computer, an Application-Point-Server host listens for any incoming transmission on this specified UART port. Once a Simple-Communication event is detected, the received data is modified based on the user specifications defined in the Data-Management-Application. For example, when an application point module sends data serially to an Application-Point-Server host, the data can be converted from \"devicePin3 Voltage: 2.33\" to \"CO\({}_{2}\) (ppm): 1200\". This conversion is achieved by mapping the received data to specified user data. (3) After the host computer obtains the captured sensor data, it will upload the data to an onlinedatabase for visualization or analysis in the future. According to the above discussion, the proposed system supports a \"Plug and Play\" style of system operation and data acquisition. Once a user connects the output pin of an environmental sensor to a wireless sensor module, the specific sensor data will be captured and converted via the proposed software framework, and then the data collected by this environmental sensor will be uploaded to an online database. The disconnection of an environmental sensor from this WSN does not affect the operation of other sensors in this system.  
In Figure 3, the entire WSN system utilizes a star network topology. In a star topology, an application point module is typically surrounded by all wireless sensor modules. Other network topologies (e.g., tree, ring, or fully connected) are also available and applicable for our WSN system platform. Particularly, if a wireless sensor module is too far away from the application point module, a repeater can be placed between the two wireless sensor modules for the signal augment and relay.