Tuesday, December 3, 2013

ADF4107 PLL Frequency Synthesizer Part II - 1.35Ghz LO for Radio Astronomy

Earlier this year I built the first version of my frequency synthesizer which was to provide a stable local oscillator frequency of 5.4Ghz. It was based on an Analog Devices ADF4107 PLL chip paired with a Z-Comm VCO. Control is provided by a Microchip PIC 18F14K50 microcontroller. The original design I had made was specifically for a Z-Comm V940ME02 VCO to provide the 5.4Ghz LO source that I wanted to use for downconversion of various amateur satellites (FITSAT-1 being one of them). The ADF4107 is a very versatile frequency synthesizer with 7Ghz of bandwidth. Using it I wanted to leave my design flexible for other frequencies for various other designs requiring stable local oscillators. With this in mind, I stuck with the Z-Comm VCO mini-14 form factor to give me the flexibility for many other frequency ranges including the one shown here.

Another design feature is the addition of a serial interface. Analog Devices ADIsim PLL software provides the tools for programming either fixed or tunable PLL designs. While the two units I have now built do not require tuning as they are fixed frequency, having the possibility of tuning or simply a status of frequency lock via RS232 was a nice addition.

The next unit I have made provides a fixed 1.35Ghz LO source that I will be using for radio astronomy. 1.35Ghz will provide a 70Mhz IF from the target 1.42Ghz hydrogen line frequency. Only a few modifications were needed on this second unit from the original design:

1. A new VCO had to be chosen, a Z-Comm V602ME15 was selected with a tunable range of 1100Mhz to 1400Mhz.
2. A new loop filter had to be calculated which ADIsim PLL was able to do for me. Several high frequency capacitors and thin-film resistors were used.
3. The PIC had to be programmed to write the correct register values to the ADF4107. The PLL calculator on Analog Devices website was attempted to be used for this. Interestingly its calculated values were not working as it would not lock with them in place. After manually calculating the values out and programming them in I was able to get a successful lock.
4. The output filter had to be replaced. A 5.4Ghz bandpass filter was easy to source in the original build as that is used in 5Ghz wifi access points as part of the 802.11A and N frequency ranges. Unfortunately a filter centered on 1.35Ghz was not easy to find. For the time being I have bypassed the filter on the board which did end up with a spur on its output (will discuss more in a bit).


ADF4107 Based 1.35Ghz Local Oscillator

While testing the original 5.4Ghz version, I was limited to measuring its performance by my test equipment. I was able to measure the peak frequency output via my EIP 18Ghz frequency counter and its RF output could be measured by my Boonton microwattmeter. Unfortunately my best spectrum analyzer only goes to 3Ghz, so spurs and phase noise would not be measurable. With my new design on 1.35Ghz, these measurements are now easily obtainable.


1.35Ghz LO
Once the ADF4107 registers were programmed correctly, I had an immediate lock and very clean RF output. The Z-Comm VCO has a rated output of 7.5dBm. I have a small pad on the VCO output to both feed the loop filter and stabilize the VCO which results in a final output of roughly .70dBm. Driving my mixer will need a slight higher output so an external amplifier will be used.

Now to check phase noise, I zoomed into a 100Khz and 10Khz span respectably:




Using the 10Khz span to calculate phase noise, my results are -65dBc/Hz. Not quite as good as I would like, although adequate for my needs. There still may be some performance I can get out of the design by adjusting some of the other registers within the ADF4107. 

I am still very happy with the output, the results are a very clean peak near perfect on frequency with no noticeable drift. Looking at a full span of 10Mhz to 3Ghz, there is one noticeable harmonic at the 2x frequency of 2.70Ghz. Due to the fact that I am not using my onboard filter. I will have to add an external lowpass filter to remove it. 




Saturday, June 8, 2013

Analog Devices ADF4107 Based RF Frequency Synthesizer

I have had a few projects recently needing a stable local oscillator (LO) source for downconversion, notably my hydrogen line radio telescope and a few receivers for low earth orbit high frequency satellite transmitting in the 5.8Ghz range. I have attempted the use of various VCOs along with a very stable power supply to produce a stable LO frequency, but this over the long term has proven unsuccessful. My previous designs used a  precision adjustable voltage regulator trying both analog and digital precision trim-pots, but temperature drift among other things resulted with it being too difficult to keep a stable frequency. These solutions would need constant calibration which proved to be unreliable for a true stable LO source. An alternate good solution could be the use of a precision frequency synthesizer / phase-locked loop from a reference source to produce a stable frequency. Researching frequency synthesizers, I came across the Analog Devices ADF series of PLL frequency synthesizers which I ultimately ended up choosing for my design.

I wanted the design to be flexible, that is with a single board I could populate it with a variety of VCOs only having to update the ADF4107 register configuration and the loop filter component values to produce a fixed or tunable frequency. My final design achieved this goal.

ADF4107 based frequency synthesizer
This design was based on the Analog Devices ADF4107 frequency synthesizer. The ADF4107 consists of a low-noise phase frequency detector that uses a programmable reference divider and prescaler to run a VCO via a precision charge pump to produce a stable locked frequency from a fixed reference oscillator. There are many variations within the ADF frequency synth family, I chose the 4107 as it met my needs with a maximum frequency of 7Ghz.

The ADF4107 can utilize a variety of VCOs, I chose to go with a Z-Comm device which I have used in many previous designs. The specific VCO used in this version is a V940ME02. It has an adjustable output frequency range of 5220 to 5420Mhz which fit well into the 5.40Ghz LO needed for my downconverter. The reference input to the PLL is provided by a 32Mhz TCXO crystal, which was a last minute change as I ordered the wrong package type for the original 20Mhz TCXO I had specified for the design. Only some reference counter changes were needed to use the alternate crystal that I had in my parts bin.

The ADF4107 itself is a very complex device looking at both its usage and programming. To help integrate this family into your design, Analog Devices has a great tool called ADIsimPLL to assist with the initial design regarding calculations of output frequency range based on the reference frequency input. It will also assist with selecting the loop filter component values based on a given design among many other useful things.

ADIsimPLL screenshot
My ADF4107 synthesizer is controlled via a SPI bus from a Microchip PIC18F14K50 microcontroller. After the initial power up of the ADF4107, multiple registers must be sequentially loaded to define the prescaler counters among other configuration flags. The PIC stores and handles this configuration. I have also included an external serial interface into the design to allow remote tuning and control of the frequency synthesizer via the PIC, although in this specific design it is not being used as it only needs to provide a single hard-coded fixed frequency.

The design itself follows good mixed-signal design practices. The board is a four-layer design that I had received from my favorite fab house, OSH Park. Upon receiving, I populated by first board by hand and had a working board on power up. ADF4107 register programming took a bit as the specific loading order of the registers was tricky, but once mastered, the PLL immediately locked onto 5.40Ghz according to my frequency counter. I couldn't view it directly on my spectrum analyzer as it only goes to 3Ghz, but the frequency counter was nicely stable at 5.4 Ghz plus or minus a few hundred hz. Each subsequent PLL lock is almost instantaneous. I added two LEDs to some spare PIC outputs, one of them is used to indicate when there is PLL lock and a spare that can be used for any additional status I wish to see.

An output filter is included in the design, in this case it has a center frequency of 5.4Ghz. Filters of this frequency are easy to find as they are used a lot in 802.11a WLAN hardware. I did not include an output amplifier on this board as I had planned to keep the design as simple as possible, instead I would be using an external amplifier. This will need to be the case as the output of this VCO at 5.4Ghz is -15dBm, which is not high enough to provide a LO for most mixers. So on any future redesigns, I may add an amplifier back in.








Sunday, June 2, 2013

Lowrance Globalmap / LMS GPS Antenna Replacement Modification

The older Lowrance Globalmap and LMS series of marine electronics are terrific GPS receivers. The only common issue I see with them is that the GPS antenna units for them often go bad. The antenna are about 4" round white pucks that you mount high up on your boat that actually contains the GPS antenna / receiver along with an optional DGPS receiver. This then connects to the back of your Lowrance unit supplying power and communication to the antenna from the head unit itself.

There are two series of these GPS antennas depending on how new your Lowrance unit is. The older ones are NMEA-0183 based while the newer stuff is NMEA-2000 based (most models support both). The advantage of the older 0183 protocol is that is uses a simple RS-232 serial interface, while the 2000 protocol is CAN-bus based (not that this is bad, CAN is a great protocol, but for the point of interfacing these units the RS-232 protocol is significantly easier to work with). Both of my units (A Globalmap 3000 and LMS-480) support NMEA-0183.

Repairing the antennas themselves is a huge pain. I have a dead Lowrance LGC-3000 GPS CAN bus antenna that I cracked open to take a look inside, these units are definitely designed to not be opened, it took some serious cutting to get inside.

Inside Lowrance LGC3000

Nothing unexpected found, a basic GPS receiver, small micro, and an impressive watertight enclosure. Typically I see the micro and/or GPS receiver itself is dead. I'm not sure if heat is the cause or possibly static discharge is, but repairing usually isn't really feasible. Just getting into the thing pretty much destroys the nice water-tight enclosure.

So what to do if your GPS antenna is dead and don't want to spend $100+ for a new one? Simply use any GPS receiver that outputs NMEA-0183 data and feed it directly into the Lowrance spare serial port. This is pretty much every GPS receiver / module ever made.

Each device within the Lowrance family has an optional NMEA-0183 input (and sometimes output depending on device) that allows you to daisy-chain units together. So a single unit connected to the GPS antenna can send the GPS information via NMEA-0183 through multiple units allowing you to need only one antenna. Now the cool thing about this is in the Lowrance configuration menu, you can set which serial input you wish to receive the GPS information from along with what GPS strings you want to receive. This means you can feed NMEA-0183 GPS strings directly into the units spare serial input from any 0183 compatible receiver, not needing to use the Lowrance expensive antenna.

My solution as to use an old 12 channel Cirocomm receiver that I have had laying around which cost about $12. This receiver runs off of 3.3V- 5V and outputs TTL level NMEA-0183 GPS strings. The original GPS  module in the LGC puck can also be used as long as it is not dead itself. To use this with the Lowrance, I added an RS-232 level converter and small power supply to run directly off of 12V. I had these boards already designed and built for Xbee use, it was just a matter of wiring in the GPS unit to make it work. The only downside of this is you need to power the GPS unit directly as the Lowrance does not supply power on the spare serial interfaces like it does on the direct GPS interface. The serial interface requires only two wires, TX from the GPS antenna to RX on the Lowrance unit and ground. You could also interface this into the GPS input connector on the Lowrance, but if you are missing the antenna and cable, wiring to the spare serial interface avoids sourcing the expensive twist-lock connector. Once the new receiver is put together the only thing remaining to do is to mount it in a sealed watertight enclosure, something nice looking so it doesn't look stupid. Also preferably something plastic and white to reflect heat and be transparent to the GPS signal.


To use, set the Lowrance to use the NMEA-0183 input for GPS, then set the correct baud rate and GPS strings your receiver supports ($GPGGA and $GPGLL are the important ones). That is all, the Lowrance should respond indicating it is receiving GPS data and begin to populate you satellite information screen. Multiple units can then also be daisy-chained in the exact same manner.

Lowrance Globalmap 3000 NMEA Config
My Cirocomm GPS unit defaults to 4800 8N1, which is fine and sends $GPGLL, $GPGGA, $GPGSA, and $GPRMC strings, so make sure those are selected in the GPS configuration. If daisy-chaining, make sure the NMEA outputs are also enabled and set to the same baud rate on the sending units.

Lowrance LMS-480 NMEA Config
Note that again almost any GPS receiver can be used to supply GPS information to the Lowrance. Something like an old Garmin GPS 12 also works great as a spare if your antenna dies, simply take its NMEA-0183 output and feed it directly into the input of the Lowrance in the exact same manner.

Both units are daisy-chained off of my GPS receiver. Note testing was in my basement, so no GPS lock here





Tuesday, May 21, 2013

Experiencing the Dayton Hamvention 2013

The Dayton Hamvention was this past weekend (May 17th - 19th) and after many years of wanting to go and not going for various reasons, I finally planned a day to spend there. This was also the first one since I received my ham radio license last year which gave me another excuse to go.

The Hamvention is an enormous ham radio swap meet that has been going on since the 1950s. While ham radio is a huge part of it, general electronic components are everywhere, so it is suitable for anyone who loves electronics. While I would have loved to get there on Friday morning to be one of the first ones looking for deals, prior work commitments forced my visit to occur on Saturday. The day started by leaving my house at roughly 6:00 am from Michigan to drive about 220 miles down to Dayton Ohio. The weather forecast for the day was sketchy at best with a 50% chance of rain all day, I decided to get there as early as possible to hopefully beat any rain. The location was easy to find, just a few miles off of I-75 and the towering antennas made it easy to spot. Upon arriving around 9:30 am, there was no rain and still plenty of parking in the field across from the venue, Hara arena.


After my initial ticket purchase at the front doors, I headed straight for the outside market area as there was no rain at this point and I wanted to start hunting for anything good before all the great items were picked over. Upon walking outside into the huge outdoor swap meet, the initial experience was overwhelming! The size of the outdoor swap meet was just enormous.


I started at the front and started hitting every row of booths on the east lot, followed later by the west lot. There was just so much good stuff! There was a lot of junk there too. Things like late 1990s computer hardware, old giant two-way radios, and random assorted telco hardware from the 1980s. I would say about 75% of the booths (a booth could be just the bed of someones truck piled full of electronics) contained interesting stuff. You would find people with just boxes and boxes of the strangest things. About an hour into the day the rain did start falling, so I browsed into one of the larger tents for a bit.

Meters!
Once the rain subsided, I began more browsing. The selection of hardware and components was terrific. Looking for RF components was not an issue, the stuff was everywhere so I was extremely happy. Everything from new MMICs and cables / connectors to older used random brick oscillators and waveguides.


Later that morning I spent some time browsing the inside exhibits, all the big radio brands were there (Icom, Yaesu, Kenwood, Alinco, etc). The DZKit guys were there too with their Sienna HF Receiver/Transceiver kit which was really impressive. It's a very high-end HF transceiver that you assemble. Most of the smd work comes completed on the boards, another 40 or so hours of assembly is required to complete including stage by state testing.

Mini-circuits had a booth there, being one of my favorite RF component suppliers I had stopped by to talk to them for a bit. I also talked with the Society of Amateur radio Astronomers along with the AMSAT people. I was happy to learn that their upcoming Fox-1 Satellite has an actual launch date scheduled in 2014. This satellite will carry a handful of experiment payloads along with the best part, an FM repeater. It will be nice to have a second working FM sat available besides SO-50.



A little after noon I met up with Chris Gammell of The Amp Hour podcast, it was the first time meeting him which was awesome after listening to the show for almost two years. We browsed around the booths for the rest of the day talking about everything electronic and looking for bargains. A little bit later that day we also met up with Dr. Gregory L. Charvat who was a guest on The Amp Hour which was equally as awesome. I had a bunch of questions for him regarding my radio telescope project, he was really informative and a great person to talk about RF to while browsing random electronic bits.

Towards the end of the show at 5:00 we started looking for any last deals before people started packing up their gear. While I didn't find anything, Chris came across an old HP frequency generator in perfect condition for $10. A lot of exhibitors who were not sticking around for Sunday starting just dumping stuff they didn't want in the trash. Some of it was scavenged by people, but most of it wasn't worth carrying back to the car even for being free.

As for my own purchases, I only ended up buying a few things: some SMA hardlines and cables, a nice brass WR-90 waveguide about 16" long (perfect for a 10Ghz slot antenna), a few mini-circuits attenuators, and a large lot of aluminum hardware (hexagonal standoffs and such). Looking back, I keep thinking about things I should have bought, but did not. I definitely needed more than a single day for this!

After 5:00 when the show was over for the day, a bunch of us headed over to a local bar which Chris had previously planned. There were about 20 people that had showed up total, most are other fellow Amp Hour listeners which was very cool. Shortly after 6:00 I decided to start heading home as I was completely exhausted, but not before Chris tore into his frequency generator to take a look inside.



Lessons learned:

Next year, arrive on Friday morning. I felt like a lot of booths tables had a lot of empty spots where gear had been sold. It seemed like everything good (test equipment and radios) was already gone by Saturday morning.

Bring a rolling luggage cart. I had one but forgot to throw it in my trunk. If you purchase anything heavy, it's a long walk back to the car.

And definitely spend more than one day there. A single day is not enough time to see everything. I probably only saw a quarter of the inside booths and still missed a bunch of stuff outside as well.


Friday, February 22, 2013

XBee Interface for the Davis Vantage Vue Personal Weatherstation

About a month ago I finally purchased a good personal weather station, a Davis Vantage VUE. I performed a ton of research over the past few months and the Davis models seemed to be some of the best within a reasonable budget. One of the main features I liked about the Davis models is the wireless capability of the sensor unit and most importantly the two second data update interval. This was important to me as I wanted to be able to submit real-time data up to the Weather Underground utilizing their rapid-fire servers and API.

I had been doing this previously via some home made sensors I had put together, at the time I was sending temperature and humidity data to my Wunderground station (KMIWESTB14) via one of my datacenter temperature monitoring sensors I had built. The sensor was mounted outside and transmitted data via an XBee to a linux server in the basement rack where a simple bash script listened to the serial port, reformatted the data and sent it up to Wunderground. While it was cool, I wanted more data. My station was lame compared to many of the other nearby stations, so I looked to expand. Barometric pressure was easy as SPI/i2c sensors to receive air pressure are cheap and prevalent  but the remaining sensors, notably wind direction and speed were not. These sensors would require mechanical designs (which I am all for building) along with calibration which would be the more difficult piece to solve. Calibrating a wind vane would be simple, but calibrating a anemometer would require a calibrated source or device, I would at least have to invest in a good handheld anemometer to calibrate my home built one. With the cost of these even used not really cheap, I finally decided to retire my station and purchase a commercial one.



The Davis Vantage VUE system is awesome and I have been very happy with it for the first few weeks of using it. The only complaint I have is it did not have any type of available interface to access it by, no direct serial, ethernet, USB, etc. These were all additional add-ons that were necessary to purchase along with the unit. I knew this when purchasing it, and I had plans to reverse engineer it as soon as I received it.

The Davis Vantage VUE console is a rather simple device, the main board has a handful of components which include a common ATMEL microcontroller, so this was going to be easy. Figuring out the pinout on the back of the unit was trivial at best, but it turns out that a group of people already have. A few weather forums out there have a good amount of information on the Davis interface which consists of a 20pin, (2x10) 2mm pitch connector that the factory options can install onto. A pinout of this interface is readily available along with a full API of the serial interface.

Once discovering that a serial interface was available on the back of the unit, my immediate thought was to use an XBee. Checking the pinout of the connector there was also +3V and Gnd available. Perfect! Since an XBee can run between +2.8V and +3.4V,there would be no issues as long as not too much current was consumed eliminating the need for any additional power source. Because I had no data on how much current I could actually draw off of this port, I stuck with a standard XBee (non-pro) as its transmitting current at 3.3V is only 45ma. Assuming it may be slightly higher at 3.0V, it would still be low enough (I had hoped) to run the XBee, and after some testing I proved that it was.

Once some basic testing was made with the XBee to prove that it worked, I designed up a simple board and sent it off. Once received, I threw it together and here is the final device:


Davis weather station XBee interface

It tucks neatly into the back of the Davis console. I chose to use an original V1 XBee (still wearing the MaxStream logo as it was pre-Digi) because it was the only one on hand that I had with a nice low profile chip antenna.


Hacking Davis Vantage VUE

Once I had it installed, which fit very nicely into the back of the console, I wired up another XBee to serial interface on my desktop and powered up the Davis. The unit initially responds with an 'LCD ok' message at the same time the unit goes through its self testing at which point it is ready for commands. The easiest is to send an 'STRMON' to it which will dump all of the raw sensor data from the external sensor unit every two seconds.



I have had this running for a few days now without any issues, the next step will be to rewrite my simple script to grab this new data and reformat it according to the Wunderground API and send it.

One additional note on this, apparently Davis has limited the usability of the serial port on the newer versions of firmware. Luckily my new unit came with the older version of firmware which still allows access to the serial interface. It is unfortunate that this has happened, I can't imagine getting around whatever was put in place to figure out how to re-enable the serial interface would be too difficult, but I am not about to update my unit to find out.