Designing for FLL with Lego Mindstorms Hints and Tips Presented by: Sharon Youth Robotics Association sharonrobotics.org We acknowledge the efforts and copyrights of FIRST, LEGO Education and LEGO with regards to the contents of this workshop. Without their generosity, the FIRST LEGO League would not exist!
Introduction FLL season basics LEGO Mindstorms system basics LEGO Mindstorms chassis design LEGO Mindstorms navigation issues LEGO Mindstorms manipulator design Questions & Wrap-up Coding is beyond the scope of this workshop
FLL Challenges Each fall, a new themed challenge 2017 FLL challenge : Hydro Dynamics Past challenges 2016 - Animal Allies 2014 World Class 2013 Nature s Fury 2012 Senior Solutions 2011 Food Factor 2010 Body Forward 2009 Smart Move 2008 Climate Connections 2007 Power Puzzle 2006 Nano Quest 2005 Ocean Odyssey 2004 No Limits 2003 - Mission Mars 2002 City Sights 2001 Arctic Impact 2000 Volcanic Panic 1999 First Contact
FLL Challenges Challenges include a series of robotic missions Carried out on a custom mat on top of a 4 x 8 playing table, bordered by 2"x3" board borders Read all FLL Challenge documentation thoroughly! Usually 8+ individual missions Missions goals scored by object positions at end of 2.5 minute competition round Technical presentation about the teams approach to the challenge and their robot Research Project presentation, as assigned Core Values, as presented and/or demonstrated
2016 FLL Accounting Team Registration - $225.00 for 2017 season http://www.firstinspires.org/robotics/fll/cost-andregistration Hydro Dynamics Field setup kit - $75.00 Basic LEGO Mindstorms EV3 kit - $439 Can use retail or educational kit, reuse each season Useful, not required Extra EV3 DC battery $84.95 EV3 Gyro sensor $29.95 EV3 Large Servo Motor - $26.95 EV3 Medium Servo Motor - $19.95 EV3 various duplicate sensors 23.95 and up Each tournament will have a team registration fee
LEGO Mindstorms EV3 kit The home and education versions are somewhat different Both versions include: 1 Intelligent EV3 Brick 2 large and 1 medium servo motors 7 connection cables of various lengths 500+ LEGO elements EV3 programming software 1 USB computer to EV3 Brick cable Home version includes: 1 touch, 1 color and 1 infrared sensors, plus infrared remote Education version includes: 2 touch, 1 color, 1 ultrasonic and 1 gyro sensors 1 rechargeable battery and charger Can order education version at team registration
LEGO Mindstorms NXT 2.0 kit This essential and reusable core set is the recommended package for teams who are newcomers to FIRST LEGO League. NXT/G Software 1 Intelligent NXT Brick 3 Interactive servo motors (rotation sensor built in) 2 touch, 1 sound, 1 light and 1 ultrasonic Sensors 1 USB computer to Brick cable 7 connection cables of various lengths 500+ LEGO elements Recommended additions 2 rechargeable DC batteries 1 DC battery charger
Useful Building Resources Building Robots with LEGO Mindstorms NXT David Astolfo, Mario Ferrari, Guilio Ferrari Great overall reference for LEGO robotics Winning Design! LEGO Mindstorms NXT Winning Design! Lego Mindstorms EV3 James J. Trobaugh More specific to addressing challenges https://www.firstinspires.org/robotics/fll https://techbrick.com/fll-resources/fll2017 www.sharonrobotics.org links and resources Many LEGO and FLL web resources available Use Google keyword searches
Recommended Textbooks for our teams These books have guided this presentation Winning Design! LEGO Mindstorms NXT Winning Design! Lego Mindstorms EV3 Author - James J. Trobaugh Experienced FLL coach from Georgia Book oriented to FLL activities These books are recommended solely on their merits SYRA has no financial interest.
LEGO Mindstorms components allowed LEGO electrical parts limited to : One EV3, NXT or RCX microcontroller Only 4 motors! Total quantity brought to the competition table! Cannot add in extra motors in detachable modules! We really mean it! Also, no pull-back mechanical motors Any number of LEGO-manufactured sensors Touch, light, color and ultrasonic sensors LEGO cables allowed as needed All LEGO non-electric components are allowed In any quantity BrickLink Marketplace is a source LEGO pneumatics are allowed
NXT Brick, motors & sensors NXT (NeXT) 4 Sensor inputs (plus rotation sensors on motors) 3 Motor outputs LCD and control buttons Sensors Touch Light Sound Ultrasonic Motors
EV3 Brick, motors & sensors EV3 (3 rd Evolution) 4 Sensor inputs (plus rotation sensors on motors) 4 Motor outputs LCD and control buttons Sensors Touch Color Gyroscopic Ultrasonic Motors Large & Medium
Robot systems block diagram Chassis Computer (microcontroller) Motors Power Sensors Communications and control
Robot systems EV3 Controller Sensor ports - four input ports to attach sensors - 1, 2, 3 & 4. Motor ports - 4 output ports to attach motors - A, B, C & D USB port for code loading EV3 Buttons Orange button : On/Enter /Run Light grey arrows: Used to move left & right in the NXT menu Dark grey button: Clear/Go back LEGO attachment points Loudspeaker Specifications 32-bit ARM9 microcontroller 16 Mbytes FLASH, 64 Mbytes RAM Bluetooth wireless (V2. DER) USB 2.0 port, 489 Mbits/sec Supports WiFi dongle 4 input ports, 6-wire cable digital 4 output ports, 6-wire cable digital 178 x 128 pixel LCD graphical display Micro-SD card reader (32 GB max) Power source: 6 AA batteries or LiIon
Robot systems NXT Controller Sensor ports - four input ports to attach sensors - 1, 2, 3 & 4. Motor ports - 3 output ports to attach motors - A, B & C USB port for code loading NXT Buttons Orange button : On/Enter /Run Light grey arrows: Used to move left & right in the NXT menu Dark grey button: Clear/Go back LEGO attachment points Loudspeaker Specifications 32-bit ARM7 microcontroller 256 Kbytes FLASH, 64 Kbytes RAM 8-bit AVR microcontroller 4 Kbytes FLASH, 512 Byte RAM Bluetooth wireless (Class II V2.0) USB full speed port (12 Mbit/s) 4 input ports, 6-wire cable digital 3 output ports, 6-wire cable digital 100 x 64 pixel LCD graphical display Loudspeaker - 8 khz sound quality. Power source: 6 AA batteries
Robot systems NXT motors Your robot is able to move using up to 3 servo motors. Rotation ~ 170 rpm, 20 N/cm NXT servo motors have an integrated rotation sensor Two motors can be synchronized so that your robot will move in a straight line
Robot systems EV3 motors Your robot is able to move using up to 4 servo motors. Rotation ~ Large 160 rpm, 20 N/cm; axle to either side Medium 240 rpm, 8 N/cm; axle to front EV3 servo motors have an integrated rotation sensor Two motors can be synchronized so that your robot will move in a straight line
Robot systems NXT & EV3 power Batteries are placed inside of the NXT microcontroller Flash memory programs not lost when battery removed 6 AA cells or 1 Lithium Ion rechargeable battery Two different battery packs, AC or DC charger
Robot systems NXT sensors Sensors are used to provide information about the environment to the microcontroller Light sensor used for line tracking, a color with filter Touch sensor used to sense collisions Ultrasonic sensor sense proximity (distance without touching) Color sensor sense colors, line tracking Light Touch Color Ultrasonic
Robot systems EV3 sensors EV3 sensors are similar to NXT Touch sensor used to sense contact Color sensor used to sense colors and track lines Gyroscopic sensor used to estimate robot motion Ultrasonic sensor used to sense proximity (distance without touching) Infrared sensor used for homing on beacons and remote control Touch Color Gyro Infrared Ultrasonic
Bricks & Beams Standard LEGOs bricks, hold together by friction only LEGO Technics standard beams, hold together by friction and/or pins LEGO Technics studless beams, hold together by pins
Liftarms & Pins Studless beams also come in bent shapes Some connectors are crossed for axles, others round Pins are different lengths & tightness the light grey ones will rotate in the holes
Axles & Angle Connectors Axles can be used for more than just connecting wheels. With angle connectors, light frameworks can be built
Gears & Drive Trains Gears are designated by # of teeth Motor speed starts at ~ 125 rpm Smallest (8t) & largest (40t) give a 5 to 1 ratio Gearing down (small to large) increases torque (power) and decreases speed Gearing up (large to small) decreases torque and increases speed Spur Gears 40 24 16 8
Technic Gears Spur gears 8t, 16t, 24t, 40t Crown gear Double bevel gears Single bevel gears Worm gear Clutch gear
Technic Gear trains Gear up/gear down Up for speed Down for torque Idler gears Only first and last gear affect ratios Single stage gearing Ratio between # of teeth Multi stage gearing Multiplicative 3:1 plus 3:1 becomes 9:1
Worm Gears, Bevel Gears & Pulleys Worm gear w/gear rack equivalent of 1st gear High torque Difficult to back drive! Crown & Bevel gears Use to change angle of rotation (90 ) Pulleys bridge distance Low torque capacity (bands slip)
LEGO Wheels Avoid tracks Low friction/high slippage Motion/turns not easily reproducible Large wheels go farther per revolution Friction varies with different tires Consider how well they pivot for turns, as well as straight forward motion Wheel-axle support More support less wiggle/sag Support from both sides is best
Wheel Stability 1. Not Stable 3. More Stable 2. Stable 4. Most Stable
Robot Design and Construction Planning what does the team want to achieve and how will they achieve it? Let the kids do it! Design iteration Brainstorm (what to build) Design (how to build it) Build it! Test it! Repeat until it s perfect (or good enough) Trade-offs: Good, Quick, Cheap pick two (at most)! Quality Schedule Budget
Robot Design Considerations Size navigate obstacles on board, motor power Ruggedness maintain structural integrity Center of Gravity avoid tipping with slopes, sharp turns or stops, or in collisions Chassis style 2 wheel Balancing skid is usually fine if no ramps to climb 3 wheel Caster wheel can change robot course (supermarket carts) 4 wheel Usually one pair is without tires to slide while pivoting) 6 wheel Larger than most FLL robots, consider size of the base
General Robot Chassis Design The chassis (body) of the robot is built using LEGO Technic components. It should be stable and rugged, so it does not fall apart under use. Remember after it is built, you still need to get to the battery compartment on the bottom of the microcontroller. 2011/12 Building for FLL with LEGO - Hints and Tips Workshop
General Robot Chassis Design Two basic designs (many that are more complex) Differential Drive Tank-like steering, one motor connected to each side Powerful, easy to turn in place Can be a challenge to go straight Steering Drive Car-like steering, one motor to drive a pair of wheels, another motor to steer Less power (steering motor doesn t add drive power), hard to turn in place Not often used in competition
Robot systems NXT motors Each motor has a built-in Rotation Sensor to control the robot s movements precisely. Rotations are measured in degrees or rotations [+/- one degree]. 1 rotation = 360 degrees, if you set a motor to turn 180 degrees, it will make half a turn. Slack in the internal gear-train makes precise movements difficult to reproduce exactly The built-in Rotation Sensor in each motor also lets you set different speeds for your motors [set different power parameters in software].
Robot Chassis Design Differential Drive - dual wheel pivot
Robot Chassis Design Differential Drive - single wheel pivot
Navigation Design Issues Wheelbase narrow turns easily, wide goes straighter Like fighter jets, stability is less maneuverable Weight heavy yields less tire slip Weight placement affects balance, ability to turn Wheel support flexing of axles makes erratic motion Support from both sides, if possible Batteries constant power levels are key Replacement batteries are important Match motors for performance Build jig to compare rotation speeds Works best if you have many motors to choose from
Navigation Design Issues Wall following Horizontal guide wheels, approach wall at shallow angle Line following Use the light generated by the light sensor itself For greatest accuracy, box light sensors to eliminate (as much as possible) ambient light Calibration can help to reduce the effect of changes in external lighting, but is hard to eliminate Light sensors tend to hunt pivoting on one wheel (instead of two) tends to be less jittery and make faster progress Take advantage of knowing the proper course for the mission not a general-purpose line follower
Navigation - Design Issues Uncalibrated light ranges from ~30 to ~70, 50 is a good center of the midrange Look for a range, look for < & >, not equal to a single value Single light sensor line following Following a grey value between the black line and the white border Dual light sensor line following One follows the black line, the other follows the white border Triple light sensor line following The middle one follows the black line, the outer ones follow the white borders
Navigation - Design Issues Reorientation after turns Squaring against walls can restore a known angle Push for a time, or use twin touch sensors Contact surface of robot and wall must be smooth Movement to a fixed point should be careful not to base only on rotations a timer can save the robot from never arriving at the final distance value Dual light sensors can be used to align along a line on the mat Arrival Touch sensors can detect impact Ultrasonic sensor can detect an approach without contact Successful designs tend to use a combination of movement controlled by rotations and timers and sensor-based movement
Demo robot from Winning Design book used for examples
Demo robot enhancement Adding an attachment connection Snap-on or slip-on Use long black friction pins They don t pull out easily when the attachment is removed 0
Demo robot enhancement Adding a third motor on reverse end Snap-on / snap-off Cable to motor port A 2011/12 Building for FLL with LEGO - Hints and Tips Workshop
Robot Manipulator Design - no motors Simple pusher design bulldozer Flat surface Snap-on or slide-on Move game elements independently or in a container
Robot Manipulator Design - no motors Simple plow design cowcatcher Angled surfaces Snap-on or slide-on Move game elements out of robot s path
Robot Manipulator Design motors optional Fork and Hook attachments Can be combined with power assist to lift or sweep
Robot Manipulator Design motors optional Object trap Box opens only inward Capture objects to return to base
Robot Manipulator Design - with motors Only four motors allowed in FLL Two are used for propulsion Additional motors can be attached to chassis or to attachments themselves If on the chassis, attachments would be designed to connect to the fixed motor NXT controller has only 3 motor ports, EV3 has 4
Robot Manipulator Design - with motors Carabineer arm Passive clip open/close Spring or band tensioned Principle can be used for grabbers. etc. Powered arm to raise/lower attach to motor with axle
Robot Manipulator Design - with motors Lifting hook attachment Vertical pivot from attached motor Similar design could pivot horizontally as a grabber
Robot Manipulator Design - with motors Forklift attachment Uses worm gear, resists being back-driven Gearing is often used in powered attachments Can provide extra torque or slower motion Simultaneous motion (grabber arms coming together) Can redirect angle of motion
Testing FLL Robots Test robots in mission environment Table/mat/mission objects Properly oriented and secured Time missions Speed is important, but consistency is even more critical Only 2.5 minutes total, include in-base time Modify design one change at a time Too many variables can confuse issues Don t change code before you verify battery strength Weak batteries cause performance issues 2011/12 Building for FLL with LEGO - Hints and Tips Workshop
Practicing with FLL Robots Practice in mission environment At first, just the individual mission Then, in combination with others Time in base for change-over is critical Best to practice in assigned pairs Plan for contingencies When to grab robot and try again (or move on) One of pair can follow robot down-field (quick grabs) Alternate plan in case of difficulties Murphy s Law (and its many corollaries) Whatever can go wrong will go wrong, and at the worst possible time, in the worst possible way Murphy was an optimist!
Questions & Wrap-up Resources linked at our Sharon Youth Robotics Association website Including this presentation sharonrobotics.org/resources.html