element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Internet of Things
  • Technologies
  • More
Internet of Things
Forum DIY an RF power meter Based on STM32F103 + MAX4003
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Internet of Things to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 2 replies
  • Subscribers 515 subscribers
  • Views 58 views
  • Users 0 members are here
  • diy
  • rf power meter
Related

DIY an RF power meter Based on STM32F103 + MAX4003

iotservice
iotservice 13 hours ago

As we all know, Radio frequency (RF) is a very important segment of the IoT industry. 

When learning RF technology, power is a critical indicator that must be mastered. Testing RF power usually requires a spectrum analyzer or an RF power meter. However, spectrum analyzers are too expensive for beginners who are new to RF like me, and even the cheapest RF power meters cost hundreds of RMB. For electronics enthusiasts who follow the principle of "spend when you should, save when you can", DIYing an RF power meter is a great alternative.

The first step was to define the functions and design the hardware circuit. To test RF power, a chip called a detector is required. I had not found a suitable option for a long time as it was my first time working with an RF detector, until I saw the power detection module on the E25-C test baseboard, which uses a Maxim MAX4003 for power acquisition.

The MAX4003 RF detector chip supports a frequency range of 100MHz to 2.5GHz, with an input range of -45dBm to 0dBm. It is very cost-effective at only 6 RMB, and its parameters fully meet the requirements. Its stability during testing is also proven in practical use, so I finally chose this detector as the core device of this DIY power meter.

Next was the selection of the MCU chip. I used the well-known STMicroelectronics STM32F103TBU6, which integrates a 12-bit successive approximation ADC (analog-to-digital converter), a 72MHz Cortex-M3 ARM processor, and 128KB of on-chip program memory. The main reasons for choosing it are its QFN36 package and integrated USB controller.

For the display part, a 1.3-inch monochrome LCD screen with ST7565 main controller is used, which communicates via the SPI interface and has a resolution of 128*64. It is fully sufficient for displaying collected data and other information.

In addition, a Texas Instruments OPA333A high-precision operational amplifier is used to amplify the analog signal output by the detector and send it to the ADC pin of the MCU. A GT20L16S1Y chip provides the Chinese character library. The power supply adopts a TYPE-C port, and the voltage is regulated by ME6211 to supply power for the chips. A REF3033AIDBZR reference chip is used to provide the reference source for the ADC.

After the hardware selection and circuit design were completed, the software design was carried out. STM32CUBEMX was used for project configuration, and development was based on HAL library functions. After initializing the ADC, the HAL_ADCEx_Calibration_Start function was used to self-calibrate the ADC. The TIM2 timer was enabled and the interrupt was activated for regular collection of the voltage value output by the RF detector. The ADC performs cyclic collection 10 times and calculates the average value to implement software filtering. For the convenience of wiring during PCB design, the hardware SPI interface of the MCU was not used to operate the screen and the character library chip, so the IO port was used to simulate the software SPI timing to operate the LCD screen and read/write the character library chip.

In addition to the 16*16 GB2312 Chinese character library and character library, the GT20L16S1Y character library chip also has 64KB of freely erasable space from address 0x6FFFF to 0x7FFFF (start address 0X7000), including 16 sectors. This storage space is used to store power calibration parameters.

In addition, necessary functions such as compensation settings have been added. Since the input signal of MAX4003 cannot exceed 0dBm, most signals need to be tested in conjunction with an external attenuator, so software compensation is required for accurate readings. 10 sectors are set to store 10 frequency points, compensation and calibration parameters. To make it easy to set these parameters, a setting menu is written, through which you can select the current frequency point, set the current software compensation and frequency, calibrate the current frequency, save the set parameters and other functions.

During testing, an external high-precision RF signal source was used. It was found that the MAX4003 chip has excellent linearity in the range of -7dBm to -43dBm, so a trade-off was made: 31 calibration data acquisitions were carried out from -10dBm to -40dBm and saved as an array. When the data is measured, the nearest low value is queried from the 31 sets of data for display, and the decimal value between the nearest high value and low value is calculated. After measurement, the test accuracy is excellent, which meets my needs for power measurement as an RF beginner.

The preliminary functional design of the small power meter has been completed. The hardware reserves the TP4055 battery management chip and independently controllable power management. A battery will be added to this small power meter later to use it as a portable power meter.

  • Sign in to reply
  • Cancel

Top Replies

  • aspork42
    aspork42 6 hours ago +1
    I like this! Any photos or videos you could share?
Parents
  • aspork42
    aspork42 6 hours ago

    I like this! Any photos or videos you could share?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • aspork42
    aspork42 6 hours ago

    I like this! Any photos or videos you could share?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube