Home/ Blog/Examples & Guides/Seven Segment Display with Digi XBee

Seven Segment Display with Digi XBee

 

Table of Contents

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

1) Introduction

Number communicate clearly. With a simple 7-segment numeric display you can show how many, how much, which one or when with precision. It’s a snap to display numbers wirelessly with an Digi XBee radio.

The Digi XBee directly drives a simple numeric display, and that’s often all a project needs. For example, here’s some characters you can show in seven segments, (click the image to see even more possibilities):

The numbers can be small or huge. For applications that require extensive text, check out our LCD text display example for rich communications. Otherwise when simple numbers and letters fit the bill, here’s how to get ’em….

2) Assemble the Parts


To hook up a 7-segment numeric display to an XBee, you’ll need:

3) Configure the Radio

If you’re not familiar with configuring radios using AT commands, review the steps in the Basic Digi XBee 802.15.4 Chat tutorial, which walks you through configuring CoolTerm to program the radios.

  • Insert the Digi XBee into the Explorer USB and connect it to your computer.
  • Launch CoolTerm and connect to the Digi XBee.
  • Here are the commands we’re going to use to configure the radio:
Function Command Parameter
Reset ATRE N/A (resets the radio to its factory settings)
PAN ID ATID 3001 (any address from 0 to FFFE will do)
MY Address ATMY 2
Pin 0 I/O configuration ATD0 4 (digital output, LOW on startup)
Pin 1 I/O configuration ATD1 4 (digital output, LOW on startup)
Pin 2 I/O configuration ATD2 4 (digital output, LOW on startup)
Pin 3 I/O configuration ATD3 4 (digital output, LOW on startup)
Pin 4 I/O configuration ATD5 4 (digital output, LOW on startup)
Pin 5 I/O configuration ATD5 4 (digital output, LOW on startup)
Pin 6 I/O configuration ATD6 4 (digital output, LOW on startup)
Pin 7 I/O configuration ATD7 4 (digital output, LOW on startup)
I/O input address ATIA 1 (accept data from any transmitting radio)
Write to memory ATWR N/A (save the settings to flash memory)
  • Here’s what your terminal session might look like. The user input is in bold:
+++
OK
ATRE
OK
ATID 3001
OK
ATMY 2
OK
ATD0 4
OK
ATD1 4
OK
ATD2 4
OK
ATD3 4
OK
ATD4 4
OK
ATD5 4
OK
ATD6 4
OK
ATD7 4
OK
ATIA FFFF
OK
ATID
3001
ATMY
2
ATD0
4
ATD1
4
ATD2
4
ATD3
4
ATD4
4
ATD5
4
ATD6
4
ATD7
4
ATIA
FFFF
ATWR
OK

Note: Remember to issue the ATWR command when you’re done so that the settings are saved in the radio’s flash memory. If you don’t issue this command, the radio will revert to its old settings when it loses power.

4) Wire up the Circuit

  • Place the Digi XBee adapter into the breadboard and wire up the power buses to each other. Next, connect the VCC terminal of the XBee adapter to the positive rail and the ground terminal to the negative rail.

  • We made it easier to attach the battery holder to the breadboard by soldering some male headers onto its positive and negative wiring leads.

  • Connect the battery pack directly to the ground and power rails.

  • Place the 7-segment display module across the trough in the breadboard as show, so that the two columns of pins go into separate breadboard rows. The display shown is a common-cathode model which means that all the LED segments share a command ground connecting. Attach one or both of the GND pins to the ground rail of the breadboard. For this module we use physical pin 12. You can either use a regular wire or a low-value resistor (~100 Ohm) to make the connection.

  • The remaining pins each run one segment of the numeric display.

  • Wire each one to a digital output on the XBee.
  • Here’s the connections for the 7-segment display that we used (great data sheet notes here). Yours may be different so check its data sheet and connect it accordingly!
XBee pin XBee physical Display pin Display physical
AD0 20 segment A 14
AD1 19 segment B 13
AD2 18 segment F 1
AD3 17 segment G 2
AD4 11 segment E 6
AD5 15 segment D 7
AD6 (RTS) 16 segment C 8
AD7 (CTS) 12 segment RDP 9
n/a [GND] common cathode 4
n/a [GND] common cathode 12

Note: The particular organization of the segments can be changed according to your taste.

  • And finally, insert the Digi XBee into the breakout board and connect the battery pack. If there’s a switch on the battery pack be sure to switch it to the on position. All the segments should be off to start with. Now any pins brought high on the Digi XBee, either remotely or from the Internet via XIG will turn on one of the segments. For example, to show the decimal number 5, turn on segments A, F, G, C and D! See  Setting or Getting Remote Digi XBee AT Settings on the XIG for more information on remotely setting pins via iDigi.

  • Above is a breadboard layout and a diagram of the circuit for your reference.

5) Use it!

For this video we got those numerals pouring out of the Digi XBee by using the Remote Digi XBee AT Settings feature of the XBee Internet Gateway. It’s an easy way to switch the LED segments on and off from the Internet. You could also use the Arduino XBee Library to run a local display wirelessly.

Now you can create a counter that shows how far away Friday is, display your current Amazon or Yelp ratings, show the current flight landing at O’Hare or keep an eye on the temperature in your restaurant’s walk-in freezer. A 7-segment display can keep you, your employees, and your customers in the know!

Tags: , ,
Posted on:

Comments are closed.

Contact a Digi expert and get started today! Contact Us
Have a Question?