A PIC-based "TDOA" DF antenna unit


NOTE:  The unit described on this page is functional, but still in its prototype stage.
If you have some questions, please email me at the address in the link at the bottom of the page.

Overview:

This page describes a simple microprocessor ("PIC") based TDOA (Time Difference of Arrival) direction-finding unit.  These types of direction-finding units work by switching two antennas back-and-forth rapidly, thus imparting a phase modulation on the received signal.  By observing the amplitude and phase of this signal, one can infer the bearing to the signal being received.

Note that this scheme works only with FM receivers:   In particular it works best with narrowband FM receivers such as those typically used in 2-meter FM amateur radio communications.

Recently added:  Adding a meter to the TDOA unit - no firmware change required!

he as-built PIC TDOA prototype
Click on image for a larger version
Prototype of the PIC-based TDOA circuit


General comments on "Homing-Type" (TDOA) units:

The circuits described on this page are of the "Homing" or "TDOA" type in that they switch two antennas rapidly and, by observing phase changes in the incoming RF signal, allow the user to determine the bearing of the transmitter.

TDOA-type circuits have several advantages and disadvantages:

Advantages:

Disadvantages:
Do people use TDOA units in Foxhunting?

Yes, but presently, the most serious on-foot transmitter hunters use the combination of a yagi and a receiver with a very wide-range signal level meter.  The advantage of this "yagi - plus signal strength" scheme is that it gives two important pieces of information at the same time:
Having both of these pieces of information allows the user to determine something about how near or far he/she is from the source in addition to its possible location.  Also note that it is easier to determine, with the "bearing plus signal strength" information whether or not the bearings are likely being affected by multipath or reflections.

Again, the TDOA system has the useful advantage that it can be fitted to nearly any narrowband FM receiver that the user may have onhand and that it is very simple and cheap to construct by comparison.

A PIC-based TDOA system:
 
To better-understand how this circuit works, first read the description of the "Metered" Circuit on the UARC Homing Circuit DF page.  These pages provide a general explanation as to how all similar TDOA systems operate.  This unit simulates, in software, much of the functionality of the "Metered" circuit - and provides a few other features as well.

About the hardware:

The described circuit uses a standard 2-antenna diode-switched antenna array.  For details on its construction, see the FM Direction Finding Antenna page.

In the "Metered" Circuit, a counter and some electronic switches are used to select a brief "window" during which the phase information of the signal being received will be sampled.  In so-doing, only that portion of the audio containing the "pulse" caused by the antenna switching is used to determine the bearing of the signal.

In this PIC-based circuit, all of the sampling and analyzing of the signal is done by a PIC12F675 8-pin microprocessor.  This chip has an onboard 10-bit A/D (Analog-to-digital) converter, a built-in oscillator, and several timers - not to mention input/output pins to read the status of the pushbutton and to drive the antennas and LEDs.

The audio enters through C1 which, along with R1 and R2 form a simple highpass filter with a -6dB point of about 300 Hz.  R1 and R2 bias the input at mid-supply and R3 and C2 form a lowpass filter with a -6dB point of 8 kHz:  This lowers the effective impedance on the A/D input (during the sample-and-hold charge transfer) as well as to removing some high-frequency noise and possible RF that may be present on the input, as well as to guarantee a minimum pulse length.

The GP1 output is a square wave that, through C3 and R4 drives the PIN diodes on the Antenna Array.

The GP4 output drives LED2 that, if the A/D converter is being overdriven with too much audio from the receiver, it will flash:  GP3, capable only of operation as an input pin, is tied to GP4 to prevent it from floating.  GP5 is an input with an internal weak pull-up and connected across it is PB1 used to initiate a "calibrate" procedure.  Pins 3 and 4 are tied together because with this device, pin 4 can only be used as an input - and it has no internal pullup resistor available:  It was easier just to tie it to adjacent pin 3 than to connect it to either pin 1 or 8, the power supply pins.  If another input and/or output is needed for some future function (if you can think of something, let me know...) then pins 2, 3 and/or 4 could be shuffled around to gain another input and/or output.  (The "overload indicator" pin could have easily been used both as an input and an output at the same time.)

J1 is a stereo earphone jack wired such that when a pair of stereo headphones is plugged in, the internal speaker is muted:  In one channel may be heard the receiver audio, while the other channel contains only the switching tone.  In this way, the tone can always be heard - even if it is nulled out or buried in modulation or noise and cannot be heard via the receiver's speaker directly.

Indication of direction using LED(s):

In addition to the pitch of tone, one may also use LEDs to indicate relative direction.  LED1, a dual-color LED (or, if the builder chooses, separate LEDs, one each for left and right that could be of different colors) will illuminate green or red to indicate whether the signal being sought is left or right:  Exactly how the LED is connected will determine which color is associated with which direction and a high/low pitched tone.

Indication of direction using a meter:

In addition to (or instead of) and LED, you may add a zero-center meter to indicate left or right.  Practically any zero-center type of meter may be used, but it is recommended that a meter movement of 1 milliamp or less (for full deflection) be used, with R9 being selected to provide appropriate current limiting to the meter.  (Note:  Be careful when adjusting R9 to too low a resistance to avoid "slamming" the meter.)  Unfortunately, zero-center meters may be difficult to find in some cases, but they may often be found surplus as "tuning meters" for FM receivers.  Technically, it is also possible to use a "normal" meter (e.g. zero on the left) by using the square wave output on pin 6 as a "mid-scale" reference (using a potentiometer) and bridging with this signal the output from pin 5 with another potentiometer:  Upscale readings are obtained when pins 5 and 6 are "out of phase" with each other and downscale readings are obtained when they are in-phase.  Note that full-scale readings may be easily obtainable:  Contact me for more info. Note:  No change in firmware is necessary to add the meter.

To adjust the meter, first set R9 to maximum resistance to avoid "slamming" the needle and possibly causing damage.  Next, calibrate TDOA unit as described, using a clean, unmodulated signal.  Then, listening to the signal, steer the antenna off to the left or right, causing the meter to deflect, adjusting R9 so that the meter is deflected a maximum amount.  Once this is done, move the antenna back and forth to verify that it deflects fully left and right, adjusting R9 as necessary.  If it turns out that the meter deflects backwards, simply reverse the leads to the meter - making certain that the signal source isn't behind you or that your antenna isn't upside-down.

Schematic of the PIC-based TDOA unit.
Click on image for a larger version.
Schematic of the prototype PIC-based TDOA

About the firmware:

The code in this processor generates a square wave that, upon each transition, couples through C3 and applies an AC signal to the diodes in the Antenna Array.  When the diodes are switched, a brief pulse appears in the demodulated audio (if the two antennas are NOT equidistant from the transmitter) a short time after the antenna switch occurs.  Because this amount of delay varies with each radio, one uses the "calibrate" button on a clean, unmodulated test signal.  During the calibration procedure, the precise delay between the antenna's being switched and the appearance of the pulse in the audio is timed and then stored in the processor's EEPROM.  Unless one uses a different radio, this calibration procedure need not be done again.

Also stored in EEPROM is the amplitude of the pulse measured during the "calibrate" procedure:  This allows the LED's brightness to be in some way indicative of the magnitude of the error of the user's antenna bearings.  While the radio's volume will not affect the bearing accuracy (unless the audio output is high enough to cause significant distortion) if the "brightness versus bearing" feature is to be used, it is recommended that the user use the same volume setting every time after calibration with the radio being used.  If you do not wish to use the "brightness versus bearing" feature, simply turn the volume most of the way down (but have it high enough to get a reliable reading,) do a calibration, and then turn volume back up to normal levels.

At the precise time delay after the antenna switch occurs (the delay having been determined using the "calibrate" procedure) a sample of the voltage from the receiver audio is taken - and this brief sample (the "window" of the sample is only a few hundred nanoseconds wide) contains the pulse resulting from the antenna switching.  Each time the antenna switches (there are two antenna switches per cycle) a pulse appears in the audio if the two antennas are not equidistant from the transmitter.  Depending on which antenna is closer to the transmitter, one pulse will be positive with respect to the other pulse.  Once a pair of pulses has been accumulated (one from the positive antenna switch, and another from the negative antenna switch) the relative polarity and amplitude of those two pulses is calculated:  By knowing the polarity, one now knows whether the signal being sought is to the user's left or right.

To make the unit more resistant to noise modulation that might appear on the audio, multiple samples are average together to form one reading.  To further improve the user interface, the switching rate of the antennas (which produces a tone audible to the user) is varied, with a lower tone indicating that the signal source is to the left, and a higher tone indicating that the signal is to the right.  Furthermore, the LED will not only change from red to green to as a left/right indication, but it will glow brighter/dimmer to represent the amount of error in the antenna's heading (e.g. brighter = more error.)

Additional comments:

This unit is in its very first stages of prototyping and is likely to change significantly over time - possibly to use a different PIC and antenna array.

If you have immediate interest in this, you may send email - follow this link or - go here for more information on pre-programmed chips - keeping in mind that this is a prototype!

Related Links:

T his page updated on 20070715