6 - Testing Layout
Indoor Testing
While indoors, make sure not to transmit any signals with the antenna. Only transmit into the spectrum analyzer or in a loopback configuration to the SDR.
Before doing any testing in a loopback configuration, use the spectrum analyzer to confirm that the transmitted power is less than the maximum input power the SDR can handle.
When connecting any SMA cable, make sure to hold the cable and connection point still while you connect it so that the cable does not spin as you tighten the nut, as this can cause damage to the pin. Tighten the nut using the SMA torque wrench (the wrench will bend when the proper tightness is reached).
Spectrum Analyzer Test
To test the program with the spectrum analyzer, you will need the following equipment:
- b205mini SDR
- USB 3.0 Micro B cable (connecting SDR to Pi)
- Raspberry Pi 5
- Raspberry Pi 5 Power Supply (USB C)
- Ethernet cable (connecting Pi to Laptop)
- Ethernet to USB C adapter (if your laptop doesn’t have ethernet)
- 30 dB inline attenuator
- 2 SMA male-male cables
- SMA female-female adapter (or replace one of the male-male cables with a male-female cable)
- SMA torque wrench
- SMA female to N-Type male adapter (probably plugged into the spectrum analyzer RF Input port already)
- Spectrum Analyzer (Rigol DSA832-TG)
- 50 Ohm Load (Found in the Calibration Kit F604MS)
Process
- Ensure the blue ESD mat is properly grounded, and there are no food or drinks nearby.
- Carefully take the 50 Ohm Load out of the calibration kit box. Be very careful while handling this piece of equipment.
- Connect 50 Ohm Load to the “RX2” port on the SDR, ensuring that the load does not spin while the nut is being tightened. Tighten it using the torque wrench.
- Connect this cable to the SMA female-female adapter.
- Connect the SMA female-female adapter to the “IN” port on the 30 dB attenuator.
- Connect the other SMA cable to the “OUT” port on the 30 dB attenuator.
- Connect this SMA cable to the SMA female to N-Type adapter.
- Connect the SMA female to N-Type adapter to the “RF Input” port on the spectrum analyzer if it is not already connected. Take special care that the adapter does not spin while connecting it to this port.
- Turn on the spectrum analyzer.
- Set the Spectrum Analyzer’s frequency to the chirps’ configured center frequency.
- Set the span of the spectrum analyzer to a bandwidth that allows you to see your full chirp in detail.
- Configure your spectrum analyzer to see the maximum value when sampled.
- Follow the steps in the sections above to connect your laptop to the Pi and get all the code ready to run on the Pi.
- Plug the USB 3.0 Micro B cable into one of the blue USB ports on the Pi and plug the other end into the SDR.
- Follow the Running the Code section below on how to run the program.
- When the code is running, you should see the transmissions appear on the spectrum analyzer. To see the peak transmitted power, press “Peak”. Ensure that this value is less than the SDR’s max input power before doing any loopback or outdoor testing.
- Since the SDR is not receiving any samples, you will see receiver errors printed to
uhd_stdout.log, andrx_samps.binwill be empty.
Loopback Test
To get any actual data from the SDR, we must both transmit and receive signals by connecting the SDR to itself in a loopback configuration.
Before running the program in this configuration, make sure that you have tested your current code and config settings with the spectrum analyzer method above, and that the peak power is less than the SDR’s max input power (-15 dBm)!
When connecting the b205mini to itself, you should always use a 30 dBm attenuator!
- Follow the steps in the Spectrum Analyzer section above to set up the hardware and test it with the spectrum analyzer. Confirm that the program works and the peak power is less than -15dBm.
- Stop all transmissions, and do not transmit again until everything has been reconnected. You can unplug the SDR from the Pi to ensure this cannot happen.
- Disconnect the SMA cable from the adapter on the spectrum analyzer.
- Carefully disconnect the 50 Ohm Load and place it back in the box.
- Connect the SMA cable to the “RX2” port on the SDR.
- Plug the SDR back into the Pi if you disconnected it previously.
- Follow the Running the Code section below to run the program.
Running the Code:
Now that you’re connected to the Pi and have hardware set up, you can run the code with the following commands:
cd uhd_radar/conda activate uhd- Check your config settings are set correctly with
nano config/<your-file>.yaml- If you are using the B205-mini, make sure the following values in
RF0(not RF1) section are set:tx_gainshould not exceed ~80 dBrx_gainshould not exceed 76 dBtx_antshould be set to"TX/RX"rx_antshould be set to"RX2"transmitshould be set toTrue
- If you are using the B205-mini, make sure the following values in
- run
make hardware-test - run
python run.py config/<your-file>.yaml- If you have
num_pulsesset to-1, then you must stop the program withCtrl+C
- If you have
- To view the output data, transfer the desired data files to a laptop, ensure the
PLOTsection has been copied to the config file (it can be found insynthetic-config.yaml) and update the parameters in that section to match the names of the trial you wish to view - Plot the output with
python postprocessing/plot_samples.py data/<timestamp>_config.yaml