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 Inc. 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, or the 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 reported 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.com. Digi XBee Cellular is available from Digi.com.
Step 1: Gather Materials
Here are all the supplies you'll need to create this project:
- Parallax ActivityBot
Step 2: Build the Robot
Follow the full online instructions for assembling the Parallax ActivityBot:
- Hardware Check
- Prepare External Encoders
- Prepare Tires
- Prepare Chassis
- Prepare Servos
- Mount Right Servo
- Mount Left Servo
- Mount Right Encoder
- Mount Left Encoder
- Mount Battery Pack
- Mount Tail Wheel
- Mount Drive Wheels
- Mount the Activity Board
- Electrical Connections
- Software and Programming Check
- Make a Beep
- 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.
Step 3: 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.
Step 4: Configure the XBee Cellular
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.
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.
Install and launch the XCTU program. It will automatically update its firmware library to the latest version. In the XCTU program:
- Add a device, using the factory default settings (9600, 8 N 1) for XBee radios:
- 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
- Update your XBee3 Cellular module to the latest firmware. Note: This is recommended even if your module is newly purchased.
- Select the device from the Radio Modules list by clicking on it. XCTU will display the current firmware settings for that device.
- 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 send texts to.
- Check the TD parameter. It should be set to 0 because the text delimiter won't be used in this project.
- Be sure to write the settings to the XBee using the button with the pencil icon.
Install the XBee into the robot
- 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.
- Be sure you still have the nano-SIM card inserted into your XBee Cellular
- 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.
- 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.
- 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.
Step 5: Program the Robot
Load the XBee3 Cellular ActivityBot code
- Connect the robot to your computer using its USB cable
- 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.
- Open blocky.parallax.com and register a new account
- Download the BlocklyProp Client for your computer and install it. This client program must be running on your computer to use BlocklyProp Online.
- Press its Connect button in BlocklyProp Client to allow local IP access.
- Load the Whiskers SMS code in your browser.
- Use the green button with the downward arrow to load and run the firmware using the robot's EEPROM over USB
- 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!
Step 6: Test the Robot
- Set the power switch to the "0" position
- Install the five AA batteries in the bottom of the robot.
- Disconnect the USB cable so that the robot can roam freely.
- Set the power switch to the "1" position to power the board and XBee3 Cellular.
- Wait for the blue ASSOC light to blink, indicating a connection to the cellular network:
- Set the power switch to the "2" position, and press the RST button above it.
- Check your mobile phone for a text message: "Robot 1.2 ready..."
Got the message? Great! Otherwise, here are some things to check:
- 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
Step 7: 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!
CLHazlett made it!