This page describes a serial RS232 interface for the Doppler unit which employs a PIC 16F84 microcomputer. It is installed ( as an option ) on a "modified" version of the digital readout COUNTER PC board, and generates 3 ASCII digits of BCD bearing information, using the ( popular ) AGRELO DF serial data format. A "shareware" display program is also provided which can be downloaded and run on a laptop computer. The message format is %XXX/Y(cr), where XXX = relative bearing to signal, Y = bearing quality, ( fixed at "7" in this design ) and (cr) = carriage return. The messages are sent about 15 times per second, and the data stream is "squelched" when no signal is present. The data format is 1200 baud, 1 start bit, 7 data bits, no parity, ( = logic 0 for 8th bit ) and 2 stop bits. Negative supply voltage for the RS232 output is "robbed" from the host computer s TRANSMIT signal pin, which is ( otherwise ) ignored.
The photo below shows the finished prototype unit, which includes an option for an electronic compass, ( described elsewhere on this site ) as well as the digital readout. The thin black cable is the RS232 output, the larger grey cable ( barely visible ) is for the the compass. The connector mates with a cable that runs to the FM receiver, the antenna, and DC power.
At present, no significant filtering of the transmitted data is performed by the software... a small routine was added to the first version of software to convert bearings of 360 into 000, but there are no "averaging / filter" functions... only a small fraction of the total data available is transmitted, since the Doppler generates 500 bearings per second, and this interface only produces about 15 data streams per second.
This serial interface was added as a "retrofit" to the original COUNTER board, which is part of the DIGITAL READOUT option. The serial interface uses the same basic method to measure the signal bearing, ( but using software instead of chips ) so the reader should examine the DIGITAL READOUT description, for an explanation of the measurement method. A new version of the original artwork for the digital readout COUNTER PC board has been modified to include the PIC micro, and that artwork is provided in this section of the website.
This circuit employs several of the chips originally used in the digital readout to generate the X16 clock, required by the Doppler MAIN board, as well as the X720 clock for the bearing counter, which is located inside the 16F84. ( an internal prescaler reduces this clock to X360 ) These clock signals could have been generated by the 16F84 with software, but the resulting design would be less agile for the end user, and a lot of the ( available ) CPU time would be used to generate these clocks... time which might be needed later, if the user chooses to add other tasks to the software.
The digital readout NUMERIC board was not modified, so no "new" version of it is provided here. The schematic diagram and parts list are combined into a single drawing, located with the PC artwork files... The schematic shows ONLY the PIC portion of the DIGITAL COUNTER board, and the parts list includes only the EXTRA parts required for the PIC interface... it seemed pretty pointless to repeat the entire schematic and parts list for the complete DIGITAL COUNTER board.
The crystal for the PIC 16F84 must be "manually connected" ( with wire jumpers ) to pins 15 and 16 of the ( 18 pin ) PIC chip... there just wasn t enough room on the PC board to install the crystal anywhere close to these pins... PC tracks covered the area where the crystal should be installed, and they could not be easily re-routed. Besides, crystals come in a wide variety of different packages, but only the smallest varieties would fit in the available area, even if the tracks were moved. For these reasons, I provided a pair of uncommitted / disconnected "pads" for the crystal, which the user must connect to the PIC micro, with wire jumpers.
Hey... all this stuff is free... you get what you pay for...
By retaining and using the original LS/TTL hardware for the X16 clock divider, the user can ( if desired ) modify the divider, ( with cuts and jumpers ) to adapt it to other types of DF s which might not employ an X16 clock. If this divider had been realized with software, such changes would require modification of the PIC code.
If you use the PC board artwork for this "version" of the digital COUNTER board, be aware that the PIC chip IS REQUIRED for normal operation of the digital readout, even if the serial output data is not desired. ( explanation below ) If the digital readout is not desired, ( but serial data IS desired ) the NUMERIC PC board can be omitted, as well as the 74LS90 counter chips on the DIVIDER board. If BOTH options are desired, both will work simultaneously, if all chips are installed. This will remain true even if the divider circuits are modified for a different type of Doppler. If NEITHER option is desired... why are you reading this ?
ANTI - JITTER ROUTINE
While testing the first digital readout, it became apparent that the display "update rate" was much too fast ( 500X / second ) and it had to be "throttled back" to about 2.5X / second. Otherwise, the last digit ( BRG X1 ) was unreadable, due to data jitter. An "anti-jitter" circuit was added to the digital readout, to achieve this. Unfortunately, it occupied the same part of the PC board as the PIC chip, so it could not be duplicated on PC boards with the serial interface option.
To deal with this problem, a small routine was added to the PIC code which serves the same task as the "anti-jitter" circuit on the original COUNTER board... pin 9 of the PIC chip is normally "low" and pulses "high" ( about 1 microsecond duration ) when a CALIB 1-shot pulse is detected. This code is located at the start of the "message output" routines, and generates only one pulse ( on pin 9 ) for each 7 messages transmitted... that translates to about 2.5 times per second.
Unfortunately, that means the PIC chip IS NECESSARY for normal operation of this digital readout "version", even if the serial data is not employed. If you build this thing yourself ( with a digital readout ) and want to get it running before you get a PIC chip, you can connect the terminal numbered "32" on the DISPLAY board directly to U9 pin 6, to generate digital displays. As a temporary measure, ( to deal with readout "jitter" ) you can disconnect the wiring for the "A" input bit of chip U23 and tie it directly to ground... that will reduce the jitter a LOT ( at least, it did on the test bench ) but it will also limit the display to "even numbered" values... xx2, xx4, xx6 degrees, and so on.
[HOME PAGE][NEXT PAGE]