Unformatted text preview:

6.081, Spring Semester, 2007—Thursday Lab for Week 7 1MASSACHVSETTS INSTITVTE OF TECHNOLOGYDepartment of Electrical Engineering and Computer Science6.081—Introd uction to EECS ISpring Semester, 2007Thursday Lab for Week 7• Lab on designing and using a virtual oscilloscop e.• Lab report due Tuesday April 3rd in Lecture.The constraints view of circuitsIn Tuesday’s software lab, you used the constraint view of resistor networks to get the computer toanalyze circuit voltages and currents. In this lab you will be designing circuits with resistors, andwe hope this experience will help you develop intuition about how such circuits behave. Specifically,you will us e your unders tanding of resistor networks to design a virtual oscilloscope, and then usethat oscilloscope to investigate the behavior of a LEGO motor. This lab is new, and to allow us toexperiment with some of the material, we have made some parts optional. Please also be preparedthat we may make announcements if we see common difficulties which we did not predict.Thursday Lab - Designing and using a virtual oscilloscopeIn this lab you will design a resistor network that will allow you to measure voltages over a wid erange. Then you will write a python program that will create a graph of a sequence of voltagesamples taken at r egular time intervals, effectively creating a virtual oscilloscope. Finally, you willuse your virtual oscilloscope to measure the relationship between voltage and current for a LEGOmotor, and use your knowledge of circuits to develop a circuit model for the motor.For this lab you will not need the robot, but you will need a laptop an d:• National I nstruments (NI) Interface Box, USB cable, and screwdriver.• A number of resistors.• A Lego motor with connector.• A protoboard with built-in power supply.We will be us ing the NI box in a number of labs to interface to circuits, sensors and motors. The NIbox can b e used to measure voltages and convert those voltages to numbers that can be accessedusing python. We have provided a python program which will read numbers generated by the NIbox, specifically the numbers that are related to the voltages at the NI box terminals lab eled AI0,AI1, and AI2. Note that for the NI box, the voltages are measured with respect to the voltage atthe NI box terminal labeled GND. Our program, daqtry.py, is an infinite loop which reads fromand writes to the NI box and prints the results. The program is in the subdirectory NILab in thehome directory on the lab laptops.You will also be using a protoboard to build some small circuits. A protoboard is used for makingeasily modifed electrical connections between wires and circuit elements. If you look at yourprotoboard, you will notice many rows of five holes. These holes are electrically connected, soif you plug two wires in to two holes in the same row, the wires will b e connected electrically.Resistor leads can also be plugged directly in to the protoboard holes. Also, each protoboard6.081, Spring Semester, 2007—Thursday Lab for Week 7 2has several long columns of holes which are used for nodes in a circuit that have a large numberof connections. These columns are often used for ground and power. CAREFUL: the longcolumns are only electrically connected for HALF THE COLUMN. If you have neverused a protoboard, have one of the staff members demonstrate the board’s use.Try using the NI BoxConnect the NI box to your laptop (it has a USB connector), and try running the daqtry.py programto read the voltage at AIO. Please note that you will need to connect wires to the AI0 and GNDterminals to conn ect circuitry to the NI Box. You should also take note of the fact that the NIbox has terminals which generate two reference voltages, +5 volts and +2.5 volts. We have specialscrewdrivers, wire, and wire strippers, just ask if you need them.Try connecting AI0 to GND and to the two reference voltages and note the readings returned bythe daqtry.py program.PLEASE NOTE: Sometime the interface to the USB port gets confused, and you get a pile oferror messages when you run daqtry.py. I f so, exit any python interpreter you are running, unplugthe NI box from the USB port, wait a few seconds, and then replug in the NI box. Then tryrunnin g daqtry.py again. If that does not fix the problem ask for help.Checkpoint: 2:15 PM• Demonstrate that you can use python to read voltages from the NI box.Rerange the input using a resistor networkThe input voltage range for the NI box AI0 inpu t is from 0 volts to 5 volts, but the power supplyfor the protoboard can generate voltages in the range of 0 volts to +15 volts. Your job will beto design a resistor divider network that will reduce voltages in the range from zero volts to +15volts to voltages in th e range from zero volts to five volts. The reduced voltage range can then bemeasured using the AI0 input, and you can use python to post-process the measured voltage andundo the effect of the resistor divider. In this way, you can use the NI box to effectively measure alarger range of voltages, making your own volt meter.To see how to design such a circuit, consider the diagram below of the NI b ox, an external resistornetwork, and the connection points for a test voltage (supplied h ere by the protoboard +15 variablesupply and the protoboard ground). If R2 = 10, 000Ω = 10kΩ, what value should R1 have so thatthe voltage at AI0 with respect to GND will be five volts when the protoboard adjustable supplyvoltage is 15 volts.Once you have decided on a resistor value for R2, explain your solution to your LA. Th en , pleaseuse the protoboard we have given you to construct your external resistor network. In order toconstruct your network, you may need to use series and parallel combinations of the resistors wehave available to generate the r esistance values you n eed. Ask you LA to sh ow your our labeledbox of resistors. Finally, modify daqtry.py so that th e printed voltage m atches the test voltage.You can demonstrate your volt meter using the protoboard’s adj ustable voltage supplies.6.081, Spring Semester, 2007—Thursday Lab for Week 7 3R1V1R2V2NationalInstrumentsUSB CableGNDTo Protoboardvariable +15vAI0To ProtoboardGroundCheckpoint: 3:15 PM• Demonstrate that you can measure voltages from 0 to +15 volts using the NI box andyour r esistor network.Optional Challenge if you have timeThe NI box has a five volt reference voltage. Can you add a resistor to the divider network, andthen adjust


View Full Document

MIT 6 01 - The constraints view of circuits

Documents in this Course
Week 1

Week 1

3 pages

Op-Amps

Op-Amps

8 pages

Op-Amps

Op-Amps

6 pages

Syllabus

Syllabus

14 pages

Planning

Planning

14 pages

Load more
Download The constraints view of circuits
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view The constraints view of circuits and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view The constraints view of circuits 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?