Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

1/5/23, 7:01 PM Activity 3.1.

1 Inputs and Outputs (VEX V5)

ENGINEERING

Activity 3.1.1

Inputs and Outputs (VEX V5)

Distance Learning Support

If you are doing this activity away from the classroom, jump to
the flexible path DL: Activity 3.1.1 Inputs and Outputs.

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 1/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

INTRODUCTION

We perceive the world through the brain’s response to sensory stimuli or


information. The organs of the eyes (vision), ears (hearing), skin (touch), nose
(smell), mouth (taste), and vestibular system (balance and spatial orientation)
contain receptors that input sensory information and pass it along to our brain
for processing. The brain interprets what is going on around us to instruct precise
and context-appropriate behavior. Through the body’s motor circuits, responses or
outputs take many forms, including speaking, moving your hand, or running.

Robots behave similarly to humans when they sense their world through inputs of
physical touch, ambient light intensity, or distance to a solid object. The robot
processor translates these inputs and activates a response (output) such as
triggering a motor or light emitter. Robotic or artificial sensing might help an
individual with tasks that would be otherwise difficult or impossible. For example, a
robot positioned inside a fuel pipeline uses ultrasonic sensors to assess the
structural integrity of the pipeline without subjecting a human to this volatile
environment. Another device uses a 3D camera input to track the hand movement
of a sign language signer and converts the movement into text or voice.

EQUIPMENT

Computer with VEXcode V5 software


VEX® POE V5 kit

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 2/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

RESOURCES

Introduction to the VEX Robotics Platform

Testbed Build Instructions

Testbed Build Instructions (VEX V5)

Team A: Smart Sensor Exploration

Team B: Smart Sensor Exploration

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 3/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

Procedure
In this activity, you will use the VEXcode® V5 software to monitor inputs and control
outputs. This way you can test the behavior of components before you write a program
and use the testbed, shown in Figure 1, as a troubleshooting tool for analyzing program
performance.

Figure 1. VEX Testbed

1 Form groups of four and get your group’s VEX® POE Kit under the direction of
the teacher.

2 Within your four-student group, form two teams: Team A and Team B.

Note: Are you working in Team A or Team B? You will need to recall this
later, so note your team in the space provided:

3 Construct the VEX testbed. You can find supporting documents in the VEX
and VEXcode section of the General Student Resources.
Team A will construct the VEX Testbed without the optical sensor .
Team B will construct the VEX Testbed without the distance sensor and
servo motor.

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 4/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

Note: Step 16 of the VEX Testbed requires a 1x5 Bar. This is not supplied
in the kit and must be cut from a 1x25 Bar. Please consult with your
teacher to obtain a 1x5 Bar.

4 View the Introduction to VEX Robotics Platform presentation.

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 5/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 6/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

Note: Be careful to fully seat a 3-wire connector into a 3-wire port


otherwise a V5 brain cannot communicate with the device. If the
connector is not fully seated, gently change the angle of the 3-wire
connector until it is fully seated as shown in Figure 1.

Figure 1. Seating 3-wire Connectors

Figure 2. Introduction to VEX Robotics Platform

Note: You can download the following presentation from the Resources.

Motors

Let’s first explore the motors on your testbed. In the VEX V5 Smart Motor, the motor’s
gears are contained inside a gear cartridge with a gear ratio of 18:1.

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 7/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

Note: The gear ratio of the VEX V5 motor can be


changed by disassembling the motor and swapping
out the gear cartridge. Each gear ratio has a different
color marker. For this course you will use the green-
marked cartridge with the 18:1 gear ratio. For robotics
competitions or other uses that require more torque
or more speed, your teacher may suggest that you
change the cartridge.
Figure 3. 18:1 Gear Ratio
Cartridge

With this VEX V5 Smart Motor, you can control the motor’s direction, speed,
acceleration, position, and torque. The VEX V5 Smart Motor provides feedback to the
VEX V5 Brain about many variables, including position, velocity, current, voltage,
power, torque, efficiency, and temperature.

5 Make sure the battery and motors are connected to the brain. To power the
brain on, press the Power button on the brain.

Important: If a notice about the battery appears, ask your teacher


whether you should plug the battery in or cancel the message.

6 Tap the Devices button to see a list of all the devices connected to the brain.

7 Select port 1.

8 To run the motor, tap the blue right arrow one time.

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 8/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

Figure 4. Start Motor Interface

PLTW ENGINEERING NOTEBOOK


Record the value for velocity in revolutions per minute (rpm).

Note: The value may fluctuate between numbers; do your best to


estimate the value.

9 Press the blue right arrow until the motor is running between 130–140 rpm.

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 9/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

Figure 5. Percent Velocity

PLTW ENGINEERING NOTEBOOK


When the motor is between 130–140 rpm, observe the percent
measurement in the Velocity box. Estimate what percent velocity the
motor is running at 130–140 rpm.

Reflection Questions
In general, what is happening to the values for Revolutions
and Degrees as the motor continues to spin?
What is the input in this system? The output?
What is the relationship between Revolutions and Degrees?

10 To stop the motor, tap the white square.

Figure 6. Stop Motor

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 10/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

PLTW ENGINEERING NOTEBOOK


When you select Stop, document what happens to the values for each
of the following:
Velocity
Revolutions
Degrees

11 To reset the values for revolutions and degrees, press one of the values.

Reflection Question: Predict what happens when you select the left
arrow, instead of the right arrow, to start the motor.
Then, try it out! Did it behave as you predicted? Don’t forget to stop the
motor and reset the values when you are done.

Analog and Digital Sensors

The way you see and experience things in the world is different
from the way a computer senses the same things. Some things
you observe have degrees of difference to describe them, such
as a fuel tank. There are many ways to describe the amount
—"full", "half-full", "20% full", "three-quarters", "almost empty", and
many more. A fuel gauge is an example of analog data. Other
Figure 7. Example Gas
examples of analog data are quantities like sound, time, and Gauge
acceleration.

In contrast, computers use discrete data, also referred to as digital data. Digital
input quantities jump from one value to another without representing the values in
between. A light switch represents discrete, digital data; it is either on or off. Imagine
how inconvenient it would be if the level of fuel in the tank was represented discretely,
either full or empty with no values in between.

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 11/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

There are many types of analog and digital input sensors. It is important to understand
the type of sensor you are using so you can use the correct type of data (analog or
digital) at the correct time.

It’s time to see the sensors in action!

3-Wire Sensors

12 Make sure all the sensors are connected to the brain. If necessary, power the
brain on by pressing the Power button on the brain.

Note: If you are still in the Motor view, press the Power button on
the brain to return to the Devices menu.

13 On the brain display, tap Devices, then tap the 3-wire ports button. You
will see a list of the sensors that are connected to the 3-wire ports A through
H on the brain.

14 Watch the values on the screen as you press the limit switch.

Figure 8. Limit Switch

PLTW ENGINEERING NOTEBOOK


Record the values of the limit switch when it is pressed and not pressed.
Are there any values between?

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 12/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

Based on the values you ob-


serve for the limit switch,
what kind of sensor is it?

a Digital

b Analog

Ch k A
The 3-wire ports are set to analog by default so they can use any information
they receive from the sensors. The limit switch sends two values to represent
pressed or not pressed. However, you can change the port to digital to see
the values when the incoming sensor looks for digital information.

15 Tap the port D icon to see it switch from Analog Input to Digital Input.

PLTW ENGINEERING NOTEBOOK


Record the values of the limit switch when it is pressed and not
pressed.

16 Watch the values on the screen as you press the bumper switch in both the
analog and digital settings.

Figure 9. Bumper Switch

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 13/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

PLTW ENGINEERING NOTEBOOK


Record the values of the bumper switch when it is pressed and not
pressed. Are there any values between?

Based on the values you ob-


serve for the bump switch,
what kind of sensor is it?

a Analog

b Digital

Ch k A
17 Watch the values on the screen in the analog and digital settings as you rotate
the wheel connected to the potentiometer. If you feel resistance, stop and
rotate it in the opposite direction.

Important: Do not force the potentiometer past the stop points. Doing
so will break the potentiometer.

Figure 10. Potentiometer

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 14/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

PLTW ENGINEERING NOTEBOOK


Record the values of the potentiometer. What range of values are
available to use in program design?

Based on the values you ob-


serve for the potentiometer,
what kind of sensor is it?

a Analog

b Digital

Ch k A
A sensor can create unexpected results if not properly used as analog or
digital. For example, all of the 3-wire sensors send information to the brain and
will be interpreted differently based on what the brain expects.

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 15/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

PLTW ENGINEERING NOTEBOOK


a. Look at the range of values for the
potentiometer when it is in the
analog setting and compare them
to a protractor. How do the values
align?
Figure 11. Protractor
b. Look at the range of values for the
potentiometer. When it is in the
digital setting, how would you describe the physical locations that
create the 0 or the 1?

Hint: In the digital world, 0 is often thought of as false, off, or


the lack of input. The opposite is true of 1. 1 is considered to
be true, on, or something detected. There is no in between in
a digital world. It either is 1 or is not (0).

Check your response

Reflection Question: Why is it important to know whether a sensor


provides analog or digital data?

Smart Sensors
3-wire sensors are either digital or analog in the way that they send information.
Alternatively, smart sensors can process the data as it is being collected and instantly
provide a variety of data to the brain. These smart sensors can simultaneously collect
both digital and analog data.

18 To begin exploring the smart sensors, select the option provided for your
team.

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 16/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

Need Help?
Team A: Smart Sensor Exploration

Team B: Smart Sensor Exploration

ETHICAL SCENARIO
Jay’s father-in-law is blind and has a service dog that helps with his day-
to-day navigation. However, the dog is unable to help him avoid low-
hanging objects. Jay has an idea to develop a headset that provides a
mechanical nudge on a person’s ear when an ultrasonic sensor detects
something within a certain range. While he is sure this device can help
his father-in-law, preliminary studies indicate that the device will be
expensive to produce and requires materials that may be difficult to
source. What should Jay do?

19 After you complete the smart sensor exploration, think about some of the
sensors you interact with routinely, such as automatic doors and water
faucets. What kind of sensor data—analog or digital—do those tend to collect
and why?

PLTW ENGINEERING NOTEBOOK


Record your response in your engineering notebook.

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 17/18
1/5/23, 7:01 PM Activity 3.1.1 Inputs and Outputs (VEX V5)

CONCLUSION

1 Describe real-life scenarios where these sensors could be used. Provide


two examples.

2 Describe observed behaviors where the sensors did not respond as you
would predict.

3 Think about if the several motors and sensors were incorporated into one
robotic system. Make a graphic organizer showing which of the following
devices in the system would be input and which would be output.

a. Motors
b. Optical Sensor
c. Distance Sensor
d. Bumper Switch
e. LED
f. Servo
g. Limit Switch
h. Potentiometer

Proceed to next activity

https://pltw.read.inkling.com/a/b/605a57613e7d45b4810fbab1c37b7dde/p/0e33a58a3ccf4a3fa8e180a18db2366c 18/18

You might also like