Close
0%
0%

Yet Another Doppler Direction Finder w/ Teensy DSP

An update on WA2EBY's May/June 1999 QST Homebrew DDF/Radio Direction Finder

Similar projects worth following
Doppler radio direction finder using Teensy audio library DSP to replace switched capacitor filter and random logic. Use a Neopixel ring for a display.

Radio direction finding (RDF) or T-hunting or fox hunting has been a hobby in the ham radio world for a long time.  If you've ever seen a car equipped with a big, crazy looking antenna, a square antenna array or people running around with funny antennas and radios, they are probably T-Hunting.  If it's a weekend it's probably hams and a weekday someone looking for a transmitter for another reason.

T-hunting is still a thing with communities of hunters.  In San Francisco there is rdf-sf and there may be a club in your neighborhood.  rdf-sf and http://www.homingin.com are great sources of fox hunting information and local hunts.

Google's your friend for Doppler Direction Finding theory of operation.  The May and June 1999 QST issue with WA2EBY's article on  a radio direction finder is based on simulated Doppler.   For even more information find a copy of "Transmitter Hunting - Radio Direction Finding Simplified" - available in dead-tree form only.   The 1999 article is an update to WA4BVY's early 80's design.  It's been 20 years so a technology update is overdue. 

I'm using four antenna that are electronically switched to impart a Doppler tone FM modulated on the received signal.  The Doppler tone is isolated with a very narrow band-pass filter and the phase of the Doppler relative to the switched antenna is measured to determine direction.  The relative position of the signal source is derived from the difference.  

The WA2EBY DDF  is composed of nine chips (74HC),  a couple of transistors, a voltage regulator and a bunch of passive parts.  I am using the same idea for the antenna switching but trying to do the instrumentation with many fewer parts.  WA2EBY's  used cheap 1n4148 because at the time PIN diodes could be over $10 and the design needs 8.  PIN diodes have become commodity parts and the BAP64-03 PIN diodes I'm using are $0.09.   In addition the 1n4148 are rated for 75 V and the PINs are 175 V.

I first went with a "drop in " replacement of the Teensey  for the WA2EBY DDF using zero crossing detection to determine input Doppler phase angle.  That is described as the "Zero Crossing Version".  I have found that approach limited in accuracy.  I an now working on a "DSP Version".  The big motivation is the elimination of considerable hardware.  I also hope to improve performance by going DSP. 

Along the way I have been building a set of boards for the Teensy, an antenna switcher and antenna connectors.  The are documented below.

Zero Crossing Version -  A Teensy 3.2 ($20) is used for most all the logic and filtering including the Teensy Audio Library.  I am using 16 Bi-Quad filters but have not gotten around to characterize performance yet.  The code is pretty simple and sloppy.  It mostly "rotates" the antenna and measures the zero crossing of the filter output.  

DSP Version - This will be a bare-bone audio into the Teensy and no zero crossing detection.  I am redoing a new board to free up the D5 pin to make use of FrequencyTimer2 library.  That promises to reduce jitter in the antenna rotation and resulting Doppler tone.  Too much jitter in the Doppler tone causes the receiver's FM discriminator to break up.

Both Versions - feature a magnitude measurement of the Doppler antenna rotation frequency and second harmonic (a measure of reflections)  to create a measurement quality metric.

Display - The design uses a 24 element Neopiixel display - the Neopixel is a nice update of the '80s ring of plain old blinken' LEDs.  I am using a single white pixel to point direction and the rest of the array to display signal quality.  I have decided to augment the Neopixel display with a heading readout.  ...

Read more »

Goertzel_algorithm_2.ino

Working version running with simple serial display of direction based on tone phase. Need to add filter for second harmonic - reflections.

ino - 5.10 kB - 05/23/2019 at 00:15

Download

ddf_HW_v0.2.pdf

Updated hardware with overkill analog band-pass filter from the 1999 WA2EBY article. I thought it would be an interesting test to see if system performance could be improved with additional filtering.

Adobe Portable Document Format - 125.27 kB - 04/15/2019 at 07:15

Preview
Download

display options.jpg

The VFD is beautiful but I worry about washing out under sunlight. E-ink is really slow and not a good fit. Probably go with 4 digit LED or LCD. Any tips for getting better LED pix? I turned the ISO to lowest setting to get this.

JPEG Image - 2.93 MB - 04/07/2019 at 22:39

Preview
Download

VFD_DDF[1].jpg

Experimenting with an expensive display. I really need a heading readout at very least.

JPEG Image - 2.92 MB - 04/04/2019 at 05:31

Preview
Download

Puck Magnet Cookie Sheet.jpg

This is the cookie sheet ground plane with the prototype puck mounted antennas and antenna switcher. Because it'e unsymmetrical the cookie tin is not a good idea and the antenna and switcher will mount on the car. One step closer to in car testing.

JPEG Image - 2.23 MB - 03/30/2019 at 05:40

Preview
Download

View all 16 files

  • Goertzel algorithm tinkering

    Martin3 days ago 0 comments

    By playing with sample size and ADC resolution the phase output error is now under a degree.  Quite a win over all the time domain phase crossing detection hardware and filters.  I'm sure with some better audio signal isolation would help.

    There is a new problem - the phase changes (~10 degrees) with input signal large amplitude changes.  This is very pronounced when the signal is very low or or on the verge of overload.  Need to look into setting the receiver volume to get the best results.

    So far I also haven't done anything about the signal riding on ADC input - I haven't addressed the half scale DC offset built into the samples. 

    Latest version of the code was  just posted.

  • Newer BNC antenna mount

    Martin04/27/2019 at 03:50 0 comments

    New magnet mount BNC antenna assembly.  The through-hole antenna mounts are great.  I could weatherproof them by painting with epoxy.  Or switch to a top mount SMA and 3D print a top.

  • Yet more DSP approaches

    Martin04/15/2019 at 07:56 0 comments

    I would like to try some pure DSP approaches and eliminate noise error from old fashioned analog zero crossing detection.  I looked at the Teensy DSP library and unfortunately it only has a magnitude only output FFT and the bins are too big.  I don't have time to to tinker with other FFT libraries for now.  A simpler way is the DFT.  There is a simpler form of that known as the Goertzel algorithm that computes a single DFT bin.   I recall it used for tone detection applications like DTMF decoding with low power micro-controllers.  It offers a phase output as well as magnitude so it should work well and allow "dialing in" the the bin width.  Both a magnitude and phase measurement for the Doppler tone and just the magnitude of the Doppler second harmonic need to be computed.  This should be computationally very efficient though not an issue with the Teensy 3.2 - plenty of CPU cycles. 

  • System Interface

    Martin04/04/2019 at 04:58 0 comments

    Up until now I have been planning on a Neopixel ring and a couple of rotary encoders for a user interface.  The Neopixel ring works great and I can use different colors for different uses.  I have come up with a workable system for entering small numbers and displaying on the ring but I really need an alphanumeric display - at least three or four digits.  

    In normal operation the three digits would be the processed heading.  Several adjustments need to be entered: filter Q, Doppler frequency, averaging, azimuth adjustment, etc. 

    The typical  location for this device is in a car with normal lighting so that's the issue.  It needs to be readable in possibly direct or almost direct sunlight.  I've ordered a few small paper white displays and a 24 LED ring.  Perhaps mounting the paper white display inside the ring.  This arrangement would be nice but is awfully expensive for what is needed.  Any suggestions?

  • Very Narrow Bandpass Filter

    Martin04/01/2019 at 02:47 0 comments

    The DDFs of yore used switched capacitor filters to create a very narrow bandwidth signal to measure phase.   The Teensy 3.2 has plenty of horsepower to do the same.  There are many ways of doing this and I hoped to use the Teensy Audio Library.    The library offers three filters: FIR, biquad and state variable.  16 concatenated biquad sections may work.  By using what seems to be a high Q value of 5 - 25 the raw heading readings  settle down nicely.   After fiddling with the other filters the biquad stands out as the best.  The Teensy Audio Library runs only at a 48ksps rate for high fidelity.  I would probably be better off sampling at something like  8 ksps.  If I roll my own I may end up doing a DFT for the Doppler Tone and second harmonic bins.  I can read the phase directly from the Doppler bin which eliminates the need for the zero crossing measurement  and bandpass filter/comparitor.   I would love to ditch the comparitor IC and parts.    

    The rotational rate/Doppler frequency needs to be variable.  With the biquad I can restart the filter after changing the center frequency.  Likewise I can easily change the filter Q which should be very useful.  Going to an FIR filter requires a new set of coefficients for each frequency.  Some DDFs offer a limited set of frequencies which is good enough.  State variable filters might be an easier option.

  • Biquad filter noise

    Martin03/30/2019 at 05:55 0 comments

    I noticed that using the test configuration I get a lot of variation in raw heading info.  Fortunately I didn't include a test point.  After soldering to the DAC pin and attaching the 'scope I saw the problem immediately - noise.  Doing a little research on the PJRC site I found that biquad noise has been an issue before.  I may drop down to an FIR filter to quiet things down.  That may mean adding some prefiltering to the FIR filter to get the requisite brick wall filter performance. 

  • System Testing v0.01

    Martin03/23/2019 at 06:18 0 comments

    PA8W had a great idea for system testing - using the antenna drivers as test signals.  Using about a 200k ohm resistor, I applied the antenna driver signal to the transmitter audio input and attached the rubber ducky to my radio.  North and West lit at 0 and 270 degree spot on but E and South are a little wobbly and interchanged.    The NeoPixel rings are also numbered backwards so more bugs to squash.

  • Software for Direction Finding

    Martin03/22/2019 at 08:30 0 comments

    I was looking for software to use in conjunction with the DDF.  I found it and another technology update of a "Roanoke" DDF.   Created by PA8W it is based on an Arduino.   I am doing what he did but with a nicer switching unit and a bigger display.  He was nice enough to post some detailed information and other useful tips.  I think the Teensy should have much better bandpass filters.  PA8W claims 2.2 degrees accuracy.    Sadly, I would need to build one of his units to try one out. 

    The PA8W DDF works with "RF Mapper" from Jonathan Musther.  Several devices from twenty years ago used Agrelo DF jr serial format.  I need to track down more info.

    I also have bumped onto direction finding in the APRS standard.  There is a standard method for sending reports with bearing information.  I need to look further at that.

  • Displaying Signal Quality

    Martin03/08/2019 at 07:47 0 comments

    I am using a single white LED to show direction.  The remaining array can be used to convey signal information with different colors.  I am testing the audio input for the amount of Doppler tone and 2nd harmonic are present.  Currently the Doppler tone is used to turn the white position pixel on or off.  The combination of the two are used to show a variety of background colors from red to green.  Pix to follow...

  • Non-Blocking WS2812 Library from Paul Stoffregen

    Martin03/03/2019 at 06:42 0 comments

    The Neopixel display has wonkyness that I can't  blame entirely on RF reflections.  I discovered Paul's non-blocking library which would go a long way to fixing some problems.   I tried running some of Paul's examples.  They were doing something but not what they were supposed to do.  I also saw his warning about using 5 V signals to drive the array.  I have been using the Adafruit library and did see some problems due to driving with 3.3 V.  Fortunately I have some spare LM339 comparitor sections running at 5 V that should work.  I also saw a non-blocking WS2812 library for RGB+W LEDs and relized my problem with Paul's example.  The good new is the RGB only rings are cheaper!  Paul is brilliant!

View all 15 project logs

Enjoy this project?

Share

Discussions

Simon Merrett wrote 02/21/2019 at 03:54 point

"if you have a [logic/analogue/ghetto-RF] problem, if no one else can help... and if you can find him... maybe you can hire...

@Ted Yapo"

...cue theme tune. 

  Are you sure? yes | no

Ted Yapo wrote 02/21/2019 at 15:01 point

speak of the devil and he doth appear

Cool project!

I played with this circuit not long after the 1999 article. It was what got me initially interested in PIN diodes, which I ended up designing a logic family around (#The Diode Clock ). The 1N4148's originally specified will "work", but I think it would be really interesting to try some of the fancy new MMIC RF switches available today. For example:

https://www.digikey.com/product-detail/en/m-a-com-technology-solutions/MASW-007935-TR3000/1465-1360-1-ND/4430057

One thing jumps out at me from the project pic: those pigtails in between the antennas are going to mess up your pattern. It might work better if you cut a hole in the center of the plane and ran the cables through that to keep everything below.

I did some antenna modeling with EZNEC for this kind of setup, although the work is lost at this point. If you're up for it, you could give it a shot:

https://www.eznec.com/eznec.htm

  Are you sure? yes | no

Martin wrote 02/22/2019 at 01:15 point

Did you get your DDF working?

I do understand that I'll get better performance using even just PIN diodes but want to keep the cost of prototypes down.  I will check out some of the spendier parts in time.   

The antenna ground plane cookie tin is a mess - it was built for expediency - not RF performance.  I am reworking the antenna mounts and switcher to make them suitable for mounting on a vehicle.  I'm also building it for VHF so no more cookie tin.   

I actually like 4NEC2 but haven't used it for this.  There are several ways to do the antenna switching, the way I did it or by shunting all but one antenna to ground.  The shunt is a biased on  diode connected to the antenna a 1/4 wavelength away connected to ground.  This needs further investigations as well.

For the UHF antennas I used threaded rod in a union so I could tune the antenna by screwing it in or out.  But never got around to tuning them.

All good points. 

Thanks - Martin

  Are you sure? yes | no

Ted Yapo wrote 02/22/2019 at 01:52 point

I got it working enough to see some crude results from data sampled by a PC sound card, but never took it beyond that. As usual, I was distracted by some small part of the project, and wandered off following that.

Yeah, you can't get a cheaper, more versatile part than the 1N4148. Well, maybe the 1N914 ;-)

  Are you sure? yes | no

Dan Maloney wrote 02/19/2019 at 16:50 point

I'm curious how this turns out, please keep us posted. And I'll have to look up that QST article so I can get my head around DDF. Thanks!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates