Watchdog for asterisk: implementation (Part I)
Part I: Generating a tone from host computer for an "alive signal" for the watchdog
First, it is obvious that a mini-stereo plug is needed to get the signal out of the sound card. I managed to find an old headset from my junk pile, and carefully cut out the mini-stereo plug and the cord for the earphone part. Stripping the wires is a little tricky, as the inner wire is very thin.
Next, I need to generate a tone. I picked 18kHz, which is almost inaudible, though the LM567 part can easily handle a wide range of frequencies. I also need to adjust the amplitude of the tone so that it is sufficient to be detected by the LM567. The datasheet for LM567 says that the minimum detectable input voltage is about 20-25 mVrms, but in one of its example circuits (a touch-tone decoder) an input voltage level of 100-200 mVrms is indicated. So a minimum of 100mVrms should be safe.
I used Audacity, which provides a nifty tone generator, to produce 30 seconds of 18kHz sound:
The next dialog box allows one to specify the frequency, amplitude, and duration:
Since I don't have an oscilloscope, I had to rely on my very primitive multimeter, which can measure AC voltage to only an precision of 0.1V. After experimenting with a few values of amplitude and measuring the corresponding voltage, I decided on an amplitude of 0.4. During this measurement, the volume setting in the Windows (Vista) mixer is set to its full value 100. This is because, when the circuit is deployed, the signal on the sound card in my Linux box will be produced via an ALSA program directly reading from a PCM WAV file, without final gain adjustment. Of course, I may need to readjust the amplitude since the output signal level on the Linux box may be different from my Windows box.
First, it is obvious that a mini-stereo plug is needed to get the signal out of the sound card. I managed to find an old headset from my junk pile, and carefully cut out the mini-stereo plug and the cord for the earphone part. Stripping the wires is a little tricky, as the inner wire is very thin.
Next, I need to generate a tone. I picked 18kHz, which is almost inaudible, though the LM567 part can easily handle a wide range of frequencies. I also need to adjust the amplitude of the tone so that it is sufficient to be detected by the LM567. The datasheet for LM567 says that the minimum detectable input voltage is about 20-25 mVrms, but in one of its example circuits (a touch-tone decoder) an input voltage level of 100-200 mVrms is indicated. So a minimum of 100mVrms should be safe.
I used Audacity, which provides a nifty tone generator, to produce 30 seconds of 18kHz sound:
The next dialog box allows one to specify the frequency, amplitude, and duration:
Since I don't have an oscilloscope, I had to rely on my very primitive multimeter, which can measure AC voltage to only an precision of 0.1V. After experimenting with a few values of amplitude and measuring the corresponding voltage, I decided on an amplitude of 0.4. During this measurement, the volume setting in the Windows (Vista) mixer is set to its full value 100. This is because, when the circuit is deployed, the signal on the sound card in my Linux box will be produced via an ALSA program directly reading from a PCM WAV file, without final gain adjustment. Of course, I may need to readjust the amplitude since the output signal level on the Linux box may be different from my Windows box.
Labels: Watchdog for Asterisk
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home