Close

Does this project spark your interest?

Become a member to follow this project and don't miss any updates

Handheld 3GHz Spectrum Analyzer

Includes RF detector up to 6GHz and a datalogger

5 48 37
Enjoy this project?
Share on twitter   Share on Facebook

This project was created on 08/15/2014 and last updated 3 hours ago.

Description
This is a handheld spectrum analyzer that works up to 3 GHz. All basic functions that you would expect on a spectrum analyzer are available. No external PC or other computer is needed.

The user interface is a backlit graphic LCD. The lowest section of the LCD displays the menu (function of the control buttons).

The most important connectivity aspect is, that the device can be used to check or debug wireless connectivity of other systems. But also a wired serial connection is provided for remote operation (half duplex RS232).

For Openness, many things will be public, such as schematics, complete parts list, pcb artwork, and firmware source code.

See my 2-minute video on YouTube:

https://www.youtube.com/watch?v=nwh_d2H407A&feature=youtu.be
Details

  • System diagram

  • Internal operation of the spectrum analyzer

The analyzer has the classic structure with a local oscillator, mixer and IF system. The Si4012 is used as local oscillator, it generates up to 960 MHz and has a two-wire control interface. The mixer is a Maxim 2680. The Si4431 is tuned to the IF frequency (with selectable bandwidth) and provides a logarithmic signal strength indication.

The Si4431 can be tuned to 960 MHz maximum, this would give a maximum receive frequency of 960+960 = 1920 MHz. But we can also use the 3rd harmonic of the oscillator, this theoretically gives a maximum receive frequency of 3840 MHz.

For a given receive frequency, mirror frequencies are suppressed in firmware by using two or more combinations of LO and IF frequency. The wanted frequency will be present in all combinations, mirror frequencies are only present in a single combination.

The sweep time is set automatically by the firmware, as a function of the SPAN and the RBW.

  • Other functions

Several wireless communication systems use short pulses, that might be hard to detect on a spectrum analyzer. To detect these, the analyzer has a ADL5519 power detector that works up to 6 GHz. The power detector is sampled at 20KHz, so it will detect short pulses without the need to be tuned to a certain frequency. It also has the ability to measure the frequency of the pulses (under most circumstances with 100MHz resolution), this is described in one of the project logs. The input is switched between the spectrum analyzer and the power detector with a AS186-302 switch chip.

Every 10 seconds, the maximum output level of the power detector and the detected frequency are written to a micro-SD card. A realtime clock is present to provide date and time stamps to the logfile. The logfile is readable on the device itself, but can also be read with excel (CSV format). Every new day, a new directory is created for this day and a new logfile is created. Every month, a new directory is created for this month that contains the directories of the days.

The micro-SD card can also be used to upgrade the internal firmware. 

The output of the power detector can be directed to the internal speaker, so you can hear the wireless communication pulses. The sound is generated by the DAC output of the microcontroller, with the same 20KHz sample rate. Volume control is done in the firmware. Sound can be output through a 3.5mm jack. The second channel of this 3.5mm jack can be used as analog input, or as a half duplex RS232 communication port.

A microphone is available. I want to be able to record spoken comments (and store this on the SD card) while measuring, but the firmware for this sound recorder is not yet working.

The device is powered by two AA batteries, or two NiMH cells. An adapter can be connected to charge the NiMH cells.

  • low-frequency electric and magnetic fields

Many people have health problems due to exposure to RF radiation (see mast-victims.org). These people can also be sensitive to low-frequency electric and magnetic fields. For this reason, the device can also measure these low-frequency fields. The waveform is displayed on the screen, and can be output at the speaker. 20KHz sampling is used. Every 10 seconds, the measured value is written to the logfile. The same functions are available for the analog input (AC value is measured, DC value could also be measured).

  • User interface

Only the most important user-interface functions are mentioned in this section.

After switching ON, you can choose between the following modes:

  • SCAN (Spectrum analyzer)
  • RF (Power detector)
  • ELEC (electric field)
  • MAGN (magnetic field)
  • MENU (Utility functions: inspect SD card, set time and date)

The spectrum analyzer mode displays the following values:

  • In PK (peak freq) mode: measured level and frequency of the detected peak
  • In CF (center freq) mode: level and frequency at center frequency
  • Start and Stop frequencies, Span, RBW (Resolution bandwidth)
  • Graphic presentation of the spectrum
  • Battery condition...
Read more »

Components
  • 1 × Si4012 Transmitter used as local oscillator
  • 1 × MAX2680 Mixer
  • 1 × ADL5519 Logarithmic RF detector
  • 2 × AG201-63 RF amplifier
  • 1 × AS186-302LF RF switch
  • 1 × ATXMEGA192 Microcontroller
  • 1 × NCP2890 Audio ICs / Audio Amplifiers
  • 1 × MT41T81S Realtime clock
  • 1 × DOGM128-6 LCD display
  • 1 × LP2980-3.3 Voltage regulator

See all components

Project logs
  • Low cost version

    3 hours ago • 0 comments

    Several people asked if they can buy the analyzer as a pcb or kit.

    I think with more than 270 components, this will be relative expensive and/or quite difficult to assemble. I also think that for most people, the spectrum analyzer itself is the most important, and they don’t need the other features.

    ------------------------------------------

    To make it interesting for a lot of people, the following needs to be done:

    - The cost should be low. So it should be a kit.

    - It will only be a spectrum analyzer

    - The kit should have no more than approx. 60 components to make it easy to build.

    - SMD components should not have a very fine pitch

    - The ATXMEGA should come pre-programmed, so an AVRISP2 programmer is not needed.

    My plan is, to make a 'bare bones' version, and offer it as a kit. But the full version with all options will also be available, perhaps only as complete device.

    ------------------------------------------------

    The bare-bones kit will contain:

    - pcb with the programmed ATXMEGA

    - All spectrum analyzer components

    - The Si4431 (that is difficult to mount) on a pre-assembled small pcb

    - connectors: SMA input, 3.5mm RS232 half duplex, connector for 5V power adapter

    - on/off button (or .perhaps only a reset button)

    - NO lcd and no control buttons. Operation by the PC application.

    The price of the bare bones version should be below USD 100, I think.

    -------------------------------------------------

    The following components can then be mounted as an option:

    - LCD with backlight, and control buttons (enables operation without PC)

    - micro-SD card connector, real time clock

    - battery circuits, step-up converter, charging circuit.

    - Enclosure

    - Firmware updates by SD-card (no programmer needed).

    -----------------------------------------------

    The barebones version will require a redesign of the pcb, aimed for easy assembly. For instance, the MBT3946 fine-pitch dual-transistors should be replaced by SOT23 single transistor types. Only a few types of resistors and capacitors should be used. The ATXMEGA has 0.8 mm pitch, that is not very difficult to mount. (It was deliberately chosen for this, I don't like soldering big 0.5mm pitched parts). The Si4012 is a 0.5mm part, but has only 10 pins, si it can be mounted without too much trouble.

    It will, however, not be possible to have the barebones design ready before the next judging round of THP...

  • PC remote control application

    2 days ago • 0 comments

    The analyzer has a RS232 port, intended for remote control. So I created a PC application to control the spectrum analyzer. A simple protocol is used to communicate over this connection, at 38400 bps.

    The following screenshot shows the PC application.

    The measurement graphics are show in green. The data is written from left to right. The indicated white area is the separation between new and old data: data to the left of this area has just been written, and data to the right of this area is old and will soon be overwritten (so the white area moves from left to right).

    The device finds the peak in the data, displays its level and frequency at (1), and displays the peak position as a red line. (In this case, the data at the right side of the screen has a higher level, caused by the fact that the PC graphic update is not (yet) synchronous to Atxmega screen update. I probably did set RBW to a lower value, causing a lower level. Atxmega has completed a scan at this lower level, and sends an updated peak value (as shown), but the PC has not yet completed its screen update and still shows a higher level at the right side. This will be obvious when you are operating the PC application yourself)

    To find level and frequency of other points in the data, you can can move the blue marker with the two marker buttons at (5), and the level and frequency are displayed at the right side of the marker buttons. The marker buttons have a auto-repeat function.

    Most important controls are:

    (2) Center:   Step the center frequency up or down in 1/2-span steps

    (3) Span:   Select the frequency difference (stop - start) from a series of fixed values.

    (4) RBW:   Select the resolution bandwidth from a series of fixed values.

    The values Center freq, Marker freq, Start and Stop freq can also be directly entered as a number. Just press the button at (6), the associated 'LED' will light up, the number buttons will be enabled and you can enter the number. The entered number will appear above the LEDs (not shown). Press ENTER when you're done.

    If you enter start and stop frequency, the span will automatically be set to the difference between start and stop. Using one of the span buttons afterwards will let the span jump back to one of its normal fixed frequency values (1-2-5 sequence). After a span adjustment, the center frequency will stay the same.

    All PC software functions are also available on the device itself (sometimes you need to press one or a few buttons more)

    The PC software is based upon the Open Instrumentation Project. It is programmed in the script language Tcl/Tk. The use of Tcl means that the application will also work on Linux and on the Mac without any change (but I did not test that...).

    I did not program in Tcl before, but the basic functions were not difficult to understand and quite easy to do, and my program is not complicated. Whenever you press a button, a simple code is sent to the analyzer, and the analyzer sends back what numbers and lines are to be displayed on the PC application.

  • Source code

    a month ago • 0 comments

    Today, I got a mail from Hackaday, telling that I should also put my sourcecode on the project page.

    I am afraid that the sourcecode is not an easy read. It is based on software from older projects, and it should be cleaned up. I think you can tell from the code that I did quite a lot of assembly coding in the past...  

    This evening, I translated several dutch comments to English. The real spectrum-analyzer work is in 'sa.c'.

View all 7 project logs

Discussions

Chris wrote a day ago null point

I'd love either a board or a fully assembled unit... any idea on a ballpark of the pricing?

Are you sure? [yes] / [no]

Noam Rathaus wrote 2 days ago null point

What is the estimated cost of this item?

Are you sure? [yes] / [no]

roelh wrote 2 days ago 1 point

Hi Noam, I plan to have 2 selling items, SMD mounted pcb and full device. I want to have the pcb SMT-assembled by a professional well-equipped company. As soon as it is clear how much that will cost, I will put the price here on my page.

Are you sure? [yes] / [no]

Bart van der Wee wrote 17 days ago 1 point

Thank you Roel - this looks like a handy little gadget - if you need help with Dutch->English I may be able to help, just ask.
I would also be interested in building one of these, are you planning on selling kitsets or ready-made items?

Are you sure? [yes] / [no]

roelh wrote 2 days ago null point

Hi Bart, thank you for your offer for translation.... It was mainly a problem because of the deadline for THP at that time... nearly all program comments are translated now.

I plan to sell:
1) pcbs with all SMD mounted, tested and calibrated,
2) complete device

Are you sure? [yes] / [no]