Teardown, repair and analysis of an Agilent E4443A 3Hz – 6.7GHz PSA series Spectrum Analyzer from The Signal Path:
In this episode Shahriar repairs an Agilent PSA Series Spectrum Analyzer. The instrument generates many errors during self-alignment and produces no measurements below 3.2GHz. The block diagram of the unit is thoroughly presented and various possible failure points are considered. Based on the observation of the noise floor, the most likely cause is the second LO module. The measurement of the LO power indicates that the second LO power is fall below nominal.
Kerry Wong did a teardown of Microsemi’s C900502 X-band planar transceiver:
I got a couple of Microsemi’s C900502 10.525 GHz X-band Doppler radar motion sensors a while ago. This batch was made in UK and had “UK patents 2243495 and/or 2253108 apply” printed on the case. I have seen a teardown of an HB100 Doppler radar module before and was wondering if I this one is any different inside.
In this short episode Shahriar takes a close look at an Ist-Rees laser spectrum analyzer. This simple instrument is based on a continuously rotating diffraction mirror to detect various wavelengths. A trigger signal is used to denote the beginning of the scan and the front-panel display shows the current selected wavelength. By aligning the output signal with the trigger signal the wavelength of the input light can be measured.
After the unit teardown, the instrument is used to measure the wavelength of a semiconductor 1310nm laser. The unit is calibrated using this source and is then used to measure the infrared leakage wavelength from a green laser pointer.
If you buy an amateur transceiver cheap enough to make a reasonable grab bag gift or stocking stuffer, you get what you pay for. And if this extensive analysis of cheap radios is any indication, you get a little more than you pay for in the spurious emissions department.
Amateur radio in the United States is regulated by the FCC’s Part 97 rules with special attention given to transmitter technical specifications in Subpart D. Spurious emissions need to be well below the mean power of the fundamental frequency of the transmitter, and [Megas3300] suspected that the readily available Baofeng UV-5RA dual-band transceiver was a little off spec. He put the $20 radio through a battery of tests using equipment that easily cost two orders of magnitude more than the test subject. Power output was verified with a wattmeter, proper attenuators were selected, and the output signal scanned with a spectrum analyzer. Careful measurements showed that some or all of the Baofeng’s harmonics were well above the FCC limits. [Megas3300] tested a few other radios that turned out to be mostly compliant, but however it all turned out, the test procedure is well documented and informative, and well worth a look.
The intended market for these radios is more the unlicensed crowd than the compliant ham, so it’s not surprising that they’d be out of spec. A ham might want to bring these rigs back into compliance with a low pass filter, for which purpose the RF Biscuit might prove useful.
The “normal” way to build a spectrum analyzer is to collect a bunch of samples and run a Fast Fourier Transform (FFT) on them all in one shot. As the name implies, the FFT is fast, and the result is the frequency components of the sampled data. [agp.cooper]’s “wrong” way to do it takes the Goertzel algorithm, which is used for detecting the intensity of a particular frequency, and scanning across the frequency range of interest. It’s a lot slower than a single FFT but, importantly for the ATtiny85 that he implements this on, it’s less demanding of the RAM.
The result isn’t a snapshot of a single moment in time, as it would be with an FFT. For instance, his latest version of the software takes almost 3/4 of a second to take 61 measurements across 500 Hz of bandwidth and push the data out to an LCD screen. That’s too slow for fast signal data, but is just about workable for looking at the way frequency components of a plucked guitar string damp out, for instance.
We’re sure that there’s some version of FFT code that will fit inside these micros and manage to get the job done faster, and if any of you out there can prove it, the gauntlet is thrown. But it’ll take a lot of work compared to just sliding Goertzel’s algorithm up and down, and frankly we just think it’s cool that this method works at all.
Shortwave listening has always been a mainly nocturnal hobby. To get the real DX, one had to wait for favorable ionospheric conditions after sunset and spend hours twisting knobs while straining to pick voices from half a planet away out of the noise. But who has time for that in today’s world? And what of the poor city-dwelling SWL, with antenna limitations and often elevated noise floor in the urban jungle?
[London Shortwave] came up with a solution to both problems – a briefcase SDR capture rig. With a wide-band SDR receiver and an HF up-converter, a Windows tablet, a 12-meter dipole antenna, and a few bits and bobs, [London Shortwave] can now nip to the low-noise environment of the local park and capture large swaths of spectrum to an SD card. The recordings can be played back and analyzed later. [London Sortwave] has been able to dig some interesting signals out of the SDRSharp waterfall display, like Radio New Zealand, a Philipines station, and an early morning transatlantic contact with Radio Aparecida from Brazil. We really like to look and feel of [London Shortwave]’s capture rig too. It bears little resemblance to the Hallicrafters and Drake SW rigs of yore, but it puts a new spin on old hobby and offers possibilities the old timers could only dream of.
If you are interested in electronics or engineering, you’ll have noticed a host of useful-sounding apps to help you in your design and build work. There are calculators, design aids, and somewhat intriguingly, apps that claim to offer an entire instrument on your phone. A few of them are produced to support external third-party USB instrument peripherals, but most of them claim to offer the functionality using just the hardware within the phone. Why buy an expensive oscilloscope, spectrum analyzer, or signal generator, when you can simply download one for free?
Those who celebrate Christmas somewhere with a British tradition are familiar with Christmas crackers and the oft-disappointing novelties they contain. Non-Brits are no doubt lost at this point… the crackers in question are a cardboard tube wrapped in shiny paper drawn tight over each end of it. The idea is that two people pull on the ends of the paper, and when it comes apart out drops a toy or novelty. It’s something like the prize in a Cracker Jack Box.
Engineering-oriented apps follow this cycle of hope and disappointment. But there are occasional exceptions. Let’s tour some of the good and the bad together, shall we?
Of course, it’s not that simple. Modern phones have plenty of processing power, but when it comes to analogue input and output they are restricted to only the hardware they need to make a telephone call. A single microphone input, and a stereo output that can drive a line input on an amplifier, or a set of headphones. Unless you have spent a lot of money on a very high-end phone targeted at audiophiles these will not be served by particularly high-end silicon, the ADC and DAC will top out at somewhere just above the CD sample rate of 44.1kHz and will not have the quietest noise performance. They will not be in any way calibrated, so the best you can hope for from your hardware in terms of measuring ability will be a bandwidth of somewhere just above 20KHz with no ability to produce or measure quantifiable voltages. To give some context, even a 5-dollar USB sound card for your PC will be capable of a higher bandwidth than that you’ll find in your phone.
Our question posed earlier in this piece then becomes “Why buy an expensive oscilloscope, spectrum analyzer, or signal generator, when you can simply download one for free that only has a 20KHz bandwidth and can’t accurately measure or produce a known voltage?” It doesn’t sound very encouraging, does it.
But looking at it another way, you can’t argue with free. If you are working at audio frequencies then perhaps they can offer something useful. Even with their limitations perhaps there are still areas in which they can deliver useful insights, and that’s what we’ll now investigate.
We’ve looked at the shortcomings of a mobile phone as an instrument platform, but does it have any strengths? In one respect here we are fortunate. A phone may not be able to measure voltages accurately, but it should be able to do so when it comes to frequencies and timing. All the actions of its microprocessor will be governed by a crystal oscillator, which while it won’t be calibrated to an incredible standard will still be good enough for the purposes of a free mobile phone instrument.
Even if we can’t entirely trust our phones on matters of amplitude we can do so in this field, if it returns a frequency or period reading we can believe it. Another area in which we can place some trust in our phones lies with waveform generation. Within the limitations of its DAC we know that it is designed to reproduce whatever waveforms a piece of music can supply it, so for the purposes of a very simple audio benchtop instrument we can trust it to produce the sine, square, and triangle waves we’d expect from a basic signal generator.
Having considered the likely usefulness of a mobile phone app instrument and thus having an idea of what to expect, it’s time to sit down at the bench with a phone and try a few for real. This isn’t a review of the apps themselves but a look at the feasibility of an app as an instrument, so we’ll mention a few apps but not review their individual features in detail. Our device for these tests is a Moto G4 running Android 6.0.1.
We started by looking at the performance of a phone as a signal generator. There are a lot of results for a search on “signal generator” or “function generator”, one of the ones near the top was keuwlsoft’s offering, capable of producing sine, triangle, and square waves from 22kHz down to an improbable-sounding 471.16mHz, as well as a selection of noise sources and modulation effects.
Installed on the phone, it rewarded us with a tone in the speaker after the usual moment to decipher its UI. Plugging in a 3.5mm jack with a lead to our ‘scope, and we could see the three types of waveform as expected. The frequency was measured as exactly the figure in the app. At the upper end of the frequency range above 20KHz it became obvious that the waveform was diminishing and distorting, however that is probably a feature of the Moto’s audio hardware. Otherwise the amplitude stayed pretty constant over the audio range.
On the subject of amplitude, these apps are usually calibrated in percentage of the maximum amplitude they can serve, there is no voltage reading. However to give an idea of the output level, with both the in-app gain and the device volume set to maximum we measured 945mV RMS for a 1KHz sinewave. Knowing that figure it was a simple matter of setting the in-app gain to a calculated percentage to give a lower figure, for example to achieve a 500mV RMS reading we set it to 52.91%. It’s not perfect by any means, but if you have measured the output at full volume it is possible to impose some level of calibration.
Having exercised the phone’s capabilities producing waveforms, it’s time to consider its abilities measuring them. There are a variety of apps freely downloadable that offer either oscilloscope, spectrum analyzer, or a combination of both functionalities.
The first thing we encountered when installing these apps was the nature of Android’s approach to audio hardware. By default these apps take their input from the microphone. Everyone who installs them probably spends a while whistling at their phone to see a nice waveform or spectrum peak appear, but sadly for our purposes a microphone is no use. We need a physical input, and you might think that could be served by the microphone input on the device’s 3.5mm jack plug. Unfortunately a modern phone is not the same as a cassette recorder of old, so we quickly discovered that simply plugging in the appropriate TRRS lead did not magically switch over from the microphone.
Instead that changeover is handled by software, and whether it works for you will depend on how lucky you are in your combination of phone, OS version, and app. We did not find any apps that recognized an audio source plugged into the jack socket by default on the Moto, though a couple of spectrum analyzer apps offered a source selection option in their settings between the built-in microphone, and the line input.
Happily there is an alternative that shouldn’t cost too much if your phone is a fairly recent one. Since version 5 there has been support in Android for USB sound cards, so if you have an OTG cable you can plug one in and reboot the phone to find its default audio input and output now come through the sound card. To test the oscilloscope apps we did this with the Moto and a cheap no-brand USB audio dongle, and it performed very reliably. It’s important to reboot the phone with it plugged in, we found it wasn’t always recognized when plugged in after reboot. It’s also worth noting that even though our USB card is capable of more than CD-quality sample rates there was no provision to enable these in any of the software.
Whichever way you get your working input to your phone, there is one further thing to beware of. A mobile phone input is designed only for use with a headset microphone for making calls, thus it expects a microphone level signal. It will top out somewhere well under 100mV, and anything above that (such as line level audio) will push it into distortion. Further, it does not have anything like the resilience of a real ‘scope input so unless you are only measuring up to about 50mV you will have to build some form of protection circuitry. Have a look at this preamplifier project for an example. For the purposes of our tests when using the Moto’s input jack we wound down our signal generator to an appropriate level for the input.
Having now dealt with the prerequisites of getting a signal into our phone, it’s time to look at some apps to use it. Starting with a spectrum analyzer, we found that Vuche labs’ Advanced Spectrum Analyzer offered the ability to select the Moto’s 3.5mm jack as an input, and presented an interface that was easy to get working. When presented with a sine wave it obligingly produced a single peak, and on changing to a square wave it showed the harmonic content as you might expect. It consistently identified the fundamental frequency on the low side by a few Hz, for example showing a verified 1KHz as 990Hz.
On the Y axis it returns a figure in dB. As always the question is “dB relative to what?”, and the answer here appears to be relative to the maximum level quantifiable by the device. So if you have time to calibrate it against a known instrument as described above and do some calculations you could get some idea of a real figure, however in the majority of cases this scale can at best be considered as indicative only for relative quantization of peaks.
When looking at oscilloscope apps we tried almost every one that the Google Play Store could find for us, and none of them offered an ability to select the Moto’s 3.5mm jack that would work. It’s not to say that none of them support it on other phone and OS combinations, merely that none of them worked for us. So when testing these apps we had to resort to the USB sound card mentioned above, a mild inconvenience but one that a subset of the apps had no problems recognizing.
SmartScope Oscilloscope from LabNation is a companion app to their oscilloscope peripheral which gives the features you’d expect from a “proper” ‘scope, but it also has a mode that supports the phone’s audio input. We liked it because unlike many other ‘scope apps it has a user interface allowing easy pinch-and-zoom selection of timebase period and voltage. In the time domain it’s extremely easy to measure period with this app, but the amplitude domain like those on the other apps can not be trusted when not using their peripheral and would need calibration against a known instrument. It does however handle different waveforms as you’d expect from a conventional oscilloscope, and provides a handy way to look at the shape of an audio waveform.
Cracker Or Bench? Our Conclusions
So after several hours at the bench installing and trying test equipment apps, what do we think? The overwhelming impression is that none of these apps could replace the real instrument on their own using just the phone’s hardware. It’s quite possible that with a dedicated peripheral they could provide a good instrument, but that is beyond this article.
That said, do these apps offer any useful functionality, and is it worth keeping them on your phone? We’d say yes in that a not very good instrument is better than no instrument, but we’d like to qualify that by looking at each case individually.
Signal generators, at least in the audio range, are something at which the apps do a passable job. If your voltage requirements extend only to audio line level and below, and you have no wish to venture above 20kHz, they make a useful audio source that is capable of delivering a variety of combinations of waveform. Definitely useful.
Spectrum analyzers though are not a field in which the phone performs as well as signal generation. These apps are fine in the frequency domain so as long as you stay within the voltage range of the input you can use them to gain a view of what frequencies are present, however the lack of intensity calibration is an Achilies’ heel. It’s probably best to consider these as half-useful, half-novelty.
Oscilloscope apps are sadly closer to the Christmas cracker. Yes, you can see the shape and period of the waveform, but there is only a certain amount of information to be gleaned from these readings. The most useful feature of an oscilloscope as we see it is as an accurate time-domain voltmeter, and without that ability the app becomes significantly less useful. Three-quarters-novelty, quarter-useful.
Could these apps be improved? Definitely if their developers took the time to incorporate input selection to ensure that all users could force them to listen to the microphone jack. Unfortunately the feature that would be most useful, calibration in the voltage domain, is probably beyond the capabilities of a phone’s hardware without buying extra peripherals, which rather defeats the object.
After all, the one thing these apps have going for them is that they cost nothing, and that’s more than you can say for a Christmas cracker. Do you have suggestions for useful instrument apps? Let us know in the comments below.