• Home   /  
  • Archive by category "1"

Electric Circuits Lab Conclusion Essay

This section presents the addition of four subroutines to the existing software developed in the previous section. The added subroutines, listed in Appendix D, were called InitSCI, SendChar, SendMsg, and CheckLimits. The InitSCI subroutine initialized the serial subsystem of the HC11 so that it could communicate with the host PC at 9600 baud [Spasov, 1996]. This initialization was done by writing control words to the BAUD, SCCR1, and SCCR2 control registers in the HC11 as shown in Appendix C.

In performing the testing and design for this part of the project, my laboratory partner and I divided the work in the following way. My partner assumed the lead role in connecting the hardware, and I assumed the lead role in writing the programs. Although one of us had a lead role in performing either the hardware or the software, we worked collaboratively in checking both the hardware and software and in troubleshooting any problems.
>
Procedures for Design. The first subroutine, SendChar, was added to send a single data byte from the HC11 to the remote PC terminal. The data byte to be sent was contained in accumulator A. After waiting for the TDRE bit in the SCSR register to be set, indicating that the HC11 is ready to transmit another byte, the value in accumulator A was written to the SCDR register to begin the transmission [Motorola, 1991].

The second subroutine, SendMsg, used the SendChar subroutine to write character strings to the remote PC terminal. Before calling SendMsg, the X index register was set to point to the beginning of the character string to be sent. The SendMsg subroutine then sent out the string by calling SendChar for each character until the NULL character was reached, which marked the end of a string.

The third and final subroutine, CheckLimits, was added to the existing software program to check the temperature range. The subroutine CheckLimits called SendMsg to print the following message if TEMP was less than 20 degrees Fahrenheit: "Temperature is very low." If TEMP was greater that 90 degrees Fahrenheit, CheckLimits called SendMsg to print the following message: "Temperature is very high." If TEMP was between 20 and 90 degrees Farenheit, CheckLimits called SendMsg to print the following message: "Temperature is acceptable." A flag variable called FLG ensured that the messages were not repeatedly sent for each entry into the very hot, very cold, or acceptable temperature regions. FLG was set to zero if TEMP was between 20 and 90 degrees, one if TEMP was less than 20 degrees, and two if TEMP was greater than 90 degrees.
>
Assessment of Design. While developing the design presented in this section, several mistakes and difficulties were encountered. The initial setup of the serial subsystem of the 68HC11 involved some troubleshooting. We also had problems with sending the alarm messages more than one time because a flag variable was not set. The diagnosis and solutions to these problems are discussed in this section.

Initially, the serial writes from the 68HC11 to the host PC did not work properly because the SendChar routine did not check the TDRE bit before writing to the SCDR register. This caused characters to be dropped when sending a message. We also had a problem sending out messages using SendMsg because we did not terminate the message strings correctly with the NULL zero. By adding the NULL zero to the end of the strings, the sending of messages worked as expected.

A final problem was the output rate of the alarm messages. At first, we did not set a flag to indicate to the program that a message had already been sent to the PC. This failure caused messages to be continually sent to the PC terminal when the temperature was outside of the normal operating region. This problem was fixed by making a variable called FLG that was set as soon as the alarm message was sent and then cleared when the temperature returned to the normal operating region.
>
>
Conclusions
>
This report has discussed the development of a temperature measurement and display system. The objectives of this lab were to develop the necessary hardware and software to have the HC11 measure temperature and indicate whether that temperature fell outside of prescribed limits. Both objectives were met. By keeping track of the measured temperature, the HC11 was able to control an LED temperature display. Also, if the temperature became very cold or hot, the HC11 sent an alarm message to a host PC terminal.

This lab has introduced us to the important topics of A/D conversion and serial communications. In the lab, an A/D converter allowed us access to analog inputs of temperature from a remote computer. Besides temperature measurement, A/D converters have many applications in automatic control systems and factory automation. For example, in an electric motor drive, the phase currents and flux are continually measured by using scaling circuitry and an A/D converter input to a microprocessor.


>
>
>
Appendix A: Hardware Schematic
>
>
Figure A-1 presents the hardware schematic for the temperature circuit. The circuit was designed according to the specifications obtained from the Computer Engineering Laboratories web site for ECPE 4535 [Lineberry, 2001].

Figure A-1. Hardware schematic for the temperature measurement circuit designed for this lab. In an actual report, all the connections, pin numbers, and pin labels should be shown.


>
>
>
Appendix B: Pseudocode for the Software Developed
>
>
XXXXXXXXXXXXXXXXXX*
XXXXXXXXXX
XXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXX
XXXXXXXXXXXX
XXXXXXXXXXXXXXXXXX
XXXXXXXXXX
XXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXX
XXXXXXXXXXXX

*In an actual report, the pseudocode would appear here. Also note that some professors allow you to substitute an appendix with program flow charts for this appendix.


>
>
>
Appendix C: Program Listing
>
>

The aim of this experiment was to understand the relationship between the variables of Ohm’s law and how they are part of an operation of an electric circuit. Introduction:

This experiment was done in two parts. The first part consisted of understanding how to determine the current, voltage and resistance as part of Ohm’s law. The second part consisted of how to use the variables in an electrical current. Knowing how the variables are used in calculations and electrical currents is important in determining the value of the resistor and how it affects the current in the circuit.

A device known as the multimeter is used to find the voltage and current in the circuit. Ohm’s principal discovery was that the amount of electric current through a metal conductor in a circuit is directly proportional to the voltage impressed across it, for any given temperature. Ohm expressed his discovery in the form of a simple equation, describing how voltage, current, and resistance interrelate: V= IR equation (1)

This continuous movement of free electrons through the conductors of a circuit is called a current (I). Current is often referred to in terms of “flow. The force motivating electrons to “flow” in a circuit is called voltage, which is a specific measure of potential energy which is always relative between two points. When there is a certain voltage present within the circuit it means the measurement of how much potential energy exists to moves the electrons from one particular point in the circuit to another particular point. Free electrons tend to move through conductors with some degree of friction, or opposition to motion.

This opposition to motion is more properly called resistance. The amount of current in a circuit depends on the amount of voltage available to motivate the electrons, and also the amount of resistance in the circuit to oppose electron flow. Just like voltage, resistance is a quantity relative between two points (cramblet, boorn, crowell, and starck). There are two types of circuits namely, series and parallel. In a series circuit the following equations are used to calculate resistance, voltage and current: Req = R1 + R2 + R3 + ….. Equation (2) Ieq = I1= I2 = I3 …… Equation (3)

Apparatus & Procedure:
Procedure of part one of this experiment was, decode the resistance values by the colors of the five resistors available to you. Once all five have been decoded, record values in excel. Then construct a circuit using a D-cell battery, electronics lab borad and wire leads as shown in figure 3.1A. Once that has been completed, insert the red wire and black wire into the multimeter and insert the red on the positive side of the battery while making sure the black wire is in upper left section of the lab board. Keep in mind that the multimeter sensitivity should be at 200mA range.

Now you can place the restitor in the circuit to determine the readings. After determining the values of the five resistors, disconnect the multimeter in order to connect a wire from the positive end to the resistor. Make sure to change the multimeter to voltage scale and reconnect the wires as shown in figure 3.1b. Now you can measure the voltage with a resistor in the current and record these values in the table. Be sure to do this with every resistor.

Part 1 sample equations: Voltage/Resitance = Current (V/R=I). In part two of this experiment, use the same equipment was in part one. Pick three resistors and insert them in the board as series as shown in figure 6.1 below while keeping in mind that they need to be connected with additional wires to complete the circuit. Then connect two wires to the battery cell. Put the scale back to 200mA, now that the current is complete it must be interrupted by connecting the red wire to the positive terminal. Then connect the black wire to the resistor 1 as shown figure 6.3. Record the reading of I0 which is initial current. For parallel circuit, set the board as shown in figure 6.4 below. Repeat the previous procedure, and interrupt the circuit in order to connect the multimeter at certain points in order to measure the currents of each resistor.

Data:
Table 1-Using values of current and resistors to find voltage: can be found in the appendix A of this report. Graph 1 of resistance vs current can be found in appendix A. Graph 2 of current vs voltage/resistance can be found in the appendix A. Table 2- Series circuit:

Results & Discussion:
At the start of this experiment, setting up the apparatus was a mild set back for my group as it was rather difficult to attach the wires in the correct location especially, in the parallel circuit. We quickly resolved this by seeking help to understand the setup. We were able to determine the current, voltage and resistance in each circuit and with the three resistors.

In the series circuit by looking at table 2 under appendix A, current is the same at every resistor which shows that it follows the formula for current in series circuit as current at each point is equal. However, for voltage and resistance when one increases so does the other. It can be seen as a clear trend that with increasing voltage the resistance also increases as they are directly proportional. The readings for each voltage are individual and the total resistance is found by the sum of all the resistors in the circuit.

Looking in appendix A table 3, the table shows results for parallel circuit. The currents at 0 and 4 are equal or the same. The voltage is the same when going through each resistor which follows the formula in parallel circuit that each voltage equals each other. However, the resistance the inverse of
each resistor is summed up to equal the total value of the resistance which is also inversed. Thus the total resistance would be smaller than the total summed up. Looking at graph 1 in appendix A, it can be seen that as current increases the resitance decreases which follows Ohm’s law. As, I=V/R. The graph does follow the theory of this experiment. Similarly, looking at graph2 it shows a relationship between V/R and current. Conclusion:

I can conclude that my results do agree with the theory. The results have shown that there is some type of relationship between the three variables and how they behave in a series and parallel circuit. It was also seen that the voltage and current had constant readings for different circuits. There was some difficulty in calculating the readings as it was rather difficult to do, due to human error and equipment error. The equipment should be more accurate with the readings and students should improve their handling on the equipment so as to obtain more accurate results. Ohm’s Law describes that current-voltage relationship for a resistor is linear.

Appendices
Appendix A – prediction and results of the electric field mapping. 1. Table 1 shows the universel resistor values and the recorded resistor values. 2. Table 2- shows the data in series circuit
3. Table 3 shows the data in parallel circuit
4. Graph 1 shows the relationship of current vs resistance.
5. Graph 2 shows the relationship of current vs voltage with the error bars

Appendix C- Citations of sources
Giancoli, Douglas C. Physics, Principles With Applications. 6. 2. Prentice Hall, 2005. Print. cramblet, jerry, james boorn, ben crowell, and jason starck. “Contributers:Ohm’s Law.” all about circuits. N.p., sept 2004. Web. 22 Sep. 2013. .

One thought on “Electric Circuits Lab Conclusion Essay

Leave a comment

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *