Download presentation

Presentation is loading. Please wait.

Published byWaylon Cabell Modified over 3 years ago

2
What have we learned so far? When we apply a voltage, the capacitor will charge up to the applied voltage. The capacitor charges up exponentially. The capacitor takes about 5 time constants (5 τ = 5RC) to fully charge. The capacitor takes one time constant to charge 63.2% of the way up. The same things hold true when a capacitor discharges in an RC circuit. RC Circuits

4
In Engineering Foundations, you wired up a series RC circuit to a 1.5V battery and measured the voltage across the capacitor as it charged using a multi-meter and a stop watch. It worked OK because the cap charged pretty slowly.

5
RC Circuits What happens if we have a voltage signal that changes over time (ac signal) instead of a constant voltage (dc signal) like we get from a battery?

6
RC Circuits The capacitor will try to follow the signal by charging and discharging. For example, if we apply a square wave and allow enough time for the capacitor to charge and discharge, will we see something like this:

7
Lab Today We are going to apply square waves and sine waves to a series RC circuit and measure the capacitor voltage as it charges and discharges.

8
Data Acquisition Device (DAQ) A DAQ is a cool little device that allows you to interface software and hardware. Here is what we will do: Create a square wave or a sine wave in MATLAB Send the signal out through the DAQ as a voltage signal applied across the RC circuit We will also use the DAQ as a voltmeter to measure the voltage across the capacitor The DAQ will send these measurements back into MATLAB so we can easily plot the voltage vs. time

9
Analog Discovery DAQ Analog IN Channels: The two orange wires labeled 1+ and 1- form an Analog IN channel. IN means into the DAQ from hardware. This input channel is our replacement for the multi meter. The orange wires will be placed across the capacitor to measure the voltage. The DAQ will take 10,000 measurements every second !! The blue wires (2+ and 2-) are another IN channel which we won’t use today.

10
Analog Discovery DAQ Analog OUT Channels: The yellow wire labeled W1 and black ground wire labeled form an Analog OUT channel. OUT means out of the DAQ and applied to the circuit. This output channel is our replacement for the battery. These wires will be placed across the RC circuit to apply a voltage signal. W2 allows for a 2 nd Analog Out signal but we won’t use that today.

11
MATLAB Code On the metasite for Blackboard, there is an m-file called RC.m This file has almost all of the code that you need for today. there are a few lines you will need to fill in.

12
MATLAB Code This section of code first clears all variables then checks to make sure the DAQ is connected and is recognized by MATLAB. If MATLAB can’t see the DAQ, it will print out the statement in line 13 and terminate the program

13
MATLAB Code This section of code gets things started by setting up a session allowing MATLAB to communicate with the DAQ. We used a variable name, DAQ,, to name our session.

14
MATLAB Code This section of code turns on the Analog Input Channel (1+ and 1-) to measure Voltage. We set the range on the voltmeter to read voltages between -2.5 and 2.5 volts.

15
MATLAB Code This section of code sets the sample rate to 10,000 samples per second. So, we will get 10,000 voltage readings every second. Try doing that with a stop watch!

16
MATLAB Code This section of code turns on the Analog Output Channel (W1) which will allow us to apply a square wave or sine wave voltage signal across the RC circuit.

17
MATLAB Code This section of code will ask the user to enter in the period, T, of the square wave using an input statement.

18
MATLAB Code This section of code is where your team will complete three lines of code to create a square wave called AppliedVoltage (a bit later on today)

19
MATLAB Code This section of code will queue up your AppliedVoltage square wave and get it ready to send out. The startForeground command in line 61 is the start command and collects the voltage measurements in a vector called CapVoltage and the corresponding times in a vector called timestamps.

20
MATLAB Code These commands ought to look pretty familiar!

21
Circuit

Similar presentations

OK

Chapter 19 DC Circuits. Units of Chapter 19 EMF and Terminal Voltage Resistors in Series and in Parallel Kirchhoff’s Rules EMFs in Series and in Parallel;

Chapter 19 DC Circuits. Units of Chapter 19 EMF and Terminal Voltage Resistors in Series and in Parallel Kirchhoff’s Rules EMFs in Series and in Parallel;

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on formal non-formal and informal education Ppt on transportation and communication Ppt on life in prehistoric times Ppt on different cultures of the world Ppt on division as equal sharing Presentations ppt online reader Download ppt on excretion in human beings Ppt on computer languages wikipedia Ppt on asymptotic notation of algorithms definition Ppt on major domains of earth