A High-End UHF Preamp for the VHF/UHF Dongle

My experience with the DVB-T dongle has been somewhat mixed. It does receive all the signals that I’m interested in, including fairly weak satellites. However, interference often blocks reception. Most of the time the signals are blocked for short amounts of time, around a second. The blocking signals are not visible on the waterfall display, which I think means that they are not close in frequency to the signal I’m receiving. This is not surprising, given that the  bandpass filtering of the dongle is not particularly good and given that the 8-bit analog-to-digital conversion has a very limited dynamic range.

The best way to resolve this is to add a preamplifier between the antenna and the dongle. Most premaplifiers have bandpass filtering at their input, and some also have filtering at their output. A preamplifier also allows you to add a sharp bandpass filter at its output without reducing signal strength or adding significant noise.

I tried my old 145MHz preamplifier and it seemed to improve things a bit, but it’s huge. I decided to build a smaller preamplifier for UHF (430-440Mhz) and to add a sharp filter at its output, most likely an interdigital filter.

There are several good preamplifier kits available for UHF. The cheapest is made by Ramsey. It’s filtering is not very good, it uses leaded components (not ideal at UHF), and the transistor has a relatively high noise figure (they advertise it at 1dB, but the data sheet of the transistor they use, 2SC2498, specifies 2.5dB). Minikits’s preamp also uses mostly leaded components, but it has a better input filter and its 1.5dB noise figure is believable. Other kits use surface-mount devices. A kit by David Bowman has a noise figure of only 0.5dB but not much filtering (only high-pass). Gyula Nagy designed a preamp with an even lower noise figure and with sharp bandpass filtering, but he only sells the 144MHz version of it (and he only sells it with an enclosure and connectors, which makes it more expensive than other preamp kits).

I eventually decided to buy a preamp kit from Down East Microwave (DEMI). It has a low noise figure (better than 0.5dB if tuned for low noise and only 0.2dB higher if tuned for maximum gain), and filtering on both the input and output. The filtering is not very sharp (the preamp is designed to be followed by a separate bandpass filter), but there is filtering. It comes in various forms, including a PCB+components kits without an enclosure and without connectors. This form is relatively inexpensive at $25 plus shipping (for comparison, built in an enclosure with connectors, the preamp costs $75). The output filter is a diplexer, which improves stability when the preamp is followed by a sharp filter (it sends out-of-band signals to a dummy load rather than to the filter, which prevents them from being returned to the amplifier and possibly causing instability).

The kit contains a PCB, instructions, and a plastic tray with the components, almost all of which are surface-mount devices. The tray has 24 compartments for components, and a legend tells you which parts are stored in each compartment. This is essential, since many of the components have no markings at all (resistors do have markings, but capacitors and inductors do not). Surface mount components come in tapes, and the tapes are actually glued to the compartments; this helps keep the components inside the compartments until you actually need them. The glue’s bonding is weak so it’s easy to separate the tapes when you need to.

Before I started building, I needed to decide on an enclosure. I initially intended to create an enclosure from blank PCB material. But when the kit arrived, I realized that the PCB would almost fit inside the enclosure of a surplus 140MHz amplifier I have. I bought a few of them a while ago just for the enclosure and connectors. On the right you can see the enclosure (opened) and the amplifier that it contained, but with the connectors already removed. The connectors were BNC at the input and SMA at the output,and there are feedthrough capacitors for power (and for a control function that is not needed with the DEMI premap).

The DEMI preamp board was narrower than the 140MHz amplifier but about 2mm longer, so it did not fit in the enclosure. Fortunately, the 2mm at the edges did not contain any signals, just a bit of the ground plane and the input/output connections. I filed away about 1mm from each side until the board fit inside the enclosure. The input/output connections on the board are plated-through holes, so I had to remove some of the plating on the ground-plane side, so avoid shorting these connections to the enclosure. Finally, I drilled mounting holes using the original 140MHz amplifier as a template; they went just through the ground planes, not through signals on the PCB.  You can see the result below.

At this point, I was ready to solder the components. I knew I had to be very careful and not let any parts get lost or separated from its label for too long. I was as careful as I could, but I still managed to lose a 1μF tantalum capacitor. It’s actually one of the larger components, but it somehow jumped on my shirt and disappeared forever. I did search for it all over the place, but it was somehow gone. I didn’t have a replacement. It should have been on the output of a 78M05 regulator, so I checked the data sheet of the regulator and didn’t find any constraints on the capacitors that can be used, so I just replaced it with a 10μF 10v capacitor that was small enough to fit on the PCB. Afterwards I was even more careful afterwards (and didn’t lose any more components).

When I was done with the soldering, I screwed the amplifier into the enclosure, soldered the connectors, and started testing according to the instructions. You perform the initial tests with 50Ω dummy loads on the input and output. This went fine and the amplifier consumed an amount of current that the instruction says is reasonable and does not indicate oscillations, around 85mA. I then tuned it roughly with a receiver. At that point it was supposed to work with or without an antenna and load, but it did not work without an output connection (current consumption dropped to zero). I could not figure out why.

I decided to tune it more carefully at a lab. I did that at the Herzliya Science Center, with a calibrated signal generator and a spectrum analyzer. I was able to tune the amplifier, but it still behaved erratically. After a lot of troubleshooting I realized that I forgot to tighten the screws that hold the PCB to the enclosure. This pressure contact was also the ground return path for the power supply, so as long as the connection was loose, the power supply connections were unreliable. After I tightened the screws and re-tuned the amplifier for maximum gain, it started performing reliably. You can see it in the enclosure on the right.

Testing with the dongle show marked improvement in signal quality and a reduction in interference. I was able to receive all the satellites I tried, including some fairly weak ones like CO-55 and CO-57. I would like to test the dongle+preamp receiver in a full-duplex satellite contact, but I didn’t get around to this.

A High-Performance Sound-Card AX.25 Modem

My APRS RF-to-internet gateway (iGate) had been running  a sound-card modem called soundmodem by Thomas Sailer. The software modem caused various problems and I have not found a suitable replacement. Eventually, I decided to try to implement my own sound-card-based software modem. The results have been very good, in spite of the fact that I do not have much background in digital signal processing.

I’ve been using the modem for many months now in my iGate. The modem is run is a component of javAPRSsrvr, not as a separate program. It’s working reliable non-stop.

An article that I wrote for QEX explains how the modem works and how I designed and optimized it. It is also available on my university web site.

All-Mode VHF/UHF Reception with a Low-Cost TV Dongle

Balint Seeber’s new software supports not only the USRP, but also a range of low-cost USB dongles designed for receiving DVB-T television signals. When I read about this, I felt that I can’t not try one, so I ordered an ezcap dongle for $20 from a Chinese seller on eBay. It arrived a couple of days ago, and my experience so far is very positive.

The dongle I ordered was listed as an ezcap dongle, which is one of the models supported by Balint’s software. The dongle that arrived is exactly the one that was shown in the picture on eBay; inside, it was labeled as EzTV666. It came with a 15cm whip antenna, so I plugged in the antenna, plugged in the dongle, configured the driver using Zadig, and started up HDSDR. Balint’s library for the USRP and the TV dongles was already installed, so all I had to do is tell the software that I wanted to use a TV dongle and it worked without a problem. I didn’t have to install any new software.

I was immediately able to receive some local narrow-band FM traffic. I ran the dongle with a bandwidth of 1.6 MHz, so you can see a nice piece of spectrum on the screen at once. It goes up to 3.2 MHz, but Balint warns that high bandwidths cause some signal degradation. In the screenshot below you can see shorts bursts from a hand-held trancseiver at the input frequency of a local repeater and the repeater’s output 600 kHz higher. The repeater output bursts are longer because the repeater controller adds a “tail” to each transmission. It’s pretty neat to see both the input and the output of a repeater at the same time. The dongle’s frequency is a bit off, so the displayed frequency is incorrect (about 10 kHz too high), but this is easy to correct in HDSDR (Options -> ExtIO Frequency Options).

I installed the software that came with the dongle on another computer. Reception of local broadcast FM stations was good, but I was not able to receive DVB-T television signals, even with the bundled whip antenna outside the window.

Clearly, I needed better antennas if I was to receive more interesting stuff. To use better antennas, I needed some way of connecting them to the dongle. From the picture on eBay it was not easy to determine the type of RF connector used on the dongle; it did not seem to be the IEC 169-2 connector that is used in some of the other SDR-capable DVB-T dongles, but I didn’t know what it was. When the dongle arrived, I realized that the connector is an MCX connector. I didn’t have any cables with MCX connectors or any MCX adapters, so my initial thought was to cut the cable from the rather useless whip and terminate it with a BNC, but before I did that a friend gave me an MCX-to-N patch cable that he bought at a surplus store. That was good enough to connect any of my existing antennas, so I continued the experiments.

I first tried a 145 MHz dipole (1m end to end). It improved the reception of local UHF and VHF narrow-band FM dramatically, and it also worked very well for DVB-T (which is at 514 MHz here); I was able to watch TV on the computer. It also worked reasonably well for air-band signals. The next stage was to try to receive satellite signals. I experimented previously with a borrowed FUNcube dongle and I new that the FUNcube was very capable of receiving satellite signals. The FUNcube dongle uses the same tuner chip as the ezcap (an Elonics E4000, but its analog-to-digital converter is higher resolution than the ezcap’s; the FUNcube also has a low-noise preamplifier ahead of the tuner, and I am not sure if the ezcap uses one (if somebody knows, let me know).

A satellite called VO-52 was supposed to fly over last night, so I turned my cheap Yagi towards it and listened. Initially, I attached a preamplifier between the antenna and the dongle, but I later discovered that it did not make a huge difference. VO-52 has both a Morse beacon and a linear transponder. The beacon came through very clearly. In the screenshot on the right you can see the beacon’s signal move down in the audio passband due to Doppler shift. It it well above the noise and easy to hear. Next, I checked whether I can receive SSB signals in the transponder’s passband; I could. Here is a short recording of one Greek station (the Doppler shift causes the speaker’s voice to become lower over time).

While I was listening to VO-52, the local FM repeater sprang into activity. It is only about 100kHz away from the satellite’s signal; when the repeater was transmitting, it was causing pretty severe distortion of everything else the dongle was receiving. The satellite still came though, but not as well. You can see the effect in the screenshot on the right. I discovered that this was caused by too much gain in the preamplifier+dongle chain. There are two ways to solve this: to not use a preamplifier, or to drastically lower the gain of the dongle (you can set the gain with a slider).

The main benefit of the preamplifier in my setup is that it includes a good bandpass filter. Without the preamplifier, strong-out-of band signals sometimes overwhelm the dongle. With it, reception is much more consistent. But the dongle does work reasonably well even without anything between it and the antenna.

Another interesting thing that you can see in the last screenshot is the strong CTCSS tone coming out of the repeater, at 91.5 Hz. It is clearly visible in both the audio spectrum display and in the audio waterfall.

Using the USRP with HDSDR

Balint Seeber developed a software library that links HDSDR, a software-radio receiver program (and a few other related programs) with USRPs, a family of FPGA-based radios. I have a USRP1, the original USB-based motherboard, a BasicTX and a BasicRX daughter boards (which are basically just transformers linking the input coax connectors to the amplifiers that feed the ADCs), and an RFX400 transceiver (up/down converter to 400-500Mhz).

The USRP radios are best supported by GNU Radio, an open-source signal-processing toolkit. I have already used GNU Radio. The software is very capable, but it is somewhat difficult to install and it does not come with complete sophisticated radios. There are also drivers that interface USRPs to Matlab/Simulink; I was unable to get them to work. Therefore, I was delighted to learn that Seeber wrote the library that allows USRPs to be used with HDSDR and decided to give it a try.

HDSDR is a radio program that was derived from earlier programs (Winrad and WinradHD). It supports a wide range of RF frontends through the use of software libraries called ExtIOs. Seeber wrote an ExtIO library that can control the USRP and can transfer RF samples from it.

Downloading and installing Seeber’s ExtIO library and HDSDR was easy, thanks to an installer that Seeber wrote. Seeber’s software can also switch the USB-based USRP between two different drivers, which is a very useful (my experience in trying to switch these drivers manually has not been good).

After installation, I gave the software a quick try by tuning to a UHF and checking that the RFX400 can receive a signal from a handheld transceiver; it did.

I decided to try to USRP on HF next. I connected one of my amplified receiving loop antennas to a bias tee, then from there to a low-pass filter, and from it to the input of the BasicRX board. The low-pass filter is a high-quality 39 MHz surplus unit. It’s role is to eliminate aliasing of VHF signals into the HF spectrum. Ideally, the stopband should have started at 32 MHz (since the USRP samples at 64M samples/second), but a 39 MHz unit was all I had. I was not sure whether I would receive many signals, since between the BasicRX input and the input of the ADC there are only 20dB of amplification. In the picture you can see the USRP (in the background, in a cardboard box), the filter, the bias tee, and the 12V supply that feeds the bias tee. The USRP and the antenna are shown at the bottom of the post.

It turned out that this is sufficient to receive a great number of interesting signals all over MF and HF. Here are some screenshots. In the first screenshot I was listening to BBC World at 1323 kHz, an AM medium-frequency station. The USRP digitally down-converts the high-rate RF samples and decimates the RF samples, in this screenshot to 250k complex samples per second, so we see 250kHz of RF spectrum.

In the next screenshot, the radio is tuned to a station at the low end of the AM range, but the decimation is set to a lower value. We now see a full MHz of spectrum, all of the AM range plus a bit to spare. Very neat; all the AM stations on one waterfall display.

Next, we see the entire 14MHz amateur band. The band is densely populated at this early-evening hour. On the left we see a bunch of CW stations, PSK stations near 14070 kHz, and a large number of SSB stations starting at 14100 kHz.

I was able to receive distant stations all over the HF range, all the way up to 28 MHz. Here is the antenna I used; it is mounted fairly low in an urban area.

A few days later I tried UHF reception with the RFX400 daughter board. Local FM stations were received well. Satellites proved to be more of a challenge. I was not initially able to receive satellites with fairly weak signals like FO-29 and CO-58 (which I can hear reasonably well with the FT-857D), but I was able to receive the CW beacon of RS-22, as you can see in the following screenshot. The Doppler shift is clearly visible both in the RF waterfall display and in the audio waterfall. You can also see the very narrow signal in the audio spectrum display. The signal was received with my small VHF/UHF Yagi.

A second attempt to receive FO-29 was more successful. I was able to hear both SSB and CW signals clearly enough to understand them. Linking HDSDR to the satellite tracking program of Ham Radio Deluxe via DDE provided automatic Doppler correction, which worked out very nicely. Still, the RFX400 is probably not ideal for receiving UHF satellites. Its noise figure is not documented but I don’t think it’s particularly good, and its response rolls off below 440 MHz and above 460 MHz (as reported by Patrik Eliardsson and others). An external preamplifier would probably help.

Seeber’s library also supports a low-cost USB dongle that can sample RF signals between 64 and 1700 MHz. The dongle is sold as a digital-TV and radio receiver, but somebody discovered a way to cause it to send to the PC unprocessed RF samples, which can then be processed in programs like HDSDR and GNU Radio. I ordered a such dongle for about $20 from eBay and I’m looking forward to trying it out. Its analog-to-digital converter provides only 8 bits per sample, a lot less resolution than the much more expensive FUNcube dongle, but it supports much higher sampling rates than the FUNcube dongle.

Using a Motorola PageTrac and a VHF Antenna Tuner in an APRS iGate

My APRS iGate has been using the old Kenwood TR-2500 that you see in the picture for a few months. The radio was connected to an old commertial VHF antenna. This antenna is not resonant on 144.800MHz, but it is sturdy and high, and it receives very well. So I used it in receive-only mode; the iGate relays APRS messages from RF to the internet, but not the other way around. But when I got two old Motorola VHF radios, I decided to replace the TR-2500 by one of them, a Motorola PageTrac. This was supposed to bring two advantages. First, the Motorola radio would start up on 144.800 after a power loss, whereas the TR-2500 had to be programmed manually for 144.800 after a power loss because its memory battery has long died. Second, the PageTrac puts out 45W whereas the TR-2500 puts out only 2.5W, so if I start transmitting messages, the PageTrac would have a much better range.

The plan proved more difficult to execute than I had thought.

A Matching Network

The existing antenna is sturdy, high, and mounted on an old mast that I had no desire to climb. So I decided to keep using it. To transmit using this antenna, I needed a matching network: a single-purpose antenna tuner. I borrowed an MFJ-269 antenna analyzer from Nir Israeli and measured the impedance of the antenna and coax at the radio-side connector (at 144.800 MHz). I then designed an L match circuit using an online calculator.

I didn’t completely trust the analyzer and I was not sure that the air inductor I prepared had the correct inductance. So I used a variable capacitor in the L match, so that I could tune it. This worked out well. By adjusting the variable capacitor I was able to bring the SWR to a low value that is good enough for transmitting (I think it was 1.2:1 but I didn’t record it). The L match is narrow band and the SWR is reasonable only across about 0.5 MHz, but this is of no significance for APRS, which uses a single frequency.

The online calculator gave me not one appropriate L match but two. The other solution had a tiny series inductance and a capacitor across the transmission line. I tried it (with no inductance at all) and could not get the antenna to match. I am not sure why this matching network did not work.

Antenna tuners of this sort are almost never used at VHF, because it is pretty easy to build resonant antennas. But in my situation, with a good antenna that works well even though it is not resonant, this special-purpose antenna tuner is a good solution.

Power Supply Troubles

The two Motorola radios I got are a DeskTrac, which is a desktop version of the more common mobile MaxTrac, and a PageTrac. The DeskTrac is documented very well on the web. I didn’t find any useful documentation on the PageTrac, but it is a very simple radio, so I didn’t really need much documentation. Both radios worked when I got them, but I quickly discovered that the power supply of the PageTrac was failing. Two large electrolytic capacitors were burned, and they actually charred the PCB beneath them. They were buzzing and burning when the radio was turned on. I tried to replace them, but I didn’t find replacement 15,000μF capacitors. I decided to replace the entire power supply. It was rated at 13.8V and 10A, so I needed a power supply with similar specs.

The first candidate was a power supply from a dead computer. Its 12V output was rated at 16A, so I thought it would work. I spent a bit of effort trying to raise the output from 12V to 13.8V, but this caused buzzing in the PC power supply, so I left it alone. I assumed that running the radio at 12V rather than 13.8V would reduce output a bit, but this was acceptable to me.

The radio worked with the computer power supply, but whenever I tried to transmit, the power supply shut down. I am not sure why it shuts down, but my guess is that the roughly 10A that the radio draws from the supply on transmit causes the switching regulator in the supply to generate wider pulses. This maintains regulation on the 12V line, but it raises all the other outputs that have almost no load on them (5V, 3.3V, etc.; all are generated from the same switching waveform). The over-voltage protection circuit of one of these outputs might be what is shutting down the supply.

Next, I tried an old 12V/11A Lambda switching supply that I thought at a surplus store for about $5. I adjusted it to 13.8V. It works without a problem, and it is small enough to fit inside the PageTrac enclosure. It just sits in the enclosure without being bolted to it, but since the radio just sits on a shelf, this does not cause problems.

The Computer Interface

To use the radio as an APRS iGate, I needed to connect it to the soundcard of the computer running the iGate software. The interface that I used with the TR-2500 was not really an interface at all: just a cable connecting the TR-2500′s earphone output to the computer’s microphone input. But with the PageTrac, I needed some kind of interface, if only to activate the transmitter. I built a simple interface with (1) DC blocking and level adjustment on both the audio input and audio output directions, and (2) a PTT activation circuit. The PTT circuit is activated by the RTS signal of a serial port, and is isolated from the radio by an optocoupler. But the audio lines are not isolated, so the radio and computer are not really isolated. So far this did not cause any problems.

Initially, the interface did not work. When I would connect it, the radio would go into transmit mode, even if only audio cables were connected, not a serial cable. It took me a long time to debug, but eventually I discovered that I made a mistake in the wiring of the cable connecting the interface to the radio’s front speaker-mic connector. Once I fixed the mistake, the interface started working.

Limitations of the PageTrac

The PageTrac has some limitations. One is the fact that the only audio/PTT connector available is the RJ45 speaker-mic connector on the front. It has an RJ11 connector in the back, but it is undocumented. In contrast, the backThe DeskTrac has a DB-25 jack on the back designed for connecting it for to computers and other equipment. The second is that it has no “monitor” button to turn off the squelch. APRS works a bit better without a squelch, and the DeskTrac has a button that allows you to turn it off. I also think that unsquelched audio is available from the DeskTrac’s DB-25 connector. But even through the squelched speaker-mic connection, the PageTrac works fine. Another limitation of both radios is that the speaker is never completely muted (even at the lowest volume level). To prevent the radio from sounding the APRS packets, I simply disconnected one of the speaker’s wire.

Software Modem Issues

Soundmodem, the soundcard-modem that I have been using with the TR-2500, did not decode packets received by the PageTrac. I thought of adding a high-pass filter to the audio interface, to compensate for a possibly too-aggressive de-emphasis, but eventually wrote a new software modem that decodes packets from both radios without a problem. But this is a topic for another post.

After resolving all of these issues, the new iGate configuration is up and running. The iGate beacons on both the internet and on 144.800 MHz, and it relays text messages and other packets from the internet to mobile stations. In the screenshot below you can see me exchanging text messages with a mobile station (which uses a Kenwood D700). You can see both stations on the map, the text-message window of APRSIS32, and the actual packets that are received and transmitted by the iGate, some via RF and others via the internet.

A Lego Enclosure for an APRS Tracker with a Built-In Antenna

My APRS tracker seems to work quite well, but it was difficult to use with various pieces of equipment sloshing about on the dashboard. Initially, I’ve been using the short vertical antenna that came with the UV-3R radio. Both the radio/antenna and the GPS antenna were placed on the dashboard. This antenna did not work well inside the car, especially when it was lying horizontally with the radio on the dashboard. Then I switched to the small PCB magnetic loop antenna I built a while ago. This worked much better, especially when the antenna was standing up. But now I had three pieces of equipment (the radio, the loop antenna, and the GPS antenna) sloshing on the dashboard. This was only good enough for a bit of testing.

I was considering how to mount the antenna and the radio more securely on the dashboard. I didn’t feel like spending a lot of effort on building an enclosure. Then the idea of building the enclosure, or at least a prototype, from Lego. The box you see in the picture above is the result. It actually works very well. It’s a bit heavy, so it doesn’t move at all on the dashboard. It contains the antenna, the radio, and the GPS antenna. There are holes in the box for the audio cable to the microcontroller, for the GPS antenna cable, and for the display and buttons of the radio. Being able to turn the radio on and off is important, since it runs on its internal battery. The hole on the side is also large enough for the radio’s charging cable. The antenna and radio slide into specially-built compartments that hold them securely. It’s also easy to slide them out. Both antennas work well inside the plastic box on the dashboard (Lego bricks are usually made of ABS plastic). The box has enough space for a small microcontroller board and for a GPS module, but my current microcontroller board is a large development board, so for now it and the GPS module still lives in a cardboard box that I stick in the glove compartment.

As you can see in the snapshot from aprs.fi below, this Lego tracker actually works, even though it’s inside the car and even tough the UV-3R puts out only 2 Watts. Still, I plan to deploy a 1/4-wave vertical antenna on the car’s roof for even better coverage, and I’ll probably replace the Lego with some other box, mostly to avoid having the Lego bricks ruined by exposure to sunlight. But for now, I’m using the Lego tracker. It’s also very good to know that the 10cm magnetic loop antenna works well in APRS trackers; such antennas can be used in small trackers that are completely self contained.

Two more comments are in order. First, driving with a heavy tracker on the dashboard is possibly unsafe, since in an accident it might hit the driver or a passenger. I’m mostly using it around the neighborhood, but once I switch to the vertical antenna on the roof, I’ll move the whole thing off the dashboard. The other thing I wanted to mention is that I performed the two almost-necessary modifications of the UV-3R radio. One adds a capacitor to the VHF low-pass filter, to attenuate the second harmonic, and another adds a decoupling capacitor to the external transmit-receive control signal; without it, the radio often locks in transmit mode when used with a headset or an external modem.

Building an APRS Tracker

I’ve been running an APRS RF-to-internet gateway for a few months now. It uses javAPRSSrvr as the gateway program and soundmodem as a soundcard modem, both running on a remote Linux machine. Both programs are very reliable, running for months without a fault. I spent a bit of time trying to get the two programs to communicate over a virtual serial port, but this did not work, so I eventually switched to AX25 kernel-mode support, which worked out of the box on Ubuntu Linux.

I want to track myself using APRS, so I needed a tracker.There are several published hardware and software designs on the Internet, and I originally considered building a tracker based on one of these designs. But I eventually decided to build a tracker that is not based directly on any existing design. Mostly, I wanted to end up with a high-quality and flexible code that could be easily ported to different hardware platforms and to different uses. I’m not yet there, but I’ve got a working prototype that’s running my own code.

One thing I knew I wanted to do was to avoid a modem chip. Some APRS trackers and digipeaters use a modem chip, normally the mx614. A modem microcontroller would be able to produce and decode a 1200b/s AX25 signal in software. There are several trackers that do that already, like Gary Dion’s WhereAVR and Byonics‘ TinyTrak3 and TinyTrak4.

The prototype is running on an microcontroller development board that I use at work for teaching a course on embedded computing. It has an LPC2148 microcontroller, which has an ARM processor, and lots of on-board peripherals. The tracker currently uses almost none of the on-board peripherals except for the LCD screen. The board is connected to a GPS module and to a VHF radio. The GPS is a NEO-5Q module from ublox; it’s mounted on a board that also has a microcontroller and a bunch of other components (a prototype from an old wifi-based tracker project I participated in), but I’m only powering and using the GPS module on this board. The GPS is connected to an external active patch antenna. The radio I’m using is a Baofeng UV-3R, which I bought mainly for this purpose. It cost less than $50 including shipping, considerably cheaper than some dedicated VHF tracker transmitters. The radio is connected to the microcontroller through a little interface board that I built. Both this interface board and the GPS module are currently stuck into a breadboard, with wires connecting the microcontroller board to the breadboard.

The interface board performs 3 functions. It connects the DAC output of the microcontroller to the microphone input of the radio. This signal is routed through a trimmer resistor, to adjust modulation in the radio (it needs a much smaller amplitude than the DAC produces), and though a DC blocking capacitor. The board also routes the audio output of the radio to an ADC pin of the microcontroller, but I haven’t tested this yet. Finally, an open-collector NPN transistor switches the radio to transmit. I had some trouble with this transmit-receive switch: RF would get into the circuit and would keep the radio transmitting long after the microcontroller tried to turn the transistor off. I solved this with two 0.01μF decoupling capacitors on both the base and the collector of the switching transistor.

I used my own software drivers for the microcontroller (for it’s UARTs, DAC, etc.), but I used code from other APRS open-source projects for building up packets and for producing the audio output of the modem. I will release the software once it is more or less stable. I used three codes: Tracker2′s code by Scott Miller of Argent Data, the AX25 code in BeRTOS (a real-time operating system), and soundmodem. I have a lot of positive experience with soundmodem running on the Linux box, so hopefully it will work well on an embedded system. Fortunately, it uses fixed-point arithmetic, rather than floating point which is not supported in hardware on small microcontrollers, so it should work. But I have not tested the demodulator yet. The parts of soundmodem that I’m already using required quite a bit of hacking, unfortunately. I initially tried to keep the modem code as is, but I gave up after a while; the over structure does not work too well in an embedded setting.

I’ve been working on the tracker for a few days, and yesterday it got to the point where it was working on the bench: parsing GPS data, producing packets, and sending them to the radio. The packets were well-formed and my gateway decoded them (actually just some of them;  I’m not sure if the 2W signal from the radio was too weak, or the transmitted audio is not good for some reason). It was time to take the tracker for a ride. I took it to the car and hooked it to the cigarette-ligher’s socket. The LPC2148 board can be powered by up to 15V, and it can produces enough 3.3V power for the GPS, so I assumed everything would work. It did for a while (you can see some position spots in the aprs.fi map on the right), but after a few minutes the tracker started rebooting itself every second or so. I touched the regulators on the board and they were pretty warm, so I’m assuming that one of them overheated, shut down, and caused the system to reset. I guess I can’t power this unit directly from the car’s battery; I’ll need to drop the voltage with an off-board regulator first.

Next, I’m going to work on the AX25 demodulator, hopefully producing a tracker that can also decode packets.

Follow

Get every new post delivered to your Inbox.

Join 43 other followers