Friday, December 5, 2014

Stratum 1 Time Server Based on a Trimble Placer GPS 450 with PPS Output

Setting up GPS disciplined stratum-1 timeservers are not a new or technically difficult task, plenty of articles are already available including some excellent ones from David Taylor's site. The basic idea behind using a GPS device as a stratum-0 reference is the ability to have a very low latency and low jitter accurate local time source. The only complicated part is finding or modifying a GPS receiver that can provide a precise 1 pulse per second source.

This post is going to focus on a simple, inexpensive, and somewhat elegant solution based on a Trimble Placer 450 GPS receiver. The Trimble 450 is by no means a modern device. It was originally produced in the 1990s and used within vehicles for fleet management purposes. It is large compared to modern units and is also only an 8 channel receiver that uses only satellites in the US GPS satellite constellation. The reasons why I really like the Trimble 450 are that is is very rugged and well designed (as it was to be used in the field). It can also run off of a wide voltage supply range and it is easily modified for a true precise 1 pulse per second (PPS) output which is the key part to having an accurate stratum-1 time server.

Trimble Placer GPS 450s are plentiful (there are available on eBay all the time for less than $15 including shipping). I had a unit myself sitting in a parts box for maybe 10 years that I picked up somewhere for free, this is why I went with this unit to begin with as my time source. I also love re-purposing old and somewhat obsolete inexpensive hardware. You will need an external active GPS antenna to use with it, any cheap ones from China will work, the one I purchased was $6. Note you will need an antenna with an MCX connector (or adapter) to interface to it. One additional nice thing about the 450 is you can easily replace the on-board MCX connector with an SMA, BNC, etc if you wish.

By default the Placer 450 outputs a Trimble ASCII Interface Protocol (TAIP) serial datastream, but this is easily changeable to NMEA-0183 strings. Going through the docs I believe gpsd is capable of decoding TAIP messages, but I didn't spend the time to try. TAIP is a binary format and while it is a brief and compact data format, I like the human readable NMEA output strings as they can provide visual output of  your GPS devices status. The Placer 450 can be switched to NMEA with the following commands:


Once switched to NMEA, it will provide the following standard strings: GPZDA, GPGGA, GPGLL, GPGSA, GPVTG, and GPRMC. I recommend reading the Trimble Placer 450 manual as it does have good information if you are unable to successfully communicate to the device via RS-232. There is also an old dos based configuration utility available that you can use to program it and switch its output to NMEA format. You will need a machine running win98 or older to run it though. I keep an ancient Pentium 133 machine around for programming old Motorola radios and I had no issues using it for programming the 450.

If your Placer 450 has been sitting around for years without being used, its internal GPS almanac is going to be extremely outdated. This resulted in a cold start of mine taking about an hour to finally acquire four satellites for 3D navigation and update its GPS almanac. Any subsequent warm starts after this will lock on within about 60 seconds. This would also be a good time to check the internal lithium battery. The memory in the Placer 450 is volatile and if the battery is bad every power on will result in a cold start. Checking on my receiver, the battery was fine.

PPS Output

Utilizing the PPS output of a GPS receiver is really the most important part of having a truly disciplined stratum-1 time server. Not all GPS receivers offer a true 1-PPS reference, fortunately the Placer 450 does, it just isn't where it needs to be. While the NMEA strings that come off of the GPS receiver contain accurate time data, various delays through the serial communication result in a time reference that has significant latency and jitter. This usually ends up being no better time keeping than just pointing your time server to another stratum-1 server. That said, the GPS time is still useful for events where internet connectivity is lost or unreliable.

The PPS output provides an extremely accurate time pulse that occurs once per second. Ntpd ( or your time server software of choice) can use this pulse to keep extremely accurate time. I will only be discussing the integration of ntpd in this post. The Placer 450 does indeed have a PPS output, unfortunately this output is on a separate DB-9 data connector. Probing its output on a scope, this pulse is clearly visible and has a very fast falling edge when it occurs (1.1 microseconds on average).

Now that we know we have an accurate PPS pulse, we need to get it into the computer running ntpd as quickly and with as little latency as we can afford. The solution to this is to send the pulse across the serial port on an unused pin (data carrier detect is standard to use in this case) which will drive an interrupt on the ntpd machine. In regards to the Placer 450, I decided to take this negative edge pulse, feed it into a max232 serial driver and send it down the unused DCD pin on the serial port. This worked perfect as the max232 inverts the data and results with a positive ~+15V RS-232 compliant pulse. The final setup of this is shown here:

The small blue board I added contains the max3232c serial driver and necessary charge pump capacitors. I pulled +5 volts off of a positive rail on the Placer 450 along with ground. Since the DCD pin on the RS-232 connector was unused, this modification was very simple. I also removed the original 3 pin power connector and hardwired it to +12v as there is no reason to worry about sourcing an original power cable. Since these devices are usually pulled from service, the original wiring harnesses usually never stay with the unit. Here is the resulting outgoing pulse through the max3232c:

Now that we have the pulse going to the NTP server via the DCD pin over RS-232, we need to verify its operation. Any modern Linux distribution will have PPS support built into the kernel, the serial module for PPS will just have to be loaded. To verify the arriving pulses, you can use pps-tools which is available for most distributions. The following output from ppstest shows my arriving 1 PPS pulse indicating my hardware modification is working.

[root@time01 ~]# ppstest /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1417642033.999999820, sequence: 226503 - clear  1417642033.000028598, sequence: 173333
source 0 - assert 1417642035.000000722, sequence: 226504 - clear  1417642034.000021949, sequence: 173334
source 0 - assert 1417642035.999999642, sequence: 226505 - clear  1417642035.000022821, sequence: 173335
source 0 - assert 1417642036.999999339, sequence: 226506 - clear  1417642036.000023328, sequence: 173336

One note regarding serial to USB adapters. I was using one initially and was not seeing the pulse arriving on my machine. Once I switched to the onboard serial port (/dev/ttyS0) my pulses were immediately visible. If you are going to use a USB adapter, make sure that it supports the DCD pin as mine did not.

A few more prerequisites are needed including having gpsd installed along with ntp. The ntpd configuration is really the last critical step, in the case of my Placer 450, the following configuration is used:

# GPS reference
server prefer
fudge refid GPS

# PPS reference
server minpoll 4 maxpoll 4
fudge  flag3 1  refid PPS

How this configuration works and what it should be set to could be an entire separate discussion, luckily it is documented very well. Basically the ip addresses shown above are driver interfaces to the gps NMEA serial interface and the kernel PPS. Once ntpd is restarted, checking ntp's status you will see the following:

[root@time01 ~]# ntpq -p

     remote           refid      st t when poll reach   delay   offset  jitter
-time3.chpc.utah    2 u    2   64  377   71.766   14.708   0.200     2 u   39   64  377   71.081    2.188   3.051
+segfault.boom.n  2 u   25   64  377   45.549   -4.891   0.548
+  2 u   31   64  377   58.978   -4.452   0.654
*SHM(0)          .GPS.            0 l    8   64  377    0.000  -71.444   4.780
oPPS(0)          .PPS.            0 l   12   16  377    0.000   -0.001   0.001

A few things to note in the above output:

1. Both the GPS and PPS sources now show up in the ntp output.
2. The tally flag for the GPS source is '*' indicating it is a system peer.
3. The tally flag for the PPS source is 'o' indicating the system sync is derived from a PPS signal.
4. Jitter on the PPS source is significantly lower than the other network based sources.
5. The jitter and offset for the GPS source are higher than other sources, this is expected as the serial communication latency between the Placer 450s NMEA strings and server is not guaranteed.

The next steps are to monitor and log the time servers accuracy and precision over time to see how much drift there is with the GPS source and without. After some basic testing it seems to be much improved but only time will tell.

Wednesday, November 12, 2014

10GHz Transverter Design and Testing

Ham radio operation on 10GHz and above is one of the many things that finally persuaded me to get my ham license. I love RF design, specially in the microwave bands, so allowing me to do so and at the same time travel to hilltops to work line of sight contacts just sounded awesome.

10GHz is the easiest place to start as surplus (and new) components are plentiful. Most of my station was built through surplus parts purchased on eBay and from the Dayton Hamvention. The rest I milled and assembled out of various parts I had laying around.

The best part about 10GHz and up is there is no off the shelf hardware available to work these bands. There are some commercial bits available such as Kuhne transverters and such that can simplify the design greatly, but you still have to homebrew the rest of the radio. This is what makes 10GHz and up so neat, there are no two radios that are alike. Each and every design is different based on the components available and how you want to make it. With most of the assembly complete, here is my stations final build:

KD8TBD 10GHz Radio

My design is based on the following:

10GHz transverter
Please excuse the crudeness of the above block diagram, I have a better one somewhere, but this one is pretty accurate to the final design. The design in its simplest form consists of a mixed upconverter / downconverter handing the signal transversion between a 144Mhz IF to the 10.368GHz RF. A PLL brick oscillator provides the 10.224Ghz LO signal. RF switches with a custom designed TX/RX sequencer handle the path switching as well as the power switching for the power amplifier.

The transmit and receive paths each have their own device chain separating them from each other. I went back and forth on this decision as I could have easily used a single mixer with additional RF switching, but I chose the dual paths as it actually simplified the design and I had the mixers available. So with this decision, each path contains its own mixer, both driven by the same local oscillator.

The local oscillator itself is a PLL brick that uses the x13 harmonic off of an ovenized crystal. The original output frequency was slightly off of 10.224GHz but was tuneable to my desired LO frequency. A nice feature of this brick is that it contains two outputs, each which provides more than adequate drive of about +13dBm for both mixers. A downside of this LO is that its stability is not perfect. Warm up time takes about 10 minutes or more until it has a stable frequency without drift. Another issue it is is very difficult to tune precisely which results in it being a few KHz off of my desired frequency. This ultimately plagued me during testing.

RF switching between each pathway is handled by a SPDT failsafe RF switch good up to 18GHz. A  switch is located on each end (at the antenna and radio). Being failsafe switches, upon any failure of the TX/RX sequencer the relays will fail to the TX side preventing me from accidentally transmitting into the RX path. The switches need +28VDC drive to function which is provided by a small DC to DC boost power supply.

Filtering occurs in many places and is a necessary requirement for this device to function. The most critical filtering has to occur out of the RF side of the mixers before the PA to allow the 10.368GHz RF signal to pass while blocking the 10.224GHz LO mixer leakage among other spurs. Additional filtering is also needed at the output of the RX mixers IF side to filter additional spurs and other high freq signals along with filtering on the RF side of the RX amplifier.

Low frequency filtering is relatively simple to accomplish as off the shelf filters for 144MHz are easy to source. The 10.368GHz filters are much more challenging. Many solutions are out there including building copper pipe cap based filters. I tried building a few of these with somewhat success. The filters did work but tuning was difficult and the passband was much wider than I wanted resulted in some 10.224GHz leakage. They have been proven to work and with some more tweaking (adjusting probe length and spacing) along with cascading some of them in series I know they could be used, but I ultimately decided to go with a different solution. I came across a couple nice Harris Farinon 10Ghz cavity waveguide filters that can be tuned to 10.368Ghz and have a very narrow passband. Based on the excellent performance of these filters they would be used in the final design.

10.368GHz Waveguide Cavity Filters

Due to the fact that this entire setup will be portable,  power would be provided by a 90 amp hour 12VDC sealed AGM battery. I have several of these and they are terrific mobile power sources. This would power both my entire transverter along with the Yaesu FT-290R II radio. Many voltages are required to power all of the necessary components within the transverter so a DC to DC boost converter is used along with various linear regulators to provide the necessary components their required voltage and current.

Automatic TX /RX sequencing was a necessary requirement for this transverter to function, having to manually switch the signal chain before each transmission was just not a feasible option. To do do this I would need a 2M radio capable of indicating when it was transmitting so I could interface directly off of it. I chose a  Yaesu FT-290R II for this transverter as I already had one and it is a terrific all mode 2M portable radio. An options with this radio was an additional external amplifier that clipped onto the back of it which was good as it provided a way of indicating when the radio was switching into TX for this external amp. I used this output to drive the input on my sequencer.

RF TX / RX Sequencer
The sequencer is very basic, it's just detecting the TX logic from the Yause to switch some relays for the RF switches and PA power in order. It also provides some led status indicators to verify its operation. There are two additional locations for relays that are not used, they were for the original design using four RF relays instead of two.

Amplification occurs at two points, a preamp directly off of the RX chain from the antenna and a power amp at the end of the TX signal chain. The RX preamp is a harris unit with +33dBm of gain at 10.368Ghz. The power amp is another Harris unit that can provide up to 100mw of output, this is lower than I had hoped but it will do just fine for now. I have 10GHz isolators on the amplifiers to prevent any stray reflections from coming back into the amps.

Physical construction consists of a small metal enclosure to house all of the transverter components. The box is white in color to reflect sunlight off of it during the day to help prevent it from going up in temperature. Inside, most RF components are mounted on a 1/4" aluminum sheet. I milled various other blocks and mounts to hold the other remaining components. This provides a very solid platform for everything in addition to being an adequate heatsink for the RX amplifier mounted directly to it. The PA amplifier is mounted directly to the back of the enclosure and mounted to a nice black Foxconn aluminum heatsink that came off of on old Pentium III Xeon processor. I went oversize on the heatsink as I plan to eventually replace the PA with a more powerful one. The front panel has a volt and amp meter and necessary power switches. The additional pushbutton is for manual RX / TX operation if for some reason the sequencer was not working.

The dish is a RadioWaves 18" aluminum dish with 37.8dBi of gain. It was originally designed for 43GHz operation so I had to cut off the front cover and remove the internal 43Ghz cassegrain feed. I then mounted a WR90 waveguide-to-coax transition with a small feed horn at the feed point with three brass rods. The mount is very rigid and allows for some flexibility in adjusting the feed to be right on the focal point. Very low loss Suhner Sucoflex microwave coax is used to connect the feed to the back of the transverter. The Yaesu radio is mounted directly to the top of the transverter via some velcro.

For mobile use, a motion picture camera tripod was used to mount everything together. It is a perfect mount as it is extremely sturdy but very lightweight since it is made completely out of aluminum. I usually will strap the battery placed underneath it to the bottom support of the tripod to give it some extra stability on windy days, but it has worked excellent for mounting the transverter and antenna. Setup and teardown is very fast as it is all held together with a few threaded rods.

A future post will discuss my first real testing of the unit during this past Septembers ARRL 10GHz and up contest, overall I was happy with the first testing as it almost worked really well. This was a good first real world test that isolated some issues including implementing better filtering and a more stable LO. The winter months will give me some time to get everything perfect before the spring.

Wednesday, May 7, 2014

APRS Station On a Boat - Part 1

Since purchasing my boat last year I have been wanting to add a 2m radio on it to access local repeaters. Recently while playing with my Yaesu VX-8DR HT  I recent began to experiment with APRS. APRS functionality is built into the radio and is fairly easy to setup. While its usefulness with the built in antenna is minimal I was able to reach some digipeaters while outside with the radio. Connecting the radio to my roof mounted 2m J-Pole resulted in a huge improvement, the coverage area was significantly impressive with this setup. At this point I was hooked, I wanted APRS on my boat, if anything it would allow family and friends to see where I'm at via

For the new station, I wanted a simple reliable system with a permanent and rugged 2m mobile for use on my boat. The Alinco DR-135 was a contender as it has a TNC built directly into the radio. Another unique feature is it has the capability for an APRS module to be directly inserted into the radio itself replacing the TNC. With this installed and configured, I could pull NEMA 0183 data right off my SIMRAD NMEA network into the radio making it a standalone APRS device. Unfortunately none were on the used market at the moment so I will be keeping watch for one in the future.

The next option I liked would be for some older Yaesu mobiles including the FT-2400 and FT-2500m. Both of these radios are built better than the Alinco to military standards and have all necessary external hookups available through the 8pin RJ45 mic connector. This would make it an easy single cable interface to my TNC and laptop. Another option is the Yaseu FT-2600m which I ultimately purchased as I came across one for cheap. The 2600m does not use the older RJ45 mic connector, but it does have a DB9 serial connector on the back which also contains all the connections available for a TNC.

Another benefit to the three Yaesu radios is that they can be modded to allow TX from 134Mhz to 170Mhz allowing them to be used as a backup marine radio in an emergency. Transmitting on the marine band through the 2m antenna would not be a great idea, but since the marine and ham radio will be near each other, I could quickly swap antennas to my marine band antenna if the need were to ever occur.

For the TNC I ultimately decided on the TNC-X. It is available in kit form, is inexpensive, supports the KISS protocol, has a USB interface, and has great reviews. I hadn't built a kit in probably 15 years, but I found this kit to be a simple build taking about an hour.

For APRS software I chose Xastir. I found it to be the best Linux based APRS application available and is available built in the Fedora 19 repos, although I ended up building an rpm for the latest version anyways as the builds currently available were a few versions older. For testing, I plugged both my TNC-X and a Garmin GPS receiver into my laptop, fed the speaker output of my Yaesu ft-8100r into the TNC-X temporarily and configured Xastir for the two devices. Once setup I began immediately receiving APRS message data.

Right now I have been spending most of my time with clearing and de-winterizing my boat as I have a scheduled date with my marina next week to place it in the water, so not too much time will be spent installing the station until it is in the water. Once I do set it up, it will consist of a 2m marine antenna going to the Yaesu FT-2600m, the TNC-X, NMEA-0183 GPS data from my existing network, and a laptop running Xastir. While definitely not as compact as the Alinco solution would be, I always have a laptop on my boat anyway so it will not be a big deal.

Monday, January 13, 2014

Tektronix 2445B Capacitor Replacement

Due to the fact that my Tektronix 2246 is currently out of commission (although parts are on the way as I did find a parts unit 2246 scope) I have focused my attention to my other favorite Tektronix scope, the 2445B. I primarily use my 2246 as it was the first 'real' scope I purchased about 10 years ago and is a rock solid analog scope. A few years back I came across a 2445B for a good price and have used it mostly for portable use as it is slightly smaller than my 2246. My 2445B also has Tektronix calibration stickers intact from 2002 indicating at least that no one has been inside mucking around with it.

My specific 2445B is the 150Mhz version and is in excellent condition although there have always been a few issues. The on screen display would jump around and not have a clear focus regardless of the focus adjustment and other internal astig calibration controls. When changing volts or time functions there would also be erratic display behavior. Knowing that the scope was over 20 years old and has unknown operational hours, I decided to start with a full capacitor replacement of the power supply. Electrolytic capacitors do go bad over time from several factors, so replacing them is a common step in all old electronic equipment.

The first step is to take it apart and inspect it. I will say the 2445B is one of the better scope designs I have worked on from Tektronix. The design is very modular with the power supply being very easy to access. Once removed, the power supply pulled apart into two boards shown here:

Tektronix 2445B Power Supply
There are quite a few caps between the two boards, luckily most are radial caps and not axial. As I began inspecting the caps themselves I was surprised to see that some were rated for only 85 Degrees C instead of the higher 105 Degrees C rating. I also noticed that some were definitely showing some 'bulging' which is usually indicative of high heat and ultimate failure, although none were leaking. Some other things I noticed were that all of the high voltage film capacitors looked stressed. They had slightly bulged as well and had crack marks on their casings. A few resistors also looked bad including two 15 Ohm ones within the surge protection circuitry in the line level input stage. One had actually blow open and had a physical crack in it.

Additionally looking at the A5 Control pcb I noticed that there were four surface mount electrolytic capacitors on it. I learned how leaky these caps can be after a complete Tek TDS-420 restoration which needed a total of about 75 of them replaced. Looking closely at the board I could already see they were leaking and causing corrosion to traces, so they would be replaced as well.

Tek 2445B A5 Control PCB Caps

Ultimately I decided to replace every capacitor on the power supply boards and the four smd caps on the control pcb. I would leave the caps on the A1 main pcb alone for now as they are primarily low voltage and would be considerably more work to replace. If there was still issues post-recap I would then consider replacing them as well.

For electrolytic capacitors I always go with Panasonic 105 Degrees C units. I will use Nichicon 105 C unit if a Panasonic value is not available. The film capacitors were replaced with Kemet units which were actually also the originally spec'd components. I upped the blown 15 ohm resistors to 3W units. For those interested in re-capping their own Tek 2445B (or variants) here is my Digikey parts list:

Quantity Part Number Description
6 P13476-ND CAP ALUM 100UF 25V 20% RADIAL
2 P13125-ND CAP ALUM 47UF 25V 20% RADIAL
4 P13123-ND CAP ALUM 330UF 25V 20% RADIAL
2 P13131-ND CAP ALUM 220UF 50V 20% RADIAL
1 P13465-ND CAP ALUM 4.7UF 50V 20% RADIAL
1 P5874-ND CAP ALUM 3.3UF 450V 20% RADIAL
4 P10769-ND CAP ALUM 10UF 100V 20% RADIAL
4 493-10252-1-ND CAP ALUM 1UF 50V 20% RADIAL
2 P15W-3BK-ND RES 15 OHM 3W 5% AXIAL
1 989-1206-1-ND RES 270K OHM 3W 1% AXIAL
1 399-7494-ND CAP FILM 10000PF 250VAC RADIAL
2 399-5410-ND CAP FILM 2200PF 250VAC RADIAL
2 PCE3777CT-ND CAP ALUM 33UF 10V 20% SMD
2 PCE3833CT-ND CAP ALUM 10UF 35V 20% SMD
2 493-1421-ND CAP ALUM 330UF 250V 20% RADIAL

Most of the Tektronix 24NN family (2445, 2455, 2465, 2467, etc) has the exact same power supply, so the component list above should apply to all. Here are the rebuilt power supplies once all components arrived:

Tek 2445B Capacitor Replacement
Once completed there were about 45 components in total that needed to be replaced. While the large Sprague 290uF caps were probably were fine I replaced them for good measure anyway.

Tek 2445B Capacitors

All completed and reassembled my 2445B has a beautiful display and extremely sharp digital readouts. I don't see any need to replace the A1 pcb caps at this time but will still consider it for the future. With a total component cost of $31 and about two hours of time I would recommend this rebuild for any original 24NN scope.

Rebuilt Tektronix 2445B

Monday, January 6, 2014

How I Accidentally Destroyed my Tektronix 2246

I have talked many times about my Tektronix 2246 oscilloscope in the past as it is by far my favorite analog scope. Simple, reliable, and inexpensive and was the first 'real' scope I had purchased used about 10 years ago. So to destroy it, all I had to do was take the enclosure off.

All Tektronix scopes of this era usually have handles attached to them for portability which is a nice feature. My problem was that I never take it anywhere, it stays firmly situated in the center on my bench as it is my go-to scope for most basic troubleshooting. Having the handle attached resulted in one problem, it prevents you from easily stacking anything else on top of it. With an ever growing bench of test equipment I really needed the real estate on top of it, so the handle had to go.

Removing the handle requires unfortunately more work than necessary. There is no external bolts to remove to take it off, instead the bolts attaching it are on the inside requiring the entire enclosure to be removed. While somewhat annoying, the handle has a well designed strong attachment to the scope. If I were to transport my scope around I would have no concerns of the handles integrity.

Tektronix 2246 Handle Mount Inside the Enclosure

Normally the covers of all scopes in this era come off easily, typically there are 4 screws on the back of the scope and maybe one or two on the sides. Once removed the back then falls off and the entire cover slides off the back. Normally I place the scope standing vertically and lift it straight up via the faceplate while the cover then remains on the bench. My Tektronix 2246, 2445B, and TDS-420 all have this very similar design (and have removed the later two without consequence).

So what went wrong? There was unfortunately a few dents on the bottom of the units case that I did not consider to be an issue. When I began sliding the cover off, it slid about 6" or so and had some resistance. Not seeing anything to be a problem I pulled a little harder (not excessively) and the cover did continue to come off as normal. Once removed I saw a small round heatsink laying on the bench. That's odd I thought, as I don't recall hearing anything rattling around inside previously. Once I looked to see where it came from I realized what had happened.

The dents on the cover that were pushed in had snagged a transistors heatsink on the bottom pcb. This had then put force on a TO-39 transistor ripping one of the leads off of it.

The transistor itself was not salvageable as the missing lead had been physically torn out of the can. Looking into the part itself it looks to not be an easy replacement. The markings on it reference it to a custom Motorola / Tektronix part number of 151-0846-00.

Searching for this part I discovered two things. 1. I'm not the first person who this has happened to. 2. There are no easy to find replacements for this part. The part is critical to the scopes operation as it will not power up without it in place.

The part cross references to a SRF5286 or 2N3866A. The 2N3866A is possible to find and purchase inexpensively, but reports from others say that since it is not an exact replacement for the original Motorola part, it will not work. I'll probably give it a try anyway and also be looking for a 2246 parts unit in the meantime.