Introduction: WIFI CONTROLLED ZUMO ROBOT

Hardware Overview:

RedBearLab CC3200:

The Texas Instrument’s SimpleLink CC3200 device is a wireless MCU that integrates a high performance ARM Cortex-M4 core running up to 80MHz which allows developing an entire application with a single IC. This device includes wide variety of peripherals including a fast parallel camera interface, I2S, SD/MMC, UART, SPI, I2C and four channels ADC. The power management subsystem includes an integrated DC-DC converter supporting wide range of supply voltage with low power consumption.

Key features:
- CC3200 Dual core MCU: An ARM Cortex-M4 core at 80 MHz for application and a dedicated ARM core for Wi-Fi Network Processing

- 256KB RAM 1MB serial flash memory with file system for user. - Hardware Crypto Engine for Advanced Fast Security, Including AES, DES, 3DES, SHA2 MD5, CRC and Checksum.

- Up to 27 individually programmable, multiplexed GPIO pins, including a fast parallel camera interface, I2S, SD/MMC, UART, SPI, I2C, and four-channel ADC.

- Powerful Crypto Engine for Fast, Secure Wi-Fi and Internet Connections with 256-Bit AES Encryption for TLS and SSL connections.

- SmartConfig Technology, AP Mode and WPS2 for easy and flexible Wi-Fi provisioning

Zumo Robot v1.2:

The Zumo robot control board is a shield intended for use with a CC3200 or compatible devices as its main controller. It measures less than 10 cm on each side. It uses two 75:1 HP micro metal gear motors to drive the treads, providing plenty of torque and a top speed of approximately 2 feet per second (60 cm/s). Also, it includes a 0.036"-thick laser-cut stainless steel sumo blade mounted to the front of the chassis for pushing around objects like other robots, and a reflectance sensor array mounted along the front edge of the Zumo (behind the sumo blade) allows the Zumo to detect features on the ground in front of it, such as lines for following or edges for avoiding.

Key Features:
- Dual H-Bridge motor drivers.

- Buzzer.

- User LED and Pushbutton.

- 3-axis accelerometer, compass, and gyroscope

Step 1: Hardware Setup

Hardware Requirements:

 RedBearLab CC3200

Zumo Robot for Arduino v1.2

Two 2.54 mm male headers

Two female-female premium jumper wires

 Four AA batteries

Starting from the pre-assembled Zumo Robot for Arduino v1.2, there are just few steps to build a new Zumo CC3200:

 Solder a row of headers to the Zumo shield The Pololu Zumo Shield for Arduino User’s Guide describes, in detail, how to assemble the Zumo robot from a kit and, on page 16, how to disassemble it enough to add new components. The disassembly process is summarized and lightly annotated below.

1. Remove the tracks from the chassis and carefully slide the two drive sprockets off the motor shafts.

[The sprockets are very tightly attached to the motor shafts: the safest way to remove them is to place the sprocket in a small vice and gently tap the motor shaft with a 3/32 inch pin punch (or a small nail). In practice, it's unnecessary to completely remove the sprockets from the motor shafts; by sliding them just beyond the chassis, but still on the shaft, it's possible to separate the shield from the chassis. By not completely removing them, it'll be easier to restore the sprockets later.]

2. Remove the battery cover and batteries from the chassis.

3. Unscrew all four sets of machine screws and nuts holding the shield to the chassis.
4. Squeeze the negative battery terminal spring and gently ease both battery terminals out through the holes in the chassis. The motors will stay attached to the shield as it separates from the chassis.

5. Carefully bend both motors away from the shield to allow the front piece of the spacer plate to be removed.

[Both spacers will have to be removed to solder on new headers and, because they are almost but not perfectly bilaterally symmetric, you'll want to take careful note of their placement so that the reassembly process goes smoothly.]

6. Solder a row of headers to the Zumo shield that provide access to pins 5, 6, 9, and 10

7. You can reassemble the Zumo by following the disassembly procedure in reverse.

[Take care to replace the spacer plate pieces exactly as they were originally installed. Since they are not perfectly bilaterally symmetric, it's easy to mistakenly replace the spacers upside down. The trailing edge of rear spacer has an extra wide notch on one side to make room for the "charge connector" header next to the on/off switch. Make sure the rear spacer sits perfectly flat between the battery case and the shield.]

 Connect a jumper wire between pins 5 and 9 and another wire between pins 6 and 10.

Note: The RedBearLab CC3200 board only supports PWM output on pins 5 and 6 whereas; the Zumo shield connects pins 9 and 10 to the PWM inputs of the DRV8835 motor driver. Thus, these two jumpers are required.

 Unplug the Zumo reflectance sensor array from the front bottom of the Zumo.
Note: Never use the Zumo reflectance sensor array when the RedBearLab CC3200 is connected to the Zumo; the sensors produce 5V signals that can permanently damage the max 1.5V analog inputs of the CC3200.

 Plug the RedBearLab CC3200 on the top the Zumo shield.

Step 2: Software

Energia version17 MT: To build and run apps that execute on the RedBearLab CC3200 LP.

Note: Use only Energia Release 0101E0017.

Processing 2.2.1: To run a host-side program that controls the Zumo CC3200.
Note: Be sure to download Processing 2.x not 3.x; many of the examples use libraries that have not yet been ported to Processing 3.x.

Software Setup:

 Install Energia version17 MT, so you can create and build sketches that run on the Zumo. If you're using the Windows version of Energia, you must also,
- Install the RedBearLab USB drivers to enable Energia MT to download programs to the RedBearLab CC3200 and enable serial communications with the CC3200 via a Windows COM port.

- Install the CC3200 Drivers for Windows (see the instructions under the "CC3200 LaunchPad" section for details).  Install Processing 2.2.1, so you can easily create sketches that communicate with the Zumo via the Wi-Fi.

Troubleshooting:
If you're using Windows and Energia is unable to upload to the CC3200, make sure you've installed the CC3200 Drivers for Windows. If, after the install, Energia still can't upload then copy cc3200_drivers_win/i386/ftd2xx.dll into the folder containing Energia's upload program (cc3200load.exe): Energia_installation_folder/hardware/tools/lm4f/bin.

Step 3: Demo

After hardware assembly and installation of the software tools described above, the Zumo CC3200's basic hardware functionality can be demonstrated using a simple Energia MT sketch that communicates with a Processing sketch. Together, these sketches provide simple keyboard control of the Zumo's motors and real-time display the Zumo's accelerometer and gyro data.


Build and Upload ZumoTest Demo:

 Connect the Zumo to your PC with a USB cable.

- Switch the Zumo Bot's power switch to "off" (power will be supplied to the CC3200 via the USB connection).

- Connect the RedBearLab CC3200 USB to one of your PC's USB ports.

 Unzip the “ZumoTest” folder from the attachments, and double click the file ZumoTest/ZumoTest.ino.
Note: The first time you double click a sketch after installing Energia MT, Windows will ask you what program should open the sketch. Simply navigate to your installation of Energia MT and associate the energia.exe program with .ino files.

Within the Energia MT IDE:
- Select the RedBearLab CC3200 EMT board (via Tools > Board > RedBearLab CC3200 EMT (80MHz))

- Select the COM port that's connected to the Zumo (via Tools > Serial Port > COMx). If you're using Windows, it's the "mbed Serial Port" that appears under "Ports (COM & LPT)" in the Device Manager.
- Click the "Upload" button to build and upload the ZumoTest sketch to the CC3200.

 Reset the CC3200 by pressing and releasing the RedBearLab CC3200's reset button.
Note: sometimes Energia MT has trouble uploading sketches to the RedBearLab CC3200. In these cases, it often helps to disconnect and reconnect the USB cable, and try to uploading again.

 The ZumoTest sketch above starts its own network, named "zumo-test" with password "password", that should be discoverable by your PC. - Connect your PC to the zumo-test WiFi network

 Unzip the “Zumo Test Sketch” folder, and double click the zgraph/zgraph.pde file.

Note:The first time you double a sketch after installing Processing, Windows will ask you what program should open the sketch. Simply navigate to your installation of Processing and associate the executable processing.exe with .pde files.

Within the Processing IDE:

- Click on the Run button to start running the sketch

- Wait for the graph window to appear and type the letter 'c' to start continuous acquisition and display of accelerometer data from the Zumo
You should see three separate line plots of acceleration data, one for the x, y, and z axis. Any movement of the Zumo should be reflected in immediate changes to these plots. You can switch to displaying real-time gyro data by typing 'G' when the graph window has focus and switch back to the real-time acceleration display by typing 'A'.

You can also drive the Zumo CC3200 using the keyboard keys 'w', 'a', 's', 'd', and ' ' (space).
'w' - drive forward

'a' - turn left

's' - drive backwards

'd' - turn right

' – stop
See the zgraph/zgraph.pde file for additional keyboard commands.

Build and Upload Zumo Balancing Demo:

 Install Processing library: This demo requires ControlP5 (A GUI library for processing) and it can be downloaded from the attachments. Follow following instructions to install this library in Processing.

- Start the Processing application

- Locate your Processing sketchbook folder by selecting the File > Preferences menu item and looking for "Sketchbook location"

- Copy the ControlP5 folder into the libraries folder of your sketchbook. You'll need to create the libraries folder if this is your first contributed library installation.

 Connect the Zumo to your PC with a USB cable.

- Switch the Zumo Bot's power switch to "off" (power will be supplied to the CC3200 via the USB connection).

- Connect the RedBearLab CC3200 USB to one of your PC's USB ports.

 Unzip the “ZumoBalance” folder from the attachments, and double click the file ZumoBalancing/Balancing.ino. Within the Energia MT IDE:

- Select the RedBearLab CC3200 EMT board (via Tools > Board > RedBearLab CC3200 EMT (80MHz))

- Select the COM port that's connected to the Zumo (via Tools > Serial Port > COMx). If you're using Windows, it's the "mbed Serial Port" that appears under "Ports (COM & LPT)" in the Device Manager.
- Click the "Upload" button to build and upload the Balancing sketch to the CC3200.

 Reset the CC3200 by pressing and releasing the RedBearLab CC3200's reset button.

Note: sometimes Energia MT has trouble uploading sketches to the RedBearLab CC3200. In these cases, it often helps to disconnect and reconnect the USB cable, and try to upload it again.

 The ZumoBalancing sketch above starts its own network, named "zumo-balancing" with password "password", that should be discoverable by your PC.

1. Connect your PC to the zumo-balancing Wi-Fi network

 Unzip the “Zumo Balance Sketch” folder from the attachment, and double click the zbalacing/zbalancing.pde file.

Comments

author
Swansong (author)2017-08-25

That looks neat, thanks for sharing :)

About This Instructable

52views

0favorites

More by Sushrut Kumar Pattar:WIFI CONTROLLED ZUMO ROBOT
Add instructable to: