# Engineering lab report with matlab

Lab 5: BASIC CIRCUITS

( Resistors, Voltage,  and Current with MATLAB adapted from P-178 DC Circuit Labs )

Introduction:

Electric circuits can be defined as closed or continuous paths in which electric currents are confined and around which electric currents can be caused to flow. Electrical circuits are an essential part of daily living, and may be found in heavy and light industry, commercial installations and operations, and residential applications. Modern life and its many conveniences seem inconceivable without the use of electric circuits.

The total resistance of a circuit is the sum of the individual resistances of the power source, the wiring, and the load. The load resistance is generally much higher than either the resistance of the power source or the wiring. The resistances of the wiring are usually neglected in classroom laboratory experiments. Very rarely is circuit wiring significant in experimental work. In these cases we consider the loads resistances to be the only resistance. Wiring resistance may be considerable in the case of transmission cables, as well as telephone lines, which are many miles long, and we have a lab which investigates and calculates the resistance in such cables and the lost power and energy due to these lengths.

If an arbitrary load of relatively low resistance were connected to an existing power supply or voltage source, an excessive current might flow to the load, causing burn up or other malfunctions with the load and wiring.  The current can be reduced

by reducing the source voltage, but this is not always feasible and is frequently impossible. The resistances of the voltage source or the load could be increased, but these are usually built right into the source or load. Resistances of connecting wires are so low that miles would be needed to increase the circuit resistance by more than a few dozen ohms. A selection of materials for connecting wires might be useful, but a better method would be to creation of a device that is specifically a resistor that can be included with the circuit to give the net or total resistance needed to provide the desired current for the voltage source involved.

In any DC circuit, the total current is equal to the power source voltage divided by the total or equivalent resistance. For a Series Circuit, this is the only current. This means that if the current in some portion of the circuit is known, the total current and the current through every part of the circuit is known. The sum of the voltage drops across the resistors in series is equal to the power supply voltage.

In Parallel Circuits, the total current from the power source divides into different paths as in approaches the parallel branches. The voltage drop across parallel branches is the same for all the branches. If the voltage drop for one branch is known, the voltage drop for all the parallel branches is known.  The sum of the currents in the various branches is equal to the current from the power supply.

Circuits with combinations of Series and Parallel portions or sections are more complex. The current through different sections is not the same and the voltage drop across various branches is not the same either.

Ohm’s law is the relationship between voltage, current, and resistance, and is used to calculate current, voltages, or resistances in relatively simple circuits that may be reduced to a simple circuit consisting on one voltage source and on resistance. For more complex circuits, including series and parallel portions and branches that might not be reducible or readily reducible to a single resistor, the application of Kirchhoff’s Rules is used to solve for various branch currents, branch voltages, total current and power.

Kirchhoff’s Rules are two, the Junction Rule and the Loop Rule.  The Junction Rule says that the sum of currents entering a node must equal the sum of currents leaving the node. The Loop Rule says that the sum of the voltage sources around a loop must equal the sum of the voltage drops or i*R drops around the same loop. Algebraically these would be:

Σ i = 0.0     (Node Rule)          and    Σ V   =   Σ i*R     or      Σ V   –  Σ i*R = 0.0       (Loop Rule)

Various sections are from Total Circuit Resistance:     Mileaf, 7th ed pages 2-20, 2-22, 2-106

Equipment for each Group:

PASCO Electronics Kit.

Large Power Supply.

Multimeter.

Procedure:

From the PASCO Electronics Kit select 5 resistors with values approximately equal to those tabulated here:

Number of Resistor

1

2

3

4

5

Resistance (ohms)

98.

330.

550.

995.

33.

a. (5) Measure and Tabulate the values of the Resistors in the Data Sheet provided.

b.    Place the Resistors in the arrangement shown in the Lecture Notes of Lect_Circuits.

Note there are no resistors in Series or in Parallel. The circuit is irreducible.

c.   Connect the Power Supply and set it to 15.0 volts.

d. ( 5) Measure and record the Voltages across each resistor in the Data Sheet provided.

e. (10) Calculate and record the Currents through each Resistor using Ohm’s Law.

During today’s Lab Session complete these steps f – i :

f.    ( 6)    Write the Kirchhoff’s Node Rule for nodes b and c;

g.   (12)     Write the Kirchhoff’s Loop Rule for loops I, II, and III.

h.   ( 5)  Substitute the values of the Power Supply and the five Resistors into the equations.

i.    ( 5)  Arrange the five equations in Matrix Format as preparation for entry into MATLAB.

When you have access to MATLAB complete the following steps j – l :

j. (15)  Solve the five simultaneous equations for the five currents using MATLAB and tabulate the values of current in the

Data Sheet below the measured values. Print out the MATLAB script file or workspace and results.

k. ( 5)  Calculate and tabulate the Percent Differences between the measured values of current and the ‘Theoretical’ values

of current from MATLAB; use the MATLAB values as the denominator.

l.   ( 5)   Calculate and record the Equivalent Resistance of the circuit using the measurements and again using the

MATLAB results.

m. (1)  Think about how you would calculate and fill in the various ‘Total’ entries in the Data Sheet, and fill them in.

Deliverables and Typed Memo Write-Up from Each Student:

1. (5) Brief Introduction discussing the importance of Circuits and Ohm’s law. Do not simply copy the material I sent.

2.   Neatly completed Data sheet and a paper copy of the MATLAB script file used to calculate the currents.

Equations for Kirchhoff’s Node Rule for nodes b and c;

Equations for Kirchhoff’s Loop Rule for loops I, II, and III.

The equations with values of Resistors and Power Supply substituted  into the equations.

The five equations written in Matrix Format as preparation for entry into MATLAB.

3. Discussion Questions,  Conclusions,

a. (2)   Which set of values of current do you believe to be the more accurate?

b. (2)  Which measurements contributed to the uncertainty of obtaining the currents from Task 1?

c. (2) Which measurements contributed to the uncertainty of obtaining the currents from Task 3?

d. R1 and R2 appear to be in parallel; are they?  How do you know:

i. )   (3)   Experimentally

ii )  (3) Theoretically

e. R3 and R5 appear to be in series; are they?  How do you know:

i. )  (3) Experimentally

ii )  (3) Theoretically

4. Conclusions

a. (3) What did you learn from this lab?

b. Suggested recommendations for improvements, if any.

I will post the data sheet when the deal is done