Download presentation

Presentation is loading. Please wait.

Published byJan Branscomb Modified over 2 years ago

1
**Science and Engineering Festival Some Robotic STEM Ideas**

Craig Shelden

2
**Robot Connections with STEM**

Combines disciplines Engineering Math Technology Scientific Method Makes abstract ideas real.

3
**Thoughts on Programming**

Clear Problem Statement Pseudocode Draw out what’s being attempted Words First. Program – Test – Program – Test ---> Repeat Value of default settings… ? Make things easier to program… Make students think through every block they program Approaches vary with goals and Team choices

4
WeDo Programming

5
**Sailor Max Basic boat movement Basic boat movement with sound effects**

basic_boat.wedo boat_sounds.wedo

6
**WeDo – Complex Capability with Sailor Max**

Motion and sound with tilt sensor Motion and sound with tilt triggered by proximity sensor storm.wedo

7
**WeDo – NXT-G Connection**

Similar: Syntax Coloring Left – to – right program flow

8
**NXT-G Simple Area Measurement**

Given a circle… How to measure its area using a robot? Circumference = 2πr Area = π r2 r Pause Here…

9
**NXT-G Simple Area Measurement**

Given a circle… How to measure its area using a robot? Circumference = 2πr Area = π r2 One approach might be to: measure all the way around the circle calculate the radius calculate the area Area = C2/(4 π) r

10
**One Circle Measuring Solution**

11
**NXT-G Simple Area Measurement**

Given a circle… How to measure its area using a robot? Other ways…. Circumference = 2πr Area = π r2 r Are there other ways?

12
**NXT-G Simple Area Measurement**

Given a circle… How to measure its area using a robot? Other ways…. Circumference = 2πr Area = π r2 Cross on a diameter and determine measurement…. r

13
**NXT-G Complex Robotic Behavior - Sumo**

14
**Consider This Program Architecture**

Define Variables Monitor Sensor # 1 Variable # 1 Monitor Sensor # 2 Variable # 2 … Act Act (Values) Act Record desired data See one of the sumo programs

15
**Subsumptive Programming Architecture**

See one of the sumo programs Source: Brooks: A Robust Layered Control System for a Mobile Robot

16
**NXT-G – Data Collection and Analysis Area Measurement**

17
**NXT-G – Data Collection and Analysis Area Measurement**

How to measure the perimeter and area of an arbitrary closed shape? Pause Here…

18
**NXT-G – Data Collection and Analysis Area Measurement**

How to measure the perimeter and area of an arbitrary closed shape? Consider Descartes’ method: INSTRUCTIONS Beginning with any vertex, list the coordinates of the vertices in order, moving counter-clockwise around the polygon. List the first pair again at the end. Find the diagonal products from left to right. Find the diagonal products from right to left. Sum each column of products. Find their difference and divide by 2. This is the polygon’s area. Could we do this by driving a robot around the shape? From Area the Easy Way

19
**NXT-G – Data Collection and Analysis Area Measurement**

X new = X old + ΔX Y new = Y old + ΔY Need to generate (x, y) pairs as the robot follows the line around… But unlike the plotted curve, the robot does not know what the next pair will be. Need to find a way to remember the last point and calculate the next one. Just a little trigonometry… and a compass. (X old, Y old) North Distance (X new, Y new) Heading ΔX ΔY ΔX = Dist *Sine (Hdg) ΔY = Dist *Cosine (Hdg) Inspired by Area the Easy Way

20
**NXT-G – Data Collection and Analysis Area Measurement**

X new = X old + ΔX Y new = Y old + ΔY Need to generate (x, y) pairs as the robot follows the line around… But unlike the plotted curve, the robot does not know what the next pair will be. Need to find a way to remember the last point and calculate the next one. Just a little trigonometry… and a compass. Distance (X old, Y old) North Heading ΔX ΔY (X new, Y new) ΔX = Dist *Sine (Hdg) ΔY = Dist *Cosine (Hdg) Sine and cosine provide positive and negative factors that scale the sides of the right triangle. Inspired by Area the Easy Way

21
**NXT-G – Data Collection and Analysis Area Measurement**

Show development of the path as the robot follows along the orange curve. X new = X old + ΔX Y new = Y old + ΔY ΔX = Dist *Sine (Hdg) ΔY = Dist *Cosine (Hdg) Sine and cosine provide positive and negative factors that scale the sides of the right triangle. Inspired by Area the Easy Way

22
**NXT-G – Data Collection and Analysis Area Measurement**

Show development of the path as the robot follows along the orange curve. X new = X old + ΔX Y new = Y old + ΔY ΔX = Dist *Sine (Hdg) ΔY = Dist *Cosine (Hdg) ΔY ΔX Sine and cosine provide positive and negative factors that scale the sides of the right triangle. Inspired by Area the Easy Way

23
**NXT-G – Data Collection and Analysis Area Measurement**

Example path showing generated (x, y) pairs as the robot follows the line around. X new = X old + ΔX Y new = Y old + ΔY North ΔX = Dist *Sine (Hdg) ΔY = Dist *Cosine (Hdg) (X2, Y2) (X1, Y1) ΔY (X0, Y0) ΔX Sine and cosine provide positive and negative factors that scale the sides of the right triangle. Inspired by Area the Easy Way

24
**NXT-G – Data Collection and Analysis Area Measurement**

Example path showing generated (x, y) pairs as the robot follows the line around. X new = X old + ΔX Y new = Y old + ΔY North ΔX = Dist *Sine (Hdg) ΔY = Dist *Cosine (Hdg) (X2, Y2) (X5, Y5) (X1, Y1) ΔY (X3, Y3) (X4, Y4) (X0, Y0) ΔX Sine and cosine provide positive and negative factors that scale the sides of the right triangle. Inspired by Area the Easy Way

25
**NXT-G – Data Collection and Analysis Area Measurement – two plots**

(X old, Y old) North Distance (X new, Y new) Heading ΔX ΔY X new = X old + ΔX Y new = Y old + ΔY ΔX = Dist *Sine (Hdg) ΔY = Dist *Cosine (Hdg) Rectangle with Distance = 1 inch Circle with Distance = 1 inch Inspired by Area the Easy Way

26
**NXT-G – Data Collection and Analysis Area Measurement – two plots**

Rectangle with Distance = 1 inch Circle with Distance = 1 inch Red arrows indicate error accumulated through each run. Inspired by Area the Easy Way

27
**Mapping with More Sensors**

28
**Mapping with More Sensors**

29
**NXT-G – Data Collection and Analysis Pendulum Motion**

30
Data Logging See Pendulum Program pendulum.rbtx

31
Application Measuring period of a pendulum common exercise for students Period = 2π √(L/g) Exercise taken from Physics with Robotics by William Church, Tony Ford, and Natasha Perova. Section 4.6 Swinging with Gravity 12 ½ inches 84 ½ inches

32
**Pendulum Data 84 ½ inches Ultrasonic sensor**

Exercise taken from Physics with Robotics by William Church, Tony Ford, and Natasha Perova. Section 4.6 Swinging with Gravity

33
**Pendulum Data 84 ½ inches Ultrasonic sensor**

Exercise taken from Physics with Robotics by William Church, Tony Ford, and Natasha Perova. Section 4.6 Swinging with Gravity

34
**Pendulum Data 84 ½ inches Light sensor**

Exercise taken from Physics with Robotics by William Church, Tony Ford, and Natasha Perova. Section 4.6 Swinging with Gravity

35
**Pendulum Data 84 ½ inches Light sensor**

Exercise taken from Physics with Robotics by William Church, Tony Ford, and Natasha Perova. Section 4.6 Swinging with Gravity Light sensor

36
**Pendulum Data 84 ½ inches Acceleration sensor**

Exercise taken from Physics with Robotics by William Church, Tony Ford, and Natasha Perova. Section 4.6 Swinging with Gravity The Acceleration sensor block measures the three axes of acceleration, x, y and z. It returns the readings as signed values ranging from -400 to +400 thus the scale factor is approximately 200 counts per g, so the sensor can measure +/- 2g. Using data wires, it can send out the x, y and z values and a logic signal (true/false) based on whether the x value is above or below a trigger value.

37
**Pendulum Data 84 ½ inches Acceleration sensor**

Exercise taken from Physics with Robotics by William Church, Tony Ford, and Natasha Perova. Section 4.6 Swinging with Gravity The Acceleration sensor block measures the three axes of acceleration, x, y and z. It returns the readings as signed values ranging from -400 to +400 thus the scale factor is approximately 200 counts per g, so the sensor can measure +/- 2g. Using data wires, it can send out the x, y and z values and a logic signal (true/false) based on whether the x value is above or below a trigger value.

38
**Pendulum Relationships**

Exercise taken from Physics with Robotics by William Church, Tony Ford, and Natasha Perova. Section 4.6 Swinging with Gravity The Acceleration sensor block measures the three axes of acceleration, x, y and z. It returns the readings as signed values ranging from -400 to +400 thus the scale factor is approximately 200 counts per g, so the sensor can measure +/- 2g. Using data wires, it can send out the x, y and z values and a logic signal (true/false) based on whether the x value is above or below a trigger value.

39
**Pendulum Relationships**

Maximum Light Maximum Negative Acceleration Minimum Ultrasonic Range Exercise taken from Physics with Robotics by William Church, Tony Ford, and Natasha Perova. Section 4.6 Swinging with Gravity The Acceleration sensor block measures the three axes of acceleration, x, y and z. It returns the readings as signed values ranging from -400 to +400 thus the scale factor is approximately 200 counts per g, so the sensor can measure +/- 2g. Using data wires, it can send out the x, y and z values and a logic signal (true/false) based on whether the x value is above or below a trigger value.

40
**Math Excursion See Pendulum Program pendulum.rbtx Lower the sample**

Frequency to Something near the Pendulum period. See Pendulum Program pendulum.rbtx

41
Simple Data Logging See Pendulum Program pendulum.rbtx

42
**Not So Automatic Data Logging**

Limitations on data logging… No way to automatically log variable values Not all sensor vendors supply data logging capabilities Log only four sensors Use Variables See Heading Log Program heading_log.rbtx See Data Collecting MyBlocks data_logging_myblocks.rbtx

43
**Variables Much of the programming power comes from the ability to**

read values store values, change values, and act based on values. Three types: Number – How much? Text – Say What? Logical – True or False?

44
**Consider This Program Architecture**

Define Variables Monitor Sensor # 1 Variable # 1 Monitor Sensor # 2 Variable # 2 … Act Act (Values) Act Record desired data

45
**Two myBlocks for Data Logging**

Technique to log data described in Terry Griffin’s book The Art of LEGO MINDSTORMS NXT-G Programming

46
Data File Header

47
Data Consolidation

48
**Sample Data Logging Program**

Bang_Bang_multilogger_display.rbtx See: \data\line_data folder

49
**Not So Automatic Data Logging**

Technique to log data described in Terry Griffin’s book The Art of LEGO MINDSTORMS NXT-G Programming

50
**Thoughts on Programming**

Clear Problem Statement Pseudocode Draw out what’s being attempted Words First. Program – Test – Program – Test ---> Repeat Value of default settings… ? Make things easier to program… Make students think through every block they program Approaches vary with goals and Team choices

51
**Robot Connections with STEM**

Combines disciplines Engineering Math Technology Scientific Method Makes abstract ideas real.

52
**Some Robotic STEM Ideas**

Science and Engineering Festival Some Robotic STEM Ideas Craig Shelden

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google