Reference no: EM131089999
The objective of this problem is to design a DAS alarm. An alarm should sound when noise is present in the room. Assume the output of the microphone, x(t), is a ±10 mV differential signal. The signals of interest are 100 to 500 Hz. You will sample the sound and calculate the sound energy once a second (sum of the signal squared). Be careful to subtract off the DC so that a quiet room (microphone = 0) results in an energy calculation of zero. If data are the 8-bit ADC, then x(n) = data - 128 represent the current 8-bit signed sample. If you sample at 1000 Hz, sound the alarm if (x(0) + x(1)+ . . . + x (999)) greater than 100,000. 32-bit-long integer operations are allowed. The 9S12 system has an 8-MHz E clock. The alarm can be activated by driving 20 mA through a 5-V EM relay. The software should turn on the alarm if the energy level is above a threshold (simply pick any constant). Once on, the alarm should continue until the operator types the code "213" on the keypad. This 9S12 will have a secret code of 213, but allow each 9S12 to have a different three-number code and a different threshold. The computer is dedicated to this task.
a) Show the analog interface between the differential microphone output and the 9S12 ADC channel 2. Choose the appropriate op amp circuit, gain, offset, and analog filter. The Analog Devices AD680 is a three-wire, low-cost, 2.5 V reference (+5 V input, ground +2.500 V output). This is a qualitative, and not a quantitative, DAS.
Design the interface between the 9S12 signal B0 and the EM relay (Figure 12.62). To activate the alarm, the relay coil requires a voltage between +3.5 and 6.0 V and a current of 20 mA.
Figure 12.62
c) Show the interface between the keypad and the 9S12 (Figure 12.63). Each switch will bounce for about 10 ms, so you must implement a way to debounce. No other 9S12 connections may be used for this interface (although you may use the internal features of input capture/output compare). Your solution should minimize cost. Periodic polling should be used for this keypad because it is cheaper.
Figure 12.63
d) Include all of the software that will exist in the system. Your solution will be segmented into three parts: RAM, EEPROM, and ROM. Specific software requirements include the following:
Other than a one-time initialization, there will be no foreground (main) program
Use the ADC continuous scan mode to simplify the software
Clearly show where the 9S12 is to begin execution on a power on reset
d1) Show the software that goes in the RAM (uninitialized on power up).
d2) Show the software that goes in the EEPROM (nonvolatile, but can be different for each device).
d3) Show the initialization (ritual) software that goes in the ROM (nonvolatile, and must be the same for each device). This is where your system starts executing. Assume the two interrupt vectors are set by the compiler.
d4) Show the 1 kHz DAS interrupt handler that goes in the ROM (nonvolatile, and must be the same for each device). It is here that you will turn on the alarm if the sound energy goes above threshold.
d5) Show the keypad periodic polling interrupt handler that goes in the ROM (nonvolatile, and must be the same for each device). It is here that you will turn off the alarm if the operator types in the secret code.
How does popenoe define familism
: What does Popenoe see as some of the major forces (political, economic, social/cultural) contributing to "family decline?" How does Popenoe define "familism? Where does familism fit into his thesis of family decline
|
Minimum percentage increase in the value of warrant
: The common stock has a current market price of $38 per share and the warrant's market price is $4. If the market price of the stock increases to $41.80, the minimum percentage increase in the value of the warrant is?
|
How you would collect and analyze the data
: Describe the variables in your study. Indicate whether they are independent, dependent, moderating, or intervening. Describe the relationship among the variables. Tell how they will be measured.
|
Economic and sociological theory of marriage
: What are the fundamental differences and similarities between the "economic" theory of marriage and the "sociological" theory of marriage
|
Show the software that goes in the eeprom
: Show the software that goes in the RAM (uninitialized on power up).
|
Total market value of the rxr company
: On January 1, the total market value of the RXR Company was $100 million. During the year, the firm plans to raise and invest $30 million in a new project. Compared to the risks of the firm's existing assets, the project is about average-risk. The..
|
How sexual awakening has to destabilize society
: The Shulamite seems trapped between her desire and her reasoning. She warns the ‘Daughters of Jerusalem' not to awaken love before it is ready, indicating that she believes she has done just that. Yet, the poem is a celebration of this awakening.
|
Equipment for the replacement to be worthwhile
: Find the max amount the firm would be willing to pay for the new equipment for the replacement to be worthwhile.
|
What do you think of gm foreign exchange policies
: What do you think of GM's foreign exchange policies? How would you advise them about possible changes to their policies? What would happen to GM's income statement if the Canadian dollar moved strongly, in either direction?
|