Keep control of your wireless environment with RF meters, putting the power to measure and manage radio frequency signals right in your hands
A
A
Hardware Overview
How does it work?
RF Meter Click is based on the AD8318, a logarithmic detector/controller from Analog Devices. It is a demodulating logarithmic amplifier capable of accurately converting an RF input signal to a corresponding decibel-scaled output voltage. It employs the progressive compression technique over a cascaded amplifier chain, with each stage equipped with a detector cell. The AD8318 can be used in measurement or controller mode of operation. It maintains accurate log conformance for signals of 1MHz to 6GHz and provides operation up to 8GHz. The input range is typically 60dB with an error of less than ±1dB and a 10ns response time that enables RF burst
detection beyond 45MHz. In addition, the AD8318 comes with an integrated temperature sensor with independent output, which can be used for temperature compensation. The voltage output of the AD8318 goes to the MCP3201, a successive approximation 12-bit analog-to-digital converter with an onboard sample and hold circuitry from Microchip. This ADC provides a single pseudo-differential output, with sample rates of up to 100ksps. To provide correct values, this Click board™ uses an AP7331 LDO linear regulator to provide referent voltage to the MCP3201. The RF Meter uses a 3-wire SPI serial interface of the MCP3201 to communicate to the host MCU
over the mikroBUS™ socket. The RF Meter can use either an SPI mode 0 or an SPI mode 1, depending on the needs. The readings of the independent temperature sensor of the AD8318 can be read over the OUT pin mikroBUS™ socket, giving analog values. This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the LOGIC LEVEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Features overview
Development board
PIC Clicker is a compact starter development board that brings the flexibility of add-on Click boards™ to your favorite microcontroller, making it a perfect starter kit for implementing your ideas. It has an onboard 8-bit PIC microcontroller, the PIC18F47J53 from Microchip, a USB connector, LED indicators, buttons, a mikroProg connector, and a header for interfacing with external electronics. Thanks to its compact design with clear and easy-recognizable silkscreen markings, it provides a fluid and immersive working experience, allowing access anywhere and under any
circumstances. Each part of the PIC Clicker development kit contains the components necessary for the most efficient operation of the same board. In addition to the possibility of choosing the PIC Clicker programming method, using USB HID mikroBootloader, or through an external mikroProg connector for PIC, dsPIC, or PIC32 programmer, the Clicker board also includes a clean and regulated power supply module for the development kit. The USB Mini-B connection can provide up to 500mA of current, which is more than enough to operate all onboard and additional
modules. All communication methods that mikroBUS™ itself supports are on this board, including the well-established mikroBUS™ socket, reset button, and several buttons and LED indicators. PIC Clicker is an integral part of the Mikroe ecosystem, allowing you to create a new application in minutes. Natively supported by Mikroe software tools, it covers many aspects of prototyping thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.
Microcontroller Overview
MCU Card / MCU
![default](https://dbp-cdn.mikroe.com/catalog/mcus/resources/PIC18F47J53/PIC18F47J53.jpg)
Architecture
PIC
MCU Memory (KB)
128
Silicon Vendor
Microchip
Pin count
44
RAM (Bytes)
3800
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Schematic
![RF Meter Click Schematic schematic](https://dbp-cdn.mikroe.com/catalog/click-boards/resources/1ee7909b-d87a-623c-9f05-0242ac120009/schematic.webp)
Step by step
Project assembly
Track your results in real time
Application Output
After loading the code example, pressing the "DEBUG" button builds and programs it on the selected setup.
![Application Output Step 1](https://dbp-cdn.mikroe.com/cms/shared-resources/1eed554e-d80f-6694-8cb9-02420a000272/AP-Step1.jpg)
After programming is completed, a header with buttons for various actions available in the IDE appears. By clicking the green "PLAY "button, we start reading the results achieved with Click board™.
![Application Output Step 3](https://dbp-cdn.mikroe.com/cms/shared-resources/1eed5550-3c0f-6800-a19f-02420a000272/AP-Step3.jpg)
Upon completion of programming, the Application Output tab is automatically opened, where the achieved result can be read. In case of an inability to perform the Debug function, check if a proper connection between the MCU used by the setup and the CODEGRIP programmer has been established. A detailed explanation of the CODEGRIP-board connection can be found in the CODEGRIP User Manual. Please find it in the RESOURCES section.
![Application Output Step 4](https://dbp-cdn.mikroe.com/cms/shared-resources/1eed5550-d4d0-6b20-a348-02420a000272/AP-Step4.jpg)
Software Support
Library Description
This library contains API for RF Meter Click driver.
Key functions:
rfmeter_get_signal_strenght
- Function is used to calculate radio frequency signal strenght in a vicinity
Open Source
Code example
This example can be found in NECTO Studio. Feel free to download the code, or you can copy the code below.
/*!
* \file
* \brief Rfmeter Click example
*
* # Description
* Demo app measures and displays signal strenght by using RF Meter click board.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initalizes SPI, LOG and click drivers.
*
* ## Application Task
* This is an example that shows the capabilities of the RF Meter click by
* measuring radio frequency signal strenght.
*
* \author Jovan Stajkovic
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "rfmeter.h"
// ------------------------------------------------------------------ VARIABLES
static rfmeter_t rfmeter;
static log_t logger;
static float signal;
// ------------------------------------------------------- ADDITIONAL FUNCTIONS
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
rfmeter_cfg_t cfg;
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
// Click initialization.
rfmeter_cfg_setup( &cfg );
RFMETER_MAP_MIKROBUS( cfg, MIKROBUS_1 );
rfmeter_init( &rfmeter, &cfg );
log_printf( &logger, "----------------------- \r\n" );
log_printf( &logger, " RF Meter Click \r\n" );
log_printf( &logger, "----------------------- \r\n" );
}
void application_task ( void )
{
signal = rfmeter_get_signal_strenght( &rfmeter, RFMETER_DEF_SLOPE, RFMETER_DEF_INTERCEPT );
log_printf( &logger, "Signal strenght: %.2f dBm \r\n", signal );
Delay_ms( 1000 );
log_printf( &logger, "-----------------------\r\n" );
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END