Testing, testing...

While you could wait for the once a week test of the Emergency Broadcast System, you will probably want to plug the interface into your computers line-out or headphone jack, and test with pre-recorded samples. We have found many such samples on the Web, though most of them are poorly mastered. A good one is linked to at the Wikipedia article on SAME, which uses the Ogg codec at 44.1 Khz sample rate and 239Kbps playback.

We used the Ogg file during our initial development. As a balance, we also chose a 128Kbps MP3 recording of a different event, and ran the tests described here.

We considered an output sentence to be 'good' as long as it reproduced the entire transmitted sentence exactly, from the beginning 'ZCZC' to the terminating Station ID... any extra characters left 'dangling' after that were not considered, as they do not detract from the informational content. Any sentence which did not exactly reproduce the entire transmitted sentence was considered 'bad'.

We considered an individual test to be 'perfect' if it produced 3 good sentences. A test which produced only 2 good sentences was considered to 'pass', according to the SAME specification...

For best receiver decoder performance it is recommended that a software algorithm confirm that at least two of the three header code transmissions are identical

Our results: 90% of the tests were 'perfect', an NONE failed

Our next test measured the range of acceptable signal levels. Starting at 0.05 volts, we raised the signal level in 0.05 volt increments, running 10 tests at each stop. Below 0.2 volts the results were pretty bad. From 0.2 to 0.95 volts results were excellent, with results 84% to 93% 'perfect', and no failed tests. The error rate rose dramatically at 1 volt, probably due to ADC saturation 'clipping' the samples at about +-127.

Our final lab test introduced broadband noise. A Goertzel AFSK demodulator like this one should exhibit excellent rejection of such noise, and we were not disappointed. We set the SAME audio level to 0.7 volts, and mixed in 'pink' noise, starting at 0.05 volts. There was no detectable effect until we reached 0.4 volts. Even at 0.6 volts, where the ADC was presented with a signal that was 93 % noise, the results were still mostly 'passing'. Given that typical receiver noise will be well below 0.05 volts, we feel confident that this is not an issue of any concern.

Since developing this demodulation scheme, we have experienced good results with this demodulator in the field as well, though the testing rate, obviously, is much slower. The first application we devised simply sent SMP messages to our phones, describing the alert. That worked well and, though carriers now provide their own similar functionality, we have found that so far our home-grown system is more reliable and more informative.

But, the demodulator itself was the focus of this article. Applying the demodulator to practical uses will be the subject of future articles.

As always, if you have any questions, comments, raves or rants... or just an interesting tale to tell, send them to...