Digi XBee3 Cellular SMS ActivityBot

The Digi XBee3® Cellular SMS ActivityBot is an educational robot that can be controlled with text messages from any cell phone, anywhere in the world. The ActivityBot, made by Digi's friends at Parallax.com, is designed for first-time robot-builders and is widely used in technology and engineering education.

SMS text messages sent to the robot can command it to drive forward, back, left or right. It has a built-in roaming mode where it becomes self-driving, using two "whisker" sensors to detect obstacles to the right or left. The ActivityBot uses the Digi XBee3 Cellular module to report back what it's sensing in real time. For example, any time one of the "whisker" sensors is triggered, that event is immediately reports back to the cell phone as a text. (Of course, only robots should text and drive.)

SMS is only the beginning. Digi XBee3 Cellular supports TCP/IP so commands and data can just as easily be exchanged with a web page or cloud server. ActivityBots and Blockly, the Google-invented system used to program it, come from Parallax. Digi XBee Cellular is available from Digi.com.

Gather Materials

Here are all the supplies you'll need to create this project:

  • Parallax ActivityBot
    • Included with ActivityBot:
      • USB A to Mini-B cable
      • Wire whiskers
      • Male headers
      • Hookup wire
      • 220 ohm resistors
      • 10K ohm resistors
  • Digi XBee3 Cellular LTE-M Kit
    • Included in the XBee3 Cellular Kit:
      • XBIB development board
      • USB cable
      • Antennas
      • 12-volt power supply for XBIB board
      • Nano-sized SIM card with SMS service
    • Note: antenna, XBIB board, power supply and SIM card can also be sourced separately if desired
  • Any mobile phone with SMS service
  • A Windows or MacOS computer with USB (for Blockly code programming)
  • AA batteries x 5 - (we like rechargeables with a charger)
  • XCTU for configuring XBee (free download)

Build the Robot

Follow the full online instructions for assembling the Parallax ActivityBot:

  1. Hardware Check
  2. Prepare External Encoders
  3. Prepare Tires
  4. Prepare Chassis
  5. Prepare Servos
  6. Mount Right Servo
  7. Mount Left Servo
  8. Mount Right Encoder
  9. Mount Left Encoder
  10. Mount Battery Pack
  11. Mount Tail Wheel
  12. Mount Drive Wheels
  13. Mount the Activity Board
  14. Electrical Connections
  15. Software and Programming Check
  16. Make a Beep
  17. Navigation Basics

Doing all the steps in the assembly guide is the best way to understand your new robot. We recommend at least working through the Navigating with Touch step to understand the ActivityBot and build all the systems you'll need for this project.

Customize the Robot

  1. Locate and install the whisker switches.

  2. Locate and install the buzzer for some audio feedback.

  3. Wire for wireless: using two jumper wires, connect the XBee headers to the Propeller microcontroller:
  • Use one wire to connect XBee DO to P11
  • Use the other wire to connect XBee DI to P10

Parallax also has clear wiring instructions, but be sure to use the pin numbers as listed above.

Configure the XBee3 Cellular Module

  1. Insert the XBee3 Cellular into the XBIB development board or your XBee USB adapter, being careful to align it so all the pins are in the socket correctly, as shown in the photos.

  2. Assemble the XBee3 Cellular hardware and connect to your computer. Be sure to use the 12-volt power supply because USB alone does not provide enough current to properly operate the module. The kit comes with a free limited-use SIM card. You can also purchase your own from a vendor like AT&T or Twilio.

  3. Install and launch the XCTU program. It will automatically update its firmware library to the latest version. In the XCTU program:
    1. Add a device, using the factory default settings (9600, 8 N 1) for XBee radios:

    2. The association light on your development board will begin blinking as soon as your XBee gets a cellular connection. If it isn't you can check for cellular registration and connection.
    3. Update your XBee3 Cellular module to the latest firmware. Note: This is recommended even if your module is newly purchased.
    4. Select the device from the Radio Modules list by clicking on it. XCTU will display the current firmware settings for that device.
    5. Enter your mobile phone number in the P# field and click the Write button. Type the phone number using only numbers, with no dashes. You can use the + prefix if necessary. The target phone number is the phone number your robot will send texts to.
    6. Check the TD parameter. It should be set to 0 because the text delimiter won't be used in this project.
    7. Be sure to write the settings to the XBee using the button with the pencil icon.
  4. Install the XBee into the robot
    1. Remove the XBee3 from the XBIB development board, pulling it straight up and being careful not to bend the pins. If you do bend any, carefully straighten them before moving on.
    2. Be sure you still have the nano-SIM card inserted into your XBee Cellular.
    3. Insert the XBee3 into the ActivityBot's XBee socket, oriented so the antenna connector is towards the outside edge of the robot, just like the little XBee drawing on the board.
    4. Connect the antenna to the small U.FL connector by pressing it straight down while turning it back and forth a bit to ensure that it's centered properly. It will pop into place when you align it just right and press down firmly. Sometimes the antenna connector pops in right away, but often it's a bit tricky so don't get discouraged. You'll know you've got it right when it rotates back and forth freely without disconnecting.
    5. Mount the antenna to the side of the robot with tape. Even though this isn't the ideal positioning, in most cases it works without any issues.

Program the Robot

  1. Load the XBee3 Cellular ActivityBot code.
    1. Connect the robot to your computer using its USB cable
    2. Set the power switch on the robot to the "1" position. This powers only its controller board, with the wheels disabled so the robot doesn't run away while you are programming it.

    3. Open blocky.parallax.com and register a new account.
    4. Download the BlocklyProp Client for your computer and install it. This client program must be running on your computer to use BlocklyProp Online.
    5. Press its Connect button in BlocklyProp Client to allow local IP access.
    6. Load the Whiskers SMS code in your browser.
    7. Use the green button with the downward arrow to load and run the firmware using the robot's EEPROM over USB.

    8. After a download progress message, the Terminal should appear and print a "Robot v1.2 ready...” message. You're all set to test your robot!
  2. Test the Robot.

    1. Set the power switch to the "0" position.
    2. Install the five AA batteries in the bottom of the robot.
    3. Disconnect the USB cable so that the robot can roam freely.
    4. Set the power switch to the "1" position to power the board and XBee3 Cellular.
    5. Wait for the blue ASSOC light to blink, indicating a connection to the cellular network:

    6. Set the power switch to the "2" position, and press the RST button above it.

    7. Check your mobile phone for a text message: "Robot 1.2 ready..."
Got the message? Great! Otherwise, check the following:
  • XBee3 is properly installed in its socket
  • Phone number is properly entered in the XBee's configuration
  • XBee's IP mode is set to 4 for SMS
  • Wires are connecting the pins XBee DO to P11 and XBee DI to P10
  • SIM card has SMS service
  • Robot has power—there are indicator lights near the switch
  • SIM card is installed in the XBee3

Use It!

With the robot running, here are the commands you can use. Send each as a text message addressed to the phone number of your SIM card:

  • Forward: drives the robot forward a few inches (cm)
  • Back: drives the robot back a few inches (cm)
  • Left: turns the robot about 90º to the left
  • Right: turns the robot about 90º to the right
  • Roam: puts the robot in free roam mode
  • Stop: stops the robot
The robot sends two sensor messages:
  • left whisker: the robot has contacted an object on the left
  • right whisker: the robot has contacted an object on the right
Want the robot to drive farther, faster and have more sensors? All the code is open-source so you can change anything you like. Publish your improvements with credit to this original guide and enjoy your texting robot!



Want to stay connected?
Sign up for our company newsletter