Jump to content

Recommended Posts

Mr.RC-Cam    120

Measuring Video Transmitter (vTx) RF power and checking antenna performance are two things a lot of FPV'ers would like to do. ImmersionRC sells a nice RF Power Meter but its $150 USD price tag is a problem for most hobby budgets.

But I have low cost solution for you. How about a DiY digital RF Power meter for less than $30 USD?  Its 433MHz to 5.8GHz frequency range means it can handle all your FPV devices. Max input level is 0dBm, but much higher RF power is acceptable with an external attenuator (budget $20). And it can measure antenna VSWR if you add a RF Directional Coupler (budget $65).

Here's what it looks like:

vswr_meas2_800.jpg

 

Here's an example of a VSWR measurement. Just a couple keypad presses is all it takes to measure the antenna:

vswr_meas1b_1000.jpg

 

The 3D printed plastic case shown above is not required, but looks fantastic. Inside is a Arduino Mega R3 board ($12), LCD/Keyboard shield ($3), and AD8318 RF power sensor board ($12).  These parts are available from from eBay and Banggood retailers.

internal_view2_1200.jpg

Assembly involves soldering 3 wires, 2 resistors, and a capacitor. Then flash the firmware using the Arduino Mega's built-in USB port. Low cost and quick assembly, who doesn't love that?

 

Share this post


Link to post
Share on other sites
Mr.RC-Cam    120

This DiY build has a short parts list. You'll need:

Plus about 1.5 feet of 28 to 32 AWG 3-conductor wire. You can get this from an old USB cable.

For measuring vTx power up to 1 Watt you'll need a fixed 30dB attenuator. I'm using the Mini-Circuits VAT-30W2+. At $20 it is a good value since it has a predictable attenuation curve and supports all the FPV frequencies. You can measure more than 1W with a higher value attenuator. But wary of those cheap Chinese attenuators on eBay; Their low price is due to their sloppy variations in attenuation.

VSWR measurements will require a RF Directional Coupler.  I'm using a Krytar 0955-0098 that I got off eBay for $50. It is rated for 2-8GHz applications, but I found that mine also handled 900 -1300MHz device measurements with good results too.

Share this post


Link to post
Share on other sites
Mr.RC-Cam    120

You can build the meter without a fancy enclosure.  But if you have access to a 3D printer then I recommend making the custom plastic case.

The case was originally created/published by contributor Vector_Mayhem on Thingiverse: https://www.thingiverse.com/thing:142282

But I modified the Case's Top cover and Button KeyPad for the RF Power Meter. Here's my revised files:

Custom Button Pad File: Button_Pad1.stl

keypad_stl1_1000.jpg

 

Custom Case Top File: Case_Top1.stl

Case_Top1_1000.jpg

 

3D Printing Tips:
1. You can use PLA or ABS.
2. Be sure to scale the files to account for shrinkage of YOUR filament. For example, I used ABS and that requires 101% scaling.
3. I suggest 40% infill with 3 solid layers on the top, bottom, and perimeter.
4. Do NOT remove the tree that holds the Button Pad's keycaps together (be gentle when pulling the part from your print bed).
5. The five captive keycaps on the Button Pad must smoothly fit in the case top. Trim or file as needed to eliminate any binding.


 

Share this post


Link to post
Share on other sites
Mr.RC-Cam    120

Electronic Assembly Instructions

STEP 1:
Begin assembly by plugging the LCD Keypad board into the Arduino Board. The LCD Keypad board goes on top and it must be carefully offset to the left side as shown below:

PCB_Stack1_1200.jpg

Initially it may seem to be a mystery on how to correctly align the two boards. Fortunately the various connectors are silkscreened with pin-out labels. I suggest finding "A5" on both boards and then plug them together so that the A5 positions match up. Double check your work!


STEP 2:
Solder the 100pF SMD cap to the empty component position on the RF Power board, as shown below:

RF_Board_Cap1_1200.jpg

 

STEP 3:
Solder the two resistors to the Arduino Board as follows (see photo below):
  470 ohm: A1 to GND
  3.3K ohm: A0 to GND

Shield_Wiring1_1200.jpg

Note: Use the GND solder pad that is located on the left side of the arrow pointer shown above.

STEP 4:
Connect the RF Power board to the Arduino using small gauge (28-32AWG) 3-conductor twisted wire, as follows:
NOTE: The wire's length should be short as practical. 

  WHITE: RF Board OUT to Arduino A1
  BLACK: RF Board GND to Arduino GND (right side of arrow pointer shown above)
  RED: RF Board VCC to Arduino VIN

OPTIONAL: I wrapped the wires around a 10mm diameter Toroid to minimize any common mode noise from the RF sensor board. The Toroid wraps should have at least 10 turns. The Toroid filter might not be necessary but provides a bit of insurance against unexpected problems.

RF_Board_Toroid1_800.jpg

 

If you've made the 3D printed enclosure then now is a good time to install everything in it.

Assembly is complete. All that remains is to flash the firmware.

 

Share this post


Link to post
Share on other sites
Mr.RC-Cam    120

The Arduino board has a built-in USB port for firmware flashing. The internet is full of How-To's that explain the flashing process, so I won't repeat the details here. If you are new to Arduino then be prepared to watch some YouTube videos and/or visit some web sites.

Note: This Arduino project will compile without any errors on Arduino IDE Version 1.8.1. To avoid compile failure frustrations I suggest you use this version too.

In the Arduino Tools menu choose these two settings before flashing the Arduino sketch file: 
  Board: Arduino/Genuino Mega or Mega 2560
  Processor: ATmega2560 (Mega 2560)

1. Assuming you already have the Arduino IDE installed on your PC, begin by downloading the project's zipped firmware file set.

      Version 2.0: RF_Power_Meter.zip

2. Unzip the files in a Arduino working directory named RF_Power_Meter.

3. Flash the Arduino and wait for the file transfer to end.

A few seconds after flashing is complete you will see the power meter's boot messages, beginning with the "RF POWER METER" title. At the end of the boot sequence the meter will display "HARDWARE PROBLEM, RF SENSOR FAILS". Then a few seconds later it will display "OVERLOAD WARNING, DISCONNECT NOW!" Ignore these warnings for now, they occur whenever the meter's main battery power is missing. That is to say, the USB connection on its own doesn't provide voltage to the RF sensor so it will fail the start-up tests.

4. Disconnect the USB cable. Apply 2S-3S LiPO battery power (7V - 12V).

5. At the end of the boot sequence the meter should display the "NO RF Signal" message. Congrats, the meter is working!

At this point the meter should be functional. Go ahead and use the keypad to explore the menus to see the available functions and settings.

 

Share this post


Link to post
Share on other sites
Mr.RC-Cam    120

The AD8318 RF sensor's data sheet advises performing a board-level calibration to ensure measurement accuracy. Here is the datasheet, see Device Calibration section: AD8318.pdf

Calibrating the meter will ensure accurate RF power measurements. However, if you only intend to use the meter's VSWR function then calibration is NOT necessary. But no doubt you'll want to measure RF power too, so plan on performing the calibration procedure.

What does this all mean? Editing the calibration data in the Arduino source code is needed for each RF band you intend to measure. The Arduino config file has two data arrays that holds the sensor's Slope (gain) and Intercept (offset) calibration information.

The two data arrays are found in the config.h file, as follows:
   slope data array: MV_DB_SLOPE [ ]
   intercept data array: DBM_AT_0V [ ]

Each array has six values that relate to the meter's six supported RF bands. The data values are arranged in this order: 433, 900, 1200, 2400, 3300, 5800.

The calibration data began as values determined from the datasheet that were further optimized by using a trusted RF power meter and attenuator. Fortunately I have other RF power measuring equipment that is accurate, so I used it to determine the final calibration data for my DiY meter.

You'll need to do a similar meter measurement comparison to find the best calibration values. So plan on hunting down a FPV buddy that has a reliable (calibrated) RF meter and attenuator. Beg/bribe and borrow it. For example, the ImmersionRC's power meter is fine for this task.

Share this post


Link to post
Share on other sites
Mr.RC-Cam    120

As mentioned, each RF band that you intend to use will need to be calibrated. In this example we'll calibrate the meter's 900MHz band using a 910MHz FPV video transmitter (vTx).

The items you'll need are as follows:
  1 each, 910MHz vTx (25mw to 800mW).
  2 each, 30dB fixed attenuator. MiniCircuits' VAT-30W2+ is recommended.
  1 each SMA-SMA adapter or very short coax patch cable.
 

PART 1: Slope Calibration (900MHz)

1. Apply power to the meter and wait a few seconds for the main measurement screen to appear.

2. Press the Enter key. Use the Up/Down keys and set the meter to the 900MHz band.

3. Press Enter again. Use the Up/Down keys and set the meter's Atten Profile to match your attenuator's value. For example, if using a VAT-30W2+ then select that entry. Otherwise use the Custom entry and set the correct dB value for your attenuator. Press Enter one more time to exit the setting mode.

4. Use the SMA-SMA adapter and connect the 900MHz vTx and one (1) attenuator to the meter.

5. Apply Power to vTx and confirm you see a dBm / mW value.

6. Now use the Up key and select the Relative RF Diff mode. Press the Enter key to zero the value. See the photo below.

slope_meas1_1000.jpg


7. Remove power from the vTx and install the second attenuator. The second attenuator will be measured and used to calibrate the meter.  Reapply vTx power. See photo below:
slope_meas2_1000.jpg

8. The measured attenuation value will be shown on the meter's display.

IMPORTANT: ALL attenuators have frequency dependent tolerances. That is to say, the actual dB value will vary depending on the measured frequency. In this example I am measuring a VAT-30W2+ attenuator and its datasheet shows that typical 900MHz attenuation will be 29.7dB to 29.8dB.

If the measured value is incorrect then the RF sensor's 900MHz slope value will need adjustment. This requires editing / reflashing the Arduino code.  I won't explain how to use the Arduino IDE to edit the code because there are endless YouTube tutorials that will do a better job of teaching you the basics.

9. Calibrating the slope measurement begins by opening the config.h file. Find the MV_DB_SLOPE array directly below the AD8318 SECTION BEGINS HERE text region. The six comma separated Slope values are ordered by RF band (433, 900, 1200, 2400, 3300, 5800). The second value is the 900MHz band's slope data.  Identify this value -- it is the one you will edit.

10. If the displayed measurement is too large then decrease the slope value. If the value is too low then increase the value. The exact amount of the change should be small, perhaps try ±0.0005. After editing the value, save the file, then flash the Arduino board. Repeat these slope calibration steps until the meter accurately measures the attenuator's expected value.

 

Share this post


Link to post
Share on other sites
Mr.RC-Cam    120

Now that the 900MHz slope value is calibrated we can move on to the Intercept calibration.

PART 2: Intercept Calibration (900MHz)

Come back soon for details...

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×