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 Applications Engineering 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.

External Interfaces

Android Application

Installation and setup

  1. Install Eclipse
  2. Download the Android SDK Android Developers
  3. Add the plugin to Eclipse(
  4. Create a New Project
  5. File – new – Android Project
  6. Project name:
  7. Select build target – “Android x.x”
  8. Application name:
  9. Package name:
  10. Create Activity:
  11. Min SDK version:
  12. Select Finish
  13. Right click a file in the project
    1. Run as – Run Configuration
  14. Android Tab:
    1. Browse to select the current project
    2. Launch: select the one listed
  15. Target tab:
    1. Automatic – select manager
    2. Virtual Device – New
    1. Name:
    2. Target:
    3. SD Card:
    4. Skin:
    5. Hardware
  16. Create AVD
  17. Close the manager window
  18. Select the newly created AVD – Run
  19. In the AndroidManifest.xml file you can change the icon for the app
  20. In the string.xml file you can change the name of the app

Loading the app on a phone

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


Digi’s Software Packages

DigiPython ESP

‘’‘New Project:’’’

  1. New - iDigi Dia Project
  2. iDigi Dia Project Wizard
  3. Project name: xxx
  4. Use default location
  5. iDigi Dia Settings:
    1. Use default iDigi Dia Version: 1.3.8
  6. Advanced project settings
    1. File name: xxx.yml
    2. Include iDigi Dia source code in project
  7. Python settings:
    1. Interpreter: Python 2.4.3
  8. Remote Device:
  9. Use Current Remote Devices

‘’‘Run Project:’’’

iDigi gateway

  1. Modify and save the “xx.yml” file.
  2. Run it through the python.exe, in command prompt.
  3. “c:\idigi_dia\dia_pkg_1.3.8> c:\Python24\python.exe demos\xxx\xxx.yml”
  4. Upload files for the gateway
  7. Delete files off the gateway
  8. dia.pyr
  9. Reboot the gateway
  10. Telnet to the gateway using IP Address and port 23 then type
  11. python
  12. View the dia html page of the gateway by typing the following in a web browser

Control Box

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

1st Gen Charger

The battery charger board uses a Texas Instruments BQ2031 lead-acid fast-charge IC. Circuitry is based on TI’s DV2031S2 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).

ChargerBOMG1.pdf (11.0 KB)

3rd Gen Charger

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:
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.

Gen 2020 DFRobot Lead Acid Charger

For the Weather Center 2020 season, we’ve upgraded the Lead Acid charger to an off the shelf solution from DFRobot DFR0580, with 4 INA219 current sensors also from DFRobot SEN091, to keep our Dual B&B Battery BP12-12-T2 topped off:

2020 DFRobot Lead Acid Charger

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.


The wireless anemometer module uses a XBEE Pro wireless module, #40R Anemometer, and PIC18F14K22 nanoWatt XLP microcontroller, all housed in a Bud Industries “AN” series enclosure.

Power is supplied via Switchcraft Sealed Power Jack, L712AS.

Voltage regulation is provided by a V-Infinity DC/DC converter, 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… (22.1 KB)
Anemometer_schematic_rev_A.pdf (25.1 KB)
Anemometer_Flowchart.pdf (15.5 KB) (13.4 KB)


Beagleboard xM

Logitech UVC Camera

Atheros USB WiFi (5Ghz)

Installation Details: [[Weather Center Camera]]

Light/Humidity/Supply Voltage/Temperature

The PIC24FJ192GA110 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 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 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 temperature sensor. Hardening the unit for inclement weather was a must. For this a NEMA certified enclosure 377-1459 and C&K sealed IP67 rated tactile pushbutton switches CKN10004 were used.

Node2_Sch.pdf (99.5 KB)
Node2_Prog_flow.pdf (10.3 KB) (10.8 KB) (11.5 KB)


The wireless temperature/barometric pressure sensor module uses a XBEE Pro wireless module, Bosch Sensortec BMP085, and 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. The form factor and performance level makes the V78XX series a drop-in replacement for any LM78xx linear regulator in TO220 packaging.

Solar Power

Currently 3, 18V @ 10W, Solar Panels from Parallax Inc, 750-00032-ND are used for power generation on this Weather Station.


The Electronic enclosures used in this project are from Bud Industries. The Main box is BUD’s NBA series, 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.

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) and L712AS jacks (Digi-Key part# SC1390-ND). These connectors are IP68 and NEMA 250 (6P) rated with J-Cap plugs Digi-Key part# SC1396-ND) used to seal unused jacks. The box used is a Bud Industries “AN” series (Digi-Key part# 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). The Super Barrier diodes have ultra low forward voltage drop of 0.4V maximum at 2.0A…

Battery Monitor

Part List:
Arduino Pro 3.3v/8Mhz at Digi-Key
Arduino XBee Shield at Digi-Key
2x INA219B Current Measurement at Digi-Key
Latching Mini Relay at Digi-Key
PWR JACK for Arduino at Digi-Key
Jumper Wire at Digi-Key
XBee S2C Module at Digi-Key
Antenna for XBee at Digi-Key
10K Resistor at Digi-Key

Arduino Project: