Robotic Platform 1kg / 2008 (Spring)
User’s Guide

User’s Guide

Project Title:Robotic Platform for 1kg Loads (RP1)

Project Team:P09204

Project Revision:2

Document Revision:1.5

Change Log

Revision Number / Date of Change / Description of Change / Author (s)
0.1 / 3 Mar 2009 / Document creation / Ryan Schmitt
1.0 / 1 May 2009 / Sections 1 &2 / Ryan Schmitt
1.1 / 5 May 2009 / Sections 3, 4, & 5 / Ryan Schmitt
1.2 / 11 May 2009 / Section updates / Ryan Schmitt
1.3 / 12 May 2009 / Added interconnect diagram & GUI screen capture / Ryan Schmitt
1.4 / 14 May 2009 / Added remaining information, polished up discussion, approved for Release 1 / Jason Jack
1.5 / 14 May 2009 / Added Arduino Nano pinout connections / Ryan Schmitt

Table of Contents

1 Hardware Connections......

1.1Internal Boards and Microcontroller Connections......

1.2External Connections......

2 Programming the Microcontroller......

3 GUI Controls......

3.1 Configuration......

3.2 Movement Control......

4 Wireless Communication......

5 Power-On Switch/Emergency Stop......

1 Hardware Connections

1.1Internal Boards and Microcontroller Connections

All the internal connections are shown in the diagram(s) located here: Diagram.bmp

There are six main boards internal to the chassis: two power distribution boards, the BDMicro ATmega128 microcontroller, the Arduino Nano PID controller, and two DC motor driver boards. For the purpose of this project the DC motor driver boards are internal to the chassis, but ideally they should be located external to the control system chassis. The internal cables are labeled and connectors are keyed making for easy connections if the user follows the internal interconnect diagram.

Cables are labeled on a per connector or per conductor basis, but for detailed descriptions of each cable please refer to the Internal Cabling section of the Hardware Control Document (HCD) at:

1.2External Connections

The chassis contains twelve external connections.

(1)12V/9V PWR-In: The motor and logic batteries connect here.

(2)& (3)RS232-1 & RS232-2: These two connections are RS232 serial connections that are used for wired, tethered, and wireless communication.

(4)Programming Connector: A DB-25 parallel cable connects here and goes to a parallel port on a computer forin-circuit programming of the microcontroller.

(5)(6)DC Motor-1 & DC-Motor-2: The robot currently supports up to two dc motors. These two connections are for the DC Motor Driver circuitry to connect to the motor modules.

(7) & (8)Servo-1 & Servo-2: The robot currently supports up to two Servomotors. These two connections each connect directly to a servomotor.

(9)(10)Encoder-1 & Encoder-2: These two connections are used for encoder feedback and connect to each DC motor module’s encoder.

(11)(12)TWI-1 & TWI-2: These two connections are currently not used in this revision of the project but are implemented for future use of sensors.

1.3Microcontroller & PID controller Pin out

The pin outs for the BDMicro are as follows

BDMicro Pin Destination Function

------

Port D_0 PID controller A4 TWI SDA

Port D_1 PID controller A5 TWI SCL

Port C_0 DC driver 1 Enable-1

Port C_1 DC driver 2 Enable-2

The following chart shows the connections to the Arduino Nano PID controller from the microcontroller and the motors. These connections directly control the motors for steering and drive and receive encoder feedback. The Arduino pins on the chart correspond to the same named pins in the figure.

Arduino Pin uC Pin Function

------

A4 ADC4, Pin 27 TWI SDA

A5 ADC5, Pin 28 TWI SCL

D2 ADC2, Pin 25 Motor A Encoder A

D3 ADC3, Pin 26 Motor B Encoder A

D4 PD2, Pin 32 Motor A Encoder B

D5 PD3, Pin 1 Motor B Encoder B

D6 ADC0, Pin 23 Motor A PWM

D7 PD4, Pin 2 Motor A FWD/~REV

D8 PD5, Pin 9 Motor B FWD/~REV

D9 ADC6, Pin 19 Servo A

D10 ADC7, Pin 22 Servo B

D11 ADC1, Pin 24 Motor B PWM

2 Programming the Microcontroller

The latest software builds are located at Save the files as .zip and then extract the files to their appropriate folders

Client User Interface is the Graphical User Interface (GUI) the user uses to control the movement of the robot at a computer. Operational Software is the software that is programmed on the microcontroller. The PID Software is the software that is programmed to the Arduino Nano PID controller boards.

To program the microcontroller, make sure a DB25 parallel cable is plugged into the PC and to the programming connection on the chassis. Power off the system and once fully powered down with the programming cable still plugged in, restore power. Within cygwin, navigate to the build directory. Type ‘make flash’ to start the microcontroller programming sequence. Allow the programmer to fully finish and verify the flash file before removing the programming cable. For more information on cygwin and microcontroller programming, view the section 2.2.5 on “Programming the BDMicro MAVRICIIB ATmega128” in the Software Control Document (SCD):

3 GUI Controls

After downloading and extracting the client user interface files, navigate to the ‘rpgui’ folder. To run the GUI in windows, double click the ‘rungui-windows.bat’ file. To run the GUI in Linux, open a shell prompt, navigate to the directory the software build is located in, run the command ‘.\rungui-linux.sh’. For detailed information on how to run the GUI please view the section 2.3.6 “Usage Instructions” in the SCD:

For detailed information on how to control the GUI please view section 2.3.7 “Graphical User Interface Walkthrough” in the SCD. For convenience the GUI configuration and control is specified below.

3.1 Configuration

Under the Edit menu, click configuration. This is where the user can configure the terminal connection parameters and configure the RP system, motor modules, and motor groups.

Under the serial communication tab, the user can configure the COM port, baud rate, data bits, parity, stop bits, and flow control. The default values are 38400 baud, 8N1, and “No Flow Control” respectively. Other ASCII parameters can be configured here as well.

Under the RP System tab, the platform ID can be set here or received from the RP unit. The system version identifier can be read from the platform, verify that it matches the Control Protocol Version listed in the About dialog of the GUI (Click Help->About in the main window).

The RP Motor Modules tab is the place where each motor module connected to the platform can be configured for each specific use. For more information on what each value controls, see section 2.3.7.5 “Configuration Window” of the SCD.

3.2 Movement Control

The GUI has four arrows: forward, reverse, left, right, indicating the direction to move the robot. These four arrows are controlled by clicking the button or for faster use by the keyboard keys ‘w’, ‘s’, ‘a’, ‘d’ respectively. The GUI also has a stop button, which stops the robot and is controlled by the ‘x’ key. There is also a checkbox on the left side of the GUI named “Stop Moving on Button Release”. Having this box checked designates the robot will move in continuous motion and having the checkbox unchecked will move the robot in discrete motion. In continuous motion, the robot can move in two directions at the same time including forward and left, forward and right, reverse and left, or reverse and right. While in discrete motion, the robot’s speed can be more accurately set and the direction turn can be accurately set as well. Additionally, the user does not need to hold the key or button press in order to sustain motion. Hitting ‘x’ will stop all motors and hitting ‘c’ will return the motor modules back to center.

4 Wireless Communication

The two IOGear Bluetooth Serial Adapters have already been paired, but if re-pairing is necessary, follow the pairing instructions in the “IOGear Bluetooth Serial Adapter Installation Guide”. If the guide is missing, these instructions are repeated in the Interface Control Document (ICD) located here: The two adapters have been set to a baud rate of 38400 via dip switches 1, 2 & 3.Switch 4 designates the adapter as master or slave (high or low respectively). The master is connected to the serial cable on the robot and does not need to be powered via the 5V AC to DC wall connector because it receives power from pin 9 of the serial cable. The slave adapter is connected to the serial port of a computer using the null modem adapter and this Bluetooth adapter does need to be powered by the power adapter.

Once the two Bluetooth serial adapters have been powered on, the blue LEDs will blink on them indicating they are connecting to each other. Once the LEDs have stopped blinking (approximately 1 minute or less), they have connected and are ready for use.

5 Power-On Switch/Emergency Stop

The robot has a red switch attached to the side of the chassis. When the switch is turned on, power from the 12V battery and the 9V battery is sent to the power distribution boards, which powers on the robot. The switch is also used in case the robot loses communication with the GUI as an emergency off switch.

1 of 1