Robotics 1
Digital Sensors
Quiz
Your ID Code:
Question 2:  What does a sensor produce as its output?
Question 3:  Which of the following describes the meaning of a 'transducer'?
Question 4:  I have a 'lever switch' that has three terminals: COM, NO, and NC.  I have connected a +5V signal to the COM port.  When I press the switch, what will happen?
Question 5:  What is the purpose of a pull-down resistor when wiring switches?
Question 6:  When we are checking to see if a pin is high in PSoC, how do we write that 'if' statement?
Question 7:  Which sensor term means 'the smallest change in the physical property that the sensor can detect'?
Question 8:  Suppose that you have an encoder that has 512 counts per revolution, and no gearbox, what is the smallest angle change (in units of degrees) that can be detected?  Round your answer to 2 decimal places.
Question 9:  Suppose that you are going to use the motor/encoder combination from your kit to measure the motor speed.  When you set the counter resolution to 4x and the motor shaft speed to 10 rpm, how many 'counts' will you read per second? Round your answer to two decimal places.
Question 10:  Now, suppose that you are going to use the motor/encoder combination from your kit to measure motor speed, and suppose you have set the counter resolution to 4x.  If you can count 'counts' at a maximum speed of 1 count per millisecond, what is the fastest motor speed, in units of rpm, that you can measure?  Round your answer to 2 decimal places.
Undergraduate/Graduate Questions (both undergraduates AND graduates should answer these questions):
Questions 11: Which of the following is true about the difference between absolute and incremental encoders?
Question 1: What does a sensor take as its input?
An electrical property
A physical property
A mechanical property
A program property
A device that produces sound from an electrical signal
A device that converts input signals into output signals
A device that produces electrical outputs from mechanical inputs
A device that converts energy from one form to another
NO and NC will both be low
NO and NC will both be high
A pull-down resistor connects a digital input pin to ground when a switch is open.
A pull-down resistor prevents a current spike from occurring when a switch is closed.
A pull-down resistor sets a digital pin high when a switch is closed.
A pull-down resistor provides some inductance to allow a switch to activate.
if (Switch_1_Read()==1)
{
}
Graduate Questions (ONLY graduates need to answer these questions):
An electrical property
A physical property
A mechanical property
A program property
NO will be high, and NC will be low
NO will be low, and NC will be high
if (Switch_1_Read()=1)
{
}
if (Switch_1_Read()==0)
{
}
if (Switch_1_Read()=0)
{
}
Precision
Accuracy
Repeatability
Resolution
Absolute encoders have less complex components than incremental encoders
Absolute encoders are generally less expensive than incremental encoders
Absolute encoders will retain information about position during a power outage; incremental encoders won't
Absolute encoders can measure faster velocities than incremental encoders
An incremental encoder has only one ring of 'lines', while an absolute encoder has many
An incremental encoder requires only one wire to measure the position; an absolute encoder requires many
An incremental encoder has more moving parts than an absolute encoder
An incremental encoder is more appropriate for use with a DC motor; an absolute encoder is more appropriate for use with a stepper motor
Questions 12: Which of the following is true about the difference between absolute and incremental encoders?
int Number=0;
Pin_1_Write(1);
if (Pin_5_Read())
{ Number=1;}
else if (Pin_6_Read())
{Number=2;}
else if (Pin_7_Read())
{Number=3;}
else
{Number=4;}
Questions 13: I am writing some code for the matrix keypad and then testing it.  The code that I wrote is shown here.  Pin 1 is an output connected to the first row, and pins 5-8 are inputs connected to the columns.  I press down numbers 1 and 3 at the same time, then run the code.  What value will the variable 'Number' have after the code finishes?
0
1
2
3
4
0
1
2
3
4
Questions 14: Now, suppose that I have the same setup as in Question 13, but I change the code as shown here.  When I repeat the same experiment as in Question 13, what value with the variable 'Number' have at the end of the code this time?
int Number=0;
Pin_1_Write(1);
if (Pin_5_Read())
{ Number=1;}
if (Pin_6_Read())
{Number=2;}
if (Pin_7_Read())
{Number=3;}
if (Pin_8_Read())
{Number=4;}
Normally-open
Questions 15: Are the keys of the matrix keypad normally-open, or normally-closed?
Normally-closed
Neither; they are equivalent to the COM pin of a switch