How does it work?
RMS to DC 2 Click is based on the AD8436, a low-cost, low-power, true RMS-to-DC converter from Analog Devices. It computes a precise DC equivalent of the RMS value of AC waveforms, including complex patterns such as those generated by switch mode power supplies and triacs. The accuracy conversions crest factor spans between 1 and 10. On-board buffer amplifiers enable the widest range of options, while the built-in high-impedance FET buffer provides an interface for external attenuators, frequency compensation, or driving low-impedance loads. A matched pair of internal resistors enables an easily configurable gain of two or more, extending the usable input range even lower.
The RMS or Root Mean Square is used to describe the input signal’s power: the current’s RMS value is equal to a DC current value that would produce the same heat dissipation on the resistive load. Therefore, it is often important to know the RMS value of the signal. RMS to DC 2 Click allows measuring of the RMS value of a periodically repetitive signal.
The output values of the AD8436 can be read over the analog-to-digital converter of the host MCU or over the MCP3221, a low-power 12-bit ADC from Microchip. The selection can be made over the ADC SEL jumper, where the MCP3221 is set by default. There are two terminals on RMS to DC 2 Click. The VEXT supplies the RMS core of the AD8436 with a voltage of 4.8 to 36V, while the INPUT is the AC signal input terminal.
RMS to DC 2 Click can use the analog AN pin of the mikroBUS™ socket or the I2C interface of the MCP3221 to communicate with the host MCU and read the RMS value. The default choice is the MCP3221, with its standard and fast modes of the I2C interface supporting frequencies of up to 400KHz.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL 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.
Specifications
Type
Measurements
Applications
Can be used for the development of various true RMS digital multimeter applications, panel meters and gauges, AC + DC measurement applications, a true RMS measurement of an audio signal, and other similar applications that require accurate RMS value readings
On-board modules
AD8436 – low-power true RMS-to-DC converter from Analog Devices
Key Features
Fast settling at the input level, high accuracy, wide dynamic input range, wide bandwidth, zero converter DC output offset, no residual switching products, accurate conversion with crest factors up to 10, precision DC output buffer, and more
Interface
Analog,I2C
Feature
ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on RMS to DC 2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2 | ADC SEL | Right | Output Signal A/D Selection AN/I2C: Left position AN, Right position I2C |
RMS to DC 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
External Supply Voltage | 4.8 | – | 36 | V |
Bandwidth | – | – | 1 | MHz |
Input Range | – | – | 3 | Vrms |
Software Support
We provide a library for the RMS to DC 2 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for RMS to DC 2 Click driver.
Key functions
-
rmstodc2_set_vref
This function sets the voltage reference for RMS to DC 2 click driver. -
rmstodc2_read_voltage
This function reads raw ADC value and converts it to proportional voltage level.
Example Description
This example demonstrates the use of the RMS to DC 2 Click board™ by measuring the RMS voltage of the input signal.
void application_task ( void )
{
float voltage = 0;
if ( RMSTODC2_OK == rmstodc2_read_voltage ( &rmstodc2, &voltage ) )
{
log_printf( &logger, " RMS voltage : %.3f[V]rnn", voltage * RMSTODC2_RMS_VOLTAGE_COEF );
Delay_ms( 1000 );
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.RMStoDC2
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.