Give away medical masks when you place an order. learn more

Innovations in Connectivity



Hotenda’s Weather Center utilizes the latest in wireless technology to monitor the wildly variable wind conditions.

Figure 1:Internet connectivity path. The Weather Center is expanded to show node 37, which is equipped with an anemometer to measure wind speed.

Northern Minnesota experiences an impressive variety of weather. Air temperatures range from -40° F to 100° F and include weeks of sub-zero daytime highs and wind chill factors dipping below -70° F. The seasons bring crippling blizzards, impressive thunderstorms and tornados, ranges of less than 8.5 hours to more than 16 hours of sunlight each day, and an array of wind speeds that complement this variable climate. This unique combination of weather extremes, combined with the desire to showcase wireless connectivity (Figure 1), led to the creation of the Hotenda Weather Center (Figure 2). One of the components of the Weather Center is an anemometer, which tracks average wind speed and recent wind gusts.

Figure 2: The Hotenda Weather Center.

Making the right choice

Choosing an anemometer that could withstand the harsh northern Minnesota weather without breaking the bank was a challenge. While sonic anemometers are very robust, and have undeniable ‘geek’ appeal, a glance at the Weather Center budget encouraged us to continue looking for another solution. After much consideration and comparison, the model 40R from APRS (aprsworld.com) was chosen and installed (Figure 3).

Figure 3: APRS #40R Anemoter. (Courtesy of ARPS World, LLC).

This anemometer features a three-cup design with a dry contact reed switch to sense rotation. The output frequency of the reed switch is proportional to the rotation speed of the shaft. The frequency measurement, average and peak speed calculations, and communication are readily handled by a Microchip PIC18LF14K22 microcontroller. When requested, data is sent via the PIC’s UART to the xBee Pro wireless module, which passes it to the Digi Connectport X4 wireless gateway through the ZigBee mesh network.

Periodically, the gateway combines the information from every sensor and sends it to a database on a Device Cloud by Etherios server in the form of an XML file. The Device Cloud by Etherios service stores the data and makes it available upon request through a variety of display mechanisms (e.g. web page, a mobile device app, Google gadget, etc.).

Hardware design

The hardware design of the anemometer node is fairly straightforward. This system is powered by a lead acid battery, which is charged by a solar array. Power enters the node through a sealed Switchcraft power jack, L712AS. Another L712AS is used to connect the cable coming from the anemometer. A V-Infinity DC/DC converter, V7803-500, is used to provide a regulated 3.3 V, which is required by the PIC and xBee. To keep the microcontroller and xBee protected from the elements, an aluminum NEMA 4 rated enclosure from Bud Industries was used (NBA-10148). Figure 4 shows a schematic of the anemometer circuit.

The anemometer came fixed to a steel mast, which was attached to the weather center frame or “tree” (named “tree” because it grows with each new sensor). The rotating portion of the anemometer contains four magnets that each close a single reed switch contact as it rotates. The reed switch is connected to pin RA2 of the PIC, which is configured to implement Interrupt-On-Change (IOC) functionality. When pin RA2 toggles, the Interrupt Service Routine handler increments the pulse count. The number of IOC interrupts within a defined time period is used to calculate the wind speed. Below is the transfer function provided by APRS for the 40 R anemometer:

MPH = ( Hz * 0.857 ) + 0.725
m/s = ( Hz * 0.383 ) + 0.324
km/h = (( Hz * 0.383 ) + 0.324) * 3.6

The PIC’s Timer zero is configured for a three-second period. Every three seconds, the timer interrupt is triggered, which saves the count to an array of wind speed samples, and the oldest sample is discarded. The Interrupt-On-Change and Timer zero are configured as high priority interrupts. Alternatively, UART communication is configured as a low priority interrupt so that any pin change or timer interrupt will not be neglected.

Figure 4: A detailed schematic of the Weather Center's anemometer circuit.

The end result

Each sensor module on the ZigBee network is identified by its Node number (Node_x). Each node may have any number of sensors attached to it. The data gathered by the sensor node is formatted into a predefined data string. This data string starts with the number of sensors attached to the sensor node, followed by the type of measurement, and finishes with the data from the sensor. In this example, the anemometer is the only sensor attached to the sensor node, resulting in a data string beginning with a “1” followed by a “W,” indicating wind speed. What follows is the most current data gathered by the sensor node for average wind speed and the peak wind gust since last polled. A proper Node_37 data string looks like this: “1W011015”, which translates to 1 sensor transmitting average wind speed at 11 Km/h with wind gusts of 15 Km/h. Once received by the gateway, this string is parsed and the data is stored until the periodic XML upload is initiated.

For more information about Hotenda’s Weather Center, visit connectivity.digikey.com. All the software, schematics, flow chart and bill of materials can be found at eewiki.net.

For assistance in design, please contact Hotenda’s Design Support Services at design@digikey.com.
Supplier