Attenuators are expensive, especially the fancy calibrated ones, and it seems that they are the only ones available. SMD resistors are cheap, though, and I have SMA connectors, so I thought I would try to make my own. I used the calculator here, to come up with a design that used resistors I had, gave an impedance of 50 ohms and an attenuation that was useful (10dB). The schematic for the attenuator is as follows.
The formulas to calcuate R1, R2 and R3 are:
R1=R3= Z ( K-1/K+1)
R2= 2 Z ( K / K2 - 1)
And in my case, the values I got (while selecting for resistors I already had) are R1 = R3 = 100ohm, and R2 = 75ohm.
I built it up on a pair of SMA connectors with a bit of PCB soldered to the bottom to give a bit of rigidity. I will eventually replace this with some heavy copper or tin sheet, which I will be able to fully enclose the device with. This is how it currently looks.
I did some measurements on my scope. I took readings at 2MHz and 20MHz and found an attenuation of very close to 10dB in both cases.
At 2MHz, I read a peak-to-peak voltage of 10.5V when fed direct from my signal generator. With the attentuator inline, I measured a peak-to-peak voltage of 3.28V, which is very nearly 10dB of attenuation.
At 20MHz, the figures were very similar... 9.92V p-p direct, and 3.2V attenuated. Slightly less attenuation, but close enough for my purposes.
This attenuator is not designed to handle power, but will be ideal for use with a reflection bridge and Red Pitaya for use as a Vector Network Analyser.