ME348_S24_Lab1 (1)

.docx

School

Pennsylvania State University *

*We aren’t endorsed by this school

Course

348

Subject

Mechanical Engineering

Date

Feb 20, 2024

Type

docx

Pages

23

Uploaded by BarristerSnowManatee27

Report
ME 348: Circuit Analysis, Instrumentation, and Statistics Lab 1 Getting Familiar with the Essential Lab Equipment Instructions for Completing this Lab: Please answer each question completely, showing all work as necessary. Any steps in the lab that require answers from you begin with the number of points in parentheses, highlighted yellow. You may type your answers into this document, use a tablet to write in your answers, or insert pictures of written work into the spaces provided. The most important thing is that your answers can be easily read/comprehended. Please follow all of the guidelines shown in the formatting guidelines document provided on Canvas. If pictures are requested, take a picture with your phone and insert it into the space provided if possible. Otherwise, include your picture in a clearly labeled Appendix. Remember to use figure captions. You need to include properly formatted Excel/MATLAB plots as requested. However, you do not need to include the data used to make these plots unless explicitly requested. After all of the answers have been entered, save this document as a PDF for submission to Canvas. You can delete the Introduction, Background, and Prelab if you desire, but this is not required. Attach a completed Lab Cover Sheet (provided below) to the front of your submission. Make sure to include all the documents requested, as appropriate. Only one person (designated by the team on the submission cover sheet) should upload the final submission to Canvas on behalf of the team. Questions regarding the completion of this lab should be directed towards your lab section TA on Canvas, with the course instructor included on the message as well.
Activities: 1. Oscilloscopes and Function Generators 2. Multimeters 3. Pushbutton Switch and Testing Continuity with DMM 4. Introduction to Arduino and Arduino IDE 5. Arduino Analog and Digital Read Learning Objectives: After completing this lab, students will be able to: Use a digital multimeter for static measurements of resistance and voltage Generate a periodic signal (e.g., a sine wave) with a function generator Use analog oscilloscopes, digital oscilloscopes, and computerized digital data acquisition-based virtual instruments for dynamic measurements of voltage and data logging Understand how to connect electrical components to a breadboard Set up an Arduino Uno to perform simple commands Program an Arduino Uno with MATLAB Introduction and Background: The intent of this first lab is to introduce students to some of the equipment in the Arduino student kits that will be used throughout the course, and to give them practice using these elements. Almost every lab exercise involves electronic instruments of some kind. In most cases, a voltage, current, or resistance must be measured and converted to a quantity of interest in the experiment (such as temperature, intensity, etc.). The key to a successful lab experience is to become familiar with the function and operation of the laboratory components and equipment. Instruments are available for both static and dynamic measurements. Static measurements are appropriate for parameters that are either constant or changing very slowly, such as the resistance of a resistor or the temperature in a room, respectively. These measurements can be done with a digital or analog readout in which only the time-averaged (mean) value is required. Oscillations around the mean may exist but may not be relevant to the measurement. In this lab, a digital multimeter (DMM) is used for static measurements. Depending on the brand and model, multimeters can measure voltage (both AC and DC), current, resistance, and sometimes capacitance as well as inductance. Dynamic measurements are necessary for time-varying parameters. For example, the stress and strain experienced by a vibrating beam oscillates in time with some frequency, and the amplitude of the oscillation decays with time. A multimeter would be of little use in this situation. Instead, an oscilloscope (or sometimes just “scope”) is used for such dynamic measurements. Digital oscilloscopes digitize and save the signal(s) so that better quantitative analysis is possible. Digital scopes use digital electronics, which require use of an analog-to-digital converter. A digital oscilloscope enables the user to move a cursor along the trace and read the voltage and time values numerically. This is often very convenient for estimating the amplitude or frequency of a periodic signal. In most cases, digital scopes provide Page 2 of 23
some kind of connection so that stored data can be directly transferred to a computer for further analysis. Since the 1980s and 90s, a new type of instrument has become ubiquitous for laboratory use in digital data acquisition via a computer. The graphical resolution and size of a computer monitor, as well as the storage capacity of PCs, are much better than those of a typical digital oscilloscope, and thus very attractive virtual instruments have been created for use with the computer. With graphical programming software such as LabVIEW, and with programs like MATLAB/Simulink, the computer can be programmed to function as a multimeter, oscilloscope, spectrum analyzer, or almost any other electronic instrument, and the computer display can even be made to look like the instrument it is simulating. An obvious advantage for the computer is its flexibility. State of charge (SoC) is the level of charge of an electric battery relative to its capacity. SoC is usually expressed as percentage (0% = empty; 100% = full). An alternative form of the same measure is the depth of discharge (DoD), calculated as 100 SoC (100% = empty; 0% = full). SoC is normally used when discussing the current state of a battery in use, while DoD is most often seen when discussing the lifetime of the battery after repeated use. Equipment: Your kit comes with several parts and components that you will use to build circuits as you will complete lessons and projects throughout this course. Here is a brief description of what is included in your kit: Arduino UNO – This is the microcontroller development board that will power, control, and digitize data from your circuits as we go along this semester. In 2005, the Interaction Design Institute Ivrea in Ivrea, Italy started the Arduino project to create a low-cost and user-friendly device that can control sensors and actuators. An Arduino is a single-board microcontroller. This is essentially a very small computer with a processor and sets of digital and analog input/output (I/O) pins that may be interfaced to various expansion boards ('shields') or breadboards and other electronic components or circuits. This allows users to create and program customized digital devices. In this class, we will learn two methods to program the Arduino board, (1) using the open-source Arduino Software (IDE) and (2) programming with MATLAB. Jumper Wires & Power Leads – Used to connect components to each other on the breadboard and Arduino board. Figure 2. Jumper wires and power leads Page 3 of 23 Figure 1. Arduino Uno board
A B Short bus R 2 R 1 Pushbutton – A pushbutton is a switch that closes the circuit when pressed. When released, the circuit becomes open again. Pushbuttons are used as input devices and allow the Arduino board to detect on/off signals. Breadboard – Engineers often use a breadboard to quickly build prototypes of circuits for testing. A breadboard has a series of holes or sockets into which jumper wires are inserted to make electrical connections. The wires are easy to connect and disconnect; thus, circuits wired on a breadboard are quickly and easily modified. Some of the sockets are hard-wired to other sockets, forming a bus . Breadboards have both short buses (typically containing 5 sockets) and long buses (typically running the full length or width of the breadboard and containing many sockets, often also in groups of 5). Short buses are used for component connections, in which two to five wires may be connected to one short bus. Long buses are generally saved for high-usage connections, such as a DC voltage power supply or ground (zero volts). A bus used as ground would, for example, be called a ground bus . Engineers should be familiar with the way the breadboard is internally wired before using the breadboard to create prototype circuits. Components, such as resistors, capacitors, and diodes can be inserted directly into the sockets. An example of how the leads of a resistor can be inserted directly into the breadboard is shown here. Clusters of 11 short buses are shown on the top and bottom, each containing 5 sockets, aligned vertically and indicated by the red rectangle that encircles them. These 5 sockets are connected to each other , but not to any other sockets. Resistor – A resistor is a component that resists the flow of electrical energy. As a result, resistors can change the voltage and current in the circuit. Resistor values are measured in ohms (represented by the Greek letter omega: Ω). The colored stripes on the resistor indicate its resistance value and tolerance. Familiarize yourself with these color codes (e.g., the Wikipedia article here may be a good starting point). The equation for calculating the percent error of the resistance reading is: Page 4 of 23 Figure 3. Pushbutton schematic Figure 4. Breadboard schematics with connected resistors Figure 5. Examples of resistors with different resistances
Percent Error ( % ) = | theoretical measured theoretical | where measured is the value measured with the multimeter and the theoretical is the one you will calculate using the voltage divider equation. Digital Multimeter (DMM) – The digital multimeter (DMM), or just multimeter for short, is a multifunctional measurement unit used frequency in circuit analysis and testing. DMMs may vary slightly from one unit to the next, but they are often capable of measuring at least the following: Voltage (common) Current (common) Resistance (common) Continuity (common) Capacitance (sometimes) Temperature via thermocouple input (sometimes) Transistor tester (sometimes) Watch the following video to learn the basics of how to use a digital multimeter (DMM): Digital Multimeter . Note: There are many different types of multimeters. The main difference between that in your kit and those in the video is that your “overflow” message is simply a “1.” If you get a reading of exactly 1, increase the range. Potentiometer – A variable resistor with three pins. Two of the pins are connected to the ends of a fixed resistor, while a third (sometimes referred to as the ‘middle’ or ‘wiper’ pin) is connected in such a way that it moves across the length of the resistor, essentially ‘tapping’ the primary resistor at a variable spot and dividing the resistor into two parts. Potentiometers are sometimes referred to as ‘pots’ and are used in this way to adjust the voltage in a circuit as both a means of control, as well as a sensor input. An example of a pot is the volume knob on an older radio. Project Board: The project board is a precut plastic base that combines the Arduino board and breadboard into one piece of hardware. The project board makes building circuits easy by securely holding the circuit close to the microcontroller. If you haven’t already assembled your project board, these instructions will help you do so. A. To build the project board, locate the plastic sheet. B. Carefully separate the pieces. After the pieces are separated, place Parts B, C, D, and E back into your kit. You will not need these pieces for the lessons in this course. These pieces are used for Page 5 of 23 Figure 6. Multimeter from Arduino kit Figure 7. Potentiometer drawing
projects in other Arduino books and courses. C. Attach the four Part A pieces into the holes in the corners of the base. This creates feet to hold the base up off the table. D. Your kit has three bolts that hold the Arduino board to the base. Start by removing the plastic base from the Arduino. Then insert each bolt through the Arduino board and then through the base. Use three provided nuts to hold the bolts in place. Be careful not to overtighten the nuts. E. Carefully peel the backing from the breadboard. F. You will attach the breadboard to the plastic base next to the Arduino board. First arrange the breadboard so that hole 1a is near the reset button on the Arduino board. When it’s in position, stick the breadboard to the plastic base. Lab Circuit Description/Primer In addition to familiarizing yourself with and using various pieces of laboratory equipment, this lab will introduce a useful circuit (voltage divider) and a component that can be used to make a variable version of it (potentiometer). Voltage Divider – As discussed in lecture, the voltage divider (schematic to the right) is a simple circuit that “steps-down“ the voltage supply (V in ) to some lower output level (V o ). Based on the choice of values for the two resistors, R 1 & R 2 , the output Vo can be set to a certain value according to the following equation: V o = R 2 R 1 + R 2 V ¿ As an example, if a sensor requires a supply voltage of 2 V to function properly and all you have is a 5 V source, you could choose values of R 1 and R 2 such that the potential difference across R 2 (V o ) is 2/5 of the 5 V supply (V in ). Potentiometer as a Voltage Divider – In this lab, we will use a potentiometer as a compact, variable voltage divider together with an Arduino. Referring to the schematic above for the voltage divider, think Page 6 of 23 Figure 8. Instructions to put together project board Figure 9. Circuit drawing for a voltage divider
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help