It has been a long time since my last blog post (WeakSignalTransmitter - part 2 - filter design ) but the Si5351 is still not available and I had other things to do.
But I managed to get a breakout board for the Si5351 and attached it to my filter and did some measurements.
Arduino Sketch
The Si5351 is controlled via I2C. It has the addresses 0x60 or 0x61 which can be chosen by strap pins. But the device in the MSOP-10 package has only the 0x60 option.
And this is a problem for Arduino: I wanted to use the device with an Arduino MKR WiFi 1010 or Nano 33 IoT but these boards have an ATECC608 on board at exactly the same address. I didn't want to rework my Arduino boards so I decided to go with an Adafruit Feather M0 which has no onboard I2C devices. For my final design this won't be a problem because the address of the used Si5351 in the QFN package can be changed to 0x61.
The sketch itself is quite straight forward. I used the etherkit Si5351Arduino library ( https://github.com/etherkit/Si5351Arduino ). For my first test I only wanted to have a 50 MHz clock on the CLK0 output. So I used the si5351_example of the library and changed it to 50 MHz on CLK0 and disabled CLK1.
This is the sketch:
/* * this example generates a 50 MHz clock on CLK0 * it is based on: * si5351_example.ino - Simple example of using Si5351Arduino library */ #include "si5351.h" #include "Wire.h" Si5351 si5351; void setup() { bool i2c_found; // Start serial and initialize the Si5351 Serial.begin(57600); while (!Serial); // wait for serial monitor i2c_found = si5351.init(SI5351_CRYSTAL_LOAD_8PF, 0, 0); if(!i2c_found) { Serial.println("Device not found on I2C bus!"); } // Set CLK0 to output 50 MHz si5351.set_freq(5000000000ULL, SI5351_CLK0); // Query a status update and wait a bit to let the Si5351 populate the // status flags correctly. si5351.update_status(); delay(500); } void loop() { }
Spectrum analyzer
To see the generated signal and its harmonics you need a spectrum analyzer. I don't have one because they usually cost a few thousand euros. So I needed another way to test it.
There exist USB DVB-T sticks based on the RTL28xx chip set which are widely used in ham radio. They are SDR receivers which can receive frequencies from around 30 MHz up to 1600 MHz or even more. They cannot only receive DVB-T signals but any signal in the frequency range and decode it (with the right software on your computer). And they are very cheap, starting at a few euros.
And with the right software they can do something similar to a spectrum analyzer.
Of course with a few limitations:
- receiver not linear: Two signals with 1 dBm at 50 MHz and 500 MHz won't be received with the same signal strength
- limited dynamic range: only about 40 to 50 dB from background noise to strongest signal. Real spectrum analyzers should have up to 100 dB
- limited frequency range: signals lower than about 30 MHz cannot be measured
- can only receive weak signals: So protect it against strong signals.
- weird intermodulation products: sometimes you see signals which aren't there.
But for the price tag I think this is OK and they can tell you at least if a signal is there. Especially if you compare two setups.
And this is what I wanted to do. First I measured the signal directly from the Si5351 with all the harmonics and then I measured again with my filter in place, where all my harmonics should have disappeared.
Hardware setup
This shows my test setup.
From left to right it shows:
- Adafruit Feather M0 to control the clock generator
- Si5351 breakout board
- my pcb with the filter
- DVB-T stick with RTL2832
- and some USB cables to connect it to the computer.
For the measurements without the filter I disconnected the filter and connected the DVB-T stick directly to the output of the Si5351 breakout board.
measurements
The RTL28xx has only a band width of up to 3.2 MHz. So you need a software which does all the measurements and plots all the results in one image.
I went with "Spektrum": https://github.com/pavels/spektrum
And these are the results:
Measurement without filter:
Measurement with filter:
As I have written before the RTL2832 as analyzer has some limitations. Most of them can be seen in the first measurement: The harmonics of the 50 MHz signal should all have lower amplitudes but they don't. It seems like the RTL2832 is more responsive at higher frequencies. Additionally there are some signals at 100 MHz and 200 MHz which shouldn't be there. I assume they are related to the measurements.
But the second measurement shows that all the harmonics disappear. So I think the filter works correctly and that is what I wanted to know.
Next I will write the sketch so that the transmitter will generate the desired signal.