RF Power Meter V1.1

This device is part of my APRS radio transmitter backpack rig published later on.

PCB layout file, schematic diagram and AVR program available on GitHub: https://github.com/Juvar1/RFPowerMeter
It is designed with KiCad.

Improvements

Here is second version of my RF power meter device. It has improved RF shielding and noise immunity. A little bit more expensive to make but quality pays.

C14 is also added for improving noise immunity from supply line.

C14 added and other SMA connector removed. It’s replaced with T splitter externally.

Casing

Case is bought from Digi-Key. It’s part number is PIP-11766-C. DC jack outer diameter is 5.5mm and inner 2.5mm.

RF Power Meter

This device is part of my APRS radio transmitter backpack rig published later on.

PCB layout file, schematic diagram and AVR program available on GitHub: https://github.com/Juvar1/RFPowerMeter
It is designed with KiCad. Untested!

Introduction

This meter measures the transmitting power of the radio transmitter and the voltage of the battery used as a power source. Power is displayed in watts and dBm. The device has a three-digit LCD display. The functions are controlled by a push button. The unit will automatically turn off after five minutes if the button is not pressed. By pressing once device wakes from sleep mode and show measured power in wats. By pressing again device switches to dBm mode and show power in dBm. Pressing third time device show measured supply voltage.

Comes as a bag of parts kit and is easily assembled if customer can follow the silkscreen indicators and have beginning experience with a soldering iron. Customer will need to read the resistor bands or use a multimeter to determine the resistor sizes.

Works with single 7…14 volts DC power supply connected with DC barrel plug. Internally 5.0V voltage is used through regulator 7805. ADC reference voltage is taken from supply voltage with voltage divider. Its voltage is 2.5V. One analog input is connected with supply voltage also with voltage divider. its voltage is adjusted to a max. of 2.5V at 14V so that accurate voltage measurement is made possible.

The heart of the device is AtMega328P-PU at 16MHz clock frequency. This makes it to be Arduino™ compatible system.

For measuring power, an AD8307 chip is used. It allows the RF power to be converted to a voltage between 0 and 2.5V. The permissible power is between 0 and 1kW. The permissible frequency range is between 10MHz and 1GHz. It is possible to calibrate the measuring range by ± 3dB with on-board trimmer resistor. The output is connected to the analog input of the microcontroller.

Measurement is made with following equations:

dBm = 40(U-1)
W = 10(dBm/10)/1000

The display is a three-digit LCD display. LCD display requires AC voltage. It can be simple square wave signal from DC 5V. Frequency is not critical. It can be between 30-200Hz. Phase difference lights the segment. This device uses regular CMOS series IC’s to control LCD segments. 4056 is used to control digits. Every digit needs own IC. One 4054 is used to control two decimal points and to invert common backplane signal. Frequency is made with Arduino™ PWM output. It is about 30Hz. Below is an self-explanatory illustration.

Current consumption is very low because of CMOS integrated circuits used and AtMega328P power saving mode which is programmatically activated. LCD display consumes very little current compared to regular LED display. Also power measurement circuit ’chip enable’ signal is controlled with AVR.

Physical size of device is with casing 13x13cm. PCB is 10x10cm. Dimensions excludes connectors and push button.

Usage examples

  • Amateur radio station power meter
  • Power measurement

Circuit diagram

Development stage

One prototype has been ordered so far with double sided printed circuit board and with through hole components. UNTESTED at this point. Work is in progress. It is designed with KiCad.

Target MSRP

BOM (bill-of-material) cost with casing and SMA connectors is about 50 euros. It does not include any basic components with standard values (I use my own stock).

10 pieces small batch BOM cost is $64.90 + PCB $3.02. PCB will cost $1.33 in order quantity of 1000 pieces. PCB’s are bought from Itead Studio from China. The components are bought from Digi-Key from USA. The same components can also be purchased from Mouser. The price in larger quantities are much less. If order quantity is 1000 pieces then it costs $40.04 + PCB $1.33. Manufacturing costs should also be taken into account. (In this case packing.) So total cost for parts is roughly $43.00.

Typical distribution margin is 5-7% and retail margin is 15-25% with this type of products. So the MSRP would be between $51.93 and $57.51. Realistic actual selling price would be $79.00.

Advantages

Ease of use. The device has only one button with three functions. ’Plug-and-play’. Safe operating voltage. Safe to use. Hackable design.

Other similar devices

Surecom SW-102 Digital Antenna Power & SWR Meter VHF/UHF 125-525MHz.

Soldering

The project requires no special soldering skills. All components are their through hole versions.

Programming

All parts are open source. The program is solely written in C++. The program is very simple and with its 200 lines of code it uses only 4.6kB of program memory. AtMega328P-PU chip is used.

The bootloader must first be programmed using external programmer. I personally like to use Arduino™ as ISP and Arduino™ IDE. Be sure to choose the Arduino™ Nano from the Tools→Board menu. After installing the bootloader, the program can be uploaded using same setup.

Program does not use any external libraries. Only standard built-in power saving related libraries are used.

Approvals

Arduino is a registered trademark. It is still ok to build a commercial product based on Arduino. Only the name may not be the same. https://www.arduino.cc/en/Main/FAQ#toc10

Battery level indicator

This device monitors battery voltage and shows it on 5 LED’s. Further development will include a use of AVR power saving functions. At this moment circuit uses 31mA. LED position vs. voltage:

  1. <= 12.05
  2. 12.06 – 12.25
  3. 12.26 – 12.45
  4. 12.46 – 12.65
  5. >= 12.66

Full lead acid battery has 12.7V and when it’s empty voltage is under 12.0V. Below is circuit diagram. All works just as planned. Simple math.

Here is Arduino code before power saving functions:

/* battLow2.ino
 * 
 * 
 */

void setup() {
  // initialize LED outputs
  pinMode(9,OUTPUT);
  pinMode(10,OUTPUT);
  pinMode(11,OUTPUT);
  pinMode(12,OUTPUT);
  pinMode(13,OUTPUT);

  // LED's to off state
  digitalWrite(9,HIGH);
  digitalWrite(10,HIGH);
  digitalWrite(11,HIGH);
  digitalWrite(12,HIGH);
  digitalWrite(13,HIGH);
}

void loop() {

  int val = analogRead(A5); // 0 to 1023

  // voltage divider input---56---22---gnd
  // (1023/17.727) * voltage
  if(val <= 695) {
    digitalWrite(9,LOW);
    digitalWrite(10,HIGH);
    digitalWrite(11,HIGH);
    digitalWrite(12,HIGH);
    digitalWrite(13,HIGH);
  } else if(val > 695 && val < 706) {
    digitalWrite(9,HIGH);
    digitalWrite(10,LOW);
    digitalWrite(11,HIGH);
    digitalWrite(12,HIGH);
    digitalWrite(13,HIGH);
  } else if(val >= 706 && val < 718) {
    digitalWrite(9,HIGH);
    digitalWrite(10,HIGH);
    digitalWrite(11,LOW);
    digitalWrite(12,HIGH);
    digitalWrite(13,HIGH);
  } else if(val >= 718 && val < 730) {
    digitalWrite(9,HIGH);
    digitalWrite(10,HIGH);
    digitalWrite(11,HIGH);
    digitalWrite(12,LOW);
    digitalWrite(13,HIGH);
  } else if(val > 730) { // 12.65
    digitalWrite(9,HIGH);
    digitalWrite(10,HIGH);
    digitalWrite(11,HIGH);
    digitalWrite(12,HIGH);
    digitalWrite(13,LOW);
  }
  
  delay(200);
}

After adding power saving things to code current consumption is only 18mA. It contains LED driving current and power dissipation of the linear regulator. AVR restarts every two seconds to make one ADC measurement.

/* battLow2.ino
 * 
 * Displays 12V lead acid battery voltage level on LED bar
 * 
 * Author: jpvarjonen@gmail.com
 * Copyright (C) 2019 Juha-Pekka Varjonen
 */

#include <avr/sleep.h>
#include <avr/wdt.h>
#include <avr/power.h>

void setup() {

  // power up every 2 seconds
  wdt_enable(WDTO_2S);
  // set sleep mode (not activated yet)
  set_sleep_mode(SLEEP_MODE_PWR_DOWN);
  // disable things
  power_spi_disable();
  power_usart0_disable();
  power_twi_disable();
  power_timer0_disable();
  power_timer1_disable();
  power_timer2_disable();
  
  // initialize LED outputs
  digitalWrite(9,HIGH);
  digitalWrite(10,HIGH);
  digitalWrite(11,HIGH);
  digitalWrite(12,HIGH);
  digitalWrite(13,HIGH);
  pinMode(9,OUTPUT);
  pinMode(10,OUTPUT);
  pinMode(11,OUTPUT);
  pinMode(12,OUTPUT);
  pinMode(13,OUTPUT);

  int val = analogRead(A5); // 0 to 1023

  // disable ADC
  power_adc_disable();

  // voltage divider input---56---22---gnd
  // (1023/17.727) * voltage
  if(val <= 695) {
    digitalWrite(9,LOW);
  } else if(val > 695 && val < 706) {
    digitalWrite(10,LOW);
  } else if(val >= 706 && val < 718) {
    digitalWrite(11,LOW);
  } else if(val >= 718 && val < 730) {
    digitalWrite(12,LOW);
  } else if(val >= 730) { // 12.65
    digitalWrite(13,LOW);
  }

  // go to sleep (watchdog will restart)
  sleep_mode();
}

void loop() {
  // nothing here
}

Little improvement to circuit. Now it’s current consumption is only 11mA.