Pre Lab 2

Pre Lab Assignment 2

Due at beginning of Lab week 2. Individual assignment to be done by each student.

Educational Objective

Build upon the skills learned in Lab 1 of reading analog and digital inputs. In the process learn about the capabilities and limitations of potentiometers and encoders.

Reading:

Build the following from your kit parts:

    • Follow the Pre Lab 2 Hardware Setup Instructions to:

      • Build the test setup shown above.

      • Connect the potentiometer to analog input.

      • Connect the encoder to digital inputs.

  • Note: As of 1/11 not all students have protoboards. You can complete this assignment by directly plugging in the pins into the arduino's headers.

    • Load the Pre Lab 2 Arduino code that reads the potentiometer and encoder, and then displays the output to the Serial Monitor.

    • Rotate the shaft by hand with the Arduino code running and answer questions below.

Turn In (clearly show your work):

  1. Potentiometer (Pot) Analysis:

    • With the pot connected to a 5v source, rotate the shaft approximately 90 degrees and record the changes in analog input potentiometer values. Also use a voltmeter to measure the corresponding pot voltages. Make sure to avoid the dead zone of the pot. Calculate an experimental measurement of pot resolution in units of degrees/volt AND in units of degrees/bit.

    • Use the Pot Spec Sheet and the Arduino Mega Specifications to calculate the theoretical resolution (degrees/bit) of the pot as connected to the provided Arduino (do not forget to factor in the dead zone as specified by the "Effective Electrical Angle").

      • Use your Pot Spec Sheet to estimate the frictional load the pot places on the motor shaft. The "trick" here is that spec sheets do not always use the terminology you expect, but search and you shall find!

  2. Encoder Analysis:

      • Rotate the shaft approximately 360 degrees and note the values from a single encoder pin in the Serial Monitor. Estimate the resolution in degrees/tick of the encoder using this approach.

    • Using the values shown in the Serial Monitor, determine the time step (how fast the arduino loops through the code). Any encoder ticks faster than this will be skipped. Calculate the maximum speed (RPM) that the encoder can be rotated without missing a count using the Arduino code provided for this lab.

    • Use your knowledge of encoders to estimate the frictional load the encoder places on the motor shaft.