Presentation is loading. Please wait.

Presentation is loading. Please wait.

INTRODUCTION TO ROBOTICS INTRODUCTION TO ROBOTICS Part 4: Sensors Robotics and Automation Copyright © Texas Education Agency, 2013. All rights reserved.

Similar presentations


Presentation on theme: "INTRODUCTION TO ROBOTICS INTRODUCTION TO ROBOTICS Part 4: Sensors Robotics and Automation Copyright © Texas Education Agency, 2013. All rights reserved."— Presentation transcript:

1 INTRODUCTION TO ROBOTICS INTRODUCTION TO ROBOTICS Part 4: Sensors Robotics and Automation Copyright © Texas Education Agency, All rights reserved. 1

2 So, like, dude, what’s a sensor? Copyright © Texas Education Agency, All rights reserved. 2

3 A sensor detects the environment. Copyright © Texas Education Agency, All rights reserved. 3

4 What does that mean? Copyright © Texas Education Agency, All rights reserved. 4

5 A sensor is like one of our five (5) senses; it tells you what is going on in the outside world; except that sensors send information to an electronic device, like a computer. Copyright © Texas Education Agency, All rights reserved. 5

6 Yeah, a sensor can help a robot move around without running into anything. Copyright © Texas Education Agency, All rights reserved. 6

7 Sensors A device that measures something (a detector) A transducer that converts one form of energy into another form of energy (example: temperature into voltage) Produces an output related to what it measures Copyright © Texas Education Agency, All rights reserved. 7

8 Characteristics of a Sensor Is sensitive only to the property you want to measure and insensitive to any other property Does not influence the measurement itself The output has a mathematical relationship to the measured property Copyright © Texas Education Agency, All rights reserved. 8

9 Human Senses Humans have five senses: o Sight o Sound o Taste o Touch o Smell Humans have a brain to analyze and interpret what they sense. Copyright © Texas Education Agency, All rights reserved. 9

10 Human vs. Mechanical Human senses are generally much more sensitive than sensors we can build. There are many, many individual sensors. o For example, an eye has about 120 million rods for light detection. o That much data would be impossible for a current generation computer to analyze. Human senses are generally not precise. o How hot is it? o How many pounds of pressure are exerted? Copyright © Texas Education Agency, All rights reserved. 10

11 11 The number of sensors cannot be duplicated. Human ability to analyze data cannot be duplicated. Human senses work for the brain, and the output from them cannot (yet) be connected to a computer. Copyright © Texas Education Agency, All rights reserved. Human vs. Mechanical (cont’d)

12 Sensor Output Sensor output needs to be in a form that can be analyzed. o Output needs to be a number. o Computers work with binary numbers. Sensor output needs to be in a form that can be measured. Generally, this means the output must be electrical. Copyright © Texas Education Agency, All rights reserved. 12

13 Input Voltage is Useful The galvanometer is an example where a voltage creates a force that can be seen and measured. It is easy for voltage to be measured, and there are a lot of ways of doing so. This makes voltage the preferred type of input to a computer or electronic device. Copyright © Texas Education Agency, All rights reserved. 13

14 Galvanometer Copyright © Texas Education Agency, All rights reserved. 14

15 A Galvanometer A galvanometer uses a needle on a dial to indicate the amount of voltage or current present. Two forces: o The force of interaction due to a magnetic field created by and proportional to the input o The force of a spring deflected by the previous force The needle comes to rest at a position where the two forces are equal. Copyright © Texas Education Agency, All rights reserved. 15

16 Sensor Outputs Some sensors will produce a voltage output. This voltage output can be used directly by an electronic device. Other sensors do not produce a voltage output. The output they produce must be converted to voltage. Copyright © Texas Education Agency, All rights reserved. 16

17 Temperature Sensors One type of temperature sensor called a thermocouple produces an output voltage related to the temperature. Another type of temperature sensor called an RTD produces a resistance change related to the temperature. The resistance change can be converted into a voltage, so the two (2) sensors are roughly equivalent. Copyright © Texas Education Agency, All rights reserved. 17

18 Computers Need Numbers There is generally at least one more step in the conversion process. The process of converting the voltage value into a binary number. Some types of sensors can produce binary numbers without using voltage. Copyright © Texas Education Agency, All rights reserved. 18

19 Global Positioning System A GPS tells you your position. Data is sent digitally and received digitally from at least four (4) satellites. Your GPS receiver basically measures time. The time it takes for each signal to go from the satellite to the receiver is a function of the distance to the satellite. The onboard computer can triangulate a position from those four (4) signals. Time is accurate to 10 nanoseconds. Copyright © Texas Education Agency, All rights reserved. 19

20 Sensor Technologies Most sensor technologies are not as complex as GPS. The GPS example shows how digital data (binary numbers) are getting more and more important and more and more common these days for sensors. There may be multiple conversion processes needed to make a sensor useful. Because of how we use sensor data, in a computer, there is a link between sensor technology and computers. Copyright © Texas Education Agency, All rights reserved. 20

21 Computer Programming The link between a sensor and a computer is the software program. A sensor is only as useful as a software program can make it. o Sensor data must be analyzed. o Decisions must be made as a result. A software program is used to do both. Copyright © Texas Education Agency, All rights reserved. 21

22 Example Is the room temperature above 75 degrees and rising? Turn on the air conditioner. Is the room temperature below 72 degrees and falling? Turn off the air conditioner. A microcontroller can be, and often is, used to control an air conditioner. Copyright © Texas Education Agency, All rights reserved. 22

23 Categories of Sensors There are many different ways to categorize sensors: o What they measure o How they work o Type of output they produce Copyright © Texas Education Agency, All rights reserved. 23

24 Sensor Measurement Sound level Fluid flow Electrical current Voltage Temperature Position Pressure Force Proximity Copyright © Texas Education Agency, All rights reserved. 24

25 Chemical: pH, smoke detectors, carbon monoxide, gas detectors Electrical: capacitance, galvanometer, Hall effect, resistance, voltage, current, metal detector, piezoelectric Mechanical: fluid flow (air and water), bi- metallic strip, encoder (rotary and linear ), position, diaphragm Radiation: Geiger counter, photoresistor, light sensitive diode, scintillation counter, particle detector, bubble chamber, Fabry- Perot Copyright © Texas Education Agency, All rights reserved. 25 Sensor Process Types

26 Position: galvanometer, bimetallic strip, bourdon tube, thermometer Voltage: thermocouple, microphone, piezoelectric effect, Hall effect Digital signal: MRI, video camera, GPS, range finder, switch Linear or non-linear output Copyright © Texas Education Agency, All rights reserved. 26 Sensor Output Types

27 Robotic Sensors Robotic sensors are only as useful as the ability to use a computer program to evaluate data and make decisions as a result. Sensors are getting more and more complicated and so are the computer programs needed to use them. Copyright © Texas Education Agency, All rights reserved. 27

28 28 There is a link between computer programming and the usefulness of a sensor. Therefore, we will categorize sensors based on the type of computer programming needed to make them work. Copyright © Texas Education Agency, All rights reserved. Robotic Sensors (cont’d)

29 Simple Sensors The simplest sensor acts like a switch. Produces only two values: o On o Off These values correspond directly to the language a computer uses: Binary (1 or 0). Copyright © Texas Education Agency, All rights reserved. 29

30 First Example Contact switch (Bumper Switch) Normally open switch Closes on contact with an object Open, value = 0 Closed, value = 1 Input + 5 V Output + 5 V Output 0 V Input + 5 V Copyright © Texas Education Agency, All rights reserved. 30

31 V S = + 5V V O = + 0V The diode is an open switch, the output is connected to ground. V O = 0 V Here is the same example using a light sensitive diode. Copyright © Texas Education Agency, All rights reserved. 31

32 V S = + 5V V O = + 5V The diode is a closed switch, the output is connected to power. V O = 5 V Here is the same example using a light sensitive diode Here is the same example using a light sensitive diode. Copyright © Texas Education Agency, All rights reserved. 32

33 Conditions The robot car drives straight until it hits something. When it hits something, it must stop. We put a push button switch on the front of the car. The way the car program knows when it hits something is when the switch closes. Copyright © Texas Education Agency, All rights reserved. 33

34 Data The position of the switch represents data; in this case, binary data (0 or 1). We need to “read” the position of the switch (voltage or no voltage on the input). Data needs to be stored in a computer’s memory to be used. We need a memory location for the data. We need to control the car based on the data. Copyright © Texas Education Agency, All rights reserved. 34

35 Commands Call the switch position data value “switchdata.” It is typical to use 16 bits for the data size. First command: int switchdata This is a typical C++ type of command. Copyright © Texas Education Agency, All rights reserved. 35

36 int switchdata int is a command that reserves 16 bits of memory space for data. Copyright © Texas Education Agency, All rights reserved. 36

37 int switchdata switchdata is both the name we give to the switch data and to the memory location where the data is stored. Copyright © Texas Education Agency, All rights reserved. 37

38 int switchdata switchdata is both the name we give to the switch data and to the memory location where the data is stored. Right now we have no idea what value is going into “switchdata” so we set the initial value manually. Copyright © Texas Education Agency, All rights reserved. 38

39 int switchdata = 0; Sets the initial value of switchdata to 0. Copyright © Texas Education Agency, All rights reserved. 39

40 int switchdata = 0; By setting the value we created something called a statement. Statements in C++ must be terminated by a semicolon. Copyright © Texas Education Agency, All rights reserved. 40

41 Next Command A microcontroller can only read a value on one of its inputs. The voltage output of the switch is connected to a microcontroller input pin (with a wire). o Assume the input pin is pin 7. o Use the read command for that pin. switchdata = GetDigitalInput (7); Copyright © Texas Education Agency, All rights reserved. 41

42 switchdata = GetDigitalInput (7); We now set the value of switchdata to whatever we read on the Input. Copyright © Texas Education Agency, All rights reserved. 42

43 switchdata = GetDigitalInput (7); This is a special command that reads the value of the digital input defined inside the parenthesis. Copyright © Texas Education Agency, All rights reserved. 43

44 switchdata = GetDigitalInput (7); The value of the digital input (0 or 1) is placed into the memory location called switchdata. Copyright © Texas Education Agency, All rights reserved. 44

45 switchdata = GetDigitalInput (7); This is also a statement so it must be terminated by a semicolon. Copyright © Texas Education Agency, All rights reserved. 45

46 What’s Wrong? Copyright © Texas Education Agency, All rights reserved. 46

47 What’s Wrong? I don’t think it’s that simple. Copyright © Texas Education Agency, All rights reserved. 47

48 It’s not. There are a couple of things wrong with this example. Copyright © Texas Education Agency, All rights reserved. 48

49 To learn more about how to make sensors work, we need to learn more about programming. Programming is covered in the next lesson module: INTRODUCTION TO ROBOTICS INTRODUCTION TO ROBOTICS Part 5: Programming Copyright © Texas Education Agency, All rights reserved. 49


Download ppt "INTRODUCTION TO ROBOTICS INTRODUCTION TO ROBOTICS Part 4: Sensors Robotics and Automation Copyright © Texas Education Agency, 2013. All rights reserved."

Similar presentations


Ads by Google