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

 I am using a Teensy 3.2 ($20) for most all the logic and filtering.  I am using 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.  I have...

Read more »

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

20190328_153737.jpg

(Very rough) puck magnet prototype. Being lazy I went for silver epoxy to attach the PCB to the mounting magnet. Warning: the silver epoxy is really expensive and works great. The silver epoxy is conductive and I measured ~0.1 ohm beteen antenna ground and the magnet. The side mount SMA connector is crap and I'm going to spend the money on right angle, though hole jack.

JPEG Image - 2.16 MB - 03/28/2019 at 23:04

Preview
Download

View all 15 files

  • Yet more DSP approaches

    Martin3 days ago 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.

     

  • A Different DSP Approach?

    Martin02/27/2019 at 05:03 0 comments

    I have been doing a little investigating of the Teensy Audio Library for a FFT so that I could just extract the phase and bin magnitude (bin size 43 Hz) with the 1024 bin library.  Sadly magnitude but no phase.  I could roll my own with a Goertzel algorithm but that would involve work.  

    I am finding that getting a very narrow filter is easy with the 16 Biquad cascaded filters by just dialing up the "Q" parameter.  There is a warning to use caution above 0.707 so that signals don't exceed 1.0.  Going up to 10 didn't seem to cause distortion problems though it did ring like a bell.  I wonder if that could be a good long as long as I can distinguish the Doppler from just ringing.  

    There must be a million ways of doing this.  Any other ideas?

View all 13 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