NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

TInkII

From Texas Instruments Wiki
Jump to: navigation, search

Welcome to TInk II[edit]

Welcome to the official page for TInk II, The TI Balancing Tank Project. TInk II is the next generation (i.e. 2014) of TInk which was a project done by the TI Santa Barbara interns in the summer of 2013.

This project's sources are currently hosted on gitorious.design.ti.com.

The TI Balancing Tank Project[edit]

Project Goal[edit]

Using a Stellaris launchpad, SensorHub booster pack, and a CC3000 wifi interface, design a robotic tank that can be remotely controlled over wifi using an HTML5-enabled browser interface. When driven into a wall, the robot will automatically detect that it has 'gone vertical' and begin balancing itself on its back wheels. Subsequent drive commands will be obeyed in this vertical position.

Hardware Overview[edit]

Tank Chassis[edit]

The tank chassis consists of three sub-components:

  1. Universal Plate Set
  2. Track & Wheel Set
  3. Twin-Motor Gearbox

All of these products are produced by Tamiya and can be purchased from their online store. Instruction on how to build the twin motor gearbox are available here.

Mount the gearbox one hole back from the rear of the tank.  Mount the front axle as forward as possible.  Mount the bottom wheels as shown in the picture below. Finally, place the treads around the wheels.

Motor Driver[edit]

This motor driver is a low voltage booster pack. The parts are TI made and grouped together by a third party. The motor driver takes two inputs for each motor that drive the tank in a certain direction. On page eight of the TI dual H-Bridge motor driver user guide there is a table of inputs that are mapped to outputs and a direction. The outputs are forward, reverse, coasting and brake.

The pins that go with one motor are PB0 and PB1 and the motor has pins PB4 and PB5 in the Stellaris launchpad. Those pins are going to be directly mapped to the same pins in the motor driver. Those pins will have to be wired to pins AIN1, AN2, BN1 and BN2 with A and B being the two different motors. The pins that say Motor_A and Motor_B are what will be connected to the two different motors using two wires for each motor. Also there need to be a wire directly connected from the battery holder to the VIN next to Motor_B.

Software Overview[edit]

Code Composer Studio[edit]

Code Composer Studio (CCS) is the microprocessing development environment produced by Texas Instruments. CCS is available freely to developers. CCS has many tools that are useful for embedded development. TInk II was made entirely with CS version 6.0. CCS is available to download here.

TI Real Time Operating System[edit]

TI-RTOS Multiple Tasks

TI Real Time Operating System (TI-RTOS) is a micro-controller real time operating system developed by Texas Instruments. There are many benefits to a real time operating system over a traditional synchronous micro-controller operating system. TI-RTOS allows more utilization of the ARM processor by running asynchronous processes in one program. In the TInk II project there are four tasks, which run at different times. These tasks are the HTTP Server task, the Websocket task, the Control task, and the Idle task. The Idle task is in every TI-RTOS application. Each task has their own time to run based on their priority. For TInk II, the Control task has the highest priority of 5. The Websocket task has a priority of 4 and the HTTP Server task has a priority of 3. The idle task is the lowest priority and runs when there is nothing else that needs to be done. TI-RTOS also supports most drivers form Stellarisware. TInk II was developed using TI-RTOS version 1.10.00.23. TI-RTOS is available here. 

HTTP Server[edit]

TInk II Web Interface

The HTTP Server serves up the HTML page to those who browse to it. The task is set to serve up to the page the one controlling Tink and no one else so that way control is not interrupted by others.

Websocket[edit]

HTTP is a very useful protocol but it is based on a request and response system. When controlling TInk II it is more useful to be able to send commands down to it in real time in order to control the tank with minimal lag. This is where WebSockets come in. WebSockets allow for bidirectional communication between a client and host.

TInk II uses a fairly simple communication protocol. Requests for data are sent down to TInk II. The tank responds with the motion and battery data as a formatted string, which the webpage receives, parses, and displays. To control the driving, a "WASD"-based command is sent to TInk II. When in mobile tilt mode, this command is accompanied by a value between 0-9 to set the appropriate motor speed. When the tank is not in tilt mode, the motors will run at approximately 90%, and it will turn in place.

HTML5 Webpage[edit]

TInk II serves up an HTML5-based webpage in order for users to drive the tank. The page is dynamic and adjusts it's size based on the screen of the device it is loaded up on and functions on most modern browsers. All of the graphics were created using HTML5 canvas elements, which allowed for light weight code that looks like a native app.

The webpage has a different appearance and functionality depending on if it is loaded on a desktop or mobile device. The desktop page displays data from the battery and the MPU and allows the user to click the WASD control keys on the screen or press the corresponding keys on the computer's keyboard to drive the tank. The mobile page displays the WASD keys and is initially loaded into tilt mode. A gauge on the right side fills as a larger speed signal is sent. A connection indicator in the top right allows the driver to see if the tank successfully connected. The bottom right corner features a button to change the page to touch mode, from which the user presses the keys to control the tank.

A separate console window can be opened from the desktop's main driving page, which will display the changes in battery data over time.

Notes [8/8/14]:

  • the magnetometer data received is not accurate enough (off by a magnitude of 2) to display compass data.
  • the "under construction" portion will ideally include a 3D graphical representation of the tank's current orientation.

FTP Server[edit]

TInk II has a minimal FTP server that may be started up and stopped at will. This FTP server interfaces with the on-board flash filesystem, and is how we transfer webpages to the TInk II. Note that, in the interest of saving system resources, it only supports one connection at a time; you may have to configure your FTP client accordingly.

UART Debug Console[edit]

TInk II has a console that can be connected to over UART, and which allows the user to interface with a number of useful utilities. Want to see the files on flash without launching an FTP session? Want to read and write arbitrary bytes to and from memory? Want to get information on network and heap usage? Want to see statistics on battery usage? Want to read and write from various pins manually? Well, then this is the UART debug console for you! Just type help at the console and it will describe all available commands.

Applications[edit]

TInk II has several applications. {{#ev:youtube|I-0c4I7Gc8I|Drive-By-Tilt|right}}

Drive[edit]

TInk, like any other tank, can be driven. But, unlike any other tank, Tink II has two different methods of control.

Drive-By-Tilt[edit]

TInk II can be controlled by tilting your smartphone or tablet with support for HTML5 canvas and websockets. There are several devices that TInk II is known to work with: iPhone/iPad/iPod Touch with iOS 4.2+ and Android devices using Firefox. The Firefox browser is available on the Google Play Store. TInk II does not function on Windows Phone 7 and has not been tested on Windows Phone 8.

Drive-By-Keyboard[edit]

TInk II can also be driven using your traditional keyboard interface. This form of control should work with any desktop or laptop with a keyboard running a modern browser that supports HTML5 canvas.

No Sensor Feedback[edit]

Currently, TInk II is driven without any sensor feedback. This means that each motor is given the same amount of power when driven straight. This may sound appropriate but due to differences in manufacturing each motor performs slightly differently. Thus, giving each motor the same power leads to a slight curve in the tank’s motion.

Semi-Autonomous With Sensor Feedback[edit]

Functionality for semi-autonomous control that corrects the motor differences through use of sensor data has been implemented. This has not been integrated into the main TInk II project at this time but will be in the future.

Balance
[edit]

Once in the vertical position, TInk II can balance itself on its hind axle. At the present time, this is a separate app from the main TInk program.

SfSoGB1gcv0|TInk Balance Progress}} CqnyA51CdHA|TInk Balancing}}


Smart Config[edit]

Smart Config is a TI provided app for configuring the CC3000 to connect to Wifi access points.  There is an included version of this that runs when button one is held down on the LaunchPad. There have been difficulties getting this to function so a separate app was created to allow for easier configuration. This app will need to be flashed onto the LaunchPad separately from TInk. The app is called EasyConfig and it is designed for use with the CC3000EM module. Once the app is loaded up, follow these instructions:

  1. Start with the Stellaris turned off.
  2. If the CC3000EM has been configured in the past continue to step 3. If this is the first time configuring the CC3000, go to step 4.
  3. Hold down switch 2 (SW2).
  4. Turn on the Stellaris. Press switch 1 (SW1).
  5. The CC3000 is now Smart Config mode (the blue LED should be blinking). There is an app available for smart phones on their respective app stores (iOS and Android) called SmartConfig.  Run this app to configure the CC3000 to an access point.
  6. The CC3000 should be configured now. TInk can now be reloaded onto the Stellaris and should function.


Current Project Status[edit]

Known Problems[edit]

CCS Project[edit]

The CCS projects for TInk will be posted to this wiki in the near future. Importing the project into CCS and loading it onto TInk hardware will give it the full functionality of the TInk bot. Projects are available for balancing and corrected driving as well as the Wifi easyconfig.

Project Hurdles[edit]

Hardware Design Notes[edit]

Application Software Notes[edit]

The TInk II Team[edit]

Evan Lew Sophie Russo
TInk.JPG

Sofie tink.JPG
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article TInkII here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article TInkII here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article TInkII here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article TInkII here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article TInkII here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article TInkII here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article TInkII here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article TInkII here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article TInkII here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity