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.



Monday, November 12, 2012

A Silly USB Stick, It Presses 'F1'

So it happened to me. Recently I received some alert that my colocated servers were down at a local datacenter. There had been a power event where the UPS units there had failed causing a reboot of everything in this specific DC. While driving the the DC at 1am to figure out what was going on, I received alerts that some of my servers had came back up, while one had not. Upon arriving there were already a ton of people there dealing with their own equipment. Looking at my specific servers I could see there was a bad DIMM error on the front display, classically flashing orange. "All I need to do is press F1 To Continue" I thought, but unfortunately all of the crash carts were in use by other people there. Anyone who has Dell servers has seen this message during boot at some point if there has ever been any issues with their server. It is a classic error message which I wish Dell had always by default just made the server boot if possible. Because of the queue of people waiting for crash carts, I had to wait until one finally became available to press 'F1' to get my server alive. This could have easily been avoided if I had set this specific server to boot up regardless of error in the bios, but it was too late for this now.

The solution? Well, make sure your servers are set to boot regardless of error in the bios. But a backup solution is my "F1 USB Stick":



What does it do? It is a UDB HID Keyboard that presses F1 repeatedly! That's all!

Simply plug it into a server and it presses F1 for you. No keyboard needed! Your server will be back up in no time.

F1!

I had fun with this one, looking at the kernel messages upon plugging in and you will see this:


usb 3-2: new full speed USB device using uhci_hcd and address 3
usb 3-2: configuration #1 chosen from 1 choice
input: Brad Boegler  Press F1! as /class/input/input3
input,hidraw0: USB HID v1.11 Keyboard [Brad Boegler  Press F1!] on usb-0000:00:1d.1-2

It is based on a Microchip PIC18F14K50 USB enabled microcontroller, a 12Mhz crystal, and the necessary passive components for operation and USB communication. I added a few LEDs in there just to be able to see what was going on. I wrote the code in Microchips C18 which utilizing Microchips USB libraries made this as simple as can be.

I will be keeping one of these in my laptop bag at all times... just in case. ;)


Monday, October 8, 2012

Hydrogen Line 1.42Ghz RF Front End - Radio Astronomy

After finally completing the power supply for my RF front end last week, I spent some time tonight assembling the power supply onto the back of the feedhorn assembly and wiring all of the amplifiers and downconverter to the necessary voltage supplies. Here is a look of what it currently looks like:


From the front, you have the feedhorn, LNA, 1420Mhz cavity filter, downconverter, low pass filter, second LNA, then the power supply on the very back. Now that it is completed, I performed some testing tonight to check operation, sensitivity, and power supply stability. So far everything is looking good, the video below shows its operation on my bench for testing purposes:





Saturday, September 29, 2012

Radio Telescope Power Supply - Progress

Today I received my power supply boards for the RF frond end of my radio telescope. Due to the number of amplifiers and the voltage requirements of my downconverter, I needed a supply that provided a stable and clean +5V, +10V, +12V, +15V, and adjustable 8V to 15V output.


Current requirements on all outputs is very small (less then 20mA at each respected output) with exception of the 12V supply which powers the mini-circuits ZRL-2400LN low noise amplifier. It has a 350mA @ 12V requirement so I have utilized the aluminum enclosure to sink some heat off of the 12V regulator. I slightly miscalculated the boards size for the aluminum enclosure I had chosen to use for it. Due to the mounting standoffs inside the case, I was not able to mount the board flush against the side of the enclosure... although it was nothing a band saw couldn't fix. All voltage outputs are passed through the enclosure using feed through capacitors.

There is nothing really exciting about this supply other than the fact that it is now completed. Power supplies are probably the least exciting components of any project to build, even though their importance and stability are critical. Now that it is completed I can install it on the back of my RF frontend and start prepping the actual mount for the dish.

Here is the final assembled board mounted in its shielded enclosure: