Monthly Archives: June 2015
We will soon be introducing our first consumer IOT product – a wireless soil moisture sensor for your plants. The soil moisture sensor is based on the open source “Chirp” plant watering alarm. We added an NTC thermistor to the same PCB. The sensor PCB is interfaced to the WSN1101L sub-GHz wireless node. The soil moisture sensor is a capacitive sensor. When water is added to the soil (in the vicinity of the sensor probe), the capacitance of the probe increases. When the soil looses moisture, the probe’s capacitance decreases. The MSP430 on the WSN1101L is used to generate a square wave (around 330 kHz) which is fed to a low pass filter created by a 10 kilo-ohms resistor and the capacitance of the soil moisture probe. The output of this low pass filter is rectified using a diode and the average level of the filtered square wave is measured using one of the 10 bit ADC channels on the MSP430. As the capacitance of the probe increases (when water is added), the output voltage decreases. As the soil dries out, the probe capacitance decreases and the output voltage increases. Note that capacitance increases when water is added because water serves as a dielectric. Higher the dielectric constant, higher the capacitance.
The sensor PCB has a coin cell holder which can hold a 20 mm coin cell (CR-2032 for instance). This sensor node can run on the CR-2032. If the sensor measures and reports the sensor readings say once every 30 minutes (or more), the coin cell can last more than a year.
This product will be an open system. We intend to allow users to add more sensors to the product. We are going to make the source code available so that anyone can add sensors or modify any layer of the stack. The MSP430 on the WSN1101L can be programmed through the 2 pin spy-bi-wire interface using a low cost launchpad (MSP-EXP430F5529LP) from TI. Note that the MSP430 variant on the WSN1101L is the MSP430G2955. All the MSP430 pins will be exposed. Add new sensors, replace existing sensors, modify/add any part of the firmware or just completely re-purpose the system.
Here are some pics.
The WSN1101L has a U.FL connector.
I recently built a prototype for a wireless sensor equipped with WiFi (instead of our regular sub-ghz radio). WiSense will soon be offering WiFi based sensors (in addition to sub-ghz radio based sensors).
We decided to use the CC3100 WiFi network processor. I interfaced the CC3100 to our MSP430 board and ported the simpleLink host driver (from TI) to MSP430. This allows us to leverage our existing code base which supports a large variety of sensors. The same code base now supports both WiFi (CC3100) and the CC1101 sub-ghz radio.
I ran the simple UDP client application (on the MSP430) to send data to my laptop (connected to the same AP).
The CC3100 supports 802.11b, 802.11g and 802.11n. It has on chip support for TCP and UDP.
The CC3100 has been designed to support different low power application scenarios. Let us say we need to sense some parameter once in a while (say every 30 minutes) and report the sensor value to the cloud. Such a node can be powered by a couple of AA batteries for a year or longer. This can be achieved by putting the CC3100 into hibernation in which it consumes just 4 micro-amps. When sensor data needs to be sent, the CC3100 can be woken up. Once awake, the CC3100 will rejoin the AP and send application data. The CC3100 can be put back into hibernation mode right away. Obviously this all depends on reliable connectivity to an AP.
The CC3100 can be interfaced to a host microcontroller over SPI or UART. We chose the SPI interface. The single UART port on the MSP430G2955 is free to be interfaced with any compatible sensor.
The one downside to the CC3100 is it’s cost. Avnet is quoting the lowest price ($10.1 each for 100 numbers).
Here is a functional block diagram of the system.
Here is a pic of the CC3100 interfaced to our MSP430G2955 board. Both are powered by a pair of AAA batteries.
Stay tuned for more posts on this chip.
So far, we have been using the Raspberry PI to connect the WiSense mesh network to the external world. We have built gateways for customers with Raspberry PI, a WiSense coordinator node and a mix of backhaul interfaces such as wired ethernet, WiFi and GSM/GPRS. Recently we got a requirement for a low cost gateway which can send WiSense sensor node data to the cloud through the home router. The customer was not interested in using the PI because of the cost factor. This pushed us to look for a low cost alternative which would be good enough at least for this customer. Unsurprisingly, the cheapest option was to interface the WiSense coordinator to a ENC28J60 wired ethernet module. We built a prototype which sent sensor data to the cloud using UDP and demoed it to the customer.
The ENC28J60 has an SPI interface and so does the CC1101 radio IC on our coordinator node. We have had some problems with multiple devices on the SPI bus so we decided to use an extra MSP430 (bridge) micro in between the coordinator node and the ENC28J60. The bridge micro gets data from the Coordinator node over UART and forwards it to the ENC28J60 over SPI.
Here is a pic of the prototype.
The pic below shows a gateway with Raspberry PI
We built some temperature sensors for monitoring the performance of air conditioning units for a customer. The nodes use the WiSense WSN1101L sensor node. The temperature is measured using a thermistor (103AT-4 from Semitech). The node and the sensor interface circuit is enclosed in a weather proof enclosure with just the antenna and the thermistor sticking out. We used a resistor divider circuit and an op-amp (as a buffer). The op-amp output is tied to one of the 10 bit ADC channels on the MSP430G2955. The whole node is powered by a couple of AAA batteries (within a battery box glued to one side of the enclosure).
To reduce power consumption, voltage supply to the resistor divider and the op-amp is gated through a mosfet switch. The mosfet is switched on/off by the MSP430. The driver code for this thermistor will switch on the mosfet, wait for a few milliseconds and then measure the ADC channel.
Here is some ASCII art showing the mosfet.
The 103AT-4 is a negative coefficient thermistor (resistance decreases with increasing temperature). Wikipedia has a nice introduction to thermistors here – http://en.wikipedia.org/wiki/Thermistor.
We use this equation to get the temperature from the measured resistance.
loge(R25/RT) = B * (1/T25 – 1/T)
T = 1 / ((1/T25) – ((loge(R25 / RT)) / B))
Here T25 is the temperature in kelvin corresponding to 25 deg C. So T25 is (273.15 + 25 = 298.15 K).
R25 is 10K for this thermistor. That is, the resistance of this thermistor is 10K at 25 deg C.
RT is the resistance at “unknown” temperature T. RT is obtained from the circuit shown in the figure above.
The value of B (as specified in the datasheet) is 3435.
R25 is 10 Kilo-ohms. This also gives the value of the resistor to use in the resistor divider circuit shown in the figure above.
Voltage (V_R25) across the lower resistor (call it R25) is given by –
V_R25 = (Nadc * ADC_refV) / 1024
V_R25 = (VCC * R25)/ (R25 + RT)
(Nadc * ADC_refV) / 1024 = VCC * R25 / (R25 + RT)
R25 + RT = VCC * R25 * 1024 / (Nadc * ADC_refV
– Finally –
RT = (VCC * R25 * 1024 / (Nadc * ADC_refV)) – R25
Note that R25 is 10000 ohms.
Here are some pics of the sensor node.
In this pic below, you can see two LEDs next to the antenna. These blink when the node transmits/receives.