You are on page 1of 3

ENES 100 Introduction to Engineering Design Fall 2012

Problem Set #4

Assigned: Sept. 20, 2011 Due: In class on Oct. 1 (M) or 2 (Tu)

Reading: Study Friday Lectures and Class Presentations

Problems:
1. The following graph shows the curve of the output voltage of a Sharp GP2Y0A02YK0F
distance measuring sensor. If this were attached to an analog port on the Arduino, what
value would the analogRead() function return if the sensor was 70 cm away from the
wall?

2. Given that return value, could the Arduino be certain that the wall was 70 cm away and
not 4 cm away?

3. What physical constraint could you place on the sensor to remove the ambiguity
suggested in Problem 2?

4. Suppose your hovercraft includes a servo motor designed to rotate a certain sensor within
a 180 arc. Experiments with your servo turning this load indicate that it can turn 60 in
0.17 sec. The servo datasheet indicates that the servo expects 20 ms pulses, the first 1-2
ms of which are high (thereby indicating the intended position of the servo), and the rest
of which is low. Your hovercraft logic requires that the servo start in the full counter-

1/3
ENES 100 Introduction to Engineering Design Fall 2012

clockwise position, but you do not know where it is when the craft is first powered up.
Thus, you must issue the correct command, via a pulse train, to turn the servo to the
proper position. How much time must you wait to be certain that the servo is now in the
correct position? How many pulses will have been issued during this time? Would the
answer have been different if the servo needed to start fully clockwise, since the high
pulse width is longer in that case?
!
5. In Arduino C, the pulseIn (pin, value) command reads a pulse (either HIGH or LOW) on
a digital pin. For example, if value is HIGH, pulseIn() waits for the pin to go HIGH,
starts timing, then waits for the pin to go LOW and stops timing. The command returns
the length of the pulse in microseconds. How could this be used to learn the distance
measured by the Parallax PING))) ultrasonic rangefinder?
!
6. Suppose you have a 9V motor that you want to drive with a 14.4V battery, without using
a voltage regulator or ballast resistors. Instead, you decide to use a MOSFET transistor,
driven by one of the PWM outputs of the Arduino. What duty cycle should you use on
the PWM output to generate the appropriate response? Assume the on-state resistance of
the MOSFET is 0.1!and the current through it (and the motor) is 4A.

7. What is the correct command to issue via Arduino C to produce this duty cycle? Assume
the gate of the transistor is connected to Arduino pin 3.

2/3
ENES 100 Introduction to Engineering Design Fall 2012

Pro/Engineer Assignment

8. Use Pro/Engineer to complete the following:

(a) Generate the 3D solid part shown in the drawing below. No instructions are
explicitly available for this part, but the tools needed to create this part are the same
tools you have been using on each of the last three homework assignments.
(b) Generate and submit a drawing (hardcopy) of the part created in step (a) above.
!

3/3

You might also like