rbe2001 lab report

Upload: cuong-tri-nguyen-dinh

Post on 03-Mar-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/26/2019 RBE2001 Lab Report

    1/15

    WORCESTERPOLYTECHNICINSTITUTE

    ROBOTICSENGINEERINGPROGRAM

    Introduction to Electronics

    Date Submitted : 09/16/15

    Date Completed : 09/12/15

    Course Instructor : Prof

    Putnam

    !ab Section : "02

    RBE 2001 A15 1

  • 7/26/2019 RBE2001 Lab Report

    2/15

    Task 1: Voltage Division

    Introduction

    The purpose for this section of the lab is to explain how Ohms Law works via the experimental circuit

    from the prelab. Our experiment consisted of two parts. The first part verified the correctness of the

    voltage division rule in different values of voltage. The second part verified the rule for the same voltage

    in three different configurations.

    #et$odolo%&

    Part 1

    In this part, we built a circuit according to the design proposed: in series with three known resistors whilechanging voltage to three different values and measure current and voltage on each resistor see !ppendix

    ! for circuit diagrams".

    Resistor 1 = 1 k-ohms, Resistor 2 = 2.2 k-ohms, Resistor 3 = 1.2 k-ohms

    Figure 1: Configuration of circuit with resistors (chose randomly) with three scale of voltage (5,10,15 V)

    Part 2

    #or the second part, we built three different configurations $%resistors, &%resistors, and '%resistors in

    series. !fter finishing the circuit see figures below", we measured the voltage in each resistor as well as

    its current. This process could be done efficientl( b( planning out the structure beforehand see appendix

    ! for circuit diagrams".

    RBE 2001 A15 2

  • 7/26/2019 RBE2001 Lab Report

    3/15

    Resistor 1 = 5.6 k-ohms, Resistor 2 = 1.0 k-ohms, Resistor 3 = 0.910 k-ohms,

    Resistor 4 = 2.2 k-ohms, Resistor 5 = 1.2 k-ohms

    Figure 2: Configuration of circuit with 2 resistors in series

    Figure : Configuration of circuit with resistors in series

    Figure !: Configuration of circuit with 5 resistors in series

    RBE 2001 A15 3

  • 7/26/2019 RBE2001 Lab Report

    4/15

    'esult

    Part 1

    Applied

    Voltage (V

    Voltage o!

    resistor 1(V

    Voltage o!

    resistor 2(V

    Voltage o!

    resistor 3(V

    "otal

    #eas$redVoltage (V

    #eas$red

    %$rre!t(mA

    &o'er

    issipated ()* e!tire +ir+$it

    '.) *.*+ $.'' *.& '.)- *.*+ ).))'

    *).) $.$' '.)& $.* . $.$ ).)$$

    *'.) &.& .'+ +.) *+./ &.+* ).)'*$

    Table 1. Experimental data from part 1

    AppliedVoltage (V

    &o'erissipated ()* Resistor 1

    &o'erissipated ()* Resistor 2

    &o'erissipated ()* Resistor 3

    &o'erissipated ()*e!tire +ir+$it

    #eas$red%$rre!t (mA

    '.) ).))*&) ).))$* ).))*'- ).))' *.*+

    *).) )))'** ).)**+ ).))-*' ).)$$ $.$

    *'.) ).)**- ).)$' ).)*& ).)'*$ &.+*

    Table 2. Power dissipated computation

    P=I V

    Power dissipated (total for5.0V)=0.00130+0.00291+0.00156=0.00577W

    Part 2

    ig Resistor 1V

    (&o'erdissipated)

    Resistor 2V

    (&o'erdissipated)

    Resistor 3V

    (&o'erdissipated)

    Resistor 4V

    (&o'erdissipated)

    Resistor 5V

    (&o'erdissipated)

    #eas$red%$rre!t

    (A

    AppliedVoltage

    (V

    &o'erissipated

    () *e!tire+ir+$it

    $ +.$/

    ).)))&&)

    "

    ).-)

    ).)))'/-"

    % % % ).)))* '.) ).)))*-

    & &.

    ).))$'-"

    ).-)

    ).)))+'+"

    ).-))

    ).)))+)"

    % % ).)))-/ '.) ).))&+$*

    + $.'/

    ).))*$)"

    ).+')

    ).)))$*)"

    ).+*)

    ).)))**"

    *.)$

    ).)))+-

    "

    ).''

    ).)))$'"

    ).)))+- '.) ).))*$'+

    Table 3. Experimental data from part 2

    P=I V

    Power dissipated (total for Figure2 )=0.000330+0.000586=0.000916W

    RBE 2001 A15 4

  • 7/26/2019 RBE2001 Lab Report

    5/15

    Discussion

    !s seen from the data obtained above, the value of power dissipated was consistent in resistors in series.

    This could be verified b( the fact that 0total power dissipated1 was the same for the sum of power

    dissipated in each resistor. !dditionall(, sum of all voltages in each resistor was e2ual to the total output

    voltage. These two examples verified the validit( of voltage division rule.

    Conclusion

    The experiment successfull( verified the correctness of voltage division rule. The result of both parts of

    this experiment proved that the sum of all voltages in each resistor in series" was e2ual to the output

    voltage. !lso, the sum of dissipated power in each resistor in series" was e2ual to the total power

    dissipated.

    Task 2: Signal GenerationIntroduction

    In this section, we used a signal generator to produce waveforms. It showed the peak voltage, peak%to%

    peak voltage, fre2uenc(, and period of the waveform. This part demonstrates our understandings of the

    use of apparatus and knowledge about signal and wave production.

    #et$odolo%&

    The output voltage of the function generator was set to '3, and its fre2uenc( was set to $)))45. This

    configuration generated a signal waveform for the function

    f(x )=5sin(4000t)

    !fter that, the signal was shifted and the offset was raised to $.'. This configuration generated a signal

    waveform for the function

    g (x )=2.5 sin (4000t)

    'esult

    RBE 2001 A15 5

  • 7/26/2019 RBE2001 Lab Report

    6/15

    Figure 5: "aveform for the function f(#)

    Figure $: "aveform for the function g(#)

    (/ (/

    RBE 2001 A15 6

  • 7/26/2019 RBE2001 Lab Report

    7/15

    pper-&eak (V '.) .'

    o'er-&eak (V %'.) %$.'

    &eak-to-peak (V *) *)

    re$e!+ ( $.))) $.)))

    &eriod (s ).)))' ).)))'

    Table 3. Measurement for the two functions

    Discussion

    The measurement from the oscillator gave us more insight about the characteristics of the two functions.

    These two functions had the same peak%to%peak value, fre2uenc( and period. 4owever, the function gx"

    was shifted upward $.' units.

    Conclusion

    This lab successfull( showed us the use of a function generator coupled with an oscillator. 6uch devices

    are essential in investigating the waveforms of various functions and in inspection of our later circuits.

    Task 3: R ir!"it

    Introduction

    This experiment investigates the effect of a capacitor on a s2uare waveform.

    #et$odolo%&

    The following circuit was constructed with C=10F , and R=2000 . ! function generator was

    connected to the circuit as Vs and generated a $45 waveform with a peak of '3 and a 78 offset of

    $.'3. The voltage of the capacitor was measured and captured using an !rduino coupled with Lab3iew.

    RBE 2001 A15 #

  • 7/26/2019 RBE2001 Lab Report

    8/15

    Figure %: Circuit for this e#&eriment'

    'esults

    The measurement of the capacitors voltage (ielded a stable and smooth line of approximatel( $./3

    Figure : easured voltage across the ca&acitor'

    Discussion

    In the result, it could be seen that there was a small bend at the end of the rising edge and another one at

    the falling edge of the wave. These two bends characteri5ed the dela(s caused b( the capacitor. 9hen the

    signal voltage went up at the rising edge, it took sometimes for the capacitor to charge until the potentialdifference between its two conductors became e2ual to the signal voltage. 9hen the signal voltage went

    down at the falling edge, it took sometimes for the capacitor to discharge. To make the statement more

    evident, below is the measured voltage for the same segment in the circuit without the capacitor.

    RBE 2001 A15 $

  • 7/26/2019 RBE2001 Lab Report

    9/15

    Figure *: easured voltage for the same segment in the circuit +ut without a ca&acitor

    Conclusion

    The experiment clearl( shows the how the capacitor affected how the voltage change over a period of

    time. Its abilit( to charge and discharge created a dela( on the change of the voltage.

    RBE 2001 A15 %

  • 7/26/2019 RBE2001 Lab Report

    10/15

    Task 4: &'( Signal (eas"re)ent

    Introduction

    The purpose of this experiment is to observe how the 9; signal is used to control a motor and a servo.

    #et$odolo%&

    In this experiment, a 3ex ;otor ;odule was connected to the servo port 6 of an !rduino via a

    breadboard. Two wires were plugged into the holes on the breadboard corresponding to the

  • 7/26/2019 RBE2001 Lab Report

    11/15

    Figure 10: -" signal when o&erating the motor and servo using myservo.write(0).

    Figure 11: -" signal when o&erating the motor and servo using myservo'write(10)'

    RBE 2001 A15 11

  • 7/26/2019 RBE2001 Lab Report

    12/15

    Discussion

    The result showed that b( var(ing the dut( c(cle of a 9; signals, one can control the speed and

    direction of a motor or the angle of the shaft of a servo. #or a motor, if the dut( c(cle is as low as $.-= or

    below, the motor runs at full speed in one direction. If the dut( c(cle is increased to about *$=, the motor

    runs at full speed in other direction. #or a servo, one can map the range of dut( c(cle from $.-= to *$="to its rotation range from ) degree to */) degree", and control the shaft rotation angle accordingl(.

    Conclusion

    #rom the experiment, one learns how 9; signal can be used to control a motor or a servo. #or a motor,

    var(ing the dut( c(cle of a 9; signal changes its direction and speed. #or a servo, var(ing the dut(

    c(cle of a 9; signal changes the position of its shaft.

    RBE 2001 A15 12

  • 7/26/2019 RBE2001 Lab Report

    13/15

    Task 5: D (otor &ara)eters

    Introduction

    The main purpose of this section of the lab is to stud( the behavior of 78 motor. 7ata of parameters such

    as voltage and current are monitored at all time. This provided some insights and understanding about 78

    motor. The experiment consisted of two parts. The first part investigated the amount of current drawn b( a

    78 motor in two states: stall and no load. The second part showed a linear relation between applied

    voltage and motor speed.

    #et$odolo%&

    Part 1

    ! *$%3 78 motor was connected to the power suppl(. The motor was then run at + different input voltagevalues ranging from -3 to *$3. #or each motor voltage, record the current of two states: motor running at

    no load and running when stalled using hand".

    Part 2

    ! 3ex 6haft >ncoder was attached to the motor via a shaft. The motor was then applied *) different input

    voltage values ranging from $3 to *$3. To measure the speed of the motor, the encoder was connected to

    an !rduino which was uploaded with the code in !ppendix !. !fter rotating the shaft ' complete rounds

    for better accurac(", the !rduino would calculate and print the speed of the motor on the screen. >ach

    value pair of voltage and motor speed was recorded to an >xcel file.

    'esult

    Part 1

    Voltage 7!p$t (V %$rre!t (8o oad(A

    Resista!+e (8ooad (

    %$rre!t (:tall(A

    Resista!+e(:tall (

    -.) ).)$ &)) ).- /.-

    /.) ).)$ +)) )./' .+*

    *).) ).)$ ')) *.) .&'

    *$.) ).)$ -)) *.$) *)Table 4. Measurement of current for different status of the DC motor and their correspondin resistance.

    RBE 2001 A15 13

  • 7/26/2019 RBE2001 Lab Report

    14/15

    Part 2

    Voltage 12 11 10 9 8 7 6 5 4 3 2

    RPM

    19

    6

    17

    7

    15

    9

    14

    7

    12

    5

    11

    2 94 79 63 47 29Table !. "oltae #alues applied to the DC motor and their correspondin speed.

    ) $ + - / *) *$ *+)

    ')

    *))

    *')

    $))

    $')

    fx" ? *-.)&x@A ? *

    3oltage 3"

    6peed @;"

    Figure 12: /ra&h of motor s&eed versus motor voltage and a linear leastsuares fit on the data &oints

    Discussion

    The result from part * showed that without load, the motor drawn the same amount of current regardless

    of the applied voltage. On the other hand, when the motor was stalled, a larger amount of current was

    drawn and this amount also increased linearl( proportional with the motor voltage. This linear

    relationship could be observed b( seeing how the terminal resistance did not var( much with different

    voltage values.

    art $ demonstrated a positive linear relationship between motor voltage and speed. The data points fit

    ver( well to the linear approximation, which was proved b( how close the value @$to *.).

    Conclusion

    The lab demonstrated three characteristics of a 78 motor. #irstl(, if there is no load applied, the motor

    will draw a constant amount of current. 6econdl(, if there is load, it draws larger amount of current, which

    is also linearl( proportional to the motor voltage. #inall(, there is a linear relationship between the motor

    voltage and motor speed.

    RBE 2001 A15 14

  • 7/26/2019 RBE2001 Lab Report

    15/15

    A**en+i, B

    RBE 2001 A15 15

    int Slot % 0;

    &loat 'ound % 0;&loat time % 0&loat ptime % 0;int encoder % ;&loat '*+;

    void setup() { pin+ode (encoder,-*!/*!!*);Serial.1e2in(9300);

    }

    void loop() {

    he method &or &indin2 the speed o& the motor is countin2 the total slot inside the ve4 encoder that pass the led divide 1y total time. 5alculation is per&ormed a&ter $ rounds

    &or 1etter accuracy.

    while('ound < $) { oop until the wheel rotates throu2h 90 slotswhile (Slot < 90) {int sensor6alue % di2ital'ead(encoder);while (sensor6alue %% 0) {

    sensor6alue % di2ital'ead(encoder); i& (sensor6alue %% ") { Slot77; 1rea8; }

    }}

    Slot % 0;'ound77;

    } time % millis(); -um1er o& milliseconds since last reset time % time ptime; :et num1er o& milliseconds &or this loop time % time"00030; 5onvert to minute'*+ % 'oundtime;

    Serial.print('*+ ); Serial.print('*+=5); Serial.print(?n);

    ptime % millis(); Save the cumulative milliseconds to 1e su1tracted on ne4t loop 'ound % 0; Slot % 0;