ENGR 072 - Electronic Circuit Applications, Fall 2017

Assignments

Homework due dates will be on the course moodle page; assignments will be turned in on moodle as a single pdf. Late homework will be penalized 25%, and won't be graded after 1 week. We will go over any questions on the homework the class before it is due. If your initials are next to the problem, you are responsible for presenting an outline to the solution in class (not the entire solution, but enough to get everybody working in the right direction).

If you have questions about the problem you are to present, please come see me the day before - but please don't do so right before class..

Before doing assignment 0, you may wish to read my E11/E12 review.

• Week 0: Review Problems Do problems 1 aa, 3 sa, 5 ka, 6 jc, 7 wc, 9 ed, 12 je. Note: this is due the first week of class. If you have any questions about the first assignment, either send me an email before classes begin or bring them to the first day of class. The assignment is due at noon on the first Thursday of class (9/7). Solution
Note: the solution to problem 9 is the solution to the "Relaxation Oscillator" of the second lab.
• Week 1: From text, 1.48 ec, 1.50 mg, 1.55 wg (hint: see 1.63 for a way to do subtraction, then modify it for addition), 1.57 tg, 1.63 jg, 2.8 mh, 2.16 kh Solution
• Week 2: (remember: problem session Tuesday evening) From text: 2.30, 2.47, 2.78, 2.93, 4.3, 4.10, also Problem A (the relaxation oscillator in real life) Solution
• Week 3: String of LED's, 4.64 (for parts c & d - since we're only interested in variations in voltages, you can replace zener diode by its resistance, ΔVz/ ΔIz=rZ, and eliminate DC sources since they don't contribute to variations), 4.75 part a, 4.78 (the solution method for parts d & e are in book, but we didn't do in class so you'll have to read up on it) , 4.88, Problem B. Solution
• Week 4/Week 5: No assignment
• Week 6: Solution
1. Problem C,
2. 1.35,
3. 1.36,
4. The ADC on the MSP430 has 10 bits. If the reference voltage is Vcc=3.3V, what is the resolution.
5. The 3.3V power supply is usually not very accurate (+/-5% or so), so for more accurate conversions, the ADC10 has a 1.5 and 2.5V reference (see page 535 of the data sheet). Assuming the sensor is perfectly accurate, and the ADC10 reference voltage is set to 1.5V (and is also perfectly accurate), how accuarately can you measure tempearture in Celsius (see page 550 of the data sheet).
6. Use the code below as the basis for a program that toggles the LED every time you hit the push button on the LaunchPad using interrupts on the push button input. Also add comments to the code.
7. Why is the variable pbFlag declared to be volatile?
```// don't forget the include file.

volatile int pbFlag=0;
#define LED BIT0

void main(void) {
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog
// Add your code to set up ports.

__bis_SR_register(GIE);  // enable interrupts.

while (1){
if (pbFlag) {
pbFlag = 0;
P1OUT ^= LED;
}
}
}

// Port 1 interrupt service routine
#pragma vector=PORT1_VECTOR
__interrupt void Port_1(void) {
// Add your code to set pbFlag to 1 and clear interrupt flag
}```
• Week 7: Solution
1. Problem D
2. Problem E
3. Use the VLO clock with TIMERA to get an LED to flash at 1Hz (0.5 sec on, 0.5 sec off).  Use interrupts.  The processor should be in low power mode except when processing interrupt (go into low power mode 3 - low power mode 4 turns off all clocks to save power
"```     _BIS_SR(LPM3_bits + GIE);    // Go into lpm3 and enable interrupts``` ".
The VLO clock is nominally 12 kHz, but can be as high as 20 kHz or as low as 5 kHz, so your flash rate may not be exact. There are two easy ways to get useful MSP430 examples:
1. download the file at MSP430G2x53, MSP430G2x33, MSP430G2x13, MSP430G2x03 Code Examples (Rev. I) .  Go to the "C" folder.  The readme file briefly describes what each example is.  File is also attached to this message.
2. Go to CCS (Code Composer Studio) and go to , and then open .
4. Repeat previous but use the DCO oscillating at 1 MHz as your time base. The flash rate should be very near 1 Hz.
5. Now that we have covered timers in class, add comments to the sample code (E72Lab5Template.c) to make operation of each part clearer (you don't need to comment the oscillator code in the block comment).  The commenting should be good enough that anybody in the class could follow it.   You can include a document that describes the mode of operation of the various peripherals (so you can use block diagrams and images from the documentation (documentation is here (look in MSP430G2553 Family User's Guide and Device Specs)).
• Week 8: Solution
1. From text: 1.67
2. 1.71
3. 2.117a (STC=Single Time Constant, i.e., first order filter)
4. Show that the circuit in Figure 16.37 have identical transfer function and explain why the second circuit uses one fewer op-amps.
5. 16.19
6. 16.22
7. 16.28 Also, determine ω0 and Q.
8. 16.30
• Week 9/Week 10: No assignment (no assignment until after Thanksgiving)
• Week 11:
1. Find the transfer function for a Butterworth low pass filter with the following characteristics
• No more than 3dB of attenuation below 3kHz.
• At least 50dB of attenuation above 8kHz.
2. Design a circuit to implement the filter above. Use the unity gain Sallen Key low pass filter with 10kΩ resistors. The top image is Sallen-Key low pass circuit, followed by the equation for the transfer function, followed by the unity gain Sallen Key low pass filter normalized to ω0=1.
To set cutoff to ω0=1/(RC), set R1=R2=R, C1=C·(2Q), C2=C/(2Q).

.

3. In the circuit below, if Cα=Cβ=C find a relationship between Rαand Rβ (each should be a multiple of some resistance, R). such that the circuit below is a high pass circuit with ω0=1/R·C, and Q determined by the values of Rαand Rβ.
i.e., Rα=K1·R and Rβ=K2·R

4. For the 555 oscillator from Lab 1, determine the frequency of oscillation and the duty cycle if the potentiometer is at its midpoint and the "JSlow" jumper is not installed
5. 16.62 from text
6. 17.18 from text
7. Problem F
8. Problem G

Labs

You should work on labs in groups of three or four, you will turn in one report per group.

• Lab 1 (Schematic entry and layout) Due at noon on 9/8.
• Lab 2 (Op Amps, etc...)
• Lab 3 (Diodes)
• Lab 4 (Circuit Construction and Programming - no report)
• Lab 5 (D/A & A/D) Not due until 10/12
• Lab 6 (Motor control with angle sensing)
• Lab 7 (Switched Capacitor Filter)
• Lab 8 (The Robot) Due Nov 13th.
• Project

Course information

 Instructor: Erik Cheever, Hicks 305, x8076 echeeve1@swarthmore.edu Meeting time & place: MWF 11:30-12:20, Hicks 211 Lab time & place: Lab is in Hicks 310 and is self scheduled.  I will be available at least one afternoon (TBD) per week (check my schedule) Problem Session: Tuesday evenings, 7:00-8:30, Sci 158. Text: Microelectronics Circuits, 6e, by Sedra and Smith, Oxford University Press This is an older edition of the textbook, and we will only be using a few chapters. You should be able to get it more cheaply than the most current edition (note that is is the 6th edition), but since it is an older edition the bookstore won't carry it. Amazon link. Useful refence, but there is no need to purchase: Op Amps for Everyone, available online (expanded print copy is also available on Amazon - the online version is sufficient for this class). OneNote: Link Files: Link (Old exams, powerpoints...) Moodle: Link Meeting with me: Check my schedule for office hours (I will try hard to be available then), but feel free to drop by anytime I am in my office. If you are having trouble contacting me, either call or email me.

 Coursework Weight Midterm exams #1, 2, 3 (Lowest exam counts 1/2 as much as others) 1/3 Homework (Lowest homework will be dropped) 1/6 Labs (Lowest lab counts 1/2 as much as others) 1/4 Project 1/4

Policy on working together

 Homework: I encourage you to work together on homework, but don't blindly copy another students work.  You should fully understand all solutions to homework before submitting them. Labs: I expect labs to be done as a group.  Each group will submit a single report (with all members of the group listed).  Groups should work independently of one another - you may discuss particular issues, but do not share data or reports. Projects: Projects may be either individual, or as a group. Exams: Exams are to be solely your own work.  The format of exams will vary, but it is never permissible to seek help from another individual.

Statement on Accommodations

If you believe that you need accommodations for a disability, please contact Leslie Hempling in the Office of Student Disability Services (Parrish 113) or email lhempli1@swarthmore.edu to arrange an appointment to discuss your needs. As appropriate, she will issue students with documented disabilities a formal Accommodations Letter. Since accommodations require early planning and are not retroactive, please contact her as soon as possible. For details about the accommodations process, visit the Student Disability Service Website. You are also welcome to contact me privately to discuss your academic needs. However, all disability-related accommodations must be arranged through Leslie Hempling in the Office of Student Disability Services.