EEVblog Electronics Community Forum

Electronics => Open Source Hardware => Topic started by: SaabFAN on March 10, 2017, 12:08:33 am

Title: Open Source HW RF Signal Generator
Post by: SaabFAN on March 10, 2017, 12:08:33 am
I believe many of you guys have followed my attempt to build a spectrum analyzer that ultimately fizzled out because of Feature-Creep and system-complexity that drove cost and development-time up. In the end I bought a R3131A Spectrum Analyzer on ebay and despite it having some quirks, I'm pretty happy with it so far.

That being said, I now still miss one device here: A Signal-Gen capable of producing predictable results at frequencies higher than 6MHz (Cheap DDS-Generators are only good to that frequency, even though they say on the front they're capable of 24MHz).


The specs of this thing (which are FINAL now!) are the following:

- 10kHz to 3GHz Frequency Span (to match my Spectrum Analyzer)
- -120 to +13dBm digital Amplitude control (This does not need to be flat all the way up to 3GHz, I'd be ok with some amplitude-drop above 2GHz)
- Capability of the main Signal-Chain to send the signal out to an external Module and receive the signal from an external Module (This module could add different forms of modulation to the signal)
- Internal TCXO and ability to take an external reference-clock (from a GPSDO, for example)
- Use of Vero-Board where possible (High frequency signal-path is on custom-made PCB)
- Fit inside a 19inch case

To achieve this, my first idea was to use the ADF4351 Synthesizer-Module I bought for the Spectrum-Analyzer project. It works from 35MHz up to 4.4GHz.
For lower frequencies I'm using a DDS-Module based on the AD9851-Chip. I have already built a simple Network-Analyzer with that module and it worked pretty nice.

Unfortunately, the ADF4351 can only produce a square-wave. So I want to use several LC-Filters to form that square into a sine, which are switched in and out by MASWSS0115TR-3000 switches.
There are several difficulties associated with this approach, so I'm open to different ideas, like frequency mixing, if they can produce a better sine-wave.


The next difficulty is to keep the amplitude constant across the frequency-band. For frequencies up to 60MHz, a JFET-Attenuator or even a variable gain OpAmp is the way to go. For frequencies higher than that, a PIN-Diode Attenuator, controlled by an ALC-Circuit, takes care of precise attenuation of the signal that is then sent through a step-attenuator made out of 10 and 15dB Attenuator-Chips by M/A-COM. This Attenuator provides up to 110dB of attenuation in 10dB-Steps.

I hope, this time I'm not running out of  patience and/or time and actually finish this project :)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on March 13, 2017, 02:07:25 am
Quick update:
Based on the Suggestions in the "ADF4351 Sinewave"-Thread, this is the current block-diagram for the LPF-Switching. You can also see the Automatic level control in this picture
Title: Re: Open Source HW RF Signal Generator
Post by: dmills on March 13, 2017, 02:44:48 pm
Just a thought, but something like an AD9912 clocking at 1GHz will get you near DC to maybe 400MHz sine in one hit, and the 9912 has a convenient fast comparator to turn the sine wave output into a square wave, it also programs over SPI, and has built in chirp and limited AWG functionality....

Then the square waves harmonics can be selected out with a filter to get the higher bands, maybe gets you to a GHz or so in 3 or 4 sets of BPFs. Don't forget that a wide tuning range VCO (Possibly YIG) can be phase locked to the output of the DDS, getting you DDS tuning at GHz speeds. 

Relatively low noise 1GHz VCXO are available from Crystek, and PLL chips for locking to the 10MHz reference are an AD/TI sort of thing, low pass filters are a minicircuits thing if you don't want to roll your own.

I would note that a programmable 140dB attenuator at microwave will be more challenging from a screening and leakage perspective then you would ever think possible, this one part is going to take much experimentation, I would personally build (Or buy surplus) a 0-60dB attenuators and then stock a few 30dB in line pads to screw onto the front, less annoying that way.

Personally, I would buy a second hand unit from someone like HP/R&S and have done with it, life is too short, but that is because I have interests that use such sources, but am not really interested in designing them.

Regards, Dan.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on March 13, 2017, 10:53:24 pm
The AD9912 is interesting, but I haven't found a module with it yet (I'm not comfortable with spending 50+€ on a Chip that I'm going to have trouble soldering).
There is a module available with the AD9910 though. Worth a look - Would remove the need of LowPass-Filters at lower frequencies (switching to the ADF4351 at 400MHz would remove at least 2 tuneable Filters and leave only fixed filters. The price-tag of 65€ for all the features it has is ok.

It is definitely is something I'm going to add in the future, but for the moment I'd like to keep expenses down to a minimum.
Which is why I'm going to attempt to build the LowPass-Filters myself (except for the 750MHz one, for which I already have the appropriate MiniCircuits-Part).

Using some old used equipment would be ideal, but unless a unit capable of getting as high as 2GHz drops below 250€, I'll try to make the device myself. :)
Title: Re: Open Source HW RF Signal Generator
Post by: nctnico on March 14, 2017, 02:20:52 am
I wouldn't use seperate filters but integrate them on the PCB. You can design the filters using SVC filter designer ( http://www.tonnesoftware.com/svcfilter.html (http://www.tonnesoftware.com/svcfilter.html) ). For up to -say- 800MHz you can built them using surface mounted 0603 parts. Just make sure each capacitor has 1 or more vias to the ground plane to make the filter work. For >800MHz microstripline filters are the way to go. I have created a program which can convert the component values found by SVC filter designer into an (elliptic) microstripline filter (see http://nctdev.nl/page_pg%3d17.htm (http://nctdev.nl/page_pg%3d17.htm) ). PM me if you want me to pitch in a license for this project. Either way you can download it and play with it a little. IIRC there is also a Sonnet Lite EM simulator example project bundled in the installer. Sonnet Lite ( http://www.sonnetsoftware.com/products/lite/ (http://www.sonnetsoftware.com/products/lite/) ) can be used to simulate microstripline structures in general and may be helpful for this project.
Title: Re: Open Source HW RF Signal Generator
Post by: radar_macgyver on March 14, 2017, 04:13:44 am
There is a module available with the AD9910 though.

The AD9910 has an inherent flaw in that the DAC reference voltage is not brought out to an external pin for bypassing. This means that the thermal noise of the bandgap reference shows up as amplitude modulation. The AD9957 also suffers from this issue.

Consider also the RFFC5071A that integrates a multiband VCO, PFD and a pair of mixers. One could mix the synthesizer output with a filtered DDS output to get both fine tuning steps as well as reduced spurious.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on March 15, 2017, 01:11:33 am
I wouldn't use seperate filters but integrate them on the PCB. You can design the filters using SVC filter designer ( http://www.tonnesoftware.com/svcfilter.html (http://www.tonnesoftware.com/svcfilter.html) ). For up to -say- 800MHz you can built them using surface mounted 0603 parts. Just make sure each capacitor has 1 or more vias to the ground plane to make the filter work. For >800MHz microstripline filters are the way to go. I have created a program which can convert the component values found by SVC filter designer into an (elliptic) microstripline filter (see http://nctdev.nl/page_pg%3d17.htm (http://nctdev.nl/page_pg%3d17.htm) ). PM me if you want me to pitch in a license for this project. Either way you can download it and play with it a little. IIRC there is also a Sonnet Lite EM simulator example project bundled in the installer. Sonnet Lite ( http://www.sonnetsoftware.com/products/lite/ (http://www.sonnetsoftware.com/products/lite/) ) can be used to simulate microstripline structures in general and may be helpful for this project.

I already have the programs from Tonne Software (SVC-Filter, Helicall, Elsie) and Sonnet Lite and played with those programs a little to make Filters for the spectrum-analyzer project, but I didn't know about your program. Thanks! It will surely come in handy here! The stripline-filters I have calculated so far were done by hand, using the script of a lecture I found online :)

There is a module available with the AD9910 though.

The AD9910 has an inherent flaw in that the DAC reference voltage is not brought out to an external pin for bypassing. This means that the thermal noise of the bandgap reference shows up as amplitude modulation. The AD9957 also suffers from this issue.

Consider also the RFFC5071A that integrates a multiband VCO, PFD and a pair of mixers. One could mix the synthesizer output with a filtered DDS output to get both fine tuning steps as well as reduced spurious.

Thanks for pointing that out.
Would you say that a simple differential to single ended converter is able to remove this thermal noise from the signal? I have a few GHz-Capable OpAmps here that could be used for that purpose.
Title: Re: Open Source HW RF Signal Generator
Post by: radar_macgyver on March 15, 2017, 03:18:44 am
Thanks for pointing that out.
Would you say that a simple differential to single ended converter is able to remove this thermal noise from the signal? I have a few GHz-Capable OpAmps here that could be used for that purpose.

Nope, the thermal noise amplitude modulates any tone that the DDS will output, so the only way out would be to have the DDS only generate a single tone, and apply a very narrow band filter around that tone. Having said this, the noise level is quite low, and you'd need a fairly decent spectrum analyzer to even measure it.
Title: Re: Open Source HW RF Signal Generator
Post by: dmills on March 15, 2017, 03:33:11 pm
Martin PA3AKE did the definitive work on this, it is an issue (due to reciprocal mixing) if used in the LO of an extreme performance receiver, but general lab sources are just nout usually that quiet.

Me and Martin did experiment with measuring the current flowing thru the centre tap of the output transformer (Which has nose correlated with the am noise) and feeding it back into the reference pin, but had horrific stability issues with that loop, which is unfortunate as close in it did work. It is possible that some more analysis by someone better at control theory could skin this, I will have to have a look to see if I still have the measured transfer function.

It is possible that something feed forward based with a pin doide could work, but we wanted something that did not require trimming.   

73 Dan.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on March 15, 2017, 07:40:05 pm
The Article PA3AKE wrote about the AD9910 (it is this one, right?: https://martein.home.xs4all.nl/pa3ake/hmode/dds_ad9910_amnoise.html (https://martein.home.xs4all.nl/pa3ake/hmode/dds_ad9910_amnoise.html)) was interesting to read, but I'm not aiming that high in terms of performance, so a little AM-noise is no problem for me at the moment.

At the moment I'm redesigning the RF-Module, where the signals from the different modules are being combined, in Circuit Maker to incorporate the suggestions you guys made.
Would you say that the board needs to have ENIG-Finish if I put the Microstrip-Filters on it, or is HASL enough?
Title: Re: Open Source HW RF Signal Generator
Post by: nctnico on March 15, 2017, 09:25:46 pm
If you keep the filters under a layer of solder mask ENIG or HASL doesn't matter. BTW you can simulate the solder mask as well in Sonnet but I doubt it will have a noticable effect. The errors due to differences in the trace widths due to etching tolerances will be much bigger.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on March 24, 2017, 05:53:45 pm
Small Update (had to do University-Stuff this week):

I'm going to use the AD9910-Module from ebay as the Signal-Source up to 400MHz. Tests will reveal how the second harmonic behaves and if it can be used. Otherwise I'll have to use the AD4351 from 400MHz instead of 800 and need to include one additional filter.

Also I'm ditching the self-made Attenuator, because there's a bunch available on ebay that cover DC to 2.4GHz and 0 to 95dB and are 5V TTL-Compatible. They sell for about 35€ plus 5€ shipping. I doubt my attempt to build one will provide the same performance and it'll probably cost about the same (components and Board-Space).

Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on April 02, 2017, 09:54:37 pm
Apparently, someone had the same idea I had (sort of): http://www.darc-husum.de/Frequenzsynthesizer.html (http://www.darc-husum.de/Frequenzsynthesizer.html)
The website is in german, so short summary: It details a signal-generator that uses the ADF4351 as the frequency-generator and an Arduino Nano as the control-processor.
More or less what my project is about, but with fewer features.

Btw. It seems like the prices for these attenuators on ebay have jumped a bit since I mentioned them here - Coincidence? :D
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on April 05, 2017, 07:56:56 pm
While reading about how to filter the signal from the ADF4351 I came across a circuit that involves a differential pair to smooth a triangle wave.

Does anyone here have some experience with that kind of circuit, or is it completely out of it's comfort zone at GHz-Frequencies? I found some NPN-Arrays with Ft of 10Ghz for 65 cents on Digikey (BFU520YX), which might be able to work in this application from a first glance-standpoint.


In the area of the software, I have started to write the code for the device. I'm targeting the ESP8266 as the processor and the NodeMCU V3 as the breakout-board.
The reasons for that: It offers USB, 3.3V outputs (no need for voltage-dividers or level-shifters on the SPI-Lines), has much more processing-power than an Arduino (useful to use the modulation-capabilities of the AD9910) and on top of that it has a WLAN-Transceiver - Everything is better with WiFi :D

As far as the RF-Board is concerned, I've started to do a preliminary layout to see where everything could go. And I've decided to kick everything off the board except local power-supplies and the RF-Path. All the control-logic will be placed on Veroboard and connected to the RF-Board via ribbon-cable or board-to-board interconnects. This should make it possible to make a really small RF-Board and make 4 Layer-Construction possible without spending too much money :)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on April 07, 2017, 09:30:28 pm
Today I managed to get the ADF4351 module working.
It needs about 140mA of current, which was too much for the small voltage-regulator on the NodeMCU V3-Board, but once that problem was solved, I captured several screens of my spectrum analyzer.

I also realized that I don't need a 4-Way switch for the LPFs:
Once the frequency exceeds 1.5 GHz it is outside my zone of interest and any signal-component higher than 3 GHz is going to be attenuated by the output-amplifier anyway.
Also the first harmonic of a 400MHz-Signal is already pretty weak, so I might even be able to use the PLP750+ in the 400 to 800 MHz-Band to achieve the desired suppression of harmonics. I will test that tomorrow.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on April 10, 2017, 10:55:07 pm
Today the AD9910-Module arrived. It comes on a nice board with spacers and screws, as well as SMA-Connectors populated.

I haven't played around with the module yet, but a complete read of the datasheet showed me that this chip is POWERFUL! With some tricks, as mentioned here before, it is even capable of doing Arbitrary Waveforms with 1k-Points. Nice!
I've also decided to connect the module at a point in the signal-chain where its signal isn't processed by the PIN-Attenuator and use the internal capabilities for amplitude control.

Now the only thing left is the attenuator, which I managed to get on ebay for a modest price. :)
Once it is here, I'll start building the signal-gen with the control-board. I'm still planning to use the ESP8266, but I'm getting a lot of compiler-errors when I try to use the GFX-Library from Adafruit. With arduino or teensy-boards, there's no problem. I guess this is because the library has been optimized by Adafruit to give better performance.

I also haven't been able to find a library for the AD9910, so I'll have to do the subroutines to program the chip myself. Inconvenient, but using only libaries and very little original code feels a bit like cheating :D

I'm also still investigating the idea of using a slightly overdriven long tailed pair as a sine-shaper. Googling this led me to some patents, the most recent one was from 2004, granted to Philips, who were using that technique in their PM5193 0.1mHz - 50 MHz Synthesizer back in the 80s and 90s.
They used a transistor-array chip with 3 of the 5 transistors employed as a heater/temperature-control circuit and 2 as the active components in a long tailed pair. The temperature-control was used to heat the chip to 80 - 85°C to keep the operating-point of the transistors constant to smoothly clip only the tops of a triangle wave (and judging by the spectrum I saw from the ADF4351, it is putting out a triangle-wave), which was adjusted with a pot to give the best THD.
Title: Re: Open Source HW RF Signal Generator
Post by: Pitrsek on April 11, 2017, 11:56:41 am
Hello,
seems like a nice project!
Would you consider extending LF range? Might be usefull if used as a part of VNA/SA.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on April 11, 2017, 05:10:00 pm
Lower frequencies are possible. I wouldn't go too low though, because the DC-Block caps need to get bigger and bigger to pass the signal, which decreases their performance at high frequencies.
The best way would probably be a relay-switched secondary signal path that covers audio-frequencies up to a few MHz. The AD9910 is certainly capable of generating these signals.


By the way, today the Attenuator arrived, which means that I now have all the big modules available to start building the device.
Unfortunately, I cannot find any datasheet for the Attenuator and from what is shown on the device, it isn't clear how to connect it.
I suspect "G" stands for Ground and VC for Vcc, but what does VE and LE mean in that context? LE might be something like "Latch" or "Load", if this Attenuator is supposed to be connected to a bus.
Is there some kind of standard for these things? Or does anyone have seen these Attenuators before?
Title: Re: Open Source HW RF Signal Generator
Post by: Pitrsek on April 11, 2017, 06:05:14 pm
My guess:
LE - latch enable
VC,VE - bipolar power supply

But I think you should take it apart, you know, just to make sure  :popcorn:
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on April 11, 2017, 08:57:19 pm
Okay, I have disassembled the Attenuator.
It contains a Philips Semiconductor (so it is a bit older^^) 74HCT563 Octal Non-Inverting Latch, and 2 MaCom AT90-1106 50dB Attenuators.
VE isn't connected to anything, only VC. LE is Latch Enable, which is Active HIGH.

So pretty straight forward: +5V to VC, TTL-Level to the other pins, GND to G.

Datasheets:
74HCT563: http://pdf.datasheetcatalog.com/datasheet/SGSThomsonMicroelectronics/mXsqssx.pdf (http://pdf.datasheetcatalog.com/datasheet/SGSThomsonMicroelectronics/mXsqssx.pdf)
MaCom AT90-1106: http://pdf.datasheetcatalog.com/datasheet/macom/AT90-1106-TB.pdf (http://pdf.datasheetcatalog.com/datasheet/macom/AT90-1106-TB.pdf)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on September 02, 2017, 01:25:23 am
I've finally found some time to work on this project again.

Unfortunately, there's still no library available for the AD9910, so I had to write my own code to control that beast.
I've tried to write it in a way that it is easy to read, so there's probably A LOT of room to improve speed or memory-use (see attached file).

I've exposed every bit of the 3 Config-Registers as global variables (I haven't looked into how to write a proper Library yet) and included a function to calculate the CFR-Registers, as well as the frequency tuning word.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on September 03, 2017, 04:33:42 am
I used the time today to finish (well, almost - First Version :) ) of the analog board.

I have opted for only 3 filters, of which one is always active: The 3GHz LPF. A 1.5GHz and a 750MHz LPF can be selected.

To have all the functions regarding modulation and stuff from the AD9910 available, this module is being connected directly to the output-amplifier via a RF-Switch and can be selected.

Attached are quick screenshots of the board and the schematic. Tomorrow I'll upload better ones :)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on September 03, 2017, 04:36:45 pm
As promised, here are the better screenshots.

I've redesigned the board to make it a bit more compact and used a 4-Layer board this time. MUCH EASIER than trying to route everything on 2-Layer.
Unfortunately, I had to use 4mil traces in the microstrip-filters, which means I have to use EasyEDA or any other board manufacturer that is capable to go below 6mil and has a 4Layer-Stackup with 0.18mm thick dielectric between Layer 1 and the GND-Plane on Layer 2.

Obviously, I haven't added any ground-vias yet. That will be the last step, as I haven't found a function in Circuit Maker yet that does this automatically. I'm also going to include some soldermask-cutouts to solder shields to the board.

Is this a good layout for signals up to 3GHz?
Btw. I'm pretty confident in the schematic, but before I spend 50€ on some board, could you guys check if I have made some mistake that would render the boards useless? :)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on September 05, 2017, 07:09:14 pm
Well, damn! EasyEDA does say that they support 3,5mil, but actually using structures smaller than 6mil causes cost to go up. Quite significantly.
So I'm back to using 6mil as the smallest structure.

Also an inquiry at EasyEDA about the dielectric constant didn't yield conclusive details. They told me they use 7628 for 4-Layer boards and 2116 for the 6-Layer ones. Their Core-Material has 4.2, according to the datasheet they provide.
The question now: Is the dielectric constant dependent on the type of Prepreg, or the type of Resin? If the latter is the case, it should be the same for all layers.
Also if the latter is the case, how can I measure Dk with boards I already have here? Or should I just assume the rule-of-thumb value for FR-4, which is about 4.35, according to Wikipedia.
Title: Re: Open Source HW RF Signal Generator
Post by: pigrew on September 05, 2017, 09:34:34 pm
The dielectric constant is a function of not only the resin, prepreg, but also of frequency, solder mask, humidity, everything.... For less than 1 GHz, just guess it is around 4.2.

 You also should think about the loss of the material (also versus frequency).

You'd want to to use a network analyzer to measure a thru line on the board (usually as part of a coupon). Best case would be multiple thru lines of different lengths.
Title: Re: Open Source HW RF Signal Generator
Post by: chrisl on September 06, 2017, 08:34:39 am
A couple of quick comments:

Looks like all the RF switches  have DC block caps at the GND pin (2).  You want to ground this pin directly to the board GND.

Do not expect that the fab house can control and hold the tight tolerance on the DK and 4 mil trace width - especially the low coast PCB houses.
Simulate your filter design to make sure that your design can tolerate +/- 10 to 20% of variation.
It would be much easier and cleaner to use SMT filters at 1.5 and 3 GHz.

Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on September 08, 2017, 04:23:18 pm
A couple of quick comments:

Looks like all the RF switches  have DC block caps at the GND pin (2).  You want to ground this pin directly to the board GND.

Do not expect that the fab house can control and hold the tight tolerance on the DK and 4 mil trace width - especially the low coast PCB houses.
Simulate your filter design to make sure that your design can tolerate +/- 10 to 20% of variation.
It would be much easier and cleaner to use SMT filters at 1.5 and 3 GHz.

Yes, they do have DC Blocks at the GND-Pin. The reason behind this: I've used some attenuators from MaCom in a previous design that required exactly that: DC Blocks at the GND-Pin if driven by only positive voltages.
To avoid having to respin the board if that's the case with these switches too, I've but the DC Blocks in there. If they work without those caps, I'll replace them with 0Ohm Resistors or solder-blobs.

I'm currently using 6mil traces, as that's the smallest ShenZhen2U or EasyEDA can manufacture without massive cost increase.
SMT-Filter available from digikey unfortunately don't really have the features I require. There are filters available that could replace the 3GHz Filter, but a Filter for 1.5GHz isn't really available.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on September 10, 2017, 12:23:14 am
I've just finished the controller-board. I don't have a block-diagram yet, but it is pretty straight forward:
A NodeMCU-Board with an ESP-12E contains the micro, as well as the 3.3V-Converter and the USB-Connection.
Attached to that are 3 PCF8574. One for the Keyboard (Address 0x21), One for the ChipSelect-Signals for the ADF4351 and AD9910, as well as two Interrupt-Inputs - one for the Keyboard, one for the Touch-Controller (Address 0x22), and One PCF8574 for the Attenuator-Control (Address 0x20).
Because the Attenuator requires 5V TTL-Levels, I've added what I had in my parts-drawers to do the level shifting: 74HCT14 and a 74LS00 (Both have a Positive Threshold of about 2V).
To use the TouchScreen, I've installed the STMPE610 Module from Adafruit and the Display is the 3.5inch 480x320 TouchScreen-Display-Module from Adafruit.

The MCU-Board is socketed by the way, because I had problems uploading a new Firmware when I had it soldered in. Really strange - GPIO-Pins 0 and 2 were showing a 0.5Vpp oscillation at about 2V DC-Offset when the Reset came and the bootloader was supposed to start and accept a new Upload.
Did anyone of you guys had similar problems with that board? Or do you have an idea what could have caused this behavior? Installing a socket made with female 2.54mm headers and plugging the MCU-Board into that solved the problem...
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on September 22, 2017, 12:22:41 am
I've measured the Attenuator. Looks like it is rather flat across the frequency-band I'm interested in.

To measure it, I used one of those noise-sources from ebay that get ridiculously hot after a few minutes :)

The B-Trace is just the noise-source connected via a 1m RG316-Cable with SMA-Connectors.
The A-Trace has the Attenuator inserted. It is powered with +5V and no attenuation is selected. The loss at no attenuation is about 10dB.

Input-Power is planned to be about +15dBm, which results in output-power of +5dBm that can be attenuated down to -90dBm.
With the help of the PIN-Attenuator the dynamic range is about +5dBm to -100dBm.
And when I use the AD9910, the amplitude scale factor-setting should allow for even weaker signals, as well as much finer control :)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on September 22, 2017, 04:16:08 pm
Updated RF-Detectors for the RF_LEVEL_SENSE and RF_OUT_SENSE-Signals.

RF_OUT_SENSE is used during calibration to fill the lookup-table with the right correction-factors. RF_LEVEL_SENSE provides the feedback-signal for the AGC.

I've also decided to use Microstrip-Traces instead of CPW, after reading through a PDF by Rogers that showed Microstrip to be less sensitive to changes in the dielectric constant of the material.
Manufacturing will take place at EasyEDA, as the 0.012mm thickness of the dielectric between first and second layer is too small to build the filters.

I'm not entirely sure, but I think the board is done now. Unless there's something wrong that I missed :)

Edit: Forgot one thing: The Soldermask-Cutouts to solder RF-Shields.

Edit 2: I just realized that I made a mistake, calculating the DC-Voltages. They don't go higher but lower once a signal is present at the input of the detector. So I don't need the bias-circuit on the RF_LEVEL_SENSE-Detector.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on September 23, 2017, 07:51:44 pm
I've changed the Supply-Voltage to 3.3V on the RF-Board, which allows me to work without any level shifters on the i2c-Bus. Doing that also meant I had to add some gain to the Output of the DAC that generates the AGC_BIAS. How much gain I need will be determined during testing.

On the PCB I've added pads to solder some kind of shield-can to. I've also moved the components around a bit to improve the layout and cleaned up the mess of the designators, which were sitting all over the place.

Attached you'll find the current gerbers and the schematics for the board.

This is the memory-map of the i2c-NVRAM-Chip on the RF-Board btw.:
 *  Memory-Map:
 *  0x000 - 0x0F0 = CAL-DATA: 12bit DAC-Calibration Data for PWR_SET-DAC is stored for every 25MHz-Step Starting at 0MHz and going up to 3GHz (120 16bit-Words)
 *  0x0F2 - 0x1E2 = CAL-DATA: 12bit DAC-Calibration Data for AGC_ATTEN_BIAS is stored for every 25MHz-Step Starting at 0MHz and going up to 3GHz (120 16bit Words)
 *  0x400 - 0x5FE = User-Config / User-Data
 *  0x600 - 0x7FE = Sweep-Settings
Title: Re: Open Source HW RF Signal Generator
Post by: ogden on October 02, 2017, 04:52:36 pm
Filter banks, unless very narrowband, will not help against square wave harmonics. I would go "traditional RF synth gen" way: downmixing. For example check Agilent E4400 service guide, E4400-90335.pdf and you will see what I mean. Instead of filter banks you need one 2.4GHz(?) CW source (like CC2500 in CW mode), 4.4GHz - capable mixer and 1GHz(?) low pass filter. Then you either use direct output from ADF4351 in 1GHz-4.4Ghz range or downmixed and filtered signal. Benefit of using 2.4GHz mixed with 2.4-4.4GHz of ADF4351 is: it is range of its VCO w/o divider.

Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on October 08, 2017, 10:47:23 pm
Thanks for the advice, but I've already ordered the boards and am now comitted to this path  :)

For frequencies up to 400MHz, I'll use the DDS-Module anyway, so not that big of a problem there.
I'll have to see how strong the harmonics are after filtering. If they are too strong, I can always put something between the Synthesizer-Board and the Filter-Board.  ;)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on November 25, 2017, 11:33:57 am
The boards are here and I've installed all the IC except for the quad PIN-Diodes at the input and the OpAmp for the AGC.
Partially because I don't have the PIN-Diodes and I'm too lazy to dive into my parts-bin to search for the OpAmps :D

I've also noticed that I managed to build the footprint for the MiniCircuits 750 MHz LPF backwards, so I have to solder that one in from the backside of the board. Luckily I have enough space inside the case :)

The PIN-Diodes in question are BAP64Q. Unfortunately these Diodes aren't available on ebay for a decent price and Conrad lists them with a delivery-time of 2 weeks.  :--
Anyone here who's living in Hamburg, Germany and happen to have these diodes on hand?  ;D
Title: Re: Open Source HW RF Signal Generator
Post by: ogden on November 25, 2017, 10:24:50 pm
The PIN-Diodes in question are BAP64Q. Unfortunately these Diodes aren't available on ebay for a decent price and Conrad lists them with a delivery-time of 2 weeks.  :--
Anyone here who's living in Hamburg, Germany and happen to have these diodes on hand?  ;D

Farnell does :)
http://de.farnell.com/nxp/bap64q-125/pin-diode-100v-0-1a-sot-753/dp/2775914 (http://de.farnell.com/nxp/bap64q-125/pin-diode-100v-0-1a-sot-753/dp/2775914)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on November 25, 2017, 11:47:48 pm
Indeed, but two BAR15 also fit the footprint and should work. :)

Next problem I stumbled across: I didn't have the MCP4725 DACs, only MCP4526. Difference: 4725 has A0-Pin on Pin 6, 4726 has a VREF-Input there.
As I only need one DAC (the bias voltage for the PIN-Attenuator can be set once and left there), I've just installed the 4726 to provide PowerSet and Bias-Voltage will for now be 3.3V (should be enough for +5dBm signal) and should shunt all RF-Energy to ground unless the AGC-Circuit sends a higher current through the pass-diodes.

Also the only 3.3V regulator I had available was an 1117-3.3 while the board requires a 78L33. Fortunately, there's enough room on the board to fit the 1117 on a small adapter board.

Next step is to test the board and install everything in the case.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on December 30, 2017, 11:08:45 pm
I didn't have much time the last few weeks, so there wasn't much progress.

I still haven't had the time to test the analog frontend-board, but I've used today to start building the UI.
I've also copied the serial-communication functions from my Game-Controller to the Signal-Generator. They only need minor adjustments to be used with the SignalGen. I'll post the possible commands here as soon as I have them implemented, in case someone wants to build the device too and use a PC-App to control it.

For the look of the UI, I took inspiration from the LW400-Series of LeCroy Signal Generators.
What you see in the attached picture is the Mode_Select_1-Screen, where the different Modes can be selected (Frequency-Set, Amplitude, Set, etc.).
Getting to the Mode to change Frequency, Amplitude or Modulation is also possible by tapping the corresponding area on the Screen instead of the Touch-Button - Once I've implemented the Touch-Functions :)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on January 03, 2018, 07:43:02 pm
Attached is the current version of the Program - Haven't found the time to upload it to Github yet :)

Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on January 24, 2018, 12:42:34 am
Github-Repository is up: https://github.com/SaabFAN/OpenSource-HW-RF-Signal-Generator-OSHW-RFSG- (https://github.com/SaabFAN/OpenSource-HW-RF-Signal-Generator-OSHW-RFSG-)
I'll add content as soon as I'm able to do so. Bachelor-Thesis is eating up time like crazy :)
Title: Re: Open Source HW RF Signal Generator
Post by: rhb on January 24, 2018, 01:30:52 am
Please excuse my just dropping in, but I very much agree with this remark:

Filter banks, unless very narrowband, will not help against square wave harmonics. I would go "traditional RF synth gen" way: downmixing. For example check Agilent E4400 service guide, E4400-90335.pdf and you will see what I mean. Instead of filter banks you need one 2.4GHz(?) CW source (like CC2500 in CW mode), 4.4GHz - capable mixer and 1GHz(?) low pass filter. Then you either use direct output from ADF4351 in 1GHz-4.4Ghz range or downmixed and filtered signal. Benefit of using 2.4GHz mixed with 2.4-4.4GHz of ADF4351 is: it is range of its VCO w/o divider.


A pair of ADF4351s with a mixer and low pass filters should cover 0-2GHz quite nicely.  The PCB layout will be the hard part. By using two ADF4351s you can map and avoid spurs.  For precision measurements where time is not an issue, you  can dither the frequencies of the ADF4351s so that the  spur average is lower.  Of course, one can use the full range of the ADF4351, but that makes the filtering more difficult. 

If you BP filter the 3rd harmonics from both ADF4351s you can get 0-6 GHz.

If you want the frequency agility of the AD9851 it gets a good bit harder.
Title: Re: Open Source HW RF Signal Generator
Post by: b_force on January 24, 2018, 09:28:50 pm
Lower frequencies are possible. I wouldn't go too low though, because the DC-Block caps need to get bigger and bigger to pass the signal, which decreases their performance at high frequencies.
The best way would probably be a relay-switched secondary signal path that covers audio-frequencies up to a few MHz. The AD9910 is certainly capable of generating these signals.
Can't you better go for a differential output?
With a differential to single ended output you don't need caps anymore.
Another way is to shift the whole down to 0 DC bias, with like a DC servo.
That's also a way to get rid of those nasty caps.
Title: Re: Open Source HW RF Signal Generator
Post by: Navarro on January 31, 2018, 03:51:12 am
A good attenuator that could be used is the PE4312.

I used it on some projects and really liked it.

73 PY1CX
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on February 03, 2018, 05:52:12 pm
A good attenuator that could be used is the PE4312.

I used it on some projects and really liked it.

73 PY1CX

Indeed.
I investigated that chip, but didn't really want to use it, because of the QFN-Package.
Luckily someone sold a bunch of Attenuators in really nice cases on ebay, of which I managed to get one (did a teardown a few posts before).
These PE4312, or similar chips, pop up on ebay quite often in ready made attenuators. Sometimes even with a control-panel and a micro to set the desired attenuation.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on April 05, 2018, 03:00:26 pm
Just a quick announcement, Bachelor-Thesis has been submitted and presentation is also done. Now I finally have the time to get back to work on this project :)

Title: Re: Open Source HW RF Signal Generator
Post by: Navarro on April 25, 2018, 05:52:13 am
There is a old trick to solder QFN easily in prototypes if it's only a GND pack underneath.

Make a bigger hole in the GND pad (3~4mm).
Align and solder the QFN in the soldering iron in two corners.
Flip the board and solder the GND pad with a soldering iron placing solder in the hole.
Flip back again and solder the other pads.

You can also do it easier if you make the pad a little bit longer.

Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on May 01, 2018, 07:02:35 pm
Okay, now that I have all the components together, I've tried to assemble the whole thing.
Turns out, the mess of cables is even messier than anticipated.
And the AD9910-Module unfortunately needs a lot more pins connected than just the SPI and IO-Update...

The mess of cables isn't pretty and I'm not happy with it, so I decided to create a new mainboard. :)

Because the current version is based on a ESP8266, which has way too few pins, and I've used the STM32F103 for my Bachelor-Project, I've decided to base the board on that chip.

I'm also putting a pin-header on the board with which a Orange Pi Zero can be connected (as suggested by user DC1MC). This allows upgrading the processor even further.

On the software-side, I haven't done any work, but user Bastler-XX has managed to get the AD9910 to work. My code wasn't working (missed the part in the datasheet that specifies CW-Mode only works in a specific profile and that particular profile-register has to be written to, if I remember correctly).
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on May 03, 2018, 01:41:11 am
Finished the Mainboard-Design (Rev. A):
- STM32F103 as CPU
- AtTiny861 as Input-Controller (Keyboard and resistive Touch - using internal oscillator)
- PCF8574 with two 74HC14 for Attenuator-Control
- PCF8574 to generate and read slow signals
- Fast signals (ADF4351 and AD9910 control-Lines) directly connected to CPU
- USB-Connector (CPU can talk to PC and be controlled by it + Uploading of Firmware)
- Battery to keep the RTC running and store some settings.
- CAL-Data and NVRAM are on the analog board (connected via i2c)
- OrangePi Zero-Connector (26 pin parallel cable required if used in 19 inch card cage)
- Local Switching Buck Converter for digital 3,3V-Supply
- Power-Filtering for the Attenuator (0805 Ferrite or inductor and 47µF Cap)
- Linear Regulator for ADF4351-Supply (3,3V)
- Dimensions: 10 x 10 cm
- i2c and SPI-Connectors (Chip-Select Signals need to be generated by external GPIO-Expander - Board is too crowded for another connector - Or solder cables to the 4 free pins of the CPU  ;) )
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on June 29, 2018, 11:55:26 pm
Update on the device:

Everything is now inside the case and so far the hardware seems to work.
There were some issues with signal integrity on the SPI-Bus, which I had to solve by connecting the data and CLK-Lines to GND via 22pF caps (the entire thing worked when I measured it with Scope-Probes, but ceased to work once I took the probe away - Active probe from Transverter-Store is ordered, but still on its way).
Also the Attiny is sort of connected wrong: The Libraries for i2c I could find use different pins (the Chip has two pairs for SDA and SCL connected to the USI).  ::)
So I reverted back to the original solution: PCF8574 for the keyboard and STMPE620 for the Touch.

I also designed a board that distributes a 20 MHz Ref-Clock for the Signal Sources and contains a MAX 10 FPGA + SDRAM, as well as i2c-distribution. The FPGA is intended as a advanced controller for the AD9910 and can communicate with the chip via SPI, as well as the parallel interface.
The 20MHz REF-CLK is controlled by a PLL, so locking to an external 10 MHz Reference is possible. In addition to that, 2 Outputs for the 10 MHz-Reference-Input are also fitted on the board.
Of this second board I have so far verified the PLL and that the FPGA is connected to the JTAG-Connector correctly.

Which brings me to the current status of the project:
- Verification of Communication between boards: DONE with the exception of the AD9910-Board
- Signal Generation with ADF4351: DONE
- Signal Generation with AD9910: DRIVER AVAILABLE, NOT IMPLEMENTED YET
- Control of Step Attenuator: DONE
- Amplitude-Control: MANUAL CONTROL OF STEP-ATTENUATOR
- SignalPath-Switching: TESTPROGRAM IMPLEMENTED
- AGC: NOT TESTED, DAC-CONTROL WORKING
- TOUCH: WORKING, NEEDS IMPROVEMENT
- KEYPAD: DONE
- UI: FRAMEWORK READY, IMPLEMENTATION OF FEATURES STARTED

What makes the testing a bit difficult is how the boards are arranged inside the case. Reaching test-points and measuring something is basically impossible. Also I'm still waiting for the SMA-Connector that will be put on the front-panel. It might also be necessary to put a PA somewhere in the signalchain, as it seems that the output power, especially above 2 Ghz, is dropping significantly.
A much better way to arrange the boards would be to put them side by side on a piece of wood, Copper clad Board, or a 3D-Printed Board-Holder.

Btw. At the moment I have 7 boards of each module (CPU-Board, REF-CLK + FPGA-Board, Analog Board with Filters). If someone wants these boards, please PM me. :)
I've also populated the Github-Repository now. So if anyone would like to contribute to the software, please do so :)
Title: Re: Open Source HW RF Signal Generator
Post by: pigrew on June 30, 2018, 12:10:53 am
Maybe I'm missing something, but it looks like Kspi adds 2.2k to each of the SPI lines? I'd expect these values to be closer to 22 ohms.

(I'm looking at the schematic PDF on github)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on June 30, 2018, 12:38:54 am
Oops :D

Yes, I forgot to change the value.
Currently I'm using 100 Ohms for Rspi.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on July 01, 2018, 08:17:00 pm
Some Measurements of the Filters on the analog Board I took with the noise-source and the ADF4351 as Inputs.

I have also made a Video of a Frequency-Sweep:
https://youtu.be/RAp4lgueNvI (https://youtu.be/RAp4lgueNvI)

AGC is Set to max Output (Control-Voltage: 5,96V)
LPF-Select is set to Auto.

There are some curious effects at some frequencies. Suddenly signals appear that are lower than the set fundamental frequency.

The last picture attached here shows a frequency-sweep from 500 MHz to 2.490 GHz measured directly at the output of the ADF4351.
Title: Re: Open Source HW RF Signal Generator
Post by: RoadRunner on July 18, 2018, 07:40:44 am
i have also made my self a crude Signal source based on AD4351. this seems be really nice candidate but goes only down to 35Mhz. it is an USB based hardware with PC application running in QT 5. i am using raw hid packages to transmit register information from. with HID raw you can send new regsiter configuration at 1ms interval.

At the lower frequency from 35 to 500Mhz i have seen signal is not very clean,  there are lot of harmonics . i am not a rf person may be because of high signal output level.

https://www.circuitvalley.com/2018/07/diy-4ghz-rf-signal-generator-adf4351-usb-qt5-linux-3Ghz.html (https://www.circuitvalley.com/2018/07/diy-4ghz-rf-signal-generator-adf4351-usb-qt5-linux-3Ghz.html)
i also posted a crude qulity youtube video showing sweep and hop
https://www.youtube.com/watch?v=M01K2i2qbhI (https://www.youtube.com/watch?v=M01K2i2qbhI)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on July 23, 2018, 11:36:49 pm
That's an interesting device. Especially the software controlling it via USB seems handy. I haven't done anything with HID so far, but I really should look into it - Can you point me to some easy to use references?

The spectral purity of the ADF4351 isn't great because it puts out square waves. The VCOs inside the chip start at about 2.2 Ghz and frequencies lower than that are generated by dividing the VCO-Output with digital dividers.
That's why I added filters to the signal chain. Thx again to user nctnico for the software to design the microstrip structures.

I found something interesting though - the subharmonic signals visible around 1.2 GHz in the video are caused by the first LC-element of the 3Ghz LPF on the analog board.
If I put my finger on the trace, the subharmonic signal vanishes - see attached picture.
The Signal from the ADF4351 doesn't have any subharmonic signal content.

I'm now wondering how I can modify the filter accordingly to achieve the same result that placing my finger on it has and what's more at play here: Capacitance or resistance? According to my Fluke 87, placing my finger on the trace increases capacitance of the entire filter-structure by ca. 80nF and brings the resistance to about 1 MOhm. But that's measured at sub kHz frequencies obviously.


On the software-side I'm making slow progress. The ADF4351-Driver works now, as well as the drivers for the analog board and the attenuator. I want to include some more features in the setup-menu to make it compatible with builds that use different hardware, but that's secondary.
Next step is to get the AD9910-Driver working.
By the way: Does anyone know of a UI-Designer for Arduinos using the GFX-Library by Adafruit? Coding the UI by hand is quite tedious :)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on July 24, 2018, 10:25:25 pm
The problem with the subharmonic signals could be resolved together with forum user bastler-xx. It turns out that the output of the ADF4351-Module that has no resistor can't be used. The signal power is higher at that output, but signals can bounce back and forth. My theory is that the PIN-Attenuator reflects a significant portion of the signal , which then bounces back and forth at 1.2 GHz (the Coax cable is about 7 cm long, so wavelength / 4 @ 1,2 Ghz isn't too far away).

Now that that's solved, I installed a preamp for the ADF4351-Module to have more room to play with the PIN-Attenuator. The frequency response from 500 MHz to 2 GHz is reasonably flat, but lower and higher and signal-strength drops quite drastically and there seems to be a limit that the output-amp can't pass. It's within my original design-goal: "- -120 to +13dBm digital Amplitude control (This does not need to be flat all the way up to 3GHz, I'd be ok with some amplitude-drop above 2GHz)", but it remains a bit of an eyesore :)
I'm guessing this is in part caused by the fact that i used two double PIN-Diodes instead of a BAT64Q quad diode in the PIN-Attenuator (I've got the diodes here now, but it's too warm to fire up the hot air station :) ), as well as losses in the FR4-Board, limited precision in the etching of the filters and maybe also probably a limited frequency response of the detectors that give the OpAmp of the PIN-Attenuator feedback on the signal-strength.

Attached are two measurements with my SA:
- The Output of the PreAmp I bought on ebay, with the ADF4351 directly connected - I'm suprised by the frequency response of the thing. And wondering what type of IC is in there. - This is the Amplifier btw.: https://www.ebay.de/itm/5-6000MHz-Gain-20dB-Broadband-RF-VHF-UHF-Signal-Power-Amplifier-Verst (https://www.ebay.de/itm/5-6000MHz-Gain-20dB-Broadband-RF-VHF-UHF-Signal-Power-Amplifier-Verst)ärker-Modul/362185905078?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649
- The Output of the whole signal-chain. As you can see, as soon as I start increasing the Bias-Voltage of the PIN-Attenuator, the amplitude below 500 MHz starts to drop, but I can get a reasonably flat (+/- 2dB) frequency response up to about 2 GHz. After that there's a sharp drop.
Title: Re: Open Source HW RF Signal Generator
Post by: edigi on July 30, 2018, 08:32:24 am
I plan to create a similar signal generator using ADF4351 what is discussed here. I've checked the data sheet and it describes the logic compatibility of the chip as 1.8 V. I couldn't find any information if it's 3.3 V tolerant. So far I've used a board that has 1K resistors serial with each controlling pin (CLK, DATA and LE; board is from banggood) and resistor dividers from the controlling board (Arduino nano). However I'd like to switch to ESP32 (that uses 3.3 logic) and avoid the resistor divider to shift logic level (and I have also a card that does not have any resistors between the controlling pin and the headers so the risk is also higher there).

Does anyone have a good source of information if the ADF VCO+PLL family is 3.3V tolerant? Is there any forum where I could ask this and get reliable information?

For this minimalist hobby project I'd like to avoid any extra board, I'd simply just wire the controlling board, the ADFs (2 for mixing) the OLED display and the rotary encoders.

Thank you in advance for any suggestions.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on July 30, 2018, 11:04:48 pm
The chips are 3.3 V chips. They are powered by 3.3 V and can receive data at 3.3V-Levels.
You can use 1.8 V, to send data to the chip, but anything up to VCC + 0.3 V is okay.

I am using about 75 Ohm in series as terminators on the SPI-Bus.
1K will limit the communication-speed, as the edges aren't fast enough an logic levels might not be stable long enough for the chip to recognize the data correctly.
Title: Re: Open Source HW RF Signal Generator
Post by: edigi on August 01, 2018, 10:36:27 am
That sounds reasonable.
Actually I've connected the ESP32 directly with the ADF4351 board yesterday and LD LED was showing lock and frequency meter could measure the output signal of ADF4351.
I've used only 1 MHz CLK so maybe the 1K resistor is till OK there (I guess the board vendor opted for this dumb proof protection), it could be an issue for higher clock though.
Checking with DSO the clock was already not so nice and pretty.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on September 30, 2018, 11:11:30 pm
Some progress has been made and so far several flaws of the analog board have been identified (Fixed in Revision C):
- Reflections from the first Filter cause problems at higher frequencies (3dB Attenuator added)
- Input-Side of PIN-Attenuator has DC-Voltage on it, but no DC-Block (DC-Block between PIN-Attenuator and 3dB-Attenuator added)
- Frequency-Response of the whole signal-chain varies too much. Especially the final Amplifier is a problem here (redesigned signal-chain between filters and output - See below)
- Manufacturing-Process required rather long traces to build inductors (changed manufacturer to JLCPCB to make use of their 4.5mil minimum trace-width on 4-Layer Boards - Changed first filter from 5th order to 7th order Cauer Low Pass-Filter)
- 750 MHz Lowpass-Filter Module from Minicircuits had mirrored Footprint  |O (Mirrored Footprint :) )
- Power-Detectors have terrible frequency response (replaced resistive taps with resistive dividers and replaced diode-detectors with LTC5505)
- Output-Power too low (Added BGA2866 and SBB5089 Amplifiers to the signal-chain after the filters, plus Attenuators to dampen reflections and prevent saturation of amplifiers - Output-Power of signal-chain should be about +13 dBm)
- ADC-Inputs were left floating, which threw off the readings (Added Pin-Headers for the unused ADC-Inputs to ground them or use them to measure voltages)
- Only one Aux-Input, which requires external switching-board to select between a modulated signal or the Signal from the AD9910 (Added a dedicated Input for the AD9910 with amplifier to get Output-Power close to +13dBm - Fine-Adjustment of amplitude will be done in software with the AD9910, no Hardware-ALC for signals from AD9910)
- 5V Regulator reaches over 90°C without heatsink, with heatsink you can barely touch it (Replaced with AZ1117IH-5.0 and changed Layer 3 from +12V to +5V to act as heatsink in order to get temperatures down and account for additional current-draw of the added amplifiers)
- Additional change: Replaced the two Single-Channel DACs with one 4-Channel DAC, to have 2 additional DAC-Channels.

I'll order new boards soon and testing will continue after that.

The next part is the mixer-board, which I did today - It uses a RMS-30+ Mixer (Anyone in Germany who wants one? Minicircuits asks a 20€ shipping fee, so I think I'll order 4 or 5 pieces.) and has a BGA616 Amplifier on board, to come as close as possible to +16dBm output-power as possible. +16dBm is required to get a +13dBm power-level at the output of the analog-board, due to losses in the RF-Switches and the resistive divider.

And in case a DC-Offset is needed: +/-10V of DC-Offset can be added to the signal on the "Final-Board" (current capability: ca. 40mA). Sonnet Lite simulation of the RF-Path on the board looks good.
Added that mostly just for fun :D

Attached are the Top-Views of the boards.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on December 07, 2019, 10:26:32 pm
Many months later and many days of tinkering with the whole system, including installing everyting in a 19 inch case, I can say the the individual modules work as expected (well, mostly - see below) and that basically 2 big problems remain:

- Signal integrity on the SPI-Bus
- Software (Especially UI and calibration routines to compensate for the frequency dependent losses)

While I can't say much about the software-part, as I haven't really started developing a new UI yet, apart from  a rudimentary interface that allows setting the most important parameters via serial commands, I can say quite a lot about the hardware.

The biggest problem so far has been signal integrity on the SPI-Bus, which has been not only frustrating but also actually drove me away from the project for quite some time.
I haven't identified all the issues, but I'm pretty sure that one of the major culprits is the LCD-Controller, which, according to a few forum posts, does not properly tri-state its output and screws up readbacks from other chips (which cost me at least 2 weeks of head scratching and chasing ghosts). Another issue are the cables. Due to the location of the SMA-Connectors the boards are pretty far apart in the case and connected via 10 to 15cm long cables that are bundled together with zip ties and tape. This causes quite extensive overshoot on the Clock and Data-Lines of the SPI-Bus, as well as reflections (the cables are going out in a star-pattern from the CPU-Board).
While the LCD doesn't care and the AD9910 can work with the overshoot most of the time (not always - another ghost I was chasing), the ADF4351 simple crashes when it is confronted with spikes up to 3.7V on the data-lines.
The solution that finally fixed this problem (I tried different resistor-values for the series termination on the CPU-Board with basically negligible results) was a buffer-board that uses a 74AC14 to buffer the signals and catch the spikes. This board also includes over 2000uF of capacitance to filter the power-supply and catch any remaining traces of the spikes.

After installing that, I finally managed to talk to all the chips and tell them what to do - I couldn't really listen to them, due to the stupid LCD-Controller, but I reliably (well, 90% of the time) got the expected results from the entered commands.

So I finished my drivers for the Chips and continued testing, when I noticed rather nasty traces on my Scope: Everytime there's activity on the SPI-Bus, I see a bit of noise on the waveforms. Btw. I built all the modules in a way that the mounting holes are connected to ground and the case is grounded as well, so there's basically a big ground-plane 1cm beneath each board.

But despite all these problems, I was able to verify the basic concept of the system:
- Using several switched filters works (although using a more highly integrated switch would reduce the losses that are created by these switches) and attenuates the higher harmonics to a sufficient degree
- I can (with some difficulty, depending on the frequency) fine-tune the amplitude with the ALC-Circuit
- Switching signal sources in and out works
- The Mixer-board works (I had to make a few adjustments to the circuit however - using just a resistor doesn't yield satisfying results)
- CPU and Keyboard-Interface works
- Communication between the chips works (after overcoming the difficulties described above)
- A basic prototype of the UI works

Which brings me to what I have been doing for the last 3 weeks: The ARSG - Mark III Mainboard.

I've combined all the functionality into one board and also did some changes:
- Replaced the STM32F103 with a STM32F407
- Optimized the SDRAM-Interface for the FPGA to make the traces shorter (which should allow me to increase the SDRAM-Clock to the maximum of 166 MHz)
- FOUR-LAYER-BOARD - No more 2-Layer crap  ;D
- Replaced the ADF4351 with the ADF5355 (13,6 GHz  :o )
- Replaced the AD9910 with the AD9957 (basically the same chip with large portions of the datasheet copy and pasted, but it also has digital I/Q Modulator capability and it can also work as a simple DAC driven by a data-source, whereas the AD9910 could only use the Output Scale Factor for this)
- Improved the Master Clock and used differential clocks wherever possible to reduce noise.
- Changed the power-supply to a +14 / -14V-Scheme with local regulators for the individual circuit-blocks.

I haven't started with the board-layout yet, but I think I might be able to put everything on a 200 by 150mm board.

So, in essence after a rather long hiatus, this project is back on my in progress-list :)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on December 09, 2019, 12:45:13 am
I've attached a very early preview of the layout - Power Supply-Layout is done and will get its own little shielding-cage with holes in it for the Heatsinks (Unless I run out of space. Then I'll put that on a separate board :) ).

The shield-cages will be 3D-printed cages wrapped in aluminium or copper foil and screwed to the board.
For the RF-Cages I plan to use Filament with metal content to create RF-Absorbers. Has anyone done this before and can share some insights?
Title: Re: Open Source HW RF Signal Generator
Post by: Yansi on December 09, 2019, 12:58:15 am
Ah! Finally! A was just wanting to suggest you the AD9957. I have one piece laying somewhere I bought from china some time ago. That'd be a very good opportunity to make a nice  vector signal generator.

Also, why don't you use a servo-loopped ALC for the output? Stepped attenuators are boring.

For frequency of interest up to 3GHz, a cheap nice BAP64Q PIN quad may be used. Not sure what to use further, as I have never worked beyond 3G. (Thats the limit of my instrument setup).  Any RF log-to-lin detector coupled with it will give you a pretty decent ALC building block. Rest is just any DAC with enough resolution and a couple of opamps.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on December 09, 2019, 01:20:32 am
i already have implemented a ALC ciruit to have fine control over the amplitude. And it uses the BAP64Q, which does a pretty good job :)
But since the ADF5355 can offer up to 6.8 GHz, i am planning to use a special IC by Analog Devices as the Attenuator. Namely this one: https://www.analog.com/en/products/hmc346ams8ge.html (https://www.analog.com/en/products/hmc346ams8ge.html)
Using that chip will also remove the requirement to separately control the Bias-Voltage for the attenuator, which currently requires a rather long calibration process.  ;D

For the control I'm using a quad OpAmp that is regulating the Output amp against the voltage from a 12bit DAC. So the precision should be there to make it possible to remove the step attenuator. :)
I'll have to do some more tests with the current ALC-Circuit to verify this, but its a good idea to just use the ALC-Circuit for this. Thx :)
On my current hardware I'm using LT5505 as RF-Detectors, which work rather well, but only have about 40dB of dynamic range.
The dynamic range of the detector is probably the biggest problem here. Do you know any detector-chip that has a suitable range (about 90dB)?
Title: Re: Open Source HW RF Signal Generator
Post by: Yansi on December 09, 2019, 10:05:49 am
It is very difficult to watch all this thread, as you are way to fast in slapping things together  :)  Sorry if I have missed something.

Have you already verified any RF parts of this huge design?
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on December 09, 2019, 09:21:04 pm
What I've verified so far is:
- Filtering of the ADF4351-Output to attenuate the harmonics - Working after adding some attenuators at the input and output of the filter-chain. Since the 1.5 GHz Filter is only 5th order, it probably is a bit weak, but I don't have any test-equipment to check what is going on beyond 3GHz. Could probably use some improvement - LTCC-Type Filter by Minicircuits could offer better performance here as well as significant space reduction (1.5Ghz Microstrip-Filter is quite large, even with 4mil inductors). To design the Microstrip Filter I've been using this tool: http://www.nctdev.nl/page_pg%3d17.htm (http://www.nctdev.nl/page_pg%3d17.htm) where I entered the values that this tool http://tonnesoftware.com/elsie.html (http://tonnesoftware.com/elsie.html) gave me with pretty good results.

- Automatic Leveling - Working with LT5505 used as the detector, self-made PIN-Attenator based on BAP64Q Application example in the Datasheet, standard quad OpAmp as the controller and 12bit i2c-DAC for the reference voltage. It's a bit tricky to find the correct bias-voltage though as that seems to be changing with frequency. I've replaced the BAP64Q-Attenuator with the HMC346AMS to remove the necessity for actively providing and regulating the bias-voltage for this exact reason.

- Signalpath-switching - Works perfectly with one exception: The input from the AD9910. The Amplifier (BGA616) is generating almost 26 dBm with a 1mH inductor at the input of the RF-Switch that switches between the filtered ADF4351-Signal and the AD9910-Signal. Predictably, this reliably fries the RF-Switch after a short while (I've measured up to 12Vpp on my scope at 20 MHz with the AD9910-Signal source deselected - Absolute Maximum according to Datasheet: 8,5V).
The new design uses OpAmps as the output-amplifiers of the AD9957 that are specified to 1.75 GHz and switches with internal 50 Ohm terminators instead of reflective ones I've been using in the old design.

- AD9910 Signal - Currently the handover from the AD9910 to the ADF4351 happens at 400 MHz, which is a bit high as I can see a pretty strong image frequency at 600 MHz on the spectrum analyzer, as well as some other spurs that get stronger and stronger above 300 MHz.
Using one more filter at 400 MHz to allow switching in the filtered RF-Source at 250 MHz or 300 MHz should solve that problem, since I can use LowPass-Filters with a lower cutoff-frequency for the AD9957-Output. Using an OpAmp at the output also allows much lower frequencies since the BGA616 needs to be AC-Coupled and becomes almost useless below 1 MHz.

- Mixer-Board - Works without a problem once I fixed the supply of the BGA616 Output-Amp. Output amplitude is high enough to fry the reflective RF-Switches though (see above), so again a switch with internal termination is needed (in case the software routes the signal the wrong way).

- Reference Clock-Generator and distribution-amplifier - Works perfectly after I cut a few traces since I goofed up the footprint of the main oscillator :D

- FPGA and SDRAM - FPGA is working, but I haven't checked the communication with the SDRAM-Chip yet. I'm pretty sure it'll work, but since I used a 2-Layer board there I've got interrupted GND-Return paths all over the place and had to use a short coaxial cable to get the clock from the FPGA to the SDRAM-Chip, I'm guessing that the max clock frequency is rather limited.

Most problems in the RF-Parts I've ironed out with the boards I ordered last year and since then the focus was mostly on the software-side and, as I said, the communication-problems between the CPU and the connected chips. Putting everything onto one board and using short, traces and proper termination should hopefully fix all those issues once and for all.

One more note on the FPGA and controlling the AD9957: I'm currently using a MAX 10 FPGA connected to a 8 MByte SDRAM with 16bit wide databus. I do have a few more pins available to connect a larger chip, but I think 4 Mega Samples (the AD9957 takes 18 bits but 2 of those could be calculated or just be static) is enough for this project.
With a SDRAM-Chip, I estimate a sample rate of about 100 Megasamples/s to be possible. Maybe even more with a prefetcher and some clever use of the banks inside the SDRAM to make the most of the burst-mode transfers.
I've also thought about using DDR-Memory, but laying out a board for DDR-Memory has a lot more pitfalls than normal SDRAM.
If anyone can point me to a good source of guidelines or proven rules of thumb, I might reconsider the choice of memory, however :)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on December 10, 2019, 09:48:03 pm
Here are some of the schematic-blocks of the Mark III Board.

I've tried to stay as close to the application schematics in the datasheets as possible with most of the chips, or used what I verified with my previous boards.

The reason why I'm going for differential clocks is the fact that the clock-lines are rather long and I want to eliminate any additional phase noise sources.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on December 11, 2019, 08:28:01 pm
This is the layout of the FPGA and the AD9957 with all its power supplies.

What I didn't realized when I drew up the schematic was how much power the AD9957 draws on the 1.8V Rail for the digital core: 610mA!!! :o
And on top of that the datasheet is a bit ambiguous - Quote: "DVDD (1.8V) Pin Current Consumption | QDUC mode | 610 mA" - Which could mean that it draws that PER PIN!
I doubt it will draw that much power though, as the next few entries in Table 1 state a power consumption of 1.8 Watts for the entire chip as the maximum in continuous modulation-mode.
As this would mean about 2 watts of waste heat in a linear regulator, I decided to use a switching converter for the digital core while the analog circuits will be supplied by "Ultra Low Noise" RT9193 regulators.

I'll also redesign the Power Supply as it currently takes uses too much space and seeing how large Master Clock Generators and the FPGA+AD9957-Combo is, I fear I'll run out of space pretty soon and I would like to avoid having to put parts on the bottom as much as possible :)

I might put the filter in its own little cage, however.

Btw. I haven't added a Ground-Plane on the top layer yet, as each time I put in a via Circuitmaker takes quite a while to calculate the holes in the planes - even on a Ryzen 5 3600X based gaming machine  :-//
Title: Re: Open Source HW RF Signal Generator
Post by: Mechatrommer on December 12, 2019, 03:57:30 am
kudos (subscribing...)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on December 25, 2019, 08:52:57 pm
I've got the layout of the board mostly done but I ran into a few problems with designing the filters. Especially the 4 and 6 Ghz-Filters cannot be calculated as the structures have to be too small to achieve the necessary impedance with a 0.1mm 4.05 Ef dieeletric at more than 3 Ghz. And there's also the issue of limited space on the board.

Searching for suitable filters, on Mouser and from Minicircuits, I've come across a new product by Minicircuts: A "Reflectionless Filter".
https://www.minicircuits.com/pdfs/XLF-13H+.pdf (https://www.minicircuits.com/pdfs/XLF-13H+.pdf)

They are quite expensive at 12 Dollar per piece in low quantities, but the reflectionless nature of the filter would be a nice property as the reflections from the filters caused the PLL to lock to the wrong frequency or there were excessive spurs when I didn't have a 10dB attenuator between the Filter-Board and the ADF4351-Module (problem solved with the second revision of the Filter-Board).
Anyone here who used those filters before or know of similar components / how to buld those as microstrip? I'm tempted to use them, but I'm a bit hesitant because of the high price.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on December 26, 2019, 12:09:35 am
Found this book: https://www.amazon.de/Reflectionless-Filters-English-Matthew-Morgan-ebook/dp/B06X9ZLV61 (https://www.amazon.de/Reflectionless-Filters-English-Matthew-Morgan-ebook/dp/B06X9ZLV61)
Anyone know it? Is it any good?
Title: Re: Open Source HW RF Signal Generator
Post by: ogden on December 26, 2019, 12:59:56 am
Using 12$ filter to solve problems caused by pin diode attenuator do not sound right to me. Why don't you use digital step attenuator which do not have impedance matching problems? 1dB step is good enough for most occasions.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on December 26, 2019, 04:58:21 pm
The Attenuator is used to have a defined level before the signal is being fed into a step attenuator. Using the chip from Analog Devices takes care of impedance matching and all the other things.

What I was wondering was if it would make sense to use a reflectionless filter instead of the cauer filters I've been using previously.
I'll stick with the cauer filters for now, as I know they work (with 10dB fixed attenuator between the PLL and the filters).

Current state of the development:
- Power-Supply scheme redesigned (using TPS54302-Chips)
- All function-groups laid out and most connections done
ToDo:
- Add the filters
- Connect the CPU to the function-groups
Title: Re: Open Source HW RF Signal Generator
Post by: ogden on December 27, 2019, 02:50:36 pm
AFAIK pin diode is kinda nonlinear. I would measure distortions of such "attenuator" min/max/mid range before commitment.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on December 27, 2019, 03:37:59 pm
 According to the datasheet, the HMC346AMS8GE is based on GaAs MOSFETs and it specifically states that the application circuit takes care of impedance matching.

The PIN-Diode Attenuator works pretty good too, but requires careful adjustment of the Bias-Voltage depending on the frequency. That's why I want to use the Chip from Analog Devices - Only one input required and no lookup-table that needs to be filled with calibrated values :)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on January 02, 2020, 11:39:11 pm
Mk. III Board is almost done.

I've laid out the RF-Section with just the filters for 1.5 and 3 GHz still missing.

To make sure that the signal is strong enough at the output and arrives leveled at the Mixer, I've added a second ALC-Stage that sits in front of the RMS-30+ Mixer (Anything above 3.5 GHz tends to get really expensive really fast - Especially amplifiers and I don't have a dealer for Minicircuits-Parts - so I decided to limit the upconverter-stage to 3.5 GHz).

Basically every functional block in the RF-Section has its own linear power-supply that regulates down from a +8V or +/-12V Supply from the Switching Regulators far away on the other side of the board.
In addition to that, I've positioned everything in a way that it can be shielded and the holes to screw the shield in place are 3.4mm diameter so M3 screws can be used.

To make layout a bit easier, I've used Microstrip-Transmission lines instead of Coplanar Waveguides this time. Saves me the time to put a ton of vias next to the RF-Traces and also keeps the bottom side clear of vias so routing of control-signals and power is much easier.
Also based on my experience with the JLCPCB Assembly-Service I've used 0402 components in the RF-Path. To make it less likely to blow the tiny parts off the board when hand soldering the other components, where possible I've kept a rather large distance between the parts. It makes the RF-Path a bit longer, but as I plan to release this as a partially assembled kit in the future, I think ease of assembly in the hobby-room is the more important factor here.
Which is also why I tried to avoid hard to solder packages wherever possible - The ADF5355 and the SP4T RF-Switches are the only QFN-Parts for example.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on February 01, 2020, 12:51:43 pm
Board-Layout is finally done.

I've decided to not implement a 6GHz-Filter, since anything above 6 GHz is already being attenuated quite a bit by the amplifiers that are only specified up to 6 GHz with more than 3 dB drop from their maximum figure already.
Basically anything above 3 GHz is a gimmick and not part of the core-specs (see first post for those :) ).
I'll probably send one board to TheSignalPath though. If he's interested in checking it out and willing to work around the most likely below standard User Interface  ;)

Regarding Keyboard, Display and other things that can be connected to the mainboard, I'll update the github-repository with some specifications about peripherals. Those will contain pinouts and some notes about the communication-protocols.

I've also had to switch IDEs since the Sloeber-IDE (A modified Eclipse Distribution for Arduinos) has been abandoned by the developer and there are now bugs piling up that make it unsuable with the STM32Duino Libraries.
I'm currently undecided whether to stick with Arduino and use Visual Studio as the IDE (with a Plugin), or switch completely to the STM32CubeIDE with which I've programmed a gamecontroller over the last 2 weeks with not too many showstoppers.
Title: Re: Open Source HW RF Signal Generator
Post by: Yansi on February 02, 2020, 06:33:48 pm
Was any part of this tested and verified independently? I am not a close follower of this thread, but I still have a bit of bad taste of it being just a quick slaptogether. Nor do I see a single point to use any duino crap within designs that even uses FPGAs. (simply this is not a piece of a children toy, so why even bother making it child friendly?)

How will you manage to make any RF shielding lids? A custom milled aluminium blocks?

Is there really none ESD protection on the USB?

Also for example, from another quick look at the PCB: Why not flipping the 1.5Ghz LPF vertically? Would allow for much shorter interconnects.

I think the layout is far from what I'd call done. (hence my bad taste of a quick slaptogether). But I stay being corrected.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on February 02, 2020, 07:53:15 pm
This board is a combination of all the individual boards I previously made and which I verified to be working. The only thing I didn't test so far is the FPGA-Board and its control of the AD9910 I have here. Control of the chip via SPI-Bus with the main CPU is working reliably.
The changes I've made compared to the version I have here with the individual boards I've detailed in this post: https://www.eevblog.com/forum/oshw/open-source-hw-rf-signal-generator/msg2819470/#msg2819470 (https://www.eevblog.com/forum/oshw/open-source-hw-rf-signal-generator/msg2819470/#msg2819470)

Regarding your other questions:
I don't have a CNC-Machine, but I've got a 3D-Printer and plan to use conductive filament (and/or copper-foil or conductive paint) to print RF-Shielding enclosures. The holes in the PCB have a diameter of 3.4mm, which allows using M3 screws to mount the shields.

USB ESD-Protection... Oops. :)
I'll add the USBLC6 to the USB-Lines. Used that chip in other projects before and have some in my parts-bin.

The location of the filters could be optimized, yes.
If they were a bit cheaper, I'd be using tiny SMD-Filters by Minicircuits. That would allow more more filters with better attenuation of the harmonics.
Title: Re: Open Source HW RF Signal Generator
Post by: Yansi on February 02, 2020, 08:30:46 pm
I wouldn't trust the 3D printed bullshit (yes, I'm a skepticist, especially with these types of filaments). Get a proper alu case milled (it is not that much expensive, but sure not cheap), or I'd opt to optimize the layout to use off-the shelf tinned steel sheet shielding cases.

Yup, I also go through a lot of USBLC6, both -2SC6 and -4SC6 (2 or 4 way).

There are other manufacturers of monolithic filters. Have you tried looking thoroughly enough?  Johanson technology, Taiyo Yuden, Murata, Epcos/TDK, etc etc etc. Even Mouser stocks heaps of them, for a fraction of MiniCircuits cost.

Performance of these filters suck (stopband attenuation 30-40dB), but can be cascaded with acceptable insertion loss. Very cheap. Also look at aliexpress and other far east sources. Lots of these available.



Title: Re: Open Source HW RF Signal Generator
Post by: thm_w on February 03, 2020, 06:54:16 am
3D printing makes sense regardless of what your end result is, as it lets you test fit the dimensions. CNC setup time is not cheap compared to filament.

Not sure if anyone has tested 30% copper PLA, would be interesting to see. Its not electrically conductive across the material.
The actual surface conductive stuff, afaik, is all carbon based, which is not great for RF absorption compared to say, Cu or Al.

These might be better options over carbon, just a question of if its good enough and won't melt PLA:

https://www.mgchemicals.com/downloads/tds/tds-842wb-l.pdf (https://www.mgchemicals.com/downloads/tds/tds-842wb-l.pdf)
"Surface Resistance @ 50 μm 0.0020 Ω/sq"

https://www.caswellplating.com/copper-conductive-paint-4oz.html (https://www.caswellplating.com/copper-conductive-paint-4oz.html)
"Good surface resistivity of <1 Ohm/sq at 1 mil dry film thickness. Attenuation: more than 75 dB from 30 MHz to 1.5 GHz."

https://www.mgchemicals.com/downloads/tds/tds-841ar-a.pdf (https://www.mgchemicals.com/downloads/tds/tds-841ar-a.pdf)
"Surface Resistance @ 50 μm 0.60Ω/sq"
Title: Re: Open Source HW RF Signal Generator
Post by: OwO on February 03, 2020, 08:54:46 am
Why not use shield cans and clips?
Something like this: https://www.aliexpress.com/item/33003768263.html (https://www.aliexpress.com/item/33003768263.html)
I'm sure you can find other dimensions or fold these from copper foil for custom dimensions. On taobao some sellers can do custom shield cans.

There are clips that solder to the PCB:
[attach=1]
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on February 03, 2020, 06:05:50 pm
Soldering these clips to the PCB should be possible. The surfaces free of soldermask are 5mm wide.

I was inspired to use 3D-Printed pieces by the video of TheSignalPath in which he 3D-Printed some horn antennas and Waveguide-Filters with pretty good results.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on February 19, 2020, 07:10:35 pm
I've done some research and the method to go (even used by at least one company I found that has invested some research in this area) seems to be coating the 3D-Printed objects with conductive paint or metallic foil.

Metallic foil is probably the best choice here price wise. Or cans out of copper sheet metal. :)


Regarding the filters: There's a ton of them available on Digikey and Mouser, but they all seem to be targeting the 2.4 GHz (WLAN)-Area. So they're outside the area of interest and when I have to order parts directly from the manufacturer, Minicircuits seems to be the better supplier.
Title: Re: Open Source HW RF Signal Generator
Post by: eb4fbz on February 20, 2020, 09:41:47 am
Those microstrip lines are pretty thin! What is the dielectric thickness?

You will have big mismatches due to discontinuities created by the components pads. Those lines look very thing even compared with 0402 passives!

I would never ever try again to make distributed elements filters on FR4. Not even for <1GHz. It's not about loss, but also uncontrollable variations between boards and ultimate rejection. I would use SMD low pass filters from Murata or Johanson. They are cheap, and performance will be better and painless compared to those filters on FR4.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on February 20, 2020, 08:10:42 pm
The thickness is 0.1mm (Controlled Impedance 4-Layer Board made by JLCPCB). Dielectric constant is 4.05.
Yes, I noticed the thickness discontinuities of the pads. Unfortunately, that's one of the compromises I had to make to keep cost low.

Regarding the filters: Okay, you guys convinced me to switch to some ready made SMD-Filters :)
It also seems like Mouser has recently added Minicircuits Filters to their inventory. They do not ship to Germany though. Hopefully that'll change in the near future. So I'll redesign the filter-section with the filters by Minicircuits and update the layout of the filter-section. Should save a lot of space as well.
Title: Re: Open Source HW RF Signal Generator
Post by: Yansi on February 20, 2020, 11:39:23 pm
These thin transmission lines are nightmare to work with. Use different stackup or forget 50ohms. On a generic FR4 board, even controlled impedance, it will be from floor to bottom in its value.

What is also commonly done, is to use layer 1 for signal (as you have), then omit layer 2  (no copper under RF parts), layer 3 becomes RF GND, layer 4 other signals (supply, control signals).

That way you can get much thicker traces for 50R, which is welcome, as the etching tolerances won't bother that much. Also will enable you to obtain much higher impedances for distributed filter elements.
Title: Re: Open Source HW RF Signal Generator
Post by: OwO on February 21, 2020, 04:07:33 am
There is also the 0.2mm stackup which JLC offers and is de-facto standard for boards with RF.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on April 15, 2020, 12:14:35 am
Quick update:

I've redone the Filter-Banks (added one Stage btw.) with SMD-Filters by Johanson since Mini Circuits-Components aren't sold to Germany by Mouser for whatever reason. 
Tiny Problem I ran into is the fact that these filters are only available for certain frequencies and I need a filter with a cutoff-frequency around 2.2 to 2.4 GHz. So that Filter needs to be made with a stripline-filter.
The preceding 750 MHz, as well as 1.2 GHz Filter and the succeeding 3GHz-Filters are made out of 3 Filters in series.

I'm also redesigning the RF-Path after the Filtering since the RF-Switches by Analog Devices required negative control voltages and are a bit on the expensive side. As is the ADF5355: 95€ + Taxes! The almost pin-compatible ADF4355 (One pin is an output instead of GND) is only 37€. I've put a 0603 resistor right next to the pin in question, which can be populated by 50 Ohms or 0 Ohms, depending on the chip that's being used.

In addition to that, I've switched to the 0.2mm Stackup, which makes the traces and pads look much more uniform :)

Thx for all the suggestions. Keep 'em coming. I have set the deadline to order boards to the end of may, so there's still time to get them implemented :)
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on April 18, 2020, 12:35:25 am
I managed to find a suitable filter from TDK that is in stock at Mouser and started layout of the new filter-banks.

I also added RC-Filters to each control-input of the RF-Switches to isolate them from digital noise and isolate the CPU from RF-Noise (the RF-Switches are being driven directly by the CPU).
Title: Re: Open Source HW RF Signal Generator
Post by: eb4fbz on April 18, 2020, 11:48:30 am
Have you taken the RF switch isolation into account? That will limit the rejection, so maybe cascading 3 filters does not improve anything. These switches usually have 20-30dB isolation at most for >2GHz. Layout will have some leackage too, and it gets worse when transmission lines are not properly terminated, as happens at frequencies where your filters are rejecting (reflecting) the unwanted components.

I also recommend you to simulate the cascaded filters response including interconnecting transmission lines length (phase), as most filters rejection doesnt simply add up, and even its passband could be distorted due to adjacent filters impedance.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on April 18, 2020, 12:05:15 pm
No, I haven't done that.

The SP4T-Switches have an isolation of 18 dB at 4 to 6 GHz. So if I understand this correctly, the outputs of the RF-Switch that are turned off will have a -18 dBm signal present that will then be added up at the inputs of the last switch and be visible at the output of the filter-bank. So as an example, the 4 GHz and 6 Ghz-Harmonics will appear at the output with an attenuation of roughly 36dB + the insertion loss of the 6 dB-Filters, correct?
Cascading filters in this case won't make much sense then, if the signal can just travel along a different path :)

How can I simulate the filters? I have access to Sonnet Lite, but that's about it when it comes to RF simulation-software. Is there a way to put the filters in there as black boxes with pre-defined S-Parameters?
Title: Re: Open Source HW RF Signal Generator
Post by: eb4fbz on April 18, 2020, 12:59:33 pm
You are right. But in a SP4T there are 3 leackage paths! These will add at the output, and depending on each filter bank loss and phases, you could be limited at 30dB or even less maximum rejection at some frequencies.

To simulate cascaded filters, download the s2p files from manufacturer and you can use them on a free tool as QUCS or RFSim.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on April 18, 2020, 04:23:37 pm
Thanks for pointing that out. I've switched to the ADRF5250 SP5T-Switches. They are a lot more expensive at 7€ per piece, but also offer 46dB isolation at 4 to 6 GHz.

Simulation in RFSim looks good. The Filters are behaving like advertised and the transmission-lines don't distort their behavior too much. There's just a little bit of ripple near the cutoff-frequency.
I've set the variance for the impedance of the transmission-lines to +/- 10% btw.
Title: Re: Open Source HW RF Signal Generator
Post by: rhb on May 03, 2020, 09:19:29 pm
Please forgive my being lazy.   Where can I find a block diagram of the current design concept?

It seems to me that the obvious implementation is a pair of ADF4351s, low pass filters and a mixer plus ancillary bits.

Reg
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on May 05, 2020, 04:22:31 pm
I don't know if I have posted an updated block diagram :)


But quick description is as follows:
- CPU communicates through an FPGA with AD9957 and ADF4355 (ADF4356, ADF5355 and ADF5356 are pin compatible btw.) to generate the signals.
- AD9957 is used up to 425 MHz and also supplies modulated signals
- ADF4355 is used from 425.01 MHz to 6 GHz (Max Amplitude and flatness might suffer above 3 GHz - It's all built on cheap FR4-Board to keep cost down)
- Signal from ADF4355 is LowPass-Filtered via a bank of filters that are switched in and out to filter harmonics
- Output-Amplitude is leveled by ALC-Circuits
- Digitally controlled Step-Attenuator controls output-power from -90 to +10 dBm (Higher output-power possible, but requires an amplifier-module connected to the PA Output and Input)

I did think about getting lower frequencies by mixing two ADF4355 Signals together, but using the AD9957 for lower frequencies saves components and PCB-Space to the tune of almost 100€ for one device. It saves not only a ADF-Chip, but also all the supporting circuitry, additional filters, Mixer and the PCB can stay within the 200x150mm frame (anything larger becomes expensive really fast).

The Step Attenuator isn't on the main board, since there are so many attenuator-modules available on ebay that fit the bill. Most are less than 30€ and having the attenuator as an external module helps with keeping the board-size within the mentioned 200x150mm.
Title: Re: Open Source HW RF Signal Generator
Post by: Yansi on May 05, 2020, 04:43:52 pm
So you have a LF path to the DDS directly and then HF path, where you mix the DDS with just single ADF435x?

I don't think that way you can get all the unwanted mixing products away easily. You would nee lot of band pass filtering to do so.
Title: Re: Open Source HW RF Signal Generator
Post by: rhb on May 05, 2020, 06:47:01 pm
What are the ADF4355 filter specs?  That is pretty critical to overall performance.

Looking at the AD9957 spec, it seems to me you'd get better SPFD if you ran it in the 10-25 MHz range or at 75 MHz and mixed that with the ADF435x to get the desired output frequencies.

I can't see buying a 6 GHz ADF4355 and putting it on FR4.  Either spend the money on better PCB material or drop back to a cheaper chip.

A block diagram and a more detailed description of the design logic would be a big help.  This thread has meandered along for a long time and it's hard to tell where you are.

A OSHW/OSSW replacement for an HP 8648C would be where I would start.  100 kHz to 2.9 GHz with an emphasis on very clean output and tight power level control.  That covers the 2.4 GHz WiFi band and is still reasonable to do on FR4.  I paid ~$1000 for mine in the US.  I'd love to see something comparable under $150.  And at $100 it would be OK if it only went to 2.2 GHz.

Have Fun!
Reg
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on May 05, 2020, 09:16:40 pm
I've drawn a block diagram (see attached picture and yEd-File).

The Filters for the ADF4355, which I have chosen over the 4351 because of its much finer frequency control (16bit Integer + 24 bit Fractional instead of 16bit INT + 12bit Fractional) - the 6 GHz is basically a bonus that comes with it, but can be left out by chosing the 10€ cheaper ADF4355-2BCPZ that can only go up to 4.4GHz, are:
- 750 MHz: Johanson 0500LP15A500E
- 1200 MHz: Johanson 0915LP15B026
- 2 GHz: TDK DEA202025LT-5052C1
- 3 GHz: Johanson 2450LP14A100T
- 6 GHz: Johanson 5515LP15A730

The Filter for the AD9957 is a Johanson 0400LP15A0122.

The current setup (AD9910 Module from ebay with lumped element LC-Filter) has basically no harmonics and just a few fixed spurs around 200 to 300 Mhz, which are most likely caused by some deficiencies on the module.
Approaching 400 MHz, a tiny amount of image frequency can be seen approaching 600 MHz, but its almost down in the noise. With the Johanson-Filter I expect this image frequency to be absent.

The signal of the ADF4351 has a harmonic at twice the fundamental frequency that is pretty consistent 33 dB weaker than the fundamental. Not quite the level of THD the HP 8648 is capable of, but keep in mind, this is the result of Microstrip-Filters on 0.1mm 2113 Prepreg FR4-Board with no shields over the filters. So adding shields and using the SMD-Filters, I'm guessing the result will be better, maybe even reaching -40dB.
The 3rd harmonic is mostly gone, except for frequencies around the switch-threshold of the filters (800 MHz, 1.5 GHz) - The finer granularity of the filters on the new Mainboard should suppress this third harmonic better.
Output-Power was about 0dBm each time I measured, which equates to an output-power of about +1 dBm at the output of the Filter-Board.

Once I'm done taking the measurements (and I found my USB Floppy-Drive) I'll post the measurements, comparing ADF4351 "RAW"-Output and the filtered one.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on May 05, 2020, 10:43:27 pm
Okay, so here are the measurements I just did with the Spectrum Analyzer first connected directly to the ADF4351 and then filtered, as well as the AD9910. I adjusted the ALC-Circuit to a Level-Control Voltage of 1.25V and 2V Bias-Voltage to avoid driving the amplifier that sits at the output of the filters into saturation.

Please note, the 410 MHz-Measurement is completely off, because the signal path is selected wrong (bug in the selection-routine that I can't fix without an extensive rewrite of the program at this point), but starting at 700 MHz, the correct filter is selected. You can see the effect of the 3 GHz Microstrip-Filter, however. :)
As you can see, second harmonic is down 38dB, while any higher harmonics are completely gone at 700 MHz - At this frequency the 750 MHz LPF by MiniCircuits is selected.
At 1.2 GHz the second harmonic is down 30 dB - Filtering is done by the 1.5 GHz Microstrip-Filter.

The filters on the new board will have more overlap, so especially at lower frequencies, the suppression of harmonics will be better.

The measurements of the AD9910 show a rather clean signal, except for the constant spurs that are appearing in the spectrum.
Since I don't see those in spectra I've found on the internet by other people, I'm guessing those come from external circuitry on the module I've got here (Cheap module from ebay with 1117 regulators and 40 MHz Oscillator), or the way I've programmed the internal PLL of the chip to generate the 1GHz Sample-Clock - There's quite a lot that can be configured and I have stopped fiddling with those values once I got a signal.
The image signal at Sample-Clock / 2 - Output-Frequency that appears around 350 MHz could be a problem, but the Johanson-Filters claim to have -30 dB attenuation at that frequency and I'm using 3 in series, so that should provide sufficient suppression of those signals.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on May 06, 2020, 07:35:34 pm
I've done some additional measurements after I've fixed the bug in the filter-selection.
To set the amplitude correctly, I've used the Automatic Level Control by setting the Level-Voltage to the required value and the Bias-Voltage to about 2 Volts via the DACs on the filter-board.
Starting at around 1.3 GHz the output-power is limited by the amplification on the analog-board and can't exceed -1 dBm anymore.

To look at the signal at frequency-ranges beyond 3.1 GHz, I've used the software SATSAGEN to turn my ADALM PLUTO into a Spectrum Analyzer.
Note: The signals around 3.2 GHz are always there and come from the ADALM PLUTO.

According to the manual of the HP 8648C, the spectral purity should have harmonics weaker than -30 dBc.
My current setup doesn't achieve these figures in all ranges. Especially the higher range, where just the 3 GHz Microstrip-Filter is active, shows significant harmonics.
Also of note is the fact that at 0 dBm output-power the amplifier is being overdriven and distorting the signal.
With the new design, the signal is routed either to the Attenuator or a power-amp/directly to the output, and the amplifier has its P1dB-Point at about 20 dBm instead of 16 dBm.

In the block-diagram included in the large picture, you can see the signal-chain I have currently set up.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on May 07, 2020, 06:29:33 pm
Does anyone here have RF generators by HP, Philips, Tektronix, Rigol, etc. and a Spectrum Analyzer to do similar measurements to compare the spectra of these generators to my prototype-setup?

Title: Re: Open Source HW RF Signal Generator
Post by: rhb on May 07, 2020, 10:06:56 pm
I have an 8648C and an 8566B.  I've also got a 346B noise source, so I should be able to check the 8566B response.

It will take a few days as I'll have to set things up to do the tests.  And moving the 8566B is *not* easy.  And  I just got a bunch of new TE I need to test.

Have Fun!
Reg
Title: Re: Open Source HW RF Signal Generator
Post by: rhb on May 10, 2020, 10:57:50 pm
Here are photos of the 8648C on the 8560A at 100, 200, 500 and 750 MHz at 0 dBm output.  The higher frequencies will require using the 8566B which is a real chore to get to where I can connect it to the 8648C.  I'll try to do that in the next few days.  Complicated by having only spent a few minutes running the 8566B.  Stuff like that is always an educational experience.

[attach=1]

[attach=2]

[attach=3]

[attach=4]

Have Fun!
Reg

BTW the marker info is irrelevant I forgot to turn it off.
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on May 27, 2020, 04:46:37 pm
Did you get around to get the big Analyzer on the bench and get it up and running?

I plan to do a livestream on my (so far mostly gaming related, but I want to expand that) Twitch-Channel www.twitch.tv/saabfan86 (http://www.twitch.tv/saabfan86) on friday (2100 hours central european time / GMT + 2) where I'll explain the design of each functional block and will answer questions from the chat. I hope it works as I intend it to :D

On Sunday I'll do another live stream, which will probably be shorter, where I'll address all the questions I was unable to answer and also discuss any changes or fixes to errors that were discovered during the first live stream.


So far, I think the approach I chose with the filtering and DDS for lower frequencies looks promising when comparing the spectra to the HP 8648C. Especially at frequencies below 400 Mhz. To be honest, I was expecting my system to perform much worse than what I actually observed.
Especially for a device that is supposed to cost less than 300€ in kit-form (Partially assembled Mainboard + Components and Attenuator-Module).

The closest competitor I was able to find in terms of price and features without going to the used market, would probably be the Era Instruments ERASynth Micro. It has a similar frequency range, but cannot go as low as my design, and it's quite a bit smaller. But on the other hand, does not support advanced modulation schemes, arbitrary waveforms and also does not include any filtering of the harmonics in the output.

I hope I can answer all the questions on friday and I'm looking forward to explain my ideas in more detail than possible in a simple forum post :)

Btw. For all those who can't make it on friday, you can send me questions here on the Forum or via Twitch direct Messages. I'll try to answer the questions and the live stream will be recorded and available on twitch for at least one or two weeks.
Title: Re: Open Source HW RF Signal Generator
Post by: rhb on May 27, 2020, 09:52:11 pm
I spent several days working on a LeCroy DDA-120 before giving up for now so I could check an HP  4145B semiconductor analyzer which I had gotten and needed to test. 

Then I suddenly  got a lot of other stuff on my plate.  A new tenant had a burst water line which flooded an office building and I had to deal with drying that out.    I was fixing fluorescent light fixtures rewiring them for 4' LED lamps today.  And I need to install an HVAC system in my house.

The 8566B is at the bottom of a large stack of gear. and I'm rather space constrained right now because of my  TEA binge.  However, I might be able to roll the stack close enough to the 8648C to hook it up.  I'll see if I can move the dolly close enough.

Reg
Title: Re: Open Source HW RF Signal Generator
Post by: SaabFAN on May 29, 2020, 08:54:34 pm
The livestream has happened and I was able to go over all the individual sections in about 1 hour and 30 minutes.

Links to the Videos are here: https://www.twitch.tv/collections/4VVijwCbExbTEA (https://www.twitch.tv/collections/4VVijwCbExbTEA)

Please post your questions and suggestions so I can try to answer as many of them on my sunday livestream that will also happen around the same time as today (2100 hours GMT +2).
And if you've got a Twitch-Account, feel free to follow me on Twitch or hang around in the chat on Sunday for a more direct interaction :)