Download presentation
Presentation is loading. Please wait.
1
Teacher-Mentor Workshop
Using Your BRAIN (For Beginners) Teacher-Mentor Workshop July 18-19, 2008 Auburn University
2
Introduction New programmable robot controller (BRAIN)
100% roll-out to all hubs in 2008 Current Cost: $100 per BRAIN (includes cables, software, etc) Expected delivery in July time-frame. Existing tether boxes can be used. 2007 BRAINS can be used. Functionally equivalent to 2008 BRAINS Improvements Low Battery voltage impact enhancement Tether noise suppression Additional LED indicators installed
3
Who should take this Class?
Hub Directors, Mentors and Teachers who will “Train the Trainers” in their respective Hubs. Should be limited to the individuals from those Hubs who have not had experience with the BRAIN or DSP controllers. Programming instruction will be limited to the BRAIN Wizard
4
Objectives of this Class
Train team personnel how to: Setup their computers Program their BRAINs using the BRAIN Wizard Design a robot control system using the BRAIN Identify support material to be available to the Hubs and to the Teams and where the current version may be located.
5
Content of this Basic Class
Section 1: Hardware Overview Section 2: The Programming Environment Section 3: Programming Using the BRAIN Wizard Section 4: Hub Specific Information Section 5: Training Your Teams Section 6: BRAIN Support & Feedback Section 7: Wizard Programming Demonstration
6
Section 1 - Hardware Overview
BEST Robotics Advanced Instruction Node Basic BRAIN Training Section 1 - Hardware Overview
7
BRAIN Overview Dual 16-bit microcontroller architecture (TI MSP430)
Easy program download via USB interface Electronics protected by removable cover Replaceable connectors
8
BRAIN Features Interface with standard Futaba radio
PWM input from receiver Dedicated “trainer” cable interface for tethered operation 4 proportional motor control outputs 6 servo motor outputs 8 discrete digital inputs USB port for program download Onboard power switch and replaceable fuse Powered by a single 7.2 volt RC hobby battery
9
Components Replaced
10
BRAIN Hardware Connections
G = Ground for digital input and battery power B = Battery power (passed through fuse)
11
Example Hookup Receiver Box Servos DC Motors Battery
12
Out of the Box Configuration
All channels active as both servo output and proportional speed control motor output. Motor Limits Transmitter Channel Servo Output Motor Output Positive Direction Negative Direction Channel 1 Servo 1 Motor 1 Digital 1 Digital 2 Channel 2 Servo 2 Motor 2 Digital 3 Digital 4 Channel 3 Servo 3, 5 Motor 3 Digital 5 Digital 6 Channel 4 Servo 4, 6 Motor 4 Digital 7 Digital 8
13
Out of the Box Configuration
Allows a team to hook up the BRAIN any way they wish and have it work without ever having to program the BRAIN. Referred to as the “default” project – described later. This is NOT the only configuration for the BRAIN! Good for initial checkout, but we want teams to load a unique configuration.
14
BEST Robotics Advanced Instruction Node Basic BRAIN Training
Section 2 - Programming Environment
15
What You Need… Minimum System Requirements Software & Installation
PC only, Mac not supported by BEST 1 USB port available for BRAIN programming Windows NT, XP, VISTA Software & Installation Software provided on CD or via download from Official Documents BRAIN installer auto-runs from CD
16
What is on the BRAIN CD? FTDI Driver: to access BRAIN via USB
IAR Embedded Workbench – Kickstart C programming environment BRAIN Tools Utility functions for downloading to BRAIN Provides the hardware interface library Projects and source code to use with Wizard BEST Wizard Integrated tool to generate BRAIN program Modified to remove rule-imposed limits for
17
IAR Software Installation
The BRAIN Support installer performs multiple functions on the target system (PC) to provide all the software support needed to use the BRAIN hardware. The installer loads to your PC: 1. Sample software projects 2. A BRAIN software library 3. A utility to download code to the BRAIN (BSLUSB) 4. A Wizard program 5. USB drivers for communication with the BRAIN (FTDI’s CDM driver) 6. IAR Workbench, Kickstart edition Because the BRAIN installer includes a driver for the USB interface, you must install the software prior to connecting the BRAIN hardware to a USB port.
18
Key Software Locations
Start Program Menu item is added for IAR Embedded Workbench (under the IAR Systems Group) Within IAR Workbench, under the “Tools” menu BRAIN Wizard Boot Load via USB IAR Workbench Projects are added under “My Documents\Best\Brain Projects” Wizard Project – for use with Wizard Default Project – runs all motors, all servos
19
Typical Directory Structure after BRAIN SW Installation
20
Initial BRAIN Support Installer dialog box
IAR Workbench Setup Initial BRAIN Support Installer dialog box
21
Dialog box - USB driver Install.
22
Initial IAR setup dialog box
Sometimes this dialog will be hidden by other windows and the installer will appear to hang
23
Verifying Your Installation
Verify BRAIN Tools are setup correctly in IAR Workbench Verify Microsoft serial mouse to avoid conflicts with BRAIN USB
24
IAR Configure Tools Menus
Note: Insure that you configure the BRAIN tools as shown in these drop-down menus.
25
BRAIN Detected as Microsoft Serial Mouse
On some machines, when the BRAIN is plugged into a USB port, the system detects it as a Microsoft Serial Mouse. This condition will prevent the BSLUSB program from downloading programs to the BRAIN hardware. A “failed to enumerate port” error may appear when trying to download a program to the BRAIN. (This is also the error that will appear if the BRAIN is not plugged into the USB port when a download is attempted.) To fix the detected-as-mouse problem, on a Windows XP system: Right click on My Computer. Select Properties. Select the Hardware Tab. Select Device Manager. Click on the + sign next to Mouse and other pointing devices. Click on "Microsoft Serial Mouse". Press the Delete key. Confirm that you want to delete the mouse. Note that if the BRAIN is later plugged into a different USB port, the problem may occur again.
26
BEST Robotics Advanced Instruction Node Basic BRAIN Training
Section 3 - Programming Using The BRAIN Wizard
27
Programming (step-by-step)
Generate a wizardgen.h file using the Wizard; save the file into the wizard project directory. Compile and link the code using IAR Workbench. Download the program to the BRAIN (from within the IAR Workbench) Refer to BRAIN Software GMKE00005 Revision 0; October 2007 for specific details
28
Programming Terms Compile – changes your C program into object code that the linker understands. Link – combines your program’s object code with the BRAIN API library and other libraries to create code that is executable on the MSP430 processor. Download / Bootload – transfers the machine code version of your program from the PC to the BRAIN where it will execute.
29
Software Build Overview
30
Software Build Overview
YOU ARE HERE
31
Starting the Wizard From within IAR Workbench
32
Step 1. BRAIN Wizard
33
Wizard Output Options - 1
Speed Control Output – provides motor speed control proportional to the transmitter joystick position. Servo Output – provides servo position output proportional to the transmitter joystick position. You CAN enable “speed control output” and “servo output” on the same channel.
34
Wizard Output Options - 2
Reversing Switch Output – When the transmitter joystick exceeds a user-specified position, the motor will be run at full speed; when the transmitter joystick exceeds another user- specified position, the motor will be run at full speed in the opposite direction. Optionally, you can specify proportional servo output on this same channel. Emulates this method using kit hardware.
35
Reversing Switch Output – Threshold Option
Transmitter stick position must exceed threshold value to activate motor. Value is fraction of full stick movement, i.e., a threshold of 0.2 means the motor will activate when the transmitter stick is moved 20% of the way between the center position and full “throw”. Small difference in threshold values, provides quick response to stick motion. Large difference in threshold values, prevents accidental activation.
36
Note: Stick values do not have to be symmetric
Illustration of Threshold (only applies to reversing switch output) When the stick position is between threshold values (vertical lines) the motor is off. Positive full speed Negative full speed Note: Stick values do not have to be symmetric
37
Wizard Options – Gain (applies to both speed control & servo outputs)
Multiplier used to map transmitter stick input to motor speed output. Lower gain requires more stick input; this results in more control, but may limit maximum speed. Higher gain requires less stick input, i.e., gives a faster reaction, but there is no overall increase in maximum speed.
38
Illustration of Gain This is only an example. A gain greater than one may be required to get full motor output.
39
Wizard Options –Motor limits
Input switch closure stops motor travel in one direction. Separate inputs for positive and negative stick directions. Can be used to prevent robot mechanisms from exceeding design limits, allow motion to stop at a specific location, etc… Can be used with either Speed Control Output or Reversing Switch Output
40
Programming (step-by-step)
Generate a wizardgen.h file using the Wizard; save the file into the wizard project directory. Compile and link the code using IAR Workbench. Download the program to the BRAIN (from within the IAR Workbench) Refer to BRAIN Software GMKE00005 for specific details
41
Step 2. Compile & Link YOU ARE YOU ARE HERE!
42
Step 2. Compile & Link Use “Rebuild All”
43
Step 2. Compile & Link Results
Message Window Output Rebuilding configuration: wizard - Debug Updating build tree... 4 file(s) deleted. wizardmain.c Linking Total number of errors: 0 Total number of warnings: 0
44
Programming (step-by-step)
Generate a wizardgen.h file using the Wizard; save the file into the wizard project directory. Compile and link the code using IAR Workbench. Download the program to the BRAIN (from within the IAR Workbench) Refer to BRAIN Software GMKE00005 for specific details
45
Step 3. Boot Load via USB YOU ARE HERE!
46
Step 3. Boot Load via USB Connect the BRAIN to a USB port on your PC
It will take a few seconds for the system to detect the BRAIN Battery power is not needed
47
Boot Load Menu Note: if you experience a failure here –
“Inability to connect” See the chart regarding MS Serial Mouse errors
48
Step 3. Boot Load Results Message Window Output
MSP430 Bootstrap Loader - FTDI USB Interface (Version 1.02) Mass Erase... Additional mass erase cycles... Transmit standard password... BSL version: Family member: F149 - Process: 0043 Patch for flash programming required! Load PC with 0x0C22... Load and verify patch "C:\Program Files\Best\BRAIN\bin\PATCH.TXT"... Erase Check by file "wizard.txt"... 00 KByte 01 KByte 02 KByte Program "wizard.txt"... 00 KByte 01 KByte 02 KByte bytes programmed. Verify"wizard.txt"... 00 KByte 01 KByte 02 KByte Resetting Target Programming completed.Prog/Verify: 14.1 sec - Over all: 17.0 sec
49
Testing After Programming
Ensure your robot is ‘safe’ to operate. Connect either the Team Receiver Box, the Tether Box, or BRAIN Tether Cable. Make sure BRAIN switch is in OFF position. Turn on radio transmitter (if not using tether). Turn BRAIN switch to ON position. Test robot operations with transmitter.
50
BEST Robotics Advanced Instruction Node Basic BRAIN Training
Section 4 - Hub Specific Information
51
BRAIN Considerations for BEST Events
Kickoff (or prior): recommended 1 hour minimum for BRAIN training. Check-in/Compliance Nothing related to s/w - programming restrictions have been removed in Brain mounting by screws, no velcro mounting Generic Kit Rules - no soldering to connectors, no cutting wires, no disassembling BRAIN, etc. Game day support Hubs will provide the ability to reprogram BRAIN using Wizard. Use the available Wizard programming sheets as a guides. Hubs will have a manned BRAIN debug station as part of the kit support. Hubs will provide power for teams to facilitate BRAIN re-programming using team-owned computers.
52
Basic Support Diagnostic LEDs (D41/D42) indicate status:
D41 – Control Processor; D42 – User Processor Slow blink (once per second) – normal operation Fast blink (five times per second) – absence of tether/receiver signal, or absence of communication between processors. Solid on/off – something is hung up, cycle power first then reprogram if power cycle doesn’t solve. Low Battery LED Located near the battery connecter/ power switch. LED OFF indicates battery needs charging. Internal fuse/breaker, self-resets with a few seconds. LED OFF by receiver indicates there is a short (5V) Find and fix the short. Interference when using tether may require addition of ferrite to the cable.
53
BEST Robotics Advanced Instruction Node Basic BRAIN Training
Section 5 - Training Your Teams
54
Team Training BEST will provide a subset of these slides as a tutorial for the teams. Hands-on and examples are probably the best way to get teams up to speed on using the BRAIN. The Wizard is only a starting point; teams will gain more from the BRAIN by studying the available documentation and creating programs on their own. C programming instruction is better left to other instructors/ sources; BRI is not expected to begin teaching C programming.
55
Team Tips Tin motor wires with solder before attaching to BRAIN since frayed stranded wires can cause a short. Do NOT solder wires to BRAIN connectors! Servo wires are keyed in correct orientation; insert and remove carefully to avoid destroying connectors. Tighten screws on motor and digital input connectors so that wires are not loose and do not pull out. Lock receiver connector completely Mount BRAIN to robot using #10 (or #8) screws through holes in ears; be careful not to over tighten. Two motors can be driven from one motor output. Voltage pass through can be used for other motor drive functions. Avoid hot insertion of receiver or tether box. Insert the tether cable (RJ45) until locked; carefully remove when done and don't break the tab.
56
Testing Tips Ensure your robot is ‘safe’ to operate:
Can’t move or fall off table (use a jack-stand) All team members clear of moving parts Connect either the Team Receiver Box, the Tether Box or BRAIN Tether Cable. Make sure BRAIN switch is in OFF position. Check that BRAIN has a good fuse installed. Attach a charged battery. Turn on radio transmitter (if not using tether). Turn BRAIN switch to ON position. Test robot operations with transmitter.
57
BEST Robotics Advanced Instruction Node Basic BRAIN Training
Section 6 - BRAIN Support & Feedback
58
Where to find help? Online documentation (BRI Site)
Public Message Board (for anyone) Must register for login account Share ideas, resolve issues, … Official Q&A “BRAIN” Category Use “Official Q&A” page during contest for “rules specific” questions Is this legal?
59
Online Documentation Public Information
2008 Official Documents Link BRAIN Description & Rules BRAIN Quickstart Docs Hardware Software 2008 BRAIN Tutorial BRAIN Software API Software Download Package
60
BRAIN Feedback… Online survey to be made available For hubs or teams
Provide feedback on use or operation of BRAIN Not mandatory, a mechanism for improvements Weblink to be announced later and posted on BRI site
61
BEST Robotics Advanced Instruction Node Basic BRAIN Training
Section 7 - Programming Demonstration Using The Wizard
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.