Download presentation

Presentation is loading. Please wait.

Published byJan Branscomb Modified about 1 year ago

1
Some Robotic STEM Ideas Craig Shelden Science and Engineering Festival

2
Robot Connections with STEM Combines disciplines Engineering Math Technology Scientific Method Makes abstract ideas real.

3
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 storm.wedo Motion and sound with tilt sensor Motion and sound with tilt triggered by proximity sensor

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 = π r 2 r Pause Here…

9
NXT-G Simple Area Measurement Given a circle… How to measure its area using a robot? Circumference = 2 π r Area = π r 2 One approach might be to: measure all the way around the circle calculate the radius calculate the area Area = C 2 /(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 = π r 2 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 = π r 2 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 Record desired data … Act (Values) Act See one of the sumo programs

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

16
NXT-G – Data Collection and Analysis Area Measurement

17
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: Could we do this by driving a robot around the shape? From Area the Easy Way INSTRUCTIONS 1.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. 2.Find the diagonal products from left to right. 3.Find the diagonal products from right to left. 4.Sum each column of products. 5.Find their difference and divide by 2. This is the polygon’s area.

19
NXT-G – Data Collection and Analysis Area Measurement 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. Inspired by Area the Easy Way (X old, Y old ) North Distance (X new, Y new ) Heading ΔXΔX ΔYΔY X new = X old + ΔX Y new = Y old + ΔY ΔX = Dist *Sine (Hdg) ΔY = Dist *Cosine (Hdg)

20
NXT-G – Data Collection and Analysis Area Measurement 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. Inspired by Area the Easy Way (X new, Y new ) Distance (X old, Y old ) North Heading ΔXΔX ΔYΔY 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.

21
NXT-G – Data Collection and Analysis Area Measurement Show development of the path as the robot follows along the orange curve. Inspired by Area the Easy Way 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.

22
NXT-G – Data Collection and Analysis Area Measurement Show development of the path as the robot follows along the orange curve. Inspired by Area the Easy Way 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. ΔXΔX ΔYΔY

23
(X 1, Y 1 ) (X 0, Y 0 ) North ΔXΔX ΔYΔY (X 2, Y 2 ) NXT-G – Data Collection and Analysis Area Measurement Example path showing generated (x, y) pairs as the robot follows the line around. Inspired by Area the Easy Way 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.

24
(X 1, Y 1 ) (X 0, Y 0 ) North ΔXΔX ΔYΔY (X 2, Y 2 ) (X 3, Y 3 )(X 4, Y 4 ) (X 5, Y 5 ) NXT-G – Data Collection and Analysis Area Measurement Example path showing generated (x, y) pairs as the robot follows the line around. Inspired by Area the Easy Way 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.

25
NXT-G – Data Collection and Analysis Area Measurement – two plots Circle with Distance = 1 inch Inspired by Area the Easy Way (X old, Y old ) North Distance (X new, Y new ) Heading ΔXΔX ΔYΔY X new = X old + ΔX Y new = Y old + ΔY ΔX = Dist *Sine (Hdg) ΔY = Dist *Cosine (Hdg) Rectangle with Distance = 1 inch

26
NXT-G – Data Collection and Analysis Area Measurement – two plots Circle with Distance = 1 inch Inspired by Area the Easy Way Rectangle with Distance = 1 inch Red arrows indicate error accumulated through each run.

27
Mapping with More Sensors

28

29
NXT-G – Data Collection and Analysis Pendulum Motion

30
30 Data Logging See Pendulum Program pendulum.rbtx

31
Application Measuring period of a pendulum common exercise for students Period = 2 π √ (L/g) 84 ½ inches 12 ½ inches

32
Pendulum Data 84 ½ inches Ultrasonic sensor

33
Pendulum Data 84 ½ inches Ultrasonic sensor

34
Pendulum Data 84 ½ inches Light sensor

35
Pendulum Data 84 ½ inches Light sensor

36
Pendulum Data 84 ½ inches Acceleration sensor

37
Pendulum Data 84 ½ inches Acceleration sensor

38
Pendulum Relationships

39
Maximum Negative Acceleration Maximum Light Minimum Ultrasonic Range

40
40 Math Excursion See Pendulum Program pendulum.rbtx Lower the sample Frequency to Something near the Pendulum period.

41
41 Simple Data Logging See Pendulum Program pendulum.rbtx

42
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 Record desired data … Act (Values) Act

45
Two myBlocks for Data Logging

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

50
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 Craig Shelden Science and Engineering Festival

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google