hi i'm gabe from the brainstormers today we will talk about the different sensors
how they are used and why you would want to use them in ftc
let's start with the infrared or ir sensor it is simple to wire and essentially acts as
a crude distance sensor an ir sensor sends out an infrared signal which reflects off an object
the intensity of the returned signal determines the rough distance of the object
think about knowing whether an object is in your intake system
to solve that problem the ir sensor can be used since it is small and can fit into a small space
as shown here the problem with an ir sensor is that the range is not very large making
it useful only for measuring across short distances also it's not meant for measuring
precise distances since the amount of reflected light can vary depending on the environment
since it's an analog sensor the distance is returned as a voltage which can vary slightly
depending on the voltage of your battery therefore it is mainly used in true or false readings rather
than specific values the rev 2 meter sensor is the one laser sensor that's allowed by ftc
it works by sending out one laser signal and measuring the time it takes for the
signal to bounce back this sensor returns an i2c signal which contains a precise distance
and can be a lot more accurate than the ir sensor therefore it can be used to measure an actual
distance rather than just whether an object is present one limitation is that the object has
to be opaque and the walls used in ftc may not reflect the light properly ultrasonic sensors
such as this one send an ultrasonic audio signal and then wait for the sound to be reflected back
calculating distance based on the time required they can handle longer distances than ir sensors
up to six meters or more but are not able to handle very short distance as well
an ultrasonic sensor is not used in competition because it can cross paths
with the signal from another robot leading to inaccurate readings modern robotics
provides a combination of ir and ultrasonic sensors in this one sensor which can sense
both short and long distance but we haven't used it much in competition the limit switch is a
simple touch sensor which returns a true or false value depending on whether or not it is activated
the limit switch is practical for situations where you just need to know if an object is in a certain
place for example a limit switch can be used to know when the robot has navigated to a target
in lifts limit switches may be used in determining when the lift is at the bottom of the structure
limit switches are not as useful for game objects because they are often not heavy enough or hard
enough to press the switch touch sensors such as this one by rev serve a similar purpose as
limit switches they are easier to wire but are harder to trigger because of the small button
color sensors are very useful for applications and can be used in a variety of ways they return
the rgb or red green and blue values of an object through an i2c connection
they can be used like an ir sensor to detect if an object is present they can also be used
to distinguish between different colored game pieces for example a red and blue ball
they can also be mounted to the bottom of a robot to detect lines on the field
depending on how you mount the sensor you may be able to detect the number of game elements
that you are holding to increase accuracy of this sensor you should turn on its flashlight which is
located here magnet sensors detect if there is a magnetic field near it they can be used to detect
when robot components are near each other without requiring them to touch one example is detecting a
lift being at the bottom of its range by attaching a magnet to the lift and using the sensor at the
base gyro sensors return the heading and tilt from its original initialized position a good bno055
sensor like this one is already included in rev control hub and expansion up depending on how you
mount your control hub you may need to recalibrate this sensor before getting accurate readings
this sensor is very useful for tracking robots heading and also whether the robot is flat against
the ground there are multiple types of encoders including those that are built into ftc approved
motors right now we will talk about external encoders that are attached to passive omni wheels
these encoders are useful because they allow us to track the position of our robot
these encoders go on the bottom of the robot along the x and y axes
when the robot moves the encoder rotates and their combined rotation values can be used to calculate
the position we recommend using the rev encoder since they work well and aren't too expensive
the us digital s4t encoders are also great but cost more their e4t encoders are cheaper but
are prone to dust problems finally the signswise encoders are cheapest but are difficult to mount
the pixy sensor is a camera that detects objects of certain colors
you can train the pixy to recognize specific colors such as this red ball in the simplest
use you can connect it to an analog port which it returns the x position of the largest object
you can also connect it to an i2c port which returns x and y positions for multiple objects
computer vision with either an external webcam or the phone camera can be done using opencv vuforia
or tensorflow even though it can require a lot of coding and tuning computer vision gives you
many options for detecting the size and positions of objects relative to the robot we recommended
a package called easy opencv which lets you integrate opencv without too much work there
are many tutorials online on how to use opencv to detect colors and contours of an object as you can
see here this is an overview of the sensors that can be used for ftc thanks for watching