Posts Tagged Wireless

Using softshell with GNURadio

It has been a little while since I released the very early code for softshell (not that the code has advanced much), and I’ve received a few requests for a bit more information about how it’s intended to be used.

I admit that I hacked it together very quickly so that I could make some basic use of the rtlsdr dongles on my mac.  To be very clear, Softshell does no actual SDR itself.  You can really look at it more like a driver for the rtlsdr.  Softshell opens a connection to the rtl device, allows you to tune its internal oscillator, and puts the data on the network.

To start, install the rtl device in your USB port, then open Softshell.

Freshly opened

If you see a similar window, it means that Softshell has found your device (the ezcap in this case).  It is, perhaps, a good time to mention that I’ve only ported the tuner code for the Elonics E4000 tuner.  Click the “Open” button to have the program open the connection to the device.  If it detects that you have the E4000 the “Tuner type” field will be filled in with “Elonics E4000.”

Once this is done, changes to the sample rate and center frequency will take effect with the “Update” button is clicked.  The Center frequency is provided in Hz.

Now, that’s all fine and good, but you’re just tuning the device.  To actually get the data out of it, you need to setup the network settings.  Choose a port number for Softshell to listen to, I use “12345,” and click the “Running” checkbox.

Finally, in GnuRadio, you need to use a “TCP Source” block setup as a client with the same port number you used before.

Setting up GnuRadio to work with Softshell (click for full size)

Once that’s done you should be up & running.  Note that, natively, the rtl device actually outputs unsigned bytes and that Softshell converts these to floats centered around zero.  Some GnuRadio examples include the blocks that perform this conversion.  If you come across this, just remove those blocks.

Good luck!  Please feel free to comment with any questions or issues!

, , , , , , ,

2 Comments

Spectrum Analyzer Aluminum Frame

Beautiful new frame for my SA

I haven’t posted for a while.  I’m sorry.  I was being selfish.  I’ve made fantastic progress on my spectrum analyzer build, and it’s so much fun that I haven’t had the will to pull myself away and post about it.

Also, completely unrelated to the build, I’ve experimented with a service called “Cloudflare” as a way to make my site more resilient.  It doesn’t, it’s MUCH worse.  I’m not happy with it at all.  I’ve shut it down, so hopefully once the DNS changes propagate it’ll be more stable.

Anyway, back to topic.  The last post about the analyzer was about the ChipKit digital logic controller.  That was going very well, so well, in fact, that I was able to finally diagnose an intermittent connection problem between modules.  Intermittent problems are always the worst, especially when you don’t trust other components in the system.  The reason this is relevant to the discussion at hand is that the problem only manifests when one of the connectors has pressure one one side.  I needed a reliable way the hold all the modules in fixed positions.

Since beginning this project, I’ve been inspired by the way that two people built their analyzers. Hans’ is probably my favorite.  I took the image below from his photo album in the Yahoo Spectrum Analyzer group.

Hans’ analyzer “bottom view”

I love how clean and organized it looks.  Much different than most of the others out there.  His frame has holes that go all the way through the frame, and he has a back cover that screws on.  His coax cabling is made of right-angle soldered-on connectors with what looks like RG-405 hard pipe.

Another inspirational build is Sants.  This image is also scraped from the Yahoo group.

Sant’s build

This build is most probably the closest to mine.  The pockets, or wells, for the component side of the boards don’t go all the way through the substrate.  Notice, in both designs, that there is a small lip around the perimeter of each well.  This is there to hold the boards and to electrically connect to the ground vias on the perimeter.  This design also uses right-angle connectors and hard pipe.

With these designs in mind, I sought out the things I would need.  First, of course, was the aluminum itself.  I had looked into McMaster-Carr (hopefully this link works), and a 1/2″ thick 12″ square costs about $40.  Then, my brother suggested looking on eBay.  I was able to find an equivalent sheet for about $30 after shipping.

Frame block layout

Once I had a cool hunk of 6061 alloy in my hands, I started designing the layout of the frame.  I started with OmniGraffle (it’s like Visio) because I could lay it out to scale, and the connections move in a natural way.

Once the layout was complete, I transcribed the design, complete with all the details into AutoCAD.  By this time, about a month passed, and I was able to find someone willing to machine it for me as a favor.  I also got a quote from another friend, which was about $250.  This is a reasonable cost for something like this, in case you’re looking to duplicate my results.

Close up of one of the wells

It took several weeks to get the parts back from the machinist, but the results are totally worth it!  The larger hole was cut with a 1/8″ end mill, and the inner pocket was cut with a 1/4″ mill.  With the majority of the modules, the inner radius is fine.  There were a few exceptions, however.

Small relief for DDS capacitors

This photo shows some of the rework I had to do to accommodate a few capacitors right at the edge of the DDS module.  It’s very difficult to take a picture of a small notch in a shiny material, but hopefully you can see the cut into the side of this pocket.  I made that mostly by making small, successive cuts using an exact-o knife.  The PLO reliefs were a bit more aggressive (there is a power header right in the corner), so I had to use a Dremel cutter bit in my drill press.

Relief for the PLO module

Once important lesson learned in this process is that 1.2″ or 2.4″ set into a PCB specification is more of a suggestion rather than something that you can count on all that much.  I had to sand almost every module to get it to fit.  Once that was done, however, everything fit like a glove.

Making custom coax jumpers

The final piece in the puzzle is the coax.  The perfect jumpers that both the other designs featured were definitely something that I wanted.  It’s possible to get these right-angle SMA connectors from China for about a dollar a piece, much less than the ~$5 that you’ll spend at Digi-Key.

Connector end, ready for solder.

To make them, all you really need to do is measure the coax sections, strip the ends, and solder…

Soldered center conductor

Soldering around the shield of the coax is the hardest part, and it’s not even that bad.

Final product!!

That’s all there is to it!  I’m really happy with how well things turned out.  Certainly something to be proud of.  Over the next few days, I’m going to try to keep posting about the other advancements.  I have a bit of a backlog, so I should be able to keep them coming…

, , , , ,

8 Comments

Receiving weather satellite images with Softrock

One of my first NOAA APT satellite images! (click to learn more)

The National Oceanic and Atmospheric Administration (NOAA) manages a few satellites in low earth orbit.  There are three actively transmitting APT signals at the moment, NOAA15, 17, and 18.  Each of these satellites passes overhead a few times a day.  I’ve been interested in learning how to receive their signals for a while now, and I’ve finally succeeded!

 

A bit ago, I bought a “SoftRockSDR (Software Defined Radio, read the excellent 3-part article by Bob Larkin at the ARRL site.) receiver kit from Tony Parks.  (A note about his site, he puts a few kits up for sale a few times a month, so he’s almost always sold out.)  I think SDR is really, really interesting.  I don’t want to get too bogged down in the details of it, because it’s not the point of this post, but I’m going to briefly discuss it.  Basically, the idea is that you want to have some minimum amount of electronics to deal with the antenna; letting your computer handle the rest.  This can take a variety of forms, but the simplest is the QSD, or Quadrature Sampling Detector.

Source: Gerald Youngblood’s article “A Software-Defined Radio for the Masses, Part 1.” Click image for source

It sounds complex, but it’s quite like using a strobe light to look at a spinning wheel.  The bright light of the strobe “samples” the world at a given interval.  If it strobe rate matches the speed of the wheel, the wheel appears still.  Stretching the analogy a bit further, imagine that information is written on the wheel.  Using the strobe you can read it, even if it’s spinning.  While that is an awful analogy, but the idea is that we can sample the radio signal at (nearly) the same frequency as the carrier of our desired signal.  When we do this, the signal we want magically appears at the output.  If we’re using AM (or its derivatives such as LSB or USB) we can even listen to it directly.  It only gets a bit more complex when we consider the quadrature part.  Quadrature just means “90 degrees out of phase.”  Using another copy of the radio signal, and a sampling clock in quadrature, we can cancel out some noise and interfering signals.  Sorry for the tangent, if you read this far (without falling asleep), I recommend you read the linked articles at the top of this paragraph.  The math isn’t too hard, and it’s sooo powerful!

Softrock Ensemble Receiver (click image for source)

This isn’t an image of my SoftRock, it’s a slightly different version, but I don’t have an image handy.  It’s a really easy kit to build, and it’s fairly inexpensive.  More than that, it’s really easy to use.  Once it’s all setup, you just attach it to your computer, power it, and install the antenna!

Once you’ve attached the receiver hardware to your computer, you need some software to use it.  This is an image I took of a very well written SDR program on the Mac called DSP Radio.  On the left side of the spectrum window, there is the live radio spectrum coming from the satellite.  The green box around it represents the bandwidth of my software radio receiver.  In a traditional radio, this bandwidth would be set by a filter circuit.  Most communication radios only have about 15 kHz of bandwidth.  This makes them unable to properly receive satellite weather images.  Traditionally, you would have to build or buy a specially-built satellite receiver.  With SDR, I can move a slider to scale the bandwidth way, way up!  In this case, I’m using about 37 kHz of bandwidth!  Notice that there’s all this empty space on the right, this is radio spectrum that I’m receiving, but there’s nothing there.  Maybe you can notice the shadow of the satellite data on the right; this is an “image.”  These images are the bane of all radio designers.  The true test of a receiver (other than sensitivity) is how well these images are suppressed.  In this case, they’re suppressed rather well, notice how bright the lines are on the left compared to the right.

Signal flow from RF to weather image

The DSP Radio program takes the signals from the Softrock through the audio input of the computer.  When you have something tuned in through its interface the demodulated signal appears at the audio output.  I’ve been recording these signals as well as passing them to another program called WXtoIMG.  This program is not great, I’ll be honest.  It’s barely maintained, and you can tell it’s an ugly cross-platform mess.  To even get it to work is tricky.  But, what it does, it does well.  The image at the head of this post was generated using it.  When I made that image, I literally had to connect the audio out of one computer to the audio in of another.  I’m not sure how I’m going to get around that issue.  It can accept data in the form of wav files, provided that they’re linear PCM sampled at 11,025 Hz with at least 16 bit samples.  The problem is that the nice political boundaries, lat/lon lines and ground image comes from the program.  It does this by computing the location of the satellite and where on the earth its photographing.  It has to decode the audio in real time for this to work, which means that I can’t use an audio file.  For you to play around with, if you wish, I’ve included a sample wav file.  It starts before the satellite pass and ends after, so if begins and ends with static.

NOAA15-baseband.wav (large file warning: 28 MB)

The included audio can be used to create the image below.  I used WXtoImg to generate it, though the open source WXAPT could be used under Linux.  This image was taken when the satellite was traveling south-north, so I had to flip it vertically and horizontally.  On the right side of the image is the A channel, which is visible light, and the left side is the B channel, infrared.  Normally, these channels are reversed left-to-right.  The stripes and color bars help the decoder line up the image and adjust brightness, contrast, and gamma. (Right-click here to download full-size image: 2080 x 1260 pixels)

(lightly) processed image from NOAA 15 audio file

My next step is to write some shell scripts on a Linux box to automate this whole process.  My goal is to have a page that has the latest satellite image and an archive available at all time.  But first, I have to write a post about the antenna I built to receive these signals.  Stay tuned!

, , , , , , , , , , ,

22 Comments

Softrock Ensemble VHF tuning

This post has a specific audience in mind, so unless you have, or are interested in a Softrock Ensemble VHF receiver, you’ll be bored. You’ve been warned 🙂 There are a few radio bands that are interesting near the ham 2 meter band.  NOAA weather satellites send images using APT at and around 137 Mhz and there are weather broadcasts at 162.5.  There was a question on the mailing list for the Softrock about whether it could be tuned to receive signals in all of these bands without re-tuning.  This post is simply documenting my experimentation with the front end.  I’m sampling the signal using an oscilloscope probe with the 10x setting and inserting the signal from the tracking generator connected to the antenna port.  It’s not really possible to measure the precise insertion loss absolutely, so I’ll measure it relative to the baseline of front end tuned for 2 meters.

Tuned for 2 meters

To begin the testing, I tuned as best I can to the 2M band.  The filter shape isn’t as flat as I would like, but it’s the best I could do.

Tuned for NOAA APT transmissions

It was a little easier to tune the front end for NOAA APT transmissions.  I got a better filter shape, and about 5 dB better average insertion loss.

Tuned for weather radio

Tuning for weather radio wasn’t that bad either.  The average insertion loss is about equal to what I got for 2 meters.

Compromise tuning

Finally, if you’re interesting in receiving signals from throughout the band, it’s possible strike a compromise.  You’re just about always going to get a peaked response, so I placed the lower peak at 137 Mhz and the upper at 165.  The 2 meter ham band is somewhere in the middle.  The peaks at 137 and 165 are 5-10 dB below the baseline.  The 2 meter band is a little worse at about 20 dB below the baseline.  So, it’s possible to get a somewhat broadband response at the fronted at the expense of some signal strength.  It may be possible to mitigate some of this if you use a low noise preamplifier.

, , , , , , , ,

No Comments

SKY65116 Amplifier

Amplifier breakout board

I’ve finally gotten around to assembling a breakout board for the Skyworks SKY65116 UHF amplifier.  It’s really amazing how the state of the art in RF ICs has advanced.  They can still be on the expensive side ($6 at digikey), but still relatively cheap when you consider the cost of all the support parts that it takes to build an amplifier from a RF transistor.  This particular amplifier has a 50 ohm input and output, and 35dB of gain.  It works from 390Mhz to 500Mhz, which means its perfect for the 70cm ham band.  The breakout board is stupid simple, copied directly from the evaluation board schematic in the datasheet,  but I’ll include schematic and design files anyway.

Source for the amplifier test

This is the video transmitter from my first person video experiments.  The performance was pretty terrible, even after I tested it using different receive antennas.  I’ve even purchased a receive-side amplifier to try, but haven’t done anything with it yet.  Anyway, the transmitter had a built-in antenna, so I wasn’t sure how I was going to add an amplifier.  I ended up assuming that the output would be roughly compatible with an 50 ohm load.  I unsoldered the antenna and installed a bit of thin coax to the antenna port.  I scratched off some of the solder mask on either side of the board near the antenna port to make sure I had a solid electrical and mechanical ground connection.  The transmitter is pretty crappy, and the prices you can find online are COMPLETELY RIDICULOUS!  I wouldn’t pay more than $20 for it.  I think that’s about what I paid, it was on clearance.

Amplifier test configuration

Testing configuration

This image is the testing configuration I used.  The camera, power board and transmitter are in the top of the image, and are exactly as I used them for first person video.  The added coax can be seen going into the amplifier on the left.  Coming out of the amplifier is the cable going to the oscilloscope or spectrum analyzer.  The amplifier wasn’t inline all the time, though.  I measured the output power from the transmitter at about 25mV into 50 ohms using the oscilloscope.  Using Minicircuits’ handy table that comes out to be about .01 mW, or -19 dBm. A measurement from a spectrum analyzer verifies the -19 dBm measurement from the o’scope (see below for image).

NTSC modulated spectrum (click for source)

I’ve attached a very nice graphic from wikipedia that describes the components of modulated NTSC video.  There is something happening here that isn’t obvious, so I’ll explain it.  In the spectrum analyzer image, below, you’ll notice that I’ve labeled the luminance and chrominance carriers.  The luminance carrier is really the main carrier for the entire signal.  It comes from black and white TV era.  There are significant DC components in NTSC video, so this carrier is very important.  Notice, in the graphic above, that the luma carrier is 1.25 Mhz above the lower edge of the band.  This is because NTSC video uses what’s called VSB, or vestigial side band, which means that the lower half of the signal is attenuated.  This reduces the spectrum necessary to transmit video.  The choice was made to include the carrier and 1 Mhz with of lower sideband while removing the rest.  Later, when color TV was added, they needed a way to encode color.  This is done by adding another carrier and encoding hue and saturation by modulating the phase and amplitude of this carrier.  All this is explained at length, and probably much better, in the wikipedia article on NTSC.

Source spectrum

In the spectrum image I’ve included above, it’s clear that the little transmitter uses AM rather than VSB.  You can tell because AM modulated signals are always symmetrical with respect to the carrier.  If it was VSB, the spectrum on the left side of the carrier would be suppressed.  You may notice that the left and right side don’t look 100% alike.  This is because it takes time for the analyzer to sweep the band (it does this 30 times a second), and it will be analyzing the spectrum of a different part of the image as it scans.

Source signal through unpowered amplifier

Well, that was an unexpected tangent!  Back to the amplifier…  In the above image I have the amplifier in the signal path from the source to the analyzer.  It’s disconnected from any power.  I’m a little off on the “-60 dBm” text, it’s closer to -64 dBm.  I was interested in seeing how much RF would leak through an unpowered amp.  It appears that the amp provides a little more than 40 dB of forward isolation between the input and output when it’s unpowered.

Amplifier powered on

Finally, this is the spectrum when the amplifier is powered on.  I had to install 40 dB of attenuation on the analyzer to capture this image.  The peak of the carrier is almost 5 dB lower than the top line, so it’s about 36 dB stronger than the input.  This is inline with expectation, as the amp specifies +35 dB gain.  The resulting signal is +15 dBm, which is a modest 32 mW of power.  The hope is that through a better antenna and some amplification I can get better performance from the video link.

A word about the legal implications.  Ham radio people are notoriously concerned with the rules of everything they do, so I feel obligated to mention them.  In the U.S., at least, 434 Mhz is a commonly used ATV (amateur T.V., or “fast scan TV”) frequency.  There is some concern due to the proximity to the  “satellite only” frequency band of 435 Mhz to 438 Mhz.  This means that the carrier is sometimes shifted to 433.92 Mhz, as this transmitter is.  Some of the sidebands still end up in the satellite only band, but with much lower power.  Because this amplifier only outputs +15 dBm I’m very unlikely to upset anyone with its use, though I should think about adding an overlay with my call sign to the video at this power level.  Maybe I’ll have a new 8-bit microcontroller project…

eagle files

gerber files

, , , , , , , , ,

4 Comments