Sunteți pe pagina 1din 15

WORCESTER POLYTECHNIC INSTITUTE

ROBOTICS ENGINEERING PROGRAM

Introduction to Electronics

Date Submitted : 09/16/15


Date Completed : 09/12/15

RBE 2001 A15

Course Instructor
Putnam

: Prof.

Lab Section

: A02

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.

Methodology
Part 1
In this part, we built a circuit according to the design proposed: in series with three known resistors while
changing voltage to three different values and measure current and voltage on each resistor (see Appendix
A 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
For the second part, we built three different configurations 2-resistors, 3-resistors, and 5-resistors in
series. After finishing the circuit (see figures below), we measured the voltage in each resistor as well as
its current. This process could be done efficiently by planning out the structure beforehand (see appendix
A for circuit diagrams).

RBE 2001 A15

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 3: Configuration of circuit with 3 resistors in series

Figure 4: Configuration of circuit with 5 resistors in series

RBE 2001 A15

Result
Part 1
Applied
Voltage (V)
5.0
10.0
15.0

Voltage on
resistor 1
(V)
1.14
2.25
3.37

Applied
Voltage (V)
5.0
10.0
15.0

Voltage on Voltage on Total


resistor 2
resistor 3
Measured
(V)
(V)
Voltage (V)
2.55
1.37
5.06
5.03
2.71
9.99
7.54
4.07
14.98
Table 1. Experimental data from part 1

Power
Dissipated (W)
Resistor 1
0.00130
000511
0.0116

Power
Power
Dissipated (W) Dissipated (W)
Resistor 2
Resistor 3
0.00291
0.00156
0.0114
0.00615
0.0257
0.0139
Table 2. Power dissipated computation

Measured
Current
(mA)
1.14
2.27
3.41
Power
Dissipated (W)
entire circuit
0.00577
0.0227
0.0512

Power
Dissipated (W)
entire circuit
0.00577
0.0227
0.0512
Measured
Current (mA)
1.14
2.27
3.41

P=I V

Power dissipated ( total for 5.0 V )=0.00130+0.00291+0.00156=0.00577 W

Part 2
Fig

2
3
4

Resistor 1
[V]
(Power
dissipated
W)
4.28
(0.000330
)
3.77
(0.00256)
2.58
(0.00120)

Resistor 2
[V]
(Power
dissipated
W)
0.760
(0.000586)

Resistor 3
[V]
(Power
dissipated
W)
-

Resistor 4
[V]
(Power
dissipated
W)
-

Resistor 5
[V]
(Power
dissipated
W)
-

Measured
Current
(A)

Applied
Voltage
(V)

0.000771

5.09

Power
Dissipated
(W)
entire
circuit
0.000916

0.670
(0.000454)
0.450
(0.000210)

0.600
(0.000407)
0.410
(0.000191)

0.000678

5.09

0.003421

1.02
0.55
0.000467
(0.000476 (0.000257)
)
Table 3. Experimental data from part 2

5.09

0.001254

P=I V

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

RBE 2001 A15

Discussion
As seen from the data obtained above, the value of power dissipated was consistent in resistors in series.
This could be verified by the fact that total power dissipated was the same for the sum of power
dissipated in each resistor. Additionally, sum of all voltages in each resistor was equal to the total output
voltage. These two examples verified the validity of voltage division rule.

Conclusion
The experiment successfully 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 equal to the output
voltage. Also, the sum of dissipated power in each resistor (in series) was equal to the total power
dissipated.

Task 2: Signal Generation


Introduction
In this section, we used a signal generator to produce waveforms. It showed the peak voltage, peak-topeak voltage, frequency, and period of the waveform. This part demonstrates our understandings of the
use of apparatus and knowledge about signal and wave production.

Methodology
The output voltage of the function generator was set to 5V, and its frequency was set to 2000Hz. This
configuration generated a signal waveform for the function

f ( x )=5 sin ( 4000 t )


After that, the signal was shifted and the offset was raised to 2.5. This configuration generated a signal
waveform for the function

g ( x ) =2.5 sin ( 4000 t )

Result

RBE 2001 A15

Figure 5: Waveform for the function f(x)

Figure 6: Waveform for the function g(x)

F(x)

RBE 2001 A15

G(x)

Upper-Peak (V)

5.0

7.5

Lower-Peak (V)

-5.0

-2.5

Peak-to-peak (V)

10

10

Frequency (Hz)

2.000

2.000

Period (s)

0.0005

0.0005

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, frequency and period. However, the function g(x)
was shifted upward 2.5 units.

Conclusion
This lab successfully showed us the use of a function generator coupled with an oscillator. Such devices
are essential in investigating the waveforms of various functions and in inspection of our later circuits.

Task 3: RC Circuit
Introduction
This experiment investigates the effect of a capacitor on a square waveform.

Methodology
The following circuit was constructed with C=10 F , and R=2000 . A function generator was
connected to the circuit as V s and generated a 2Hz waveform with a peak of 5V and a DC offset of
2.5V. The voltage of the capacitor was measured and captured using an Arduino coupled with LabView.

RBE 2001 A15

Figure 7: Circuit for this experiment.

Results
The measurement of the capacitors voltage yielded a stable and smooth line of approximately 2.8V

Figure 8: Measured voltage across the capacitor.

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 characterized the delays caused by the capacitor. When the
signal voltage went up at the rising edge, it took sometimes for the capacitor to charge until the potential
difference between its two conductors became equal to the signal voltage. When 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

Figure 9: Measured voltage for the same segment in the circuit but without a capacitor

Conclusion
The experiment clearly shows the how the capacitor affected how the voltage change over a period of
time. Its ability to charge and discharge created a delay on the change of the voltage.

RBE 2001 A15

Task 4: PWM Signal Measurement


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

Methodology
In this experiment, a Vex Motor Module was connected to the servo port S9 of an Arduino via a
breadboard. Two wires were plugged into the holes on the breadboard corresponding to the Ground and
Signal pins of the motor. The other ends of these wires were connected to an oscilloscope. The motor was
made to run at full speed in one direction, and then reversed to other direction. The PWM signal
generated by the Arduino was collected for each direction. The experiment was then repeated with a Vex
Servo Module in place of the Motor Module.
The following program was uploaded to the Arduino to operate the motor. To run the motor in the other
direction at full speed, the value 0 was changed to 180.
#include <Servo.h>
Servo myservo;
void setup()
{
myservo.attach(9);
}
void loop()
{
myservo.write(0); // Use write(180) to reverse the motor
delay(15);
}
Source code 1: Program uploaded to the Arduino to run the Vex Motor Module and the Vex Servo Module

Results
For the experiment with a motor module rotating at full speed in one direction, the collected PWM signal
was a square wave with duty cycle of 2.6%. When the servo was connected to the circuit instead of the
motor, the shaft of the servo rotated until it reached one of the ends of its rotation angle and stayed there.
When the direction of the motor was reversed by changing the value in the code from 0 to 180, the duty
cycle of the PWM signal was increased to 12.0%. In this case, the shaft of the servo rotated to the other
ends of its rotation angle (approximately 180 degree from its previous position) and stayed there.

RBE 2001 A15

10

Figure 10: PWM signal when operating the motor and servo using myservo.write(0).

Figure 11: PWM signal when operating the motor and servo using myservo.write(180).

RBE 2001 A15

11

Discussion
The result showed that by varying the duty cycle of a PWM signals, one can control the speed and
direction of a motor or the angle of the shaft of a servo. For a motor, if the duty cycle is as low as 2.6% or
below, the motor runs at full speed in one direction. If the duty cycle is increased to about 12%, the motor
runs at full speed in other direction. For a servo, one can map the range of duty cycle (from 2.6% to 12%)
to its rotation range (from 0 degree to 180 degree), and control the shaft rotation angle accordingly.

Conclusion
From the experiment, one learns how PWM signal can be used to control a motor or a servo. For a motor,
varying the duty cycle of a PWM signal changes its direction and speed. For a servo, varying the duty
cycle of a PWM signal changes the position of its shaft.

RBE 2001 A15

12

Task 5: DC Motor Parameters


Introduction
The main purpose of this section of the lab is to study the behavior of DC motor. Data of parameters such
as voltage and current are monitored at all time. This provided some insights and understanding about DC
motor. The experiment consisted of two parts. The first part investigated the amount of current drawn by a
DC motor in two states: stall and no load. The second part showed a linear relation between applied
voltage and motor speed.

Methodology
Part 1
A 12-V DC motor was connected to the power supply. The motor was then run at 4 different input voltage
values ranging from 6V to 12V. For each motor voltage, record the current of two states: motor running at
no load and running when stalled (using hand).

Part 2
A Vex Shaft Encoder was attached to the motor via a shaft. The motor was then applied 10 different input
voltage values ranging from 2V to 12V. To measure the speed of the motor, the encoder was connected to
an Arduino which was uploaded with the code in Appendix A. After rotating the shaft 5 complete rounds
(for better accuracy), the Arduino would calculate and print the speed of the motor on the screen. Each
value pair of voltage and motor speed was recorded to an Excel file.

Result
Part 1
Voltage Input (V)

Current (No Load)


Resistance (No
Current (Stall)
Resistance
(A)
Load) ()
(A)
(Stall) ()
6.0
0.02
300
0.67
8.96
8.0
0.02
400
0.85
9.41
10.0
0.02
500
1.07
9.35
12.0
0.02
600
1.20
10
Table 4. Measurement of current for different status of the DC motor and their corresponding resistance.

RBE 2001 A15

13

Part 2
Volta
ge

12 11 10
9
8
7
6
5
4
3
2
19 17 15 14 12 11
RPM
6
7
9
7
5
2 94 79 63 47 29
Table 5. Voltage values applied to the DC motor and their corresponding speed.
250
200

f(x) = 16.03x
R = 1

150

Speed (RPM)
100
50
0

10

12

14

Voltage (V)

Figure 12: Graph of motor speed versus motor voltage and a linear least-squares fit on the data points

Discussion
The result from part 1 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 linearly proportional with the motor voltage. This linear
relationship could be observed by seeing how the terminal resistance did not vary much with different
voltage values.
Part 2 demonstrated a positive linear relationship between motor voltage and speed. The data points fit
very well to the linear approximation, which was proved by how close the value R 2 to 1.0.

Conclusion
The lab demonstrated three characteristics of a DC motor. Firstly, if there is no load applied, the motor
will draw a constant amount of current. Secondly, if there is load, it draws larger amount of current, which
is also linearly proportional to the motor voltage. Finally, there is a linear relationship between the motor
voltage and motor speed.

RBE 2001 A15

14

Appendix B
int
float
float
float
int
float

Slot =
Round =
time =
ptime =
encoder
RPM;

0;
0;
0,
0;
= 3;

void setup() {
pinMode (encoder,INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
//
//
//
//

The method for finding the speed of the motor is counting


the total slot inside the vex encoder that pass the led
divide by total time. Calculation is performed after 5 rounds
for better accuracy.

while(Round < 5) {
// Loop until the wheel rotates through 90 slots
while (Slot < 90) {
int sensorValue = digitalRead(encoder);
while (sensorValue == 0) {
sensorValue = digitalRead(encoder);
if (sensorValue == 1) {
Slot++;
break;
}
}
}
Slot = 0;
Round++;
}
time = millis();
// Number of milliseconds since last reset
time = time - ptime;
// Get number of milliseconds for this loop
time = time/1000/60;
// Convert to minute
RPM = Round/time;
Serial.print("RPM: ");
Serial.print(RPM,DEC);
Serial.print("\n");
ptime = millis();

Round = 0;
Slot = 0;

RBE 2001 A15

// Save the cumulative milliseconds to be


// subtracted on next loop

15

S-ar putea să vă placă și