Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.



Wiki Markup

'''Welcome to the Weather Center'''


Members of Digi-Key’s Applications Engineering team began developing the Digi-Key Weather Center in a collaborative effort in February 2010. The Digi-Key Weather Center was placed on the roof of Digi-Key’s 600,000 square-foot facility in Thief River Falls, Minnesota in July 2010. The Digi-Key Weather Center was developed to demonstrate connectivity to customers by using products sold and supported by Digi-Key. Because Digi-Key is located in Northern Minnesota where the weather changes dramatically from summer to winter, it was determined to be the perfect location to demonstrate data communication with a weather station.

The primary device used to develop the Digi-Key Weather Center was a ConnectPort X4 Zigbee to Ethernet gateway, which is equipped with access to iDigi from Digi International, one of Digi-Key’s 440\+ franchised suppliers. Additionally, Digi International Series 2 XBee modules programmed with Zigbee firmware were used for wireless communication to the device sensors and gateway. The initial sensor board was designed around a Microchip PIC18F14K22 microcontroller and a VTI temperature/pressure sensor, both of which are housed in a sealed Bud boxes with an IP65 rating. Solar panels from Parallax and sealed lead acid batteries from B.B. Battery and Panasonic were also used to develop the Digi-Key Weather Center.

Digi-Key DesignApplications SupportEngineering Services team members Steve Dahl, Kevin Culkins, Shawn Rhen, Brandon Tougas, and Scott Raeker created the weather station, with each person assigned to different parts and stages of development. The project began with the design and construction of the structure that would hold the solar panel, control box and sensor nodes. Once the structure was completed, it was determined that sealed lead acid batteries and a charging circuit would be needed for power storage and distribution to the sensor nodes. The initial nodes developed for the project were a temperature/pressure sensor and a PWM controller enabled with a ZigBee module that relays the information to and from an Ethernet gateway. Next, python drivers were developed for the gateway, which relayed and managed the data to and from the sensor nodes. Finally, applications were developed for Android and Blackberry in order to present the data.


h1. External Interfaces

h2. {tm:class=myclass}Android{tm}Application


h3. Installation and setup

# Install {tm:class=myclass}Eclipse{tm}
# Download the Android SDK [http://developer.android.com/index.html]
# Add the plugin to Eclipse([http://developer.android.com/sdk/index.html])
# Create a New Project
## File -- new -- Android Project
## Project name:
## Select build target -- “Android x.x”
## Application name:
## Package name:
## Create Activity:
## Min SDK version:
## Select Finish
## Right click a file in the project
### Run as -- Run Configuration
## Android Tab:
### Browse to select the current project
### Launch: select the one listed
## Target tab:
### Automatic -- select manager
### Virtual Device -- New
#### Name:
#### Target:
#### SD Card:
#### Skin:
#### Hardware
## Create AVD
# Close the manager window
# Select the newly created AVD -- Run
# In the AndroidManifest.xml file you can change the icon for the app
# In the string.xml file you can change the name of the app

h3. Loading the app on a phone

# PHONE: Under “Settings, Applications, Development”enable “USB debugging”
# Eclipse: Under “Run, Run Configurations” select the “target” tab. For Deployment Target Selection Mode select “Manual”.
# Download and install the USB drivers for your phone to your PC then run the android application.

h2. BlackBerry{copyright}Application


h3. Creating the Development Environment

# Download and install BlackBerry JDE v5.0: [http://na.blackberry.com/eng/developers/javaappdev/javadevenv.jsp]
# Download and un-zip eclipse-jee-helios-win32.zip from [United States] OSU Open Source Lab (http)
# Downloaded and installed BlackBerry Java Plug-in for Eclipse: [https://origin-bdsc.webapps.blackberry.com/bdsc/index.jsp?lang=na&code=DC727151E5D55DDE1E950767CF861CA5&dl=6CB6BF3AB185BE2184BE108E1A4C5DA8#swdregister]

h2. Dashboard Website

h2. {tm:class=myclass}Google Gadgets{tm}Application

# Download Google Desktop {tm}
# Download Google Desktop Gadget Designer.
# Download a Google gadget zip file, make sure it contains the .manifest and .js files in it.
# Open the gadget in the designer to modify the contents of it.
# Once the gadget is compete, build the package to create the .gg file

h1. Gateway

[Digi's Software Packages|http://www.­digi.­com/­gatewaydevelopme­ntkit]

h2. DigiPython ESP

'''New Project:'''

# New - iDigi Dia Project
# iDigi Dia Project Wizard
## Project name: xxx
## Use default location
## iDigi Dia Settings:
### Use default iDigi Dia Version: 1.3.8
## Advanced project settings
### File name: xxx.yml
### Include iDigi Dia source code in project
## Python settings:
### Interpreter: Python 2.4.3
# Remote Device:
## Use Current Remote Devices

'''Run Project:'''

h2. iDigi gateway

# Modify and save the “xx.yml” file.
# Run it through the python.exe, in command prompt.
## “c:\idigi_dia\dia_pkg_1.3.8> c:\Python24\python.exe make.py demos\xxx\xxx.yml”
# Upload files for the gateway
## dia.zip
## dia.py
# Delete files off the gateway
## dia.pyr
# Reboot the gateway
# Telnet to the gateway using IP Address 192.168.1.xxx and port 23 then type
## python dia.py
# View the dia html page of the gateway by typing the following in a web browser
## 192.168.1.xxx/xxx

h1. Control Box

The control box houses the the solar charging circuit board, battery, and the distribution of the power to the external sensors.

h2. 1st Gen Charger

The battery charger board uses a Texas Instruments [BQ2031|http://focus.ti.com/lit/ds/symlink/bq2031.pdf] lead-acid fast-charge IC. Circuitry is based on TI's [DV2031S2|http://focus.ti.com/lit/ug/sluu023b/sluu023b.pdf] lead-acid charger development board and configured for a 6-cell battery  using the two-step voltage charging algorithm. Fast (bulk) charge  voltage is set for 14.9V and maintenance (float) voltage is set for  13.7V. The input power for the charger is provided by three solar panels  (each one outputs approximately 20V @ 0.5A under full sunlight  conditions).


h2. 3rd Gen Charger

(picture coming soon)

The latest revision of the charger implements a PIC30F6015 to control the output voltage of a LM2679 switching regulator circuit from National Semiconductor.  The control software in the PIC results in a PWM output signal, which is delivered to the following circuit: !charger_influence.gif!
The feedback signal is connected to the feedback pin of the LM2679. When the PWM signal is set to 0% duty, the PWM_LPF node is essentially driven to zero volts, which pulls the feedback node low through R20.  This causes the regulator to respond by increasing it's output until the feedback pin reaches 1.21V. Conversely, if the PWM signal is set to 100% duty, the PWM_LPF node is driven to 3.3V, which pulls the feedback node high through R20. This causes the LM2679 to respond by decreasing the output until the feedback node reaches 1.21 volts.  The output of the 10-bit resolution PWM allows \~4mV steps between 9.6V and 14V on the output of the LM2679. This provides very precise control of the voltage and current delivered to the 12v lead acid batteries.

The control algorithm in the dsPIC30F6015 charges the batteries according to a 3A system limit to 13.8 volts, and tracks the peak output power point of the solar panels. It also measures the current being consumed by each of the other nodes, and can individually disable them in case of high current draw or low battery voltage conditions.

h1. Sensor Nodes

In order to decrease development time for sensor nodes and Python drivers for the gateway, a common format for passing data has been created and standardized. This will also reduce the amount of data being passed between the Gateway and the XBee enabled sensor nodes.

*Gateway Character Key:*

request = "R" - All requests will lead with a NULL (0x00) operator which is used by sleeping nodes for wakeup on UART. hello = "H"

*XBee Node Requirements:*

XBee - 3.3v XBee PRO - 3.3v

*Default Communication:*

Baud Rate: 9600 Flow Control: None Data Bits: 8 Parity: None Stop Bits: 1

*Note:* Configurations can be different if needed, but needs to be specified when connected to the network

*XBee Sensor Node Communication Format:*

| Function: | Return Format: | Units: | Example: | Translation: |
| Temperature | Txxxx | C | T0756 | 75.6 C |
| Humidity | Hxx | | H26 | 26 |
| Light | Lxxxxx | L | L12345 | 12,345 Lux |
| Pressure | Pxxxx | hPa | P1234 | 1,234 hPa |
| Battery Voltage | Bxxx | V | B128 | 12.8 V |
| Solar Voltage | Sxxx | V | S163 | 16.3V |
| Wind (Speed/Gust) | Wxxxzzz | Km/h, Km/h | W012027 | 12 Km/h, 27 Km/h |
| Duty Cycle | Dzxxx | | D1045 | PWM1 = 45% |

Example 1: Request Gateway: "R" XBee Node: "3T0756P0100H26" Note: The first character in the reply from the sensor node is the number of different senors data being sent in this transmission.

Example 2: Hello Gateway: "H" XBee Node: "*" Note: The purpose of this simple "Hello" request is to be able to ping the sensor node.

Example 3: Error Gateway: "T" XBee Node: "Error" Note: If any characters that are not defined for a gateway request, the sensor nodes will reply with an "Error" message.

h2. Anemometer

The wireless anemometer module uses a XBEE Pro wireless module, #40R Anemometer, and [PIC18F14K22|http://search.digikey.com/scripts/DkSearch/dksus.dll?Cat=2556109&k=PIC18F14K22] nanoWatt XLP microcontroller, all housed in a Bud Industries "AN" series enclosure.

Power is supplied via Switchcraft Sealed Power Jack, [L712AS|http://search.digikey.com/scripts/DkSearch/dksus.dll?vendor=0&keywords=L712AS].

Voltage regulation is provided by a V-Infinity DC/DC converter, [V7803-500|http://search.digikey.com/scripts/DkSearch/dksus.dll?vendor=0&keywords=V7803-500]. The form factor and performance level makes the V78XX series a drop-in replacement for any LM78xx linear regulator in TO220 packaging.

The #40R Anemometer is a three-cup design with a dry contact reed switch sensor. Frequency is proportional to cup rotational speed..


h2. Camera


Beagleboard xM

Logitech UVC Camera

Atheros USB WiFi (5Ghz)

Installation Details: \[[Weather Center Camera]\]

h2. Light/Humidity/Supply Voltage/Temperature


The [PIC24FJ192GA110|http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=PIC24FJ192GA110-I/PT-ND] MCU was used for a weather node to return wireless readings of temperature, humidity, Supply Volatage and Lux (luminous flux density). For Lux sensing, a Microsemi Lux sensor [LX1971IDU|http://search.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&site=us&keywords=LX1971IDU-ND] was used due to its temperature stability and approximate human eye spectral response. For the humidity measurements, a Honeywell HIH-5031 humidity sensor [480-3284-1-ND|http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=480-3284-2-ND] was employed. This sensor was chosen since it has a relative humidity operational range of 0 to 100% with a low hysteresis of \+/\- 3%. The temperature was measured using a Microchip [TC1047AVNBCT|http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=TC1047AVNBTR-ND] temperature sensor. Hardening the unit for inclement weather was a must. For this a NEMA certified enclosure [377-1459|http://search.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&site=us&keywords=377-1459] and C&K sealed IP67 rated tactile pushbutton switches [CKN10004|http://search.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&site=us&keywords=CKN10004] were used.


h2. Pressure


The wireless temperature/barometric pressure sensor module uses a XBEE Pro wireless module, [Bosch Sensortec BMP085|http://search.digikey.com/scripts/DkSearch/dksus.dll?Cat=1966259&k=BMP085], and [PIC18F14K22|http://search.digikey.com/scripts/DkSearch/dksus.dll?Cat=2556109&k=PIC18F14K22] nanoWatt XLP microcontroller, all housed in a Bud Industries "AN" series enclosure. The PIC nanoWatt XLP microcontroller offers extreme low-power management drawing only 34nA in sleep mode. Power is supplied via Switchcraft Sealed Power Jack, L712AS. Voltage regulation is provided by a V-Infinity DC/DC converter, [V7803-500|http://search.digikey.com/scripts/DkSearch/dksus.dll?vendor=0&keywords=V7803-500]. The form factor and performance level makes the V78XX series a drop-in replacement for any LM78xx linear regulator in TO220 packaging.

h1. Solar Power


Currently 3, 18V @ 10W, Solar Panels from Parallax Inc, [750-00032-ND|http://search.digikey.com/scripts/DkSearch/dksus.dll?vendor=0&keywords=750-00032-ND] are used for power generation on this Weather Station.

h1. Structure


The Electronic enclosures used in this project are from Bud Industries. The Main box is BUD's NBA series, [377-1139-ND|http://search.digikey.com/scripts/DkSearch/dksus.dll?vendor=0&keywords=377-1139-ND]. This box is rated at IP65 of IEC 529 and NEMA 1, 2, 4 and 4x specifications. Temp range is \-40c to \+70c. This Box does not have an outdoor rating but has healed up very well to the Northern Minnesota environment... It has seen near 100deg F in the summer and this winter it has seen \-38F with no problems. To provide venting to the box we installed Buds NBX-10910-ND and the NBX-10911-ND moisture vents, one on each end. These vents have worked very well in venting the box and to this point we have not detected any snow or moisture migration into the box. To interface the box to the sensors we used Switchcrafts SC1391-ND Jack and the SC1381-ND Plug. These connectors are rated at IP68 but take note, only when they are properly mated. The jack is not sealed on the inside so if you do not have anything plugged in to the jack be sure to use the "JCAP" SC1396-ND to seal the Jack when not in use. On the inside of the box we installed Injectorall Electrics FR4 un-clad board material to make the back panel PC8-UNCLAD-ND. On the panel we installed the primary circuit board and two power distribution strips by Molex WM5737-ND.

h2. Junction Box


July 30th, 2010 a junction box was added to the weather station for future solar panel expansion. The connectors used are Switchcraft's Sealed Power 761KSxx plugs (Digi-Key part# [SC1382-ND|http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=SC1382-ND]) and L712AS jacks (Digi-Key part# [SC1390-ND|http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=SC1390-ND]). These connectors are IP68 and NEMA 250 (6P) rated with J-Cap plugs Digi-Key part# [SC1396-ND|http://search.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&site=us&keywords=JCAP&x=19&y=16]) used to seal unused jacks. The box used is a Bud Industries "AN" series (Digi-Key part# [377-1429-ND|http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=377-1429-ND]) which is IP65, IP66, IP67, NEMA 1,2,4,4X,12,13, UL-508 rated. Image Update: The junction box was modified by replacing the Schottky diodes with "Super Barrier" SBR2U30P1 diodes from Zetex Diodes (Digi-Key part# [SBR2U30P1DICT-ND|http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=SBR2U30P1DICT-ND]). The Super Barrier diodes have ultra low forward voltage drop of 0.4V maximum at 2.0A..