Physics 364 -- fall 2010 -- University of Pennsylvania
From
< User:Ashmanskas | p364
Physics 364 : Laboratory Electronics / Measurements Lab
University of Pennsylvania -- Fall 2010
- The overall goal is to be a fun and useful course, after which I intend that you will
- understand what electronics is good for
- know how to use common components & instruments
- know enough to be confident learning more from a textbook (e.g. Horowitz & Hill)
- know how to build solutions to lab/project problems you may encounter later in your career
- have enjoyed time spent in lab -- fun change of pace.
- Comparable courses' web sites (from which I have borrowed material in many cases):
- Last year's Physics 364 by Prof. Kroll: http://surf.hep.upenn.edu/~kroll/p364_fall09/physics364_kroll_fall09.html
- Harvard's Physics 123 by Horowitz/Hill/Hayes: http://www.people.fas.harvard.edu/~thayes/phys123/
- UC Berkeley's Physics 111 BSC: http://socrates.berkeley.edu/~phylabs/bsc/
Week 0 (Sep 8): course overview
- Detkin (formerly RCA) lab in Moore Hall: http://www.ese.upenn.edu/rca/courses.html
- Lecture 2010-09-08
- Syllabus
- Email re: proposed change of meeting times
- Meeting times:
- Lecture: DRL 3C8, Mondays only, 2-3:30pm
- Labs: 101 Moore Hall, Monday and Thursday evenings, 5-9pm
- Grading:
- 35% : lab write-ups (do ~ 90% of this in lab)
- 35% : weekly homework problems, LTspice simulations, etc.
- 15% : reading incentives (short/easy quizzes in lecture, or online questions before lecture)
- 15% : final project (a long-ish lab or simulation exercise of your own choosing)
- no midterm/final exams
- Textbook:
- I will provide loaner copies of D.V. Bugg, first edition (1991)
- if the 3rd edition of Horowitz & Hill existed yet, we would have used that instead
- Late assignments:
- It is important for you to keep up with the course, so that you can make good use of lab time.
- Unless prior arrangement is made, your score will be reduced by a factor 0.9 for every weekday that it is late. So the maximum possible score is 90%, 81%, 73%, 66%, etc., if your work is 1 day, 2 days, 3 days, 4 days late, etc.
- If you have a good excuse, you must discuss with Bill or Jose before the due date.
- Teamwork:
- I encourage you to work together, as it is a very effective way to learn. If you work together on a lab or a homework assignment, your write-up should indicate with whom you worked. In any case, everyone must turn in his or her own write-up, and what you write down must be your own reasoning – not the result of dividing the work and copying.
- On the benefits of doing technical work in pairs: http://en.wikipedia.org/wiki/Pair_programming
Week 1 (Sep 13,16): lab intro, resistor circuits, equivalent circuits, voltage dividers
- Lecture 2010-09-13
- LTspice examples:
- LTspice manual
- Lab 1
- User guides: HP 33120A HP 34401A HP 54601B
- Homework 1
- Reading from Bugg (ch1, ch2, sections 9.1--9.5) and Horowitz/Hill (pages 1-20 from ch1)
- Faraday's Law vs. Kirchoff's Voltage Law
- If you're interested in the write-up that accompanies the Walter Lewin MIT 8.02 YouTube video I showed in Monday's lab, it is listed under Lecture #16 at http://ocw.mit.edu/courses/physics/8-02-electricity-and-magnetism-spring-2002/lecture-notes/
- The video starts about 33 minutes into http://www.youtube.com/watch?v=G3eI4SVDyME
Week 2 (Sep 20,22): AC circuits, impedance, filters; diode rectifiers; AM radio
- Lecture 2010-09-20
- Quiz and Solutions
- Lab 2
- LTspice examples:
- Homework 2
- Reading from Bugg (ch3, ch4, ch5, ch6) or Horowitz/Hill (second half of ch1)
- Installing LTspice on your notebook computer
- If you are running Windows, the installation is simple. Either type "ltspice" into google or surf over to http://www.linear.com/designtools/software/ and click on "Download LTspice IV." You can register if you like, but it is quicker just to click "No thanks, just download the software."
- Once you have LTspice installed, go to http://positron.hep.upenn.edu/wja/p364 and download (right-click and save to a folder) the various *.asc files. These are LTspice input files. Open them up with LTspice. Click Simulation->Run and then left-click on wires (components) to graph their voltages (currents) vs. time. (For the full-wave bridge and power supply, you need to graph V(vin+)-V(vin-) to see the right input waveform.)
- If you are running on Linux, you just need to install WINE, and then open up the LTspice Windows installer executable from WINE. Since you are probably a bit of a hacker if your notebook runs Linux, these instructions should suffice for you!
- If you are running on a Mac, there is a good chance that you already use some mechanism of running Windows from time to time, e.g. Boot Camp, VMware, Parallels, or VirtualBox. In this case, you can just follow the Windows instructions.
- If you want to run under OS X on a Mac, then you need to install WINE. Go to http://wiki.winehq.org/MacOSX/Installing and choose one of the several methods. At home, I used the "MacPorts" option, which took me several hours and necessarily included registering as an Apple software developer. In the lab last night, I got the "Prebuilt Binary" method to work for me with very little hassle. Once WINE is installed, open up the LTspice Windows installer .exe from inside WINE, and you're good to go.
- Note that I have not managed to use LTspice on my Mac without plugging in a three-button mouse. Perhaps there is a trick I don't know to make WINE recognize control+click as a right-click, but I don't know what it is. So I use an external mouse.
- -Bill
Week 3 (Sep 27,30): Opamps I (golden rules & applications)
- Homework #3
- In place of a normal homework this week, I want you to install and run LTspice on your own computer. It's preferable if this is your portable computer, but any computer to which you have easy access will do. Follow the instructions I posted on Blackboard, and contact me or your classmates if you need more help.
- Once you have LTspice running, download then try some of the circuits that I put in the "*.asc" files on http://positron.hep.upenn.edu/wja/p364/
- If you're feeling ambitious, try creating a circuit or two on your own and simulating it.
- To receive credit for this homework, you need to find one LTspice result that you find interesting or informative, email me a screen capture of that result, and include in your email (to ashmansk@hep.upenn.edu) a few sentences about what you learned or found interesting about the result you are sending me. It could be a circuit of your own design, or one of the circuits from weeks 1, 2, or 3 of the course, or if you're feeling uninspired even one of my canned examples.
- Enjoy!
- -Bill
- Reading from Bugg (ch7) and Horowitz/Hill (sections 4.00 through 4.10, i.e. ch4 pp 175-188)
- LTspice examples:
Week 4 (Oct 4,7): Opamps II (departures from ideal); comparators; Schmitt trigger
- I put some derivations helpful in Lab 4 (basically identical to those done on the whiteboard in lab) at http://positron.hep.upenn.edu/wja/p364/lab4_notes.pdf .
- You can also find linked from http://positron.hep.upenn.edu/p364 my LTspice models for parts 4, 5, 6, and 7 of Lab 4.
- Since Lab 4 is taking people a bit longer than I originally expected, here are three changes that should make things a bit easier for you:
- (a) Part 4 is now optional.
- (b) Please do parts 6 and 7 before part 5, as they are both easier and more important.
- (c) If you find it quicker to do so, please feel free to study the LTspice models for part 5 (and the now optional part 4 if you like) in place of building those circuits in the lab. Either way is perfectly acceptable.
- Since Lab 4 is taking people a bit longer than I originally expected, here are three changes that should make things a bit easier for you:
- Also, I put solutions (from the Harvard course) for all of the problems in Horowitz/Hill chapter 4 (opamps) and chapter 2 (transistors) online at http://positron.hep.upenn.edu/p364 , in case you find them helpful.
- -Bill
- Reading material due 2010-10-04
- Homework #4 due 2010-10-07
- Solutions (from Harvard course) for HH chapter 4 (opamp) problems
- LTspice examples:
Week 5 (Oct 14 only): Transistors I
- bipolar junction transistors, BJT circuits (emitter follower, common emitter amplifier, push-pull, differential amp)
- Lecture notes 2010-10-13
- Lab #5
- We'll do Bipolar Junction Transistors first, then study Field Effect Transistors the following week. There will be a lecture (unusual time) next week, Wednesday 10/13, 2pm, DRL 3C8, but no quiz. There is no homework due in Week 5, in honor of autumn break, but I will provide some optional practice problems to solve. I will write advance lecture notes this week and put them online here.
- Read your choice of
- Horowitz/Hill chapter 2, or
- Bugg chapters 9, 17, and 18 (skip FET material and (*) sections)
- It takes quite some time to get one's mind accustomed to looking at transistor circuits. If you don't read in advance, you will definitely be confused in lab, and hence will miss an opportunity to learn as much as possible.
- Solutions (from Harvard course) for HH chapter 2 (bipolar junction transistors) problems
- LTspice examples:
Week 6 (Oct 18,21): Transistors II
- lecture notes, 2010-10-18
- lab #6
- more BJT circuits
- home-made 3-stage opamp
- homework due 2010-10-21
- LTspice examples:
Week 7 (Oct 25,28): Transistors III: Field Effect Transistors
- field-effect transistors, FET circuits (FET properties, analog switch, sample & hold, CMOS gates)
- Lecture notes 2010-10-25
- Lab 7
- Parts 1--6 (10/25)
- Part 7 (10/28)
- Note that Part 8 was canceled. Also, some component substitutions for Part 7 (e.g. JFET-input opamp; 555-based oscillator on small breadboard) were jotted on the board in the lab.
- http://positron.hep.upenn.edu/wja/p364/lab7_01nmosfollower.asc
- http://positron.hep.upenn.edu/wja/p364/lab7_02nmoscharacteristics.asc
- http://positron.hep.upenn.edu/wja/p364/lab7_03cmospushpull.asc
- http://positron.hep.upenn.edu/wja/p364/lab7_04nmosswitch.asc
- http://positron.hep.upenn.edu/wja/p364/lab7_05cmosinverter.asc
- http://positron.hep.upenn.edu/wja/p364/lab7_06cmosnand.asc
- Aha! I found models for our lab 7 MOSFETs here: http://homepages.which.net/~paul.hills/Circuits/Spice/SpiceBody.html
* * ZETEX ZVN3306A Mosfet Spice Subcircuit Last revision 3/5/00 * .SUBCKT ZVN3306A 3 4 5 * D G S M1 3 2 5 5 N3306M RG 4 2 270 RL 3 5 1.2E8 C1 2 5 28E-12 C2 3 2 3E-12 D1 5 3 N3306D * .MODEL N3306M NMOS VTO=1.824 RS=1.572 RD=1.436 IS=1E-15 KP=.1233 +CBD=35E-12 PB=1 .MODEL N3306D D IS=5E-12 RS=.768 .ENDS ZVN3306A
* * ZETEX ZVP3306A Mosfet Spice Subcircuit Last revision 3/5/00 * .SUBCKT ZVP3306A 3 4 5 * D G S M1 3 2 5 5 P3306M RG 4 2 252 RL 3 5 1.2E8 C1 2 5 28E-12 C2 3 2 3E-12 D1 3 5 P3306D * .MODEL P3306M PMOS VTO=-2.875 RS=5.227 RD=7.524 IS=1E-15 KP=.145 +CBD=35E-12 PB=1 LAMBDA=6.67E-3 .MODEL P3306D D IS=5E-12 RS=.768 .ENDS ZVP3306A *
Week 8 (Nov 1,4): Digital intro; combinational & sequential logic
- digital logic, CMOS gates, logic families, combinational logic
- flip-flops, counters, shift registers, other basic sequential logic
- lecture: http://positron.hep.upenn.edu/wja/p364/lecture_20101101.pdf
- lab: http://positron.hep.upenn.edu/wja/p364/lab8.pdf
- reading for weeks 8--10: chapter 8 of HH or chapters 11,12,13 of Bugg
- FYI -- amazing collection of old logic family data books online: http://www.tech-systems-labs.com/data_books.htm
- handy flip-flop (and more) web demos at http://www.play-hookey.com/digital/rs_nor_latch.html
- LTspice schematics:
Week 9 (Nov 8,11): Programmable logic intro
- basic Verilog
- compiling and loading FPGA programs using Xilinx ISE software
- repeating many of last week's circuits in Verilog
- testbench / running ISE simulator??
- N.B. Nov 13th Physics GRE
- lecture/lab: Lecture 9
- no lab write-up required this week
- no Thursday lab (but feel free to stop in to discuss final project ideas)
- related course material from SEAS: http://www.seas.upenn.edu/~cis371/
- I've written some Verilog Notes to help you to get started
Week 10 (Nov 15,18): Programmable logic
- programmable logic (e.g. FPGA, CPLD), memories, finite state machines, pipelining
- Lecture Notes
- Lab 10
Week 11 (Nov 22 only): Digital wrap-up
- continuation of material from Weeks 9 & 10
- summary of key digital concepts: gates, flip-flops, arbitrary truth tables, memories, state machines, pipelines
- illustrate how a simple microprocessor can be built up from digital components!
- This CPU fits in about a page of Verilog code and uses one small memory, several D-type flip-flops, and straightforward combinational logic. Yet it can carry out a nontrivial computation: computing and displaying the prime numbers from 2 to 9973 on a small Xilinx FPGA demo board (Digilent S3BOARD: http://www.digilentinc.com/Products/Detail.cfm?Prod=S3BOARD). A real microprocessor is based on the same concept, but is far more complex in order to achieve high performance.
- simple_cpu.v
- prime.sasm
- sasm.py
- asm.v
- test bench output for simple_cpu.v
- reading for weeks 11--13: HH chapter 9 or Bugg chapters 21 & 20
- also my Verilog notes
- Lab 11:
- finish Lab 10 material
- use ISE simulator to simulate simple traffic signal FSM:
- see http://positron.hep.upenn.edu/wja/p364/lab11/
- (no writeup required for this part)
- use ISE simulator to simulate my CPU example
- (no writeup required for this part)
Week 12 (Nov 29, Dec 2): Analog ⇔ digital conversion
- ADCs, DACs, connecting the analog & digital worlds, simple synthesizer using FPGA + DAC
- sampling, information, Shannon, Nyquist
- lecture: http://positron.hep.upenn.edu/wja/p364/lecture_20101129.pdf
- lab: Lab 12
- Part 1: building DAC
- LTspice DAC model: http://positron.hep.upenn.edu/wja/p364/lab12_dac.asc
- Part 2: Wilkinson-style (linear ramp) ADC
- Verilog source: http://positron.hep.upenn.edu/wja/p364/lab12_adc_linear.v
- simulation output (detailed): http://positron.hep.upenn.edu/wja/p364/lab12_adc_linear_output1.txt
- simulation output (sparse): http://positron.hep.upenn.edu/wja/p364/lab12_adc_linear_output2.txt
- Part 3: successive-approximation (binary search) ADC
- Verilog source: http://positron.hep.upenn.edu/wja/p364/lab12_adc_binary.v
- simulation output (detailed): http://positron.hep.upenn.edu/wja/p364/lab12_adc_binary_output1.txt
- simulation output (sparse): http://positron.hep.upenn.edu/wja/p364/lab12_adc_binary_output2.txt
Week 13 (Dec 6,9): PLLs, RF circuits
- Phase-Locked Loops, frequency modulation
- mixer, heterodyne receiver
- transmission lines?
- lecture by Jose on noise, interference, grounding/shielding
- (as it turned out, we didn't do a lab this week and instead people used the lab time to work on final projects)
- Please fill out survey to improve course for future years: http://positron.hep.upenn.edu/wja/p364/physics364survey.pdf
Final projects due before Dec 22 end of semester
- project ideas (some borrowed from UC Berkeley physics 111 web site):
- fill in ideas here as they occur
- build a UART for RS232 communication
- interface some transducer of interest (e.g. thermometer) to your computer's USB port
- design some analog filter of interest to you
- build a simple digital clock
- build a useful radio receiver
- build an audio amplifier to drive a big speaker from your computer
- learn some technology that interests you (GPS? cell phone network?) and describe it in a term paper
- design your own amplifier from transistors
- implement a simple microprocessor in verilog
- write a 1970s-era video game to display on an oscilloscope
- make a DTMF encoder (or decoder!) to transmit (or to receive) touch-tone telephone key frequencies
- transmit some signal of interest over an optical link
- make a distortion box for your electric guitar
- make an audio graphic equalizer
- make an audio echo/reverb machine
- put ultrasonic transducers to interesting use (e.g. intruder alarm)
- turn lights on and off with some audio signal (clap, whistle, ...)
- transmit or receive infrared TV remote control signals
- build a simple calculator with keyboard + LEDs + FPGA
- LED-based slot machine
- Times-Square-style LED marquee display
- program a simple synthesizer to play your favorite tune (e.g. J.S. Bach in old Commodore 64 commercials)
- interesting topics omitted for lack of time (could be explored in projects):
- voltage-controlled oscillators; positive feedback
- microcontrollers
- data buses, parallel & serial interconnects
- microprocessor nuts & bolts
- more extensive LabView project
- transmission lines