{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Appendix A: Programming the Audio Beacon\n", "\n", " This appendix describes the audio beacon signal parameters. The signal is generated by the M0 microcontroller of the LPC4357 ARM, an amplifier circuit (LM4752) and a loudspeaker. The microcontroller runs a dedicated program that produces continuously this signal on one of its PWM output pins which is amplified by an op-amp circuit and made audible by the loudspeaker.\n", "\n", "The generated signal is similar to the audio signals you have used in the EE2T11 Telecommunication A practicum (Labday 4). The parameters that define the signal can be set through the command interface; in contrast to the earlier practicum, now it is possible to use an arbitrary carrier frequency, bit frequency, and repetition count.\n", "\n", "## Audio Beacon signal parameters\n", "\n", "The audio beacon transmits a binary code sequence using ``on-off keying'' (OOK). If a bit in the sequence is 0, nothing is transmitted; if the bit is 1, a modulation carrier frequency is transmitted during a certain period. The number of bits is fixed at 32.\n", "\n", "Besides the actual bit sequence (a 32 bit code word), the parameters that determine the signal are:\n", "\n", "- Modulation carrier frequency (parameter *Freq0* specified in Hz), at most 30 kHz, although this is probably beyond the specs of the loudspeaker and microphones; \n", "- Bit freqeuncy (parameter *Freq1* specified in Hz), this defines the rate at which the modulation carrier signal is switched on or off by bits in the code word, i.e., determines the duration of a single bit (and indirectly the bandwidth of the generated signal).\n", "- Repetition count of the bit sequence (parameter *Count3*, an integer), this specifies the number of bits the beacon waits before transmitting the code again. The minimum value is 32 (otherwise a new code is transmitted before the previous one is finished). The resulting repetition frequency is, \n", "\n", "

\n", " \"Equation\"\n", "

\n", "\n", "For example, with a value of 5 kHz of the bit frequency, a repition count of 2500 gives a repetition count of 2500 gives a repetition freqeuncy of 2 kHz. You will probably want to have a higher repetition freqeuncy.\n", "\n", "[An example of pulses generated by the audio beacon](figaudiocode.pdf)\n", "\n", "\n", "These parameters are set by sending them to the microcontroller on the car over the Bluetooth interface. The corresponding commands are described in *Controlling KITT* section in Module 1.\n", "\n", "The model *refsignal* that is used EE2T11 Telecommunications A practicum has similar parameters, but were limited to a specific set of values.\n", "\n", "The default setting of the audio beacon is a 32 bit code sequence bit-stream with:\n", "\n", "
\n", "\n", "| | | | | |\n", "|-------|--------------------|---|-------------|----------|\n", "| Freq0 | Carrier frequency | = | 15000 | Hz |\n", "| Freq1 | Bit frequency | = | 5000 | Hz |\n", "| Count3| Repeat counter | = | 64 | samples |\n", "| | Code word | = | `0x92340f0f`| (hex) |\n", "\n", "
\n", "\n", "There is not guarantee at all this default setting is of high quality!\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 2 }