Alternate firmware for the
Montreal Doppler I Doppler DF unit

Front panel view of the Montreal Doppler I with the alternate firmware.  Note that the center LED was not installed, as the blinking of the cardinal points allows visual orientation in the dark.
Click on image for a larger version.
Front panel
                view of the Montreal Doppler I with alternate firmware

Important information - please read:


Abstract:

The late Jacques Brodeur, VE2EMM, designed a microprocessor-based "Doppler" type DF unit described on the VE2EMM's Montreal Doppler I page that drives the antenna switching circuit, updates the display, and does signal processing to determine the bearing.  This unit works along the same principles that the so-called "Roanoake" DF units do - but the addition of a microprocessor (to do the generation of switching signals and determining the phase of the recovered audio signal) adds additional flexibility.

In examining the schematic and source code for the original Doppler I, one can see that it is a more-or-less straightforward implementation of the original "Roanoke" hardware in code:

In the later Montreal Doppler II/III Jacques added more sophisticated "DSP" (Digital Signal Processing) techniques to the inputted signal.  In using DSP, one may simply throw the filtered audio signal into the microprocessor, eliminating the need for the restored square wave provided by IC3C and IC3D.  Not only does this simplify the circuitry and improve temperature stability (by removing a potential source of drift) it allows the processor to determine some aspect of the "quality" of the signal being received. 

Even though the original Doppler I firmware didn't employ DSP techniques, it is possible to improve the functionality/performance of it by replacing the microcontroller with one containing new code and performing simple hardware modifications.

Three ways to use the firmware:

There are three ways that one can use the firmware, depending on the amount of modification that you wish to do:

"What's so great about a 'sliding average?'"

One of the more important design aspects of this type of direction-finding system is that of a good filter to detect the "switching tone" caused by the electronic rotation of the antennas:  It is this switching tone that carries the phase (that is, direction) information as well as information that can potentially indicate something about its quality.  The narrower the filter, the more readily the bearing may be dug out of weak-signal noise or on-channel modulation.

There is a penalty, however:  The narrower the filter, the slower that it will be to respond to changes in a signal.

This Doppler unit, as originally designed, already had one very tight bandpass filter - the 8-capacitor "Roanoake-type" bandpass filter consisting of capacitors C21-C28 and IC4.  By adding a "damping" control to replace SW4, R17 and R18, one can vary the response time from very quick to fairly slow.

The "sliding average" is, in a very real way, a software simulation of this same type of filter.  Just like the 8-capacitor filter, it averages, over time, the directional information comprising the signal.  Because it is software-controlled, it can be made to function very much like the 8-capacitor filter - but it can also be configured to automatically "reset" when the signal goes away, allowing the new signal to be analyzed quickly without being affected by previous signal's bearing.

In this way, one can get some of the benefits of having "slow" filtering by increasing the number of averages taken - but still be able to respond to short-duration signals.
Features of the new firmware:
Interior view showing the main board with the processor and audio filtering.
Click on image for a larger view.
Inside view
                showing the main board

The modifications:

The first modification below (involving R9) is extremely simple and is strongly recommended as it greatly improves performance in the presence of weak/noisy signals.  Also, the third modification (the "damping" control) is recommended as one can greatly improve the unit's response to even very brief transmissions.  The first three modifications are recommended even if you are NOT intending to use this firmware!
The remainder of these modifications only apply to units running the "Alternate" firmware.  The first modification listed below (bypassing IC3C and D) is required to use the new firmware. 


A recommended modification for all users of the Montreal Doppler I  "Knee frequency adjustment":

This modification is applicable to all users of the Doppler I, no matter which firmware is being used.

The original instructions recommend that the C1/C2 combination on pin 1 of IC2 be adjusted for a value of approximately 680 pF to "ADJ for 500 Hz knee at pin 5."  I would not recommend this procedure for one main reason:  At the "knee" (that is, the frequency at which the attenuation of the lowpass filter starts to increase dramatically) the phase-versus-frequency changes most dramatically.  In looking at the datasheet for the MAX293/294, one can see that as one moves from 500 Hz to just 560 Hz (assuming that the "knee" is set precisely at 500 Hz - a clock frequency of 50 KHz) that the phase changes by about 180 degrees!  Assuming that one adjusts the clock frequency precisely at the knee, if the center frequency drifted 3% over temperature (this assumes zero capacitor drift and only that drift intrinsic to the oscillator in the chip) one could expect as much as 90 degrees of phase shift.  This phase shift does, of course, translate directly into bearing calibration drift!

A better solution is to purposely tune the oscillator a bit high to move the "knee" away from the 500 Hz - say, around 700 Hz (which would use a 470 pF capacitor.)  At this frequency, the "phase-versus-frequency" curve is much shallower - representing only 20-30 degrees for a 3% frequency variation.  It should go without saying that one should use ONLY NPO ceramic or polystyrene capacitors for the C1/C2 combination for best temperature stability.  If you are really after best stability, one could simply supply an external crystal-referenced clock (in the range of 50 to 75 KHz) to IC2.

If you have concern about the higher "knee" frequency degrading performance on the unit - don't worry about it:  IC1A's bandpass filter will take care of it - not to mention the highly effective filtering action of the 8-capacitor "Roanoake-type" bandpass filter consisting of IC4 and C21-C28 - it's this second filter that does almost all of the filtering, anyway.

It is worth mentioning that a unit with the above modification - and the bypassing  of IC3C and IC3D (mentioned below) displayed only about 15-20 degrees of bearing drift over a 20 degree C (nearly 40 degree F) temperature range.

Additional comment concerning the removal of IC2, the low-pass switched-capacitor filter:

These comments are applicable to all users of the Doppler I, no matter which firmware is being used.

Upon construction, IC2 may be completely eliminated without any significant affect on performance as the 8-capacitor filter (consisting of IC4 and C21-C38) does the majority of the filtering, anyway.  Elimination of IC2 does, however, require a much higher audio input to the unit, so if you have already added an attenuator to reduce the level, you will likely have to remove or readjust it.  This modification consists of the following:

Elimination of IC2 reduces one potential source of temperature-related drift and eliminates one of the more expensive, difficult-to-get components.

There is one caveat, however:  Presuming that you have done the modification to "speed up" the audio detector (e.g. moving the "input" of R9 - see below) the detector becomes somewhat less-sensitive to the presence of multipath owing to the fact that it is a bit less-able to detect the decrease in the amplitude of the switching tone's fundamental frequency.  As for its main purpose - quickly detecting the loss of audio when the squelch closes to allow "freezing" of the display - it works very well.

With the above modification, only a modest volume level was required to drive the unit - somewhere between 1/4 to 1/2 volume on the radios that I have tried and, in all cases, well below a volume level that could cause distortion of the received audio.  In the original circuit, enough gain was present so that one either had to have the volume control set very low or put an attenuator in front of the input to the main board so that the radio's volume control wasn't set at a "microscopically low" setting where the adjustment of the volume control was very touchy.


Preliminary operating instructions for the "Simple" mode:

The "Simple" mode can only be entered by executing an "EEPROM Clear" - This is done by grounding RB5 (pin 26) through a 220-1000 ohm resistor while power is applied.

For this mode, only the bypassing of IC3 sections C and D is required, along with the "speeding up the response to audio level" modifications listed above are required.  This mode operates very much like the original software:

There are a few important differences, though:

Preliminary operating instructions for the "Multi-Color" mode:

The unit may be constructed with either 3 or 4 pushbuttons, with the 4th pushbutton being required only if serial data functions are desired.

If the unit is in "Simple" mode (due to an EEPROM clear or because of new firmware or a hardware upgrade) the "Simple" mode is exited by holding down buttons 1, 2 and 3 while applying power, which will cause the unit to enter the "Configuration" mode.  Once "Simple" mode is exited, it can be re-entered only by doing an "EEPROM Clear."

The original Doppler I firmware offered no provisions for pushbuttons.  Being that a 28 pin microcontroller is used, there are not a lot of extra pins available for added function - unless you wish to multiplex them onto existing pins.  In this firmware, this is exactly what was done:  When a button is pressed, it grounds that pin through a 1k resistor.  While the mincrocontroller is scanning to update the LEDs, it will occasionally turn off all of the LEDs and check to see if a button had been pressed, effectively "grounding" the respective pin.

Because the pin that is "lightly grounded" through the pushbutton is also used to power an LED, pushing the button will also cause some LEDs that were not selected to be illuminated to glow dimly while the button(s) is/are being pressed.  This is an unavoidable consequence of the multiplexing of the LEDs with the pushbutton inputs.

Similarly, to provide an RS-232 output, the LED display must be blanked briefly while the data is being sent because the serial output of the microcontroller is also shared with one of the LED's common leads to avoid.  To avoid I/O conflicts and data corruption, all LEDs  (except the one in the center) are turned off for the duration of the data packet.

The buttons may be operated in one of two ways:

Additionally, there are two distinct modes that the unit may be in:
Important notes:
Configuration mode:

Note: 
When in configuration mode "idle" display, three LEDs will blink in a triangular pattern and no other LEDs will be lit.  After setting a configuration, the new configuration will be displayed for a couple of seconds and then the display will revert back to the "triangular blink pattern" at which time more changes may be made.
Comments on the configuration mode:
Additional configuration options:

There are two more configuration options possible.  These are activated by grounding the appropriate pin, through a resistor with a value of 220 to 1k ohms, while the power is applied:

Operate mode:
 
"Operate" mode is the normal mode where the display shows the bearings.

Note: 
When in "Operate" mode, the LEDs on the four cardinal points (North, South, East and West) will blink briefly once every 3/4 of a second or so.  This allows visual orientation of the unit in the dark.

Comments on normal operation:

Selecting 1 of 4  radio presets:

Configurations for up to 4 different radios may be stored, allowing multiple radios and/or antenna switching systems to be used without need to recalibrate.  The radio configuration to use is selected by pressing and holding buttons 1, 2, 3, or 4 while turning on the power, selecting radio #1, 2, 3 or 4 respectively, and storing this selection in nonvolatile memory.

When the unit powers up, the display will show, by the number of LEDs, which radio configuration is being used.  Note that the LEDs depicting the radio selection is shown both at the top and the bottom of the display - that is there will be 2 LEDs on the top, and 2 on the bottom to indicate the selection of radio #2.   Of course, if the 4th button was not installed, you will, not be able to select configuration #4.  The configuration data saved includes:


Using single-color LEDs:

As mentioned above, there is a "single-color" mode where green, yellow and red are represented identically by the firmware:  This mode is intended to be used when only a single color (or, more accurately, "single-polarity" LEDs) are used.  Were this mode not present, certain representations (such some of the menu settings, blinking cardinal points, etc.) would not cause single-color LEDs to illuminate.

It should be remembered that it is, in fact, color that is used to represent different types of data when it is displayed and that with the use of single-color LEDs, being able to differentiate different types of information becomes impossible - or, at the very least, rather confusing and this is one of the reasons why each configuration/menu item displays its data in a unique pattern or format, as far as possible. A notable exception to this is in the display of the adjustment of the amount of averaging and integration as well as the threshold for the quality and audio level:  These can be confusing to adjust with just one color present - but not impossible.

When in single-color mode, it will probably be necessary to disable display of the "Bad" bearing (those that would be displayed in red)
as well as the "integrated" bearing (those that would be displayed in green)  as they would otherwise just show up identically, confusing the readings.  When using single-color LEDs, it would also be advantageous to turn on "audio level blinking" so that the display blinks on/off according to the amount of audio present (e.g. "fast" blinking if the audio level is too high, "slow" blinking if the audio level is too low.)



Setting the proper audio level:

While the firmware is capable of handling a wide range of audio levels, it is best to set it properly.  Because the audio level also affects the calculated quality, being able to best reject "bad" bearings (as well as to avoid unnecessary filtering of rather poor quality, but potentially useful ones) it is best if the "normal" audio level be set as follows:
Tips for operation:

"Normal" conditions:

Typical operation is one where the signals are of fair to good quality.  Under these conditions, one would typically set the "damping" control to minimum to provide the fastest possible response time, the number of averages would be set to 32, the number of integrations would be set to 1, and the "Average Clear" setting would be at 1/2 second.  In this mode, the unit will respond to any transmission of about 1/10th second or longer, with better accuracy occurring with longer transmissions and stronger signals.

"Weak signal" conditions:

Occasionally, one will have to locate a signal that is extremely weak and/or "multipathy."  One can usually discern a trend in terms of bearings that one gets with above settings - but in these situations, it may be necessary to improve the filtering.  Note, however, that adding additional filtering has the necessary result of slowing down the response to signals.

The first technique to locating such poor quality signals is to increase the amount of damping (that is, setting the "fast/slow" switch to "slow" on the original version.)  This will provide additional filtering of the received signal while slowing the response.  An additional technique is to increase the amount of integration - although a setting of higher than 8 or so is usually not going to provide much additional improvement.

When signals are extremely poor, to not expect a high-quality, consistent bearing but, rather, look for a general trend such as left, right, front or back.  If you are able to determine the bearing within 90 degrees, you will always be able to move closer to the source and hopefully improve the signal quality as you do so.  Remember:  As with any direction-finding system, multipath will always cause inconsistent bearings.  For this reason, one should always pay attention to the long term trend rather than short-term peaks.

The very best way to learn what is a real signal and what is a reflection is to gain as much experience as possible through practice!  Some suggestions on gaining proficiency include:



State of progress for the new firmware:

At the time of this writing, the code is fully operational.   If you are interested in this code, please let me know at the email address below.  For information about the availability of this firmware, please go here.

Disclaimer:

The code for the alternate firmware was originally based on that of the original Montreal Doppler II DF unit by the late Jacques Brodeur, VE2EMM, and full credit is given to him for this fine work.  Because the additional modifications are my own and were not done with his involvement!

Although good faith efforts have been made to make certain that the operation of the hardware/firmware is as described, it is possible that "undocumented features" (bugs) may be present:  It is through testing, use, and feedback from the users that projects such as this may be improved, and the user is asked to be understanding of this fact.  This firmware is strictly intended only for non-commercial amateur-radio use and any other use is in violation of applicable laws.

This code is available in the form of pre-programmed processors.


Do you have any questions on this or other DF-related topics?  Go here.

Return to the KA7OEI ARDF Page.
 

This page updated on 20120316

Note:  This page (and other pages on this site) are/were not "official" pages of VE2EMM.  These pages are simply set up to aid those who have built or might build the described equipment.

Since 12/2010: