EV3 Workshop Curriculum Developed by Joe DeRose, Ph.D.

EV3 Workshop Curriculum Developed by Joe DeRose, Ph.D.

EV3 Workshop Curriculum Developed by Joe DeRose, Ph.D. Robefest Lead Instructor 10/26/2013 Curriculum Based Off NXT Version Developed by CJ Chung, Ph.D. Professor / Robofest Founder & Director Lawrence Technological University

Lego NXT robot used OmniBot Right Motor: C Touch Sensor NXT Computer Sonar Sensor Sound Sensor

Left Motor: B Color Sensor 2 Remember the connections! Left Motor connects to B Right Motor connects to C

Color sensor connects to port no. 1 Touch sensor connects to port no. 2 Sound sensor connects to port no. 3 Sonar sensor connects to port no. 4 3 EV3 Versions Used Examples are using EV3 Version 1.0.1

NXT Firmware version: 1.31 All example programs in RoboParade.ev3 Free version from EV3 may be downloaded http://www.lego.com/en-us/mindstorms/downloads/software/ddsoftwaredownload/download-software 4 Mission 0: Go straight for 2 seconds using different power levels

LAUNCH LEGO MINDSTORMS Education EV3 5 Go forward for 2 seconds with power level 40 % EV3 offers two move blocks Move Steering Block: Controls and regulates two motors with a steering

input and single power level. (+) steering = right; (-) steering = left Move Tank Block: Controls two motors with a power level to each motor In this course we will sue the Move Steering Block. 6 Lets test it Connect the NXT to the laptop (if this is the first time, then a Found New Hardware message will appear) Click on the Download button

Its recommended to always unplug the cable from the bot before running the program Navigate through the NXTs menu: Turn On > My Files > Software Files Then select your program and run it! 7 Lets measure the distance traveled How many centimeters when 40% power used?

How many centimeters when 70% power used? How to find out the current battery voltage level? 8 NXT motors: geared motor with built-in rotation sensor Rotation sensor gives degrees turned. (It can also give rotations,

but the pop-up incorrectly displays degrees.) For example, if the value is 360, the motor turned one rotation. Mission 1: Display the degrees when the bot goes forward for 4 seconds 10 Display the degrees turned for

going forward for 4 seconds Program: DisplayDegrees 11 Review Number of rotations = degrees / 360 Circumference of a circle = diameter * 3.14 Travel distance = number of rotations *

circumference of the wheel Speed = distance / time 12 How to calculate the average speed of robot for that 4 seconds ? 1) If degrees were 1,300, then how many times the wheel was rotated? 2) If the circumference of the wheel is 17cm,

what is the travel distance for 4 sec? 3) Then what is the averaged speed of the robot for the 4 seconds? Note: RoboParade has min and max speed limits. 7 ~ 17 cm/sec 13 Mission 2: Display the speed when the bot goes forward for 4 seconds

14 distance t1 t2 HOW DO YOU CALCULATE SPEED?

v = distance / time (cm/second) 15 Example when the degrees = 1300 16 Program: DisplaySpeed 17

Exercise We can make the program shorter Instead of multiplying by 17 and then dividing by 360*4=1440, we can just multiply by 17/1440=0.0118 This uses one math block instead of two 18

NXT-G Basics SONAR (ULTRASONIC) SENSOR ENDLESS LOOP DECISION MAKING SOUND SENSOR 19 Ultrasonic Sensor Uses the same scientific principle as bats Can measure in centimeters or inches

Large objects with hard surfaces return the best readings 20 Can you tell what the following program, usTst2, is doing? 21

Mission 3: Clap -> Move (Program: clapMove1) Use a Sound Sensor connected to port no. 3 If sound level is greater than 70, go for 1 rotation Otherwise, do nothing 22 Mission 4: Line following using a Color Sensor

23 NXT Color Sensor Percent Mode: 5% = lowest dark 100% = very bright Reflected Light Mode: shines a red light The light can be turned off detecting

ambient light (surrounding light) We will use EV3 Experiments to test our color sensor 24 NXT Color Sensor Create a New Experiment 25

NXT Color Sensor Set up the experiment to plot the color sensor reading using Reflective Light Intensity Run the experiment with the light sensor over various objects Run 26

NXT Color Sensor Sample results Reflective Tape Test Mat Black Tape 27 Zigzag Line following Idea

Left side following Right side following Simple Line Following Algorithm Program: LineFlowZZ Right side or Left side following? 29

How and Where to start the robot? B C How and Where to start the robot? C

B 31 How and Where to start the robot? Lost B

C Mission 5: FOLLOW THE PARADE ROUTE AND STOP WHEN AN OBJECT IS SENSED IN FRONT 33 Parade Program

Endless loop { If sonar sensor detects an object Stop!!!!! Otherwise Follow the black line }

Program: Roboparade 35 How to connect a parallel sequence beam? Two methods Spilt sequence beam Add additional Start Blocks

Mission 6: RoboParade with Speed Display (every 2 seconds) RoboParadeSD How to improve your robot and computer program for the Parade Go to www.robofest.net Click on Tech Resources button on the left There will be a PPT with more ideas and tips for Roboparade

38 Mission 7: Smoother Line following using a Color Sensor 39 How to improve our line following

algorithm Zig-zag method can cause a bumpy response We can improve the performance by using a more sophisticated algorithm Line Mat Line

Mat Line Mat 40 3-Level Line Follower

Divide light sensor reading range into three levels Line Line + Turn Right Mat -

Straight Mat Turn left For your robot Line = _____ Line + = _____ Mat = _____

= _____ Mat - = _____ 41 Program: LineFollowThreeState Line

Line + Turn Right Mat - Straight Mat Turn Left 42

Proportional Control Line Follower Use linear relationship between the light sensor reading and steering Steering Input (y) (x1,y1) (Black Line, Steer Right) (23, 15) for my robot

y= m* x+ b (x2,y2) (Mat, Steer Left) (44,-15) for my robot

Light Sensor Reading (x) 43 Proportional Control Line Follower Find the line slope (m) 2 1 =

= 2 1 Find the y-axis intercept 1=( 1) (Point slope form) (Rearrange to y=mx+b) (Find expression for b)

44 Proportional Control Line Follower An example (x1,y1) = (23, 15) (x2,y2) = (44, -15) 2 1 15 15 =

= = = . 2 1 44 23 Find the y-axis intercept 1=( 1)

(Point slope form) (Rearrange to y=mx+b) (Find expression for b) 45 Proportional Control Line Follower An example

= + =h = 46

Creating a Custom My Block My Blocks allow you to group a number of blocks into a single block Lets create P-Control Line Following block Step 1: Select the P-Control blocks Unconnected/broken data wires will be inputs 47

Creating a Custom My Block Step 2: Open Tools -> My Block Builder GUI 48 Creating a Custom My Block Step 3: Select Icons, and set up parameters Step 4: Name the My Block as PControlLineF 49

Using A Custom My Block Once the your my block is created, it will be placed in your My Block palette Now, we can reconstruct the line following using the My Block 50 RoboParade Program Concept

To successfully complete the RoboParade, you need your robot to Line Follow Stop safely when needed Display the average speed Perform float operations with other motors This can be achieve using parallel sequence beams 51

RoboParade Program Concept Line Following With Stop Float Motor Display Robot Speed 52

Little Robots, Big Missions Questions? [email protected] 53

Recently Viewed Presentations

  • Bilingual learning: bringing in the wider world

    Bilingual learning: bringing in the wider world

    Complex classroom contexts Smithy Street Primary School, East London Year 5 class, majority second and third generation British Bangladeshi children Some children with other languages: Arabic, Urdu Dual heritage children: Arabic/Somali, Urdu/Bengali Newcomer child from Bangladesh Teaching assistants bilingual in...
  • FingerPrints - Uplift Education

    FingerPrints - Uplift Education

    Fingerprints have served as unique signatures since prehistoric times. Early potters & scribes left fingerprints in clay . Businessmen in China's T'ang dynasty (8th century AD) used fingerprints on business contracts
  • Author Study: Judy Blume - PBworks

    Author Study: Judy Blume - PBworks

    Brynn Beavers FRIT 7431 July 10, 2008 Grew up in Elizabeth, New Jersey Graduated from New York University with a B.S. in Education in 1961 Founder of the Kids Fund, a charitable and educational foundation Serves on the boards of...
  • Gas Furnace Controls - hvacr

    Gas Furnace Controls - hvacr

    In conclusion, you can determine the sequence of operation of these two systems by looking at the schematic. If the schematic shows the control module with MV, MV/PV and PV, then there will be a pilot valve and a main...
  • Toxicology course  Part 8: Toxicology of animal poisoning

    Toxicology course Part 8: Toxicology of animal poisoning

    which are used for breaking down ATP to disrupt the prey's energy fuel use. Spitting of the venom. ... with massive release of . A . Ch. especially at motor end plates causing severe muscle spasm & also, affect .
  • GHS Differences in Consumer Products and I&I Products

    GHS Differences in Consumer Products and I&I Products

    EU Regulation (EC) No 1272/2008 on Classification, Labelling and Packaging entered into force on 20 January 2009. It replaces the Dangerous Substances Directive and the Dangerous Preparations Directive. There is a transitional period 2010 -2015 during which time both classification...
  • TULUM University of CULTURE, Tourism and Leisure In

    TULUM University of CULTURE, Tourism and Leisure In

    Complements the growth of the Tourism and Leisure industry in Mexico. Provides specialist education for government officials in the tourism sector. Improves service quality, and place TULUM at the top of the Mexican marketplace, and allowing to compete effectively with...
  • Title of Presentation

    Title of Presentation

    Salting-In and Salting-Out. Some proteins cannot be dispersed in pure water but are readily dispersed in dilute salt solutions. When a salt solution increases the dispersibility of a protein, this is termed " salting-in." It occurs because charged groups on...