Skip to product information
1 of 4

MikroElektronika

VREG 2 click

VREG 2 click

SKU:MIKROE-3055

Regular price Rs. 2,209.00
Regular price Sale price Rs. 2,209.00
Sale Sold out
Taxes included.

Out of stock

VREG 2 click is a voltage regulator click, with outstanding performances. It has a steady output voltage with the ripple lower than 5mV, short circuit protection with the LED indicator, and high efficiency with minimal power dissipation. The main output regulation element is the LM317, a well-established adjustable voltage regulator, often used in various electrical designs, for its outstanding regulation characteristics. The supporting electronics allows for the reduced dissipation, voltage regulation and short-circuit indication. It consists of the LM358, a dual operational amplifier (op-amp) with high voltage gain, and the LM2596 buck converter. The VREG 2 click can be used with the input voltage in the range of 10V to 35V, and output voltage in the range of 2.5V to 15V, with current up to 600mA.

Due to its performance, this Click board™ can be used for applications which require low ripple regulated voltage within a range between 2.5V and 15V. It can be also used for wall adapter regulators, general purpose power supplies, distributed supply regulators, and similar applications where voltage regulation with the low ripple and wide input voltage range is required.

How does it work?

The electrical circuit on this Click board™ consists of two voltage regulators of which one is a linear voltage regulator, while the second is a switching step down converter also known as the buck converter. Such topology combines the benefits of both worlds: linear regulator offers very low voltage ripple and noise, while the switching regulator provides optimal working conditions, avoiding large voltage difference between the input and output voltage of the linear regulator. Unlike the buck converter, a large difference between the input and the output voltage on the linear regulator lead to significant dissipation losses.

The Click board™ uses the LM2596, a 3A, step down voltage regulator working at 150 kHz, from Texas Instruments. It belongs to Simple Switcher™ line of products, meaning that it supports both continuous and discontinuous modes. This buck DC-DC converter itself can handle from 4.5V up to 40V, but the circuit works reliably with voltages in the range between 9V and 35V. This IC has a reasonably simple layout with just a few external pins. The output voltage of the DC-DC converter is regulated by the feedback loop. Normally, there is a voltage divider with its center pin routed to the FB pin of the LM2596, but on this Click board™, there is a PNP BJT with the 2.7V Zener diode on its emitter, which is used to provide about 3V more voltage on its output, than the desired target voltage. This provides an ideal voltage headroom for the linear regulator, allowing for greater efficiency and less power dissipation.

The linear voltage regulator is LM317, a well-established three terminal adjustable voltage regulator, from Texas Instruments. This IC is used on many voltage regulation designs, as it is very simple, reliable and does not require a big number of external components. The input voltage is provided from the LM2596 and as already mentioned, this voltage is about 3V greater than the target regulation voltage, allowing optimal headroom for LM317 IC. The ADJ pin is used to set the output voltage on this IC. It is driven by the output of the first op-amp of the LM358 IC, a dual operational amplifier, from Texas Instruments. The non-inverting input of this op-amp is controlled by the PWM signal from the MCU and therefore, the mikroBUS™ PWM pin is routed to this non-inverting input. By applying an additional RC filter, PWM signal is converted to a constant linear voltage ranging up to 3.3V, as it is limited by another Zener diode on this input. The inverting pin of this op-amp is connected to an output voltage divider, with its center tap at 3.3V for the maximum output voltage of 15V. This allows the output voltage to be measured by the host MCU. Therefore, this pin is routed to the mikroBUS™ AN pin.

The short circuit protection section is designed with the second op-amp of the LM358 IC, working as a comparator. When the current starts flowing through the 0.5? resistor, in the event of a short circuit on the output, it will cause rising of the op-amp output voltage. The red LED indicator labeled as OCP will be lit, indicating the short circuit condition. This will also cause the rising of the FB voltage of the buck regulator, effectively blocking its operation and cutting the power to the output.

NOTE: Do not connect GND IN to the GND externally, these rails should remain separated and connected to the respective terminal inputs on the Click board™ itself.

Specifications

Type Buck
Applications It can be used for precise voltage regulators, wall adapter regulators, general purpose power supplies, distributed supply regulators, and similar applications where voltage regulation with the low ripple and wide input voltage range is required.
On-board modules LM2596, a 3A, step down voltage regulator working at 150 kHz, from Texas Instruments; LM317, a three terminal adjustable voltage regulator, from Texas Instruments; LM358, a dual operational amplifier from Texas Instruments.
Key Features Low output voltage ripple, high efficiency and low dissipation losses, overcurrent and short circuit protection, thermal shutdown, a wide range of input voltage, adjustable voltage via PWM, output voltage read-out by the host MCU.
Interface Analog,PWM
Input Voltage 3.3V,5V
Click board size L (57.15 x 25.4 mm)

Pinout diagram

This table shows how the pinout on VREG 2 click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).

Notes Pin Mikrobus logo.png Pin Notes
Voltage sensing AN 1 AN PWM 16 PWM Control PWM
NC 2 RST INT 15 NC
NC 3 CS RX 14 NC
NC 4 SCK TX 13 NC
NC 5 MISO SCL 12 NC
NC 6 MOSI SDA 11 NC
NC 7 3.3V 5V 10 +5V Power Supply
Ground GND 8 GND GND 9 GND Ground

VREG 2 click electrical specifications

Description Min Typ Max Unit
Input voltage 9 - 35 V
Output voltage 2.25 - 15 V
Output current - 0.5 0.6 A
Short Circuit Current 0.8 0.9 1.5 A


Onboard settings and indicators

Label Name Default Description
LD1 PWR - Power LED indicator
LD2 OCP - Short circuit/overcurrent protection LED indicator
TB1 VIN - Input power supply connection terminal
TB2 VOUT - Regulated output connection terminal

Software support

We provide a library for VREG 2 click on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.

Library Description

This library provides parsing functions that will allow a user to control the
voltage output by inputting user-defined parameters.

Key functions:

  • void vreg2_workParameters(uint8_t setA, uint8_t setB, uint8_t setC, uint8_t setD) - Function for setting work parameters for setting the output voltage in %.
  • int8_t vreg2_incHandler(uint8_t *in); - If the setA parameter has been received this function will return the value of 1.
  • int8_t vreg2_decHandler(uint8_t *in); - If the setB parameter has been received this function will return the value of -1.
  • uint8_t vreg2_printHandler(uint16_t *pwm); - This function returns flags based on the internal parser state.

Examples Description

The application is composed of three sections:

  • System Initialization - Initializes GPIO structures.
  • Application Initialization - Initializes the GPIO driver and configures the PWM
    peripheral for controlling VREG2 voltage output.
  • Application Task - (code snippet) - Based on the data received from the UART
    the voltage output will be increased or decreased.
void applicationTask()
{
if( UART_Rdy_Ptr() )
{
rxDat[0] = UART_Rd_Ptr();
vreg2_eventTick();
}

pwmDuty += vreg2_incHandler( &rxDat );
pwmDuty += vreg2_decHandler( &rxDat ); 
vreg2_parseInput( &rxDat, &parseVoltage[0] , &pwmDuty );
temp = vreg2_printHandler( &pwmDuty );

if( temp == VREG2_VOLTAGE_SET )
{
WordToStr( pwmDuty, text );
mikrobus_logWrite( "Voltage set to : ", _LOG_TEXT );
mikrobus_logWrite( text, _LOG_TEXT );
mikrobus_logWrite( " %", _LOG_LINE );
}
if( temp == VREG2_BACKSPACE_PRESSED_HANDLE )
{
mikrobus_logWrite( " ", _LOG_LINE );
mikrobus_logWrite( parseVoltage, _LOG_TEXT );
}
if( temp == VREG2_CHARACTER_RECEIVED )
{
mikrobus_logWrite(rxDat,_LOG_TEXT);
}
if( temp == VREG2_NUMBER_PARSER_ENABLED )
{
mikrobus_logWrite( "Insert value from 1 to 99%", _LOG_LINE );
}

vreg2_set( pwmDuty );
rxDat[0] = 0;
}

Additional Functions:

  • void vreg2_set(uint16_t pwmIn) - Set's the PWM output from 0 to 100%.
  • void vreg2_pwmInit() - Initializes the PWM peripheral.

The full application code, and ready to use projects can be found on our Libstock page.

Other mikroE Libraries used in the example:

  • PWM Library
  • UART Library
  • Conversions Library
  • C_String Library

Additional notes and information

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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

mikroSDK

This click board is supported by 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.

View full details

Featured collection

The crazyflie is a versatile platform that is designed to engage people in learning about robotics and quadcopters.
1 of 25