Download presentation
Presentation is loading. Please wait.
Published byRobert Hancock Modified over 9 years ago
1
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 1 BEST Robotics Advanced Instruction Node Basic BRAIN Training Using Your BRAIN (For Beginners)
2
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 2 Content of this Basic Class Section 1: Hardware Overview Section 2: The Programming Environment Section 3: Programming Using the BRAIN Wizard Section 4: BRAIN Debug & Support
3
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 3 BEST Robotics Advanced Instruction Node Basic BRAIN Training Section 1 - Hardware Overview
4
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 4 BRAIN Overview Electronics covered (Do NOT DISASSEMBLE!) Replaceable connectors Dual 16-bit microcontroller architecture (TI MSP430) Easy program download via USB interface
5
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 5 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
6
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 6 Components Replaced Tether box too!
7
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 7 BRAIN Hardware Connections G = Ground for digital input and battery power B = Battery power (passed through fuse)
8
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 8 Example Hookup Receiver Box Servos DC Motors Battery
9
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 9 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 1Servo 1Motor 1Digital 1Digital 2 Channel 2Servo 2Motor 2Digital 3Digital 4 Channel 3Servo 3, 5Motor 3Digital 5Digital 6 Channel 4Servo 4, 6Motor 4Digital 7Digital 8
10
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 10 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.
11
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 11 BEST Robotics Advanced Instruction Node Basic BRAIN Training Section 2 - Programming Environment
12
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 12 What You Need… Minimum System Requirements 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 http://www.besting.org, 2008 Official Documents http://www.besting.org BRAIN installer auto-runs from CD
13
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 13 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 2008.
14
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 14 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.
15
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 15 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
16
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 16 Typical Directory Structure after BRAIN SW Installation * * * Same Dir Location *
17
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 17 IAR Workbench Setup Initial BRAIN Support Installer dialog box
18
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 18 Dialog box - USB driver Install.
19
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 19 Initial IAR setup dialog box Sometimes this dialog will be hidden by other windows and the installer will appear to hang
20
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 20 Verifying Your Installation Verify BRAIN Tools are setup correctly in IAR Workbench Verify Microsoft serial mouse to avoid conflicts with BRAIN USB
21
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 21 IAR Configure Tools Menus Note: Insure that you configure the BRAIN tools as shown in these drop-down menus.
22
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 22 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: 1.Right click on My Computer. 2.Select Properties. 3.Select the Hardware Tab. 4.Select Device Manager. 5.Click on the + sign next to Mouse and other pointing devices. 6.Click on "Microsoft Serial Mouse". 7.Press the Delete key. 8.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.
23
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 23 BEST Robotics Advanced Instruction Node Basic BRAIN Training Section 3 - Programming Using The BRAIN Wizard
24
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 24 Programming (step-by-step) 1.Generate a wizardgen.h file using the Wizard; save the file into the wizard project directory. 2.Compile and link the code using IAR Workbench. 3.Download the program to the BRAIN (from within the IAR Workbench) Refer to BRAIN Software GMKE00005 Revision 0; October 2007 for specific details
25
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 25 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.
26
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 26 Software Build Overview
27
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 27 Software Build Overview YOU ARE HERE!
28
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 28 Starting the Wizard From within IAR Workbench
29
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 29 Step 1. BRAIN Wizard
30
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 30 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.
31
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 31 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.
32
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 32 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.
33
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 33 Illustration of Threshold (only applies to reversing switch output) Note: Stick values do not have to be symmetric Negative full speed Positive full speed When the stick position is between threshold values (vertical lines) the motor is off.
34
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 34 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.
35
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 35 Illustration of Gain This is only an example. A gain greater than one may be required to get full motor output.
36
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 36 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 options
37
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 37 Programming (step-by-step) 1.Generate a wizardgen.h file using the Wizard; save the file into the wizard project directory. 2.Compile and link the code using IAR Workbench. 3.Download the program to the BRAIN (from within the IAR Workbench) Refer to BRAIN Software GMKE00005 for specific details
38
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 38 Step 2. Compile & Link YOU ARE HERE!
39
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 39 Step 2. Compile & Link Use “Rebuild All”
40
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 40 Step 2. Compile & Link Results Rebuilding configuration: wizard - Debug Updating build tree... 4 file(s) deleted. Updating build tree... wizardmain.c Linking Total number of errors: 0 Total number of warnings: 0 Message Window Output
41
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 41 Programming (step-by-step) 1.Generate a wizardgen.h file using the Wizard; save the file into the wizard project directory. 2.Compile and link the code using IAR Workbench. 3.Download the program to the BRAIN (from within the IAR Workbench) Refer to BRAIN Software GMKE00005 for specific details
42
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 42 Step 3. Boot Load via USB YOU ARE HERE!
43
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 43 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
44
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 44 Boot Load Menu Note: if you experience a failure here – “Inability to connect” See the chart regarding MS Serial Mouse errors
45
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 45 Step 3. Boot Load Results MSP430 Bootstrap Loader - FTDI USB Interface (Version 1.02) Mass Erase... Additional mass erase cycles... Transmit standard password... BSL version: 1.10 - Family member: F149 - Process: 0043 Patch for flash programming required! Load PC with 0x0C22... Transmit standard password... 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 2177 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 Message Window Output
46
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 46 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.
47
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 47 BEST Robotics Advanced Instruction Node Basic BRAIN Training Section 4 - BRAIN Debug & Support
48
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 48 Basic Debug 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 receiver connecter (BatOK). LED OFF indicates battery needs charging. Internal fuse/breaker, self-resets with a few seconds. 5vok LED OFF by receiver indicates there is a short (5V) Find and fix the short.
49
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 49 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.
50
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 50 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?
51
May 2, 2008 Copyright © 2008 BEST Robotics, Inc. All rights reserved. 51 Online Documentation Online Documentation Public Information http://www.bestinc.org http://www.bestinc.org 2008 Official Documents Link BRAIN Description & Rules BRAIN Quickstart Docs Hardware Software 2008 BRAIN Tutorials BRAIN Software API Software Download Package
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.