Posts Tagged Soldering

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…

, , , , ,


USB to RF Transceiver prototype complete!

Collection of transceivers

This is just a post to point you over to my new Transceiver page.  I took the work that I did on the MRF49XA transceiver, and added an Atmel AVR USB micro controller.  I prototyped is using the AT90USBKey development kit, and designed a custom PCB that includes the transceiver and an AT90USB162.

“Component side” of the USB transceiver

I wanted to design the board such that all the “guts” were on the “back” side of the PCB.  The photo above shows the transceiver circuit (surrounded by a strip of track that you can use to solder a “fence” or “can” to manage RF interference), and the AT90USB162 micro controller.  This can be replaced by and 2 series USB micro controller, like the ATMega32U2 or the AT90USB82.  I recommend using the ATMeta32U2, though the first run of boards have the AT90USB162.  I’ve also included a dedicated 3.3v voltage regulator, because the built-in regulator inside the AVR doesn’t have a clearly marked current capacity, and I didn’t want to risk it.  I’ve also included every spare pin from the AVR that was practical.

The “top” side of the board

The other side of the board contains all the user facing parts.  This includes the status LEDs, the SMA connector, USB port, and the boot loader and reset buttons.  My grand idea here was that I could mount a piece of plastic to the component side to protect them, while having access to all the bits I need to use.  In hindsight, this means that it’s a “double-sided load” which is harder to manufacture.  I ended up having to learn a new technique to solder the USB port.  Notice that the can of the USB port covers the pads?  It’s very difficult to solder those on.  It helps to “tin” the pads first, then set the USB port on top of them.  Luckily, the USB port has little plastic pins that keep it aligned.  When you’re pressing down on it, just hit it edges of the pads with the soldering iron, and it should solder just fine.  When that’s finished, solder the mounting tabs on the sides.

Also, the buttons I bought aren’t “process compatible” which means that you can’t wash the board with them installed.  To deal with this, I reflow solder the entire board, then put them in my new ultrasonic jewelry cleaner with time isopropyl alcohol and brush them with a toothbrush, finally rinse off the alcohol and dry with compressed air.  Once the board is cleaned, then I solder on the buttons.

Lessons (mostly) learned?  Think about how you would assemble something when you’re designing it!!  Building the board this way adds 15-20 minutes of assemble time.  Bummer.

PDFs of the transceiver PCB artwork.  Sorry it’s so ugly, the “high quality” rendering in Gerbv doesn’t work in mac os anymore. transceiver-top transceiver-bottom

Component side artwork

User side artwork

Also, here is are the gerber and eagle design files: Design files.

Work on the software is ongoing.  Click on the transceiver’s main page (link at the top) for updates.  Enjoy!

, , , , ,

No Comments

Helical Quad Antenna for Weather Satellites

Finished and installed antenna!

It didn’t take long after my first successful attempt at receiving weather satellite broadcasts for me to realize that I would need a much better antenna.  I had been using a 1/4 wave whip with a 4-wire ground plane.  There performance out of this antenna was poor.  I read up on QFH (Quadrifiliar Helix antennas) from many of the high quality posts from around the world.  I took what I could from these implementations, and did my best with the supplies I had available.
I ultimately started with whatever PVC pipe I had lying around; it ended up being 1-1/4″ outside diameter garden-variety PVC.  Next, I went onto the excellent QFH antenna calculator.  This site already has the defaults for a good 137 MHz antenna, and I didn’t change them.  Next I measured the diameter of my pipe (in mm) and printed out the drilling templates using their drilling template generator.

Drilling template

Pick a point for the top line of the template and scribe a line perfectly parallel with the axis of the pipe.  This is easy if you use the “estes door jamb trick.”  For those that haven’t built a model rocket recently, you put the pipe in a door jamb crease.  This right-angle will make the pipe perfectly square and you can mark a line.  Also, you can use a piece of angle stock, as this guy did.  Make sure that all your template strips line up with this line.  Next mark the holes’ letter with pen on the pipe.  This is your reference for where the wires need to go.  Finally, drill the holes.  I only drilled the top and bottom holes, and I didn’t make them as big as the template said.  The template (and the calculator) suggest using 3/8″ soft copper tubing, but I didn’t have any of that around, and it costs a lot more than the #10 ground wire that I used.

Spacers installed

I knew I would need spacers half-way through the helical loops, but I didn’t have any of the tubing that most people were using, so I used some acrylic sheet.  I just took the width of the loop and marked those points along a line.  In the center I cut holes for the mast.  I trimmed off the edges with a (mostly) straight line so it tapers to the end.  At the ends, I made little notches to hold the wire, and drilled a hole for some unwaxed dental floss.

Loops held in with floss

Once I made a simple knot with the floss, I hit it with some superglue an called it good.  I don’t have any pictures from forming the loops.  This is an often ignored part of building one of these antennas.  I understand why so many people leave that part out, though.  It’s amazingly stressful, and easy to forget about documentation.  To do it, I started with long pieces of the copper wire.  Use more than you think you need.  Once your wire is cut, measure to the center.  Measure out from the center one loop radius on each side and mark it with sharpie.  Bend one side of the wire as sharply as you can, and slide the longer side of the loop through your lower pair of holes.  With what will be the center of the loop in the pipe, bend the other side of the loop.  Carefully twist the helix, meeting the spacers on the way.  It’s probably not a bad idea to temporarily (make sure the copper can be adjusted) attach the wires to the spacer.  Measure from the mast one loop radius and bend the wire toward the mast square with the upper holes.  Cut the extra wire so that it fits inside the pipe with a little room to spare.  Once you’re sure it’s the right length, bend the wire 45 degrees toward the other loop.  Do this for each side of each loop.

Wiring of the feed point

The picture above is skipping ahead a little, but this way you can see what I mean about bending the wires inside the pipe.  As you can tell, I had a very hard time soldering the feed point.  The copper ground wire is a hard to solder with an iron because it conducts heat readily, and has a lot of thermal mass.  I usually use a torch to solder it.  In this case the solder point is inside the tube almost an inch.  The first time I tried to solder it, I set the end of the tube on fire.  Later, I insulated the coax and tube with aluminum foil.  Though the foil provided sufficient protection, I still charred the sides a bit.  The cable was adequately protected.


Though the feed for this antenna is technically 50 ohms impedance, it’s a balanced design.  Fundamentally, coax is unbalanced.  By coiling the cable around the mast a few times you’re able to implement a simple balun.  I’m not sure how many times to do it, I’ve seen different numbers different places, so I chose 6; because, why not?  It seems to work fine.

finished antenna

This is the antenna all finished up.  I’ve received several quality satellite images with it so far, but this is certainly not where I’m going to keep it.  First of all, my house is to the north-west of it, and seriously degrades the signal, secondly my wife wouldn’t like that very much, I don’t think.


I decided to keep it outside (some people put them in their attic), so I had to take some measures to spider and wasp proof the mast.  I epoxied all the openings for wire and cable at the top of the antenna, including capping the pipe, then I stuffed the bottom with some pipe-wrap foam.

Installing on the barn

I ended up settling on the barn roof as a home for the antenna.  There was a small gap in the plywood below the metal roof cap that I think I can exploit for the feedline.  I unscrewed a section of capping, found an existing hole in the tar-paper backing and went to work affixing the tripod.

Feedline routing

It’s really important to think about water infiltration whenever you do anything to a roof, especially in Oregon.  For a while, I did some contract work installing antennas for a cell phone company, and we installed outdoor antennas on almost any kind of roof you can think of.  For metal roofs like these, the easiest way to make it water-tight is to clean the metal surface off, then cover the place where you’re going to screw the mast to with silicon sealant and screw through it.

Mounting the tripod

This way, water doesn’t have a chance to wick through the roof through the screw threads (or that’s the idea…  I explicitly disclaim any responsibility for roof damage if you follow these instructions).

Feedline inside the barn

Here, you can see the ultimate goal:  Antenna on the roof of the barn and feed line inside!

Receiver ready for the next NOAA satellite pass!

Finally, I screwed the receiver to a joist and routed some wires.  I don’t know what I would do without my insulated staples! 🙂

, , , , , , , , ,


Homebrew bubble counter

Counting bubbles during secondary fermentation

For a while now, my friends and I have been brewing beer at my house.  I was inspired by an old Sparkfun tutorial about a bubble logger for Nate’s terrible wine.  I figured that while logging bubbles is interesting and all, wouldn’t it be more useful to have real-time information on the fermentation process?  I basically copied the optical gate method of counting bubbles, added a sensitive pressure sensor, and an AVR development board (Yes, Arwen, that’s your old TekBots board! 🙂 ).

Just like the Sparkfun tutorial, I used an IR photogate sensor on an S-shaped airlock.  One thing that I thought was really interesting is that the water in the airlock doesn’t block the IR path, it actually improves it.  I ended up needing a potentiometer to adjust the LED brightness on the photogate, this is because it has to be just the right brightness to detect bubble transitions.

Counter closeup

The programming on the microcontroller was really simple.  All it does is keep a clock, and when there is a rising edge of photogate signal (bubble passed) it prints the time and a bubble count to the serial port:


I chose to use whole seconds as the time step.  That was certainly an oversight.  When I designed the software, the brew was in second fermentation.  There was a bubble once every 20 seconds or so.  I thought “It couldn’t be that much more during primary fermentation, right?”  Wrong.  During the beginning of primary fermentation, there can be 3 or 4 bubbles a second.  I made up for this oversight in the Ruby script I wrote on the server:

# Get an interval from the last to this bubble in seconds
interval = seconds - last_record_seconds
last_record_seconds = seconds

if interval == 0
	bubbles_per_second += 1
# if, in the last second, we counted more than one bubble
# find the frequency by multiplying the bubbles per second
# to bubbles per hour
	if bubbles_per_second > 0
		frequency = bubbles_per_second * 3600
		bubbles_per_second = 0
	# Convert the interval into fractions of an hour
		interval = interval / 3600.0
		# Convert the interval to bubbles per hour
		frequency = 1.0 / interval
		printf("%f bubbles per hour\n", frequency)
		RRD.update(rrd_name, "N:#{frequency.to_s}")

I’ve left out the parts where I initialize the serial port and the RRD database and parse the messages.  I’ve attached the whole script, including the script that generates the graph, at the end of the post.

Chocolate porter brewing record (primary fermentation)

Here is the bubble record from one of our beers.  I was very surprised by the 14,000 bubbles/hour rate achieved a half-day after pitching the yeast.  I adjusted the graph many times to make everything visible.  I absolutely had to use a logarithmic scale on the value access, there is just no other way to be able to see a 14k+ value while still being able to see where 60 bubbles/hour is (this is about when the brewing is finished).  These graphs are always updated, and are available online.  Of course that is only meaningful when there’s a brew going at the moment!

Sensitive pressure sensor

I had grand plans of adding a pressure sensor to try and measure the volume of co2 escaping out of the airlock.  I figured that if I subtracted the pressure after the bubble from the pressure before I could use the ideal gas law and measure the moles of co2 that escaped.  This was all fine and good during secondary fermentation (when I first tried it).

Pressure delta during slow fermentation

During slow fermentation, when bubbles happen less than once per 15 seconds or so, it’s easy to see and measure the pressure difference before and after the bubble.  In the image above, there is about 40 mV of swing before and after.  The time represented in this image is a full minute, so you can see the slow buildup of pressure.

Pressure measurement during fast fermentation

During very fast fermentation, on the other hand, individual bubbles don’t contribute to much difference in pressure.  In the image above, you can see general trends of pressure.  Sometimes, i assume, due to surface tension there aren’t bubbles for a while.  When pressure builds up to a sufficient level bubbles begin.  The pressure drops again and the cycle repeats.  I’m not really sure how much I can do with this data.  The time represented in this graph is 12 seconds, and the bubbles per hour is about 18,000 bubbles per hour (5 * 3600).

Close up of a bubble during fast fermentation

This is just a close up of a single bubble.  There isn’t really any measurable difference in pressure before and after the bubble.  Ultimately, the pressure measurement stuff is on hold for the moment.  If someone reads this that’s really good with the ideal gas law has ideas let me know!

The next step for me is to figure out an elegant way to support many brews.  We’ve got a wine, apple cider, and a beer going at the moment, so I would like to have 3 channels.  Oh well, another project for another day.

Supporting files:


ruby script

Development board schematic

, , , , , , , ,


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

, , , , , , , , ,