Read this whole page in advance.
Read the SoftScope Tutorial.
Read the Intro. to Data Acquisition, and don't forget the appendices.
You'll work in pairs, so buddy up. Each team gets a kit of materials, instruments and tools.
We take SAFETY seriously and so should you. Intentionally risky behavior rates a visit with the judicial council.
You need:
From your reading you know what resistors do. The transformer is our source of (alternating current) voltage. That means its output is a sinusoidal current that varies between + and - some constant value. It already has a 10-ohm resistor attached (the rectangular ceramic component) to keep the current down to a safe level.
Using Softscope, you are to measure four (peak-to-peak) voltages in
your
circuit. The circuit diagram looks like this:
You are to measure the voltage between points I and X, I and Y, I
and Z, I and O.
Come up with a simple 'theory', a very short prose or mathematical description relating your four measurements to the circuit.
(Optional) Look at the "Theory" section below and relate it to your own theory of the observations.
Extra Credit: extend your observations by changing your circuit to have parallel resistances. If you don't know how to calculate parallel resistance, use the theory you've developed about your voltage divider to compute the combined resistance of 2 or 3 resistors in parallel.
Hand In: Write down your team members' names, your four measurement values (e.g. "I-O: XXX volts", I-X: YYY volts, ..."), and your theory prose (or math) as enhanced by your understanding from the "Theory" section. Also of course any extra measurements and experiments you did.
If you have problems identifying components or finding bits, ask for help.
Find two 6" (or so) plastic-insulated wires (red, blue, violet...) with their ends stripped of insulation, so you see at least 1/4" of copper wire on each end. (In the direst extremity, strip some wire yourself with the wire tool).
On the 6009, find the "Analog Input" side with labels that look like "GND AI0 AI4 GND AI1 AI5...". Use the screwdriver counterclockwise looking down to open the jaws of AI0 and AI4 ("leftie loosie"), insert one end of a 6" (or so) wire from the last bullet above each of the jaws and tighten them "up" with the screwdriver ("rightie tightie").
You've just created a "differential analog input" to the 6009.
Plug the 6009 into a USB connection ON THE CHASSIS (NOT THE SCREEN) of your computer.
Start Matlab
The breadboard is used to connect components together.
The idea is quite simple: Each horizontal row of 5 holes (A-E, and F-J) is tied together electrically, and can be used as a connection point for up to 5 wires or leads. All the holes in each red and blue column are also electrically connected columnwise. These columns are generally used as power source and ground repectively.
You'll need two more 6" wires we'll misleadingly call call "input" and "output".
For this lab we want to implement the circuit above, with "extra holes" so we can insert probe wires from the 6009 that connect to pairs of points in the circuit: I and X, I and Y, I and Z, I and O.
Do that any way you like: one idea is to use only columns A-E of the breadboard. Recall each half-row of holes A-E is electrically connected.
You don't even need a script. You can type the three lines that start Softscope directly from the Softscope tutorial into the command window.
Following the procedures below will leave you with a sinusoidal wave in Softscope's channel 1: CH1. You want to measure the wave's ('peak to peak') height. The numbers in the scope's lower left show how many volts per division are being used for each channel display. The default is probably 1, which means you'll want to decrease the vertical scale to something like 5 to fit your wave onto the screen. You want to see the whole wave as large as possible on the scope and to relate its height easily to volts. Choose CH1 in the middle of the Channel Scaling section of the scope. The "Scale" knob can be moused around to change the scale and the "Offset" knob to move the signal up and down. Chances are you can't get a nice even vertical scaling (like 5.00 volts/division) since the dial's so goosey.
For an exact scale setting, go to the Edit tab at upper left of scope, choose Edit Channel, then Channel Properties, then CH1, and look down the menu for "Vertical Scale". The reading there should agree with the value at the lower left. The number is editable...just type in your new desired scaling and make sure to klik OK at the bottom of the editor window. The right thing should happen.
xkHaving fixed a convenient scale, now you can use the Offset knob to put the bottom of the wave on a convenient horizontal line and read the voltage off as the height (in scaled divisions) of the top of the wave.
Put one of your 6009 leads into your chosen hole for I and the other into that for O. You're now measuring the voltage across all four resistors. Call that Vin. Write it down.
Leave the probe lead at point I and measure and record three Vout voltages at points X,Y, and Z.
To repeat from above, verify that your four resistors are equal in value. Come up with a simple 'theory', a very short prose or mathematical description relating your measurements to the circuit.
(Optional) Look at the "Theory" section below and relate it to your theory of the observations.
Extra Credit: extend your observations by changing your circuit to have parallel resistances. If you don't know how to calculate parallel resistance, use the theory you've developed about your voltage divider to compute the combined resistance of 2 or 3 resistors in parallel.
Hand in your answers (see "What to hand in" below).
If Matlab can't find the 6009 (e.g. you get errors on ai = analoginput('nidaq', 'Dev3')), and daqhwinfo('nidaq') doesn't show a device with a real name (e.g. could be Dev4), then make sure 6009 is plugged into the chassis, not the screen, of computer. Probably best to kill and restart Matlab if this happens. At least delete('daqfind'); clear.
If you hook everything up correctly, you'll see a sine wave voltage on Softscope when you connect points A and B, C, D, or E to the differential inputs for channel 0. A common problem is to see a flat line. Almost certainly there's a wiring problem (for us, we poked a wire into the wrong hole) or a bad connection (didn't poke it in all the way). A sanity check is to connect the output of the transformer directly to the two 6009 inputs, which should also give you a sine wave.
The 6009 and Softscope have internal state that sometimes gets mysteriously set and
can render them "crazed".
IF you get strange errors involving timeouts, lack of timeouts,
operations not finished, or samples missed, if get(ai)
(for instance) shows the object in the 'Running' state when it
shouldn't be, if you're told to kill off other jobs or
set SampleRate lower, or you get other mysterious whining,
AND your code seems OK, then do the following:
From Wikipedia's
Voltage Divider article.
Ohm's law says that
the total voltage drop between the input and ground is
Vin =
I * ( R1 + R2)
for some current I.
Either of R1 and R2 may be made up of
other resistors in series or parallel. Likewise
Vout = I*R2.
The first equation gives
I = Vin / (R1 + R2)
And substituting that into the second equation we get
Vout =Vin * [ R2 / (R1 + R2)] .