OFF
MIKROE-4221
19 g
Status:
AN to PWM 2 Click is a compact add-on board that contains an easy-to-use component that converts the value of the input analog signal to a fixed frequency PWM voltage output, with a duty cycle proportional to the input voltage. This board features the LTC6992CS6, a silicon oscillator with an easy-to-use analog voltage-controlled pulse width modulation (PWM) capability from Analog Devices. It features the PWM signal controlled by analog input in range of -2.5V to 2.5V, frequency range up to 1 MHz, frequency error less than 1.7%, and it has good temperature stability. It has many features that make it well suited for heater control, PWM servo loops, LED dimming, signal isolation, and other duty cycle control applications.
AN to PWM 2 Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
This product is no longer in stock
Availability date:
AN to PWM 2 Click is based on the LTC6992CS6, a voltage-controlled PWM generator from Analog Devices. This device is chosen because it keeps its output clocking at all times, and it offers glitch-free, a first cycle-accurate startup within 500μs of Power-On. The output of the this Click board™ can source or sink up to 16 mA, and it has a linear response, so applying a voltage in a range of -2.5 to 2.5V on its input, will result in generating the PWM pulse train with duty cycle linearly proportional to the input voltage. The output PWM signal is brought to the INT pin of the mikroBUS™ socket to enable fast and precise duty cycle measurement using the interrupt routines.
The LTC6992CS6 has a MOD pin which represents pulse-width modulation input where is necessary to bring an analog signal. To bring the corresponding signal to that pin, this Click board™ uses an analog circuitry made of OpAmp AD8616ARZ from Analog Devices. In the first part of the circuit, amplifier OPA1 attends to adjust the input signal through a reference voltage of 2.5V by the MCP1525 from Microchip and applied input voltage in a range of -2.5 to 2.5V. The next part of the circuit is the voltage divider and amplifier OPA2 which has the function of a buffer, after which the signal required by the MOD pin of the LTC6992CS6 is obtained.
The output frequency can range up from 3.81Hz to 1MHz and is controlled via the AD5171, a 64-position (OTP) digital potentiometer from Analog Devices, which programs the LTC6992CS6’s internal master oscillator frequency. The output frequency is determined by this master oscillator and an internal frequency divider programmable to eight settings from 1 to 16384. It communicates with MCU using the standard I2C serial interface that operates at clock rates up to 400 kHz and represents the most accurate way to set the frequency. It’s also left the possibility to adjust the frequency via resistors RH and RL by placing resistors of appropriate resistance.
This Click Board™ is designed to be operated only with a 5V logic level. A proper logic voltage level conversion should be performed before the AN to PWM 2 Click is used with MCUs with different logic levels. More information about the LTC6992CS6’s functionality, electrical specifications, and typical performance can be found in the attached datasheet. However, the Click board™ comes equipped with a library that contains easy-to-use functions, and a usage example that can be used as a reference for the development.
Type
ADC
Applications
Can be used for heater control, PWM servo loops, LED dimming, signal isolation, and other duty cycle control applications.
On-board modules
AN to PWM 2 Click is based on the LTC6992CS6, a voltage-controlled PWM generator from Analog Devices.
Key Features
Low power consumption, good temperature stability, wide frequency range, low frequency error, and more.
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
5V
This table shows how the pinout on AN To PWM 2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Input Supply Voltage | -2.5 | - | +2.5 | V |
Output Current | - | ±20 | - | mA |
Output Frequency | 3.81 Hz | - | 1 | MHz |
We provide a library for the AN to PWM 2 Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE 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 AN to PWM 2 Click driver.
Key functions
antopwm2_set_frequency
This function sets a frequency output in a range from 500kHz to 1MHz by setting the digipot resistance.
antopwm2_set_frequency_otp
This function sets a frequency output in a range from 500kHz to 1MHz by setting the digipot resistance in OTP mode.
Example Description
This example demonstrates the use of AN to PWM 2 Click by changing the PWM output frequency from 500kHz to 1MHz in steps of 50kHz.
void application_task ( void )
{
static uint32_t freq = ANTOPWM2_FREQ_MIN;
if ( ANTOPWM2_OK == antopwm2_set_frequency ( &antopwm2, freq ) )
{
log_printf ( &logger, " Frequency: %lu Hzrnn", freq );
}
freq += 50000;
if ( freq > ANTOPWM2_FREQ_MAX )
{
freq = ANTOPWM2_FREQ_MIN;
}
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
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:
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 MIKROE compilers.
This Click board™ is supported with mikroSDK - MIKROE 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.
NOTE: Please be advised that any peripheral devices or accessories shown connected to the Click board™ are not included in the package. Check their availability in our shop or in the YMAN section below.