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 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 built with 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 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.

 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.  

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.  

I am using a cheap 0.5 W FM transmitter module for my test signal.  I fired everything up and the display was crazy random.  I have come to learn that was to be expected.   I am testing in a small office with metal filing cabinets so there are lots of reflections.  Even my movement in the office makes a difference.  I did some testing on the major functions and everything looks right.   I wanted to test with a RF signal generator that somehow was synchronized to the antenna switching.  I tried putting together a gnuradio flowgraph but I've yet to find a PC fast enough to make it work.  I finally stumbled across a much simpler technique:  disconnect the switched antenna signal from the receiver and attach each of the antenna driver signals to the transmitter audio input.  The display should hit 0, 90, 180 and 270 degrees.

I plan on testing outside to operate in an open area without so many reflections.  I should be able to take my prototype for a spin soon.

I have redone the antenna board PCBs but haven't had a chance to build up a set with magnets. ...

Read more »


Code for a simple pure DSP detection. When a new antenna sweep starts I restart the filter, run the filter, and read out magnitude and phase. It seems to work but the best error so far is a couple of degrees but better because the comparitor hardware take up space. Double precision on Teensyduino is 32 bits - I hope that's not the problem.

ino - 1.90 kB - 04/29/2019 at 04:54



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


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



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


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


View all 16 files

  • 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!

  • Faraday fail 2

    Martin03/01/2019 at 01:04 0 comments

    Out of curiosity, I went online and bought the nicest galvanized steel box that $12 would buy.  I'm not sure what gauge steel but it feels very sturdy.  Almost armchair copy - albeit sounds a little muffled with the lid closed .  I guess more cowbells isolation = nicer, thicker copper box - I see the dollars flying away if I were serious.  I have found a solution: an Altoids tin!  By removing the transmitter rubber ducky, installing a dummy load a placing it in a an Altoids can I can knock the signal down low enough so the "external RF in the Baofeng is solved" when it's in it's box.


View all 14 project logs

Enjoy this project?



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:

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:

  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