EE345M Final Exam Spring 2009 Page 1 of 8 Jonathan W Valvano First Name Last Name May 14 2009 2 5pm Open book open notes calculator no laptops phones devices with screens larger than a TI 89 calculator devices with wireless communication Please don t turn in any extra sheets 6 Question 1 Consider how the ACK bit is used in a CAN network Part a What do the receivers do during the ACK bit Part b What does it mean if the ACK bit is high Part c What does it mean if the ACK bit is low 4 Question 2 When designing a low power system give the equation that defines power budget Explain define each of the terms in the equation EE345M Final Exam Spring 2009 15 Question 3 Consider the following motor interface A series wound DC motor like the ones in the robot kit can be modeled by a series combination of a resistor the ohmic contribution of the long thin wires used to wrap the electromagnets an inductor physically resulting from the cylindrical manner in which the electromagnets are wound and an emf a voltage caused by the load torque applied from the shaft back into the electromagnet The resistance is what you get when you measure the resistance of the motor with an ohmmeter a stopped motor disconnected from power In this motor R 100 and L 100 H Hint L R is 1 sec Page 2 of 8 8 4V 1N914 R Motor L 9S12 IC Rb IB Port VOH emf VCE VBE Part a Under maximum load VCE is 0 75V the emf becomes 12 35V and 0 2A flows through the motor What transistor do you choose for this interface specify part number Why Part b What value do you choose for Rb Show your work using the labels from the picture Part c Initially the motor is on 0 2A current to the motor At time t 0 the digital port goes from 5 to 0 and transistor turns off At time t 0 the emf is 12 35V motor has external torque applied to the shaft and the transistor turns off instantaneously First assuming there is no 1N914 graph the collector voltage VCE as a function of time Second graph VCE with the 1N914 EE345M Final Exam Spring 2009 Page 3 of 8 10 Question 4 Design a two pole analog low pass filter with a cutoff frequency of 10 Hz Show the design steps and specify resistor capacitor values choosing standard values Standard values for 5 resistors range from 10 to 22 M We can multiply a number in Table 1 by powers of 10 to select a standard value 5 resistor For example if we need a 25 k 5 resistor the closest number is 24 1000 or 24 k Table 2 shows standard capacitor values 10 11 12 13 15 16 18 20 22 24 27 30 33 36 39 43 47 51 56 62 68 75 82 91 Table 1 Standard resistor values for 5 tolerance 10pF 100pF 1000pF 0 010 F 0 10 F 1 0 F 12pF 120pF 1200pF 0 012 F 0 12 F 1 2 F 15pF 150pF 1500pF 0 015 F 0 15 F 1 5 F 18pF 180pF 1800pF 0 018 F 0 18 F 1 8 F 22pF 220pF 2200pF 0 022 F 0 22 F 2 2 F 27pF 270pF 2700pF 0 027 F 0 27 F 2 7 F 33pF 330pF 3300pF 0 033 F 0 33 F 3 3 F 39pF 390pF 3900pF 0 039 F 0 39 F 3 9 F 47pF 470pF 4700pF 0 047 F 0 47 F 4 7 F 56pF 560pF 5600pF 0 056 F 0 56 F 5 6 F 68pF 680pF 6800pF 0 068 F 0 68 F 6 8 F 82pF 820pF 8200pF 0 082 F 0 82 F 8 2 F Table 2 Standard capacitor values for 10 tolerance 10 F 22 F 33 F 47uF EE345M Final Exam Spring 2009 Page 4 of 8 25 Question 5 Consider the following implementation of OS AddThread similar to the one given in the Lab 17 starter file struct TCB struct TCB Next Link to Next TCB unsigned char StackPt Stack Pointer unsigned char MoreStack 101 additional stack unsigned char InitialCCR unsigned char InitialRegB unsigned char InitialRegA unsigned short InitialRegX unsigned short InitialRegY void InitialPC void typedef struct TCB TCBType typedef TCBType TCBPtr TCBType SystemTCB MAX THREADS unsigned short static NumThread 0 number of threads TCBPtr RunPt Pointer to thread currently running OS AddThread add a foregound thread to the scheduler Inputs pointer to a void void foreground function Outputs 1 if successful 0 if this thread can not be added short OS AddThread void fp void if NumThread MAX THREADS return 0 structure is full if NumThread SystemTCB NumThread 1 Next SystemTCB NumThread SystemTCB NumThread StackPt SystemTCB NumThread InitialCCR SystemTCB NumThread InitialCCR 0x40 I bit clear SystemTCB NumThread InitialPC fp Initial PC SystemTCB NumThread Next SystemTCB 0 link NumThread return 1 Redesign the system so that if the user program finishes the OS will run the user program again For example this user function executes stuff1 stuff2 and stuff3 once and quits void user void stuff1 stuff2 stuff3 If the user calls this system function to activate user OS AddThread user then with your updated system stuff1 stuff2 and stuff3 will be repeated over and over again You are allowed to make changes to the struct and to OS AddThread but not to user or other OS functions You can however add additional OS functions In particular show changes to the struct and rewrite OS AddThread in its entirety EE345M Final Exam Spring 2009 Page 5 of 8 EE345M Final Exam Spring 2009 Page 6 of 8 16 Question 6 List the four design choices one must make when implementing a spectrum analyzer ADC FFT graphics display like the spectrum analyzer that generated the following figure For each of the four choices explain what the consequences are of that choice I did not mean circuitry in front of the ADC such as anti aliasing analog low pass filter analog circuit gain analog input impedance 1 Design choice and what does it mean 2 Design choice and what does it mean 3 Design choice and what does it mean 4 Design choice and what does it mean EE345M Final Exam Spring 2009 24 Question 7 The overall goal is to design a feedback motor controller based on motor current IC The specific goal of this question is to add functionality to the following motor control circuit to allow the microcontroller to measure IC You may assume IC is always positive 0 to 0 2A according to the arrow in the figure I e it acts like a motor under load and not a generator You may assume the same specifications as Problem 3 Page 7 of 8 8 4V 1N914 R Motor L 9S12 IC Rb IB Port V CE VBE emf V OH 12 Part a Redesign this hardware interface so that the motor current can be measured using the 10 bit ADC on PAD0 Only …
View Full Document
Unlocking...