Home/ Blog/Examples & Guides

Archive for the ‘Examples & Guides’ Category

FogFinder Relies on Arduino and Digi XBee to Tap into New Water Source

Posted on:

No, it’s not possible to create water out of thin air. But, with a bit of engineering, scientists in Chile are turning foggy air into a reliable water source for nearby residents. The process is almost entirely natural—the sun desalinates the water, the winds push the water to a higher elevation, and gravity allows the collected water to flow back down to the village.

Using large fog collectors, which consist of mesh mounted on a rigid structure, to capture impacting fog water droplets from the air and tapping into the natural processes mentioned above, fog collection could be an economical way to gather and distribute clean water.

The fog collectors are typically installed on hillsides and remote areas where fog is abundant. These installations are especially common in arid climates in Chile where rain runs scarce. As fog passes through, the droplets impact the mesh fibers and collect in a trough below. One of the real challenges and opportunities for innovation lies in determining where to install these collectors, how to orient them, and understanding how efficient they are at collecting water from the air.IMG_0420

While at the Universidad de los Andes in Santiago Chile, Richard LeBoeuf, Associate Professor at Tarleton State University, and Juan de Dios Rivera, of the Pontificia Universidad Católica de Chile, developed a new type of sensor called the “Liquid Water Flux Probe” to measure the availability of water at current and potential fog collector sites. The sensor measures the liquid water content and speed of the fog and can be used to understand the optimal location and orientation for each of the collectors.

The sensor is part of a larger system called FogFinder, which Richard LeBoeuf developed in collaboration with Juan Pablo Vargas and Jorge Gómez at the Universidad de los Andes. Together they designed and engineered the FogFinder system, which includes wireless networking.

20151215_182827

With the primary challenge of measuring fog liquid water flux out of the way, the team needed to design a device capable of being deployed in extremely remote environments and easily retrieve sensor data. Since there is no power source to plug into out in the desert, the options are either solar or wind power. Due to their simplicity, a separate solar power system, comprised of a solar panel, battery, and charge controller, is used in conjunction with the FogFinder unit.

To facilitate the collection and transmission of sensor data, the team chose to build the foundation of FogFinder with Arduino and Digi XBee. Both components offered a fast and easy way to get started prototyping the design. Each sensor node is comprised of an Arduino Mega and Digi XBee module, and the team even designed and built custom boards to regulate voltage, interface the sensors and store data on a micro-SD card.

20151215_154618

The node collects data on the following parameters:

  • Liquid water flux
  • Humidity
  • Temperature
  • Flow-rate from fog collectors
  • Pressure
  • Wind speed
  • Wind direction

The team settled on using Digi XBee for local wireless communication since it provided greater range and required less power than Bluetooth. The ZigBee protocol also offers the flexibility to create a mesh network and configuration settings to conserve power-saving valuable battery life. With external antennas and mountain top to mountain top placement of each radio, they have achieved a reliable 1 km link.

Once the data is collected, it’s sent to a remote server over a cellular network. Using a BeagleBone SBC and a cellular modem, data is taken from the local Digi XBee ZigBee network and can be accessed on a remote computer. This data is then analyzed to assess the performance of the fog collector.

What’s next for FogFinder? As the team wraps up the prototyping stage, they’ll be conducting calibration in a wind tunnel to prepare for field tests.  Once the testing phase is complete, the team will work to deploy them as part of a pilot program and start connecting more Chilean residents to a clean source of water.

You can read more about the FogFinder project in the following articles:

The FogFinder project has received support from the Universidad de los Andes through its Fondo de Ayuda de Investigación, Andes Iron – Dominga, and the Pontificia Universidad Católica de Chile.

To learn more about Digi XBee click here >>

 

Connecting Grove Sensors with Digi XBee

Posted on:

Grove modules are quickly growing in popularity due to each sensor and actuator having the same standardized connector — making it fast and easy to prototype a sensor project.

In the words of Seeed Studio, “Grove is a modulated, ready-to-use tool set. Much like Lego, it takes a building block approach to assembling electronics. Compared with the traditional, complicated learning method of using a breadboard and various electronic components to assemble a project, Grove simplifies and condenses the learning process significantly. The Grove system consists of a base shield and various modules with standardized connectors.”im121027001_2_1

What makes Grove devices so simple is that the connectors eliminate the need to break out the breadboard, resistors, jumper wires, etc.. The connection is a 4-pin interface that supports digital, analog, I2C signal through four wires with different colors.

  • Red is for VCC
  • Black is for GND,
  • Yellow is for signal
  • White is for others.

Since Digi XBee is used frequently in wireless sensor networks, we included six Grove connectors on the new Digi XBee Grove Development Board. You can use it to quickly evaluate Digi XBee and Grove modules with a PC or micro-controller.

We have included two Digi XBee Grove Adapter Boards in the Wireless Connectivity Kit. If you’re interested in how this might help you build wireless sensor networks, we have this graphic that offers an overview of the board and its connections.

 

grove_board_connectors

 

Visit Digi-Key to learn more about the Wireless Connectivity Kit. More information on the Digi XBee Grove Development Board can be found here.

Digi XBee Tech Tip: How to Conduct an Digi XBee Range Test

Posted on:

Have you ever wanted to test the strength of connections in your XBee network? Within the Digi XBee configuration software, XCTU, you can perform a range test. This will tell you the amount of packets received and the RSSI values at the local and remote nodes. This video will take you through the steps necessary to perform a range test.

You can download XCTU at this link: http://www.digi.com/xctu

We hope you found this tutorial helpful! Let us know what you’d like to learn in the next Digi XBee Tech Tip: http://bit.ly/xbeetechtip

Potentiometer Example: Digi XBee Zigbee Cloud Kit

Posted on:

xbee-wifi-potentiometer-widgetTable of Contents

  1. Introduction
  2. Assemble the Parts
  3. Configure the Radio
  4. Wire up the Circuit
  5. View it!
  6. Use it!

1) Introduction

When it comes to analog input, it doesn’t get any easier than a basic potentiometer. Nicknamed “pots,” these components are variable resistors. With a twist of their knob, you alter the amount of voltage that flows out through their center pin. If you’ve ever adjusted a volume dial, chances are, you were using a potentiometer.

Potentiometers can be used for setting a level, determining an angle, or just as a simple user interface adjustment. Because you can set them immediately to a value that they’ll hold indefinitely, pots are terrific for prototyping and testing. Use them as a stand-in for any kind of analog input. Let’s get started and add them to your development toolkit!

2) Assemble the Parts

XBee_wi-fi_kit3xbee-wifi-potentiometer-parts

To hook up a potentiometer you’ll need:

*…or a powered Digi XBee ZigBee with breadboard and jumper wires.

 

3) Configure the Radio

You’ll configure the radio using your free Device Cloud account. (Note that radios can also be configured using XCTU.)

NOTE: If your radio was recently configured by the Digi XBee ZigBee Cloud Kit then the sampling rate and pin settings are already set. You can safely skip these steps.

  • Log in to Device Cloud.
  • Select Devices under the Device Management tab.
    DC-devices-list
  • Select the Digi XBee ZigBee that you are configuring, then select Properties or double-click to open the Properties window for that device.
  • Select Configurations, then Input and Output Settings, then confirm that DIO1/AD1/SPI_ATTN is set to Analog Input.
    DC-io-settings
  • On the same page, confirm that Sample Rate is set to 5000 ms which will take a sample every five seconds.
  • Save your changes!

 

4) Wire up the Circuit

You will build this sensor circuit using the Digi XBee Development Board.

  • Plug the potentiometer into the breadboard as shown. It has four pins. When facing the pins, they are from left to right:
    • Pin 1: Ground.
    • Pin 2: Output voltage that varies with the position of the knob.
    • Pin 3: Voltage in, which we will feed with 1 volt.
    • Pin 4: This is just a dummy pin and is not used for anything.
  • Connect a black jumper wire from the potentiometer’s pin 1 to ground (GND) as shown.
  • Connect one end of a yellow (or any other color) jumper wire to the second pin (2) of the potentiometer. Connect the other end of this wire to to the XBee’s AD1 pin.
    Potentiometer 2
  • Plug in the four resistors to separate rows of the breadboard as shown. They will form a chain with the each resistor connecting to one end of each resistor on either side. We will use them to scale the input down from 3.3 volt input to the 1 volt maximum of the Digi XBee ZigBee’s ADC.
    • Connect a red wire from 3.3V to the open end of the first resistor.
    • Connect a blue (or other color) jumper wire so that the third pin (3) of the potentiometer is connected to the junction between the first and second resistor as shown.
    • Use a black wire to connect the open end of the fourth resistor to GND.
      Potentiometer 1
  • Set the DIP switch for AD1 on the PCB to OFF to disconnect the soldered-on component.
    photo 2 (2)
  • Here’s what everything should look like:
  • XBee Gateway Kit Potentiometer Circuit_bbXBee Gateway Kit Potentiometer Circuit_schemPotentiometer 3

5) View It!
You will use the Digi XBee ZigBee Cloud Kit’s web application to configure a widget for viewing the potentiometer readings: https://xbeegateway.herokuapp.com/#/login

  • Log in to the Digi XBee ZigBee Cloud Kit web application.
    Gateway home
  • Use the Add Widget button to create a new display widget.
    add-widget
  • Choose Gauge Widget for the widget type.
  • Add a label such as “Potentiometer.”
  • Choose your Digi XBee ZigBee device by its ID.
  • Select ADC1 as the input stream and check the device configuration to make sure it is configured properly.
  • Enter “value/2500*100” to transform the input from millivolts to a simple percentage from 0 to 100. The calculation takes the input value, scales to a decimal, then multiplies by 100 to get a percentage value. While the base value is 2500, you may want to adjust this number to properly calibrate it with your individual potentiometer.
  • Add a name for Units such as “percent.”
  • Set a low value of 0 and a high of 100 to see the potentiometer range displayed.
    Potentiometer Setup
  • Save the changes to see your new Widget.

 

6) Use it!

xbee-wifi-potentiometer-widget

Your potentiometer settings are now instantly transmitted to the web. You can turn the knob directly to affect the gauge, and the new setting will be maintained until the knob gets moved again. This is terrific for testing out new circuits, but potentiometers can also be used to control an online setting, monitor anything that rotates, or as an input to a game that joins the physical and virtual worlds together. Once you’re satisfied that your prototype creation is working well, try replacing the pot with a light or temperature sensor to create an input that reacts to real-world environments.

Read more about Digi XBee, >>.

Push Button Example: XBee Zigbee Cloud Kit

Posted on:

xbee-wifi-switch-widgetTable of Contents

  1. Introduction
  2. Assemble the Parts
  3. Configure the Radio
  4. Wire up the Circuit
  5. View it!
  6. Use it!

1) Introduction

A button or “momentary switch” is perfect for projects that require user input, or any place you need to detect a change in device state. This example uses a simple tactile switch however the very same circuit can be used with a pressure mat to detect someone walking into a room, or with a microswitch to monitor when a door opens or with a passive infrared sensor to respond to motion. In this tutorial, we’ll walk you through wiring up a simple button to your XBee Zigbee so that its current state can be seen in a online application from anywhere in the world.

Pages: 1 2 3 4 5 6

LED Example: XBee Zigbee Cloud Kit

Posted on:

xbee-wifi-led-widgetTable of Contents

  1. Introduction
  2. Assemble the Parts
  3. Configure the Radio
  4. Wire up the Circuit
  5. View it!
  6. Use it!

1) Introduction

Making an LED illuminate is one of the first things many people do when they start learning electronics. It’s also often the most satisfying. We’re putting a wireless spin on that achievement by hooking up an LED to an XBee’s output, then controlling it from the web.

Let’s get blinking!

Pages: 1 2 3 4 5 6

Light Sensor Example: XBee Zigbee Cloud Kit

Posted on:

xbee-wifi-light-dashboard-widget

Table of Contents

  1. Introduction
  2. Assemble the Parts
  3. Configure the Radio
  4. Wire up the Circuit
  5. View it!
  6. Use it!

1) Introduction

In this example you will learn to use a photocell light sensor with the XBee Zigbee Gateway to sense and take action based on the amount of available light. You use light to tell if it’s day or night of course, but you can also determine if a cabinet is open or closed, or if someone is currently occupying a hotel room. Because light changes at the speed…well of light, it’s a great sensor to use when want to prototype using changes that happen instantaneously rather than only over a longer period of time. Best of all, these sensors are cheap—at about a dollar a piece, they’re a great component to use when deploying sensors in large multiples.

The resistance across the two leads of the cell varies according to the amount of light hitting the cell. With our circuit, the brighter it is, the lower the voltage that is passed to the XBee’s analog-to-digital converter (ADC). This reading is then sent via Device Cloud to the XBee Zigbee Cloud Kit’s online dashboard application. Now you can monitor the brightness from anywhere right in your web browser.

Pages: 1 2 3 4 5 6

Temperature Example: XBee Zigbee Cloud Kit

Posted on:

temperature-widget

Table of Contents

  1. Introduction
  2. Assemble the Parts
  3. Configure the Radio
  4. Wire up the Circuit
  5. View it!
  6. Use it!

1) Introduction

Measuring temperature is a popular way to get started with analog sensing. This example uses the TMP36 low-voltage linear temperature sensor that is included in the XBee Zigbee Cloud Kit. The TMP36 is very easy to set up. It doesn’t require any complicated circuits or tricky calculations to determine if it’s hot or not.

The sensor generates a voltage output output that is directly proportional to the Celsius temperature. The hotter it is, the higher the voltage that is passed to the XBee’s analog-to-digital converter (ADC). This reading is then sent via Device Cloud to the XBee Zigbee Cloud Kit’s online dashboard application where you can monitor the temperature right in your web browser.

Pages: 1 2 3 4 5 6

Contact a Digi expert and get started today! Contact Us