U of U ECE 3720 - Analog Interfacing Lab Handout
Pages 6

Unformatted text preview:

CS/EE 3720 Handout #10Spring 2006MyersLAB #10: Analog InterfacingYou must checkoff this lab during your lab section of the week of April 17th. Lab writeup isdue in class on April 27th. NO LATE CHECKOFFS OR LAB REPORTS WILL BEACCEPTED.1 Objectives• Demonstrate a simple digital-to-analog converter.• Gain experience with power transistors and op amps in reversed-input configuration.• Understand a simple circuit that will use a high-impedance voltage output to control a 12VDC motor.• Demonstrate analog control of a DC motor using the 68hc11 and an R-2R resistor ladder.• Demonstrate that you can control (relatively) high voltage circuits without totally destroyingsensitive digital circuits.• Use the 68hc11 A/D converter system to capture arbitrary waveforms.2 Reading• Read Chapter 11 on analog interfacing.3 Parts• You likely will need an additional breadboard for your external circuitry.• Resistors to build a 6-bit D/A converter using an R-2R ladder. You should use R equal to10K.• To build your motor driver you will need the following:– 50K variable resistor (anything in 5K to 100K range should work)– 10K resistor (+/- 50– 741 op amp– TIP120 NPN transistor– 1N4004 diode– 47-200 uF– 12V DC servo motor (available for checkout in the lab).• A 1K-10K resistor will be needed for the PE0 analog input.2R 2R 2R 2R 2R 2R 2RR R R RRb0 b1 b2 b3 b4 b5Vout40K5V2R−5V+−Figure 1: 6-bit D/A converter using an R-2R ladder.DCMotor10KTIP120 NPN Transistor1N400447−200uF50K variable+12V741 OpAmpVcontrol+12V+−Figure 2: Motor driver circuit.4 BackgroundIn this lab, you will be building a 6-bit D/A converter using an R-2R ladder (see Figure 1), use itto control a 12V DC servo motor, and use the 68hc11 A/D converter system to check the value ofyour analog output signal. Your design will be controlled via commands over the serial port (hint:you can likely start with the lab2 assembly code to handle the serial interface). Your interfaceshould accept the following commands:• a nn - set the output value connected to your D/A converter.• t - create a triangle wave• p hhhh - set the sample update period• n hhhh - capture specified number of samples• r - retrieve wave file; transmit ascii-hex over serial linkYou should use PortC to connect to your D/A converter. The “a nn” command will be used to setthe 6-bit value (where “nn” is 0 to 63) that will be sent to your D/A. The “t” command simplystarts from 0 and counts up to 63 outputing each value to the port connected to your D/A. Youshould wire the output of your D/A back through PE0 to be sampled by the 68hc11 A/D converter.The “p hhhh” command sets how many cycles you want to wait between samples. The “n hhhh”command sets how many samples you want to take (each sample should be stored into RAM).Finally, the “r” command causes the program to perform the sampling, and when it is done totranmit the results back over the serial port. The last step is to construct the moter control circuitshown in Figure 2, and to control the motor speed using the “a nn” command.CAUTION: Be very careful when building the motor driver circuit for this lab. The +/- 12Vpower supply for the op amp and DC motor can damage or destroy the integrated circuits in thedigital portion of your circuit. If possible, use a separate breadboard for the circuit ab ove. Thenonly share the GND and D/A output lines between the two circuits. When connecting power to the12V DC motor, be sure to use the power input connectors, not the tachometer output connectors.The power inputs are the pair nearest the shaft.5 Prelab1. Write new code or modify lab2 code to parse the commands described above, set the PortCvalue to your D/A converter, and perform sampling of the analog signal using the 68hc11A/D converter system.2. Answer the following questions ab out the motor driver circuit before starting the lab.(a) Assuming the TIP120’s collector voltage is 0.7V when the transistor saturates, andassuming the coil resistance of the DC motor is 15 ohms, what is the maximum currentdraw (i.e., the stall current) of the motor?(b) Assuming the DC c urrent gain (hF E) for the TIP120 is 1000, what is the base currentthat corresponds to this collector current?(c) Assuming the maximum output of the op amp is 11.3V, and base voltage of the TIP120is 0.7V, what is the largest value for the resistor connected to the transistor that willpermit a base current up to the value computed in part b?(d) Typically, an op amp is configured with the feedback signal entering at the negative in-put. Why does this circuit have the feedback signal entering the positive input? Explain,in qualitative terms, what happens in this circuit when the Vcontrol input decreases bya small amount, e.g., from 2.5V to 2.4V.(e) Does the maximum motor current correspond to a Vcontrol value of 5V or 0V? Assumethe motor is not loaded in either case.(f) When the Vcontrol input is 0V, what value would you expect to see at the TIP120’scollector? If the variable resistor is set to its midpoint, what value do you expect to seeat the positive input to the op amp? What value would you expect at the op amp’soutput? Explain your reasoning.(g) To completely turn off the motor, we would like to drive the op amp to its negative powerrail when the Vcontrol input is 5V. What requirement does this place on the value ofthe op amp’s positive input for a Vcontrol input of 5V? (You may simplify by assumingthe the op amp has infinite open-loop gain.) If the TIP120’s collector current is cutoffwhen the Vcontrol input is 5V, what is the collector voltage in this case? (You mayassume negligible current through the variable resistor, for this question.) How does thevariable resistor nee d to be s et so that our requirement for the op amp’s positive inputis met? Express you answer as a percent, where 0% corresponds to a wiper position atthe ground end of the resistor.Each group can complete the prelab problems together. Group solutions to these problems are dueat the beginning of the lab section during the week of April 19th.6 Lab Tasks1. Build a 6-bit D/A converter using an R-2R ladder. Use PortC to provide the digital signalto your D/A converter. Note: if you’re feeling ambitious and would like to experiment withmore resolution, feel free to implement a converter with 8 bits instead of 6.2. Implement a serial port command ”a nn” that will set the digital value of your D/A converter.Measure


View Full Document

U of U ECE 3720 - Analog Interfacing Lab Handout

Course: Ece 3720-
Pages: 6
Download Analog Interfacing Lab Handout
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 Analog Interfacing Lab Handout 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 Analog Interfacing Lab Handout 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?